package serviceGateway import ( "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/constant" "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/serviceGateway/reply" "net/http" ) type HttpLibBusinessAdminServiceGateway struct { httpLibBaseServiceGateway } // GetUserAuth 请求企业平台确认用户是否可以使用 func (serviceGateway *HttpLibBusinessAdminServiceGateway) GetUserAuth(userId int64, platformId int) (*reply.BusinessAdminUserAuth, error) { businessAdminUserAuth := &reply.BusinessAdminUserAuth{} serviceGateway.CreateRequest(http.MethodPost, "/auth/get-user-auth") serviceGateway.SetBody(map[string]interface{}{ "userId": userId, "platformId": platformId, }) err := serviceGateway.ToJson(businessAdminUserAuth) return businessAdminUserAuth, err } func NewHttpLibBusinessAdminServiceGateway() *HttpLibBusinessAdminServiceGateway { return &HttpLibBusinessAdminServiceGateway{ httpLibBaseServiceGateway{ baseURL: constant.BUSINESS_ADMIN_SERVICE_HOST, }, } }