作者 唐旭辉

修复bug 登录

appname = partnermg
runmode = "${RUN_MODE||test}"
runmode = "${RUN_MODE||dev}"
httpport = "${HTTP_PORT||8082}"
#开启监控
... ...
... ... @@ -97,7 +97,7 @@ func (reponsitory CompanyRepository) FindOne(queryOptions domain.CompanyFindOneO
}
if queryOptions.AdminCompanyId > 0 {
hasCondition = true
query = query.Where("admin_company_id=?", queryOptions.Id)
query = query.Where("admin_company_id=?", queryOptions.AdminCompanyId)
}
if !hasCondition {
return domain.Company{}, errors.New("findOne 必须要有查询条件")
... ...
... ... @@ -21,6 +21,12 @@ func NewMmmBusinessAdminServiceGateway() *MmmBusinessAdminServiceGateway {
baseURL: constant.BUSINESS_ADMIN_HOST,
}
}
func (client MmmBusinessAdminServiceGateway) buildHeader() http.Header {
var h = http.Header{}
h.Set("Content-Type", "application/json")
h.Set("Accept", "application/json")
return h
}
type ResponseGetUserAuth struct {
UCenterCommonMsg
... ... @@ -41,6 +47,7 @@ func (gateway MmmBusinessAdminServiceGateway) httpDo(reqURL string, mathod strin
logs.Info("====>Send To URL:%s", reqURL)
logs.Info("====>Send To BusinessAdmin:%s", bt.String())
req, err := http.NewRequest(mathod, reqURL, bt)
req.Header = gateway.buildHeader()
if err != nil {
return nil, err
}
... ...