...
|
...
|
@@ -8,6 +8,7 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/svr"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/utils"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/log"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/protocol"
|
|
|
"strings"
|
|
|
"time"
|
...
|
...
|
@@ -46,6 +47,10 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp |
|
|
return
|
|
|
}
|
|
|
}
|
|
|
if !partnerInfo.IsEnable() {
|
|
|
err = protocol.NewErrWithMessage(2002) //账号禁用
|
|
|
return
|
|
|
}
|
|
|
switch request.GrantType {
|
|
|
case protocol.LoginByPassword:
|
|
|
if len(partnerInfo.Password) == 0 {
|
...
|
...
|
@@ -76,6 +81,7 @@ func SmsCode(request *protocol.SmsCodeRequest) (rsp *protocol.SmsCodeResponse, e |
|
|
if msg, ok := data["msg"]; ok {
|
|
|
err = protocol.NewCustomMessage(1, msg.(string))
|
|
|
}
|
|
|
log.Error(err, data)
|
|
|
return
|
|
|
}
|
|
|
return
|
...
|
...
|
|