...
|
...
|
@@ -153,17 +153,29 @@ func (svr *PgLoginService) CheckIsPartner(phone string, companyId int64) (ok boo |
|
|
return ok, nil
|
|
|
}
|
|
|
|
|
|
//合伙人登录
|
|
|
// 合伙人登录
|
|
|
func (svr *PgLoginService) PartnerLogin(phone string, password string) (err error) {
|
|
|
if len(svr.PartnerInfo) == 0 {
|
|
|
//子账号
|
|
|
err = protocol.NewErrWithMessage(502, err) //账号不存在
|
|
|
return
|
|
|
}
|
|
|
if !strings.EqualFold(svr.PartnerInfo[0].Password, password) {
|
|
|
|
|
|
var misMatch bool
|
|
|
for _, partnerInfo := range svr.PartnerInfo {
|
|
|
if !strings.EqualFold(partnerInfo.Password, password) {
|
|
|
misMatch = true
|
|
|
} else {
|
|
|
misMatch = false
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if misMatch {
|
|
|
err = protocol.NewCustomMessage(1, "密码输入错误!")
|
|
|
return
|
|
|
}
|
|
|
|
|
|
return
|
|
|
}
|
|
|
|
...
|
...
|
|