限制门店老板直接修改门店改价属性为:StoreChangePriceTypeBossDisabled的门店商品价格
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/auth2"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
@@ -156,3 +157,14 @@ func (ctx *Context) GetUserID() (userID string) {
|
||||
}
|
||||
return userID
|
||||
}
|
||||
|
||||
func (ctx *Context) GetFullUser() (user *model.User) {
|
||||
token := ctx.GetToken()
|
||||
authInfo, err2 := auth2.GetTokenInfo(token)
|
||||
if err2 == nil {
|
||||
if authInfo.TokenType == auth2.TokenTypeNormal {
|
||||
user, _ = dao.GetUserByID(dao.GetDB(), "user_id", authInfo.GetID())
|
||||
}
|
||||
}
|
||||
return user
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user