- check validation of jxstore in verifyMobileIsBlank
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/model/legacymodel"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
@@ -156,7 +157,13 @@ func verifyMobileIsBlank(db *dao.DaoDB, mobile string) (user *legacymodel.WeiXin
|
||||
err = nil
|
||||
}
|
||||
} else if user.JxStoreID != 0 {
|
||||
err = fmt.Errorf("%s本身已经是门店:%d的组长", mobile, user.JxStoreID)
|
||||
store := &model.Store{}
|
||||
store.ID = user.JxStoreID
|
||||
if err = dao.GetEntity(db, store); err == nil {
|
||||
err = fmt.Errorf("%s本身已经是门店:%d的组长", mobile, user.JxStoreID)
|
||||
} else if dao.IsNoRowsError(err) {
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return user, err
|
||||
|
||||
Reference in New Issue
Block a user