1
This commit is contained in:
@@ -1074,6 +1074,11 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
|||||||
|
|
||||||
for k, _ := range valid {
|
for k, _ := range valid {
|
||||||
if earningInfoMap[k] != "" || marketInfoMap[k] != "" {
|
if earningInfoMap[k] != "" || marketInfoMap[k] != "" {
|
||||||
|
//增加权限校验
|
||||||
|
userRole, err := dao.GetUserRole(dao.GetDB(), []string{ctx.GetUserID()}, []int{model.RoleUpdateSettle})
|
||||||
|
if err != nil || len(userRole) == 0 {
|
||||||
|
return 0, errors.New(fmt.Sprintf("当前用户 [%v] 无权限修改此字段!", ctx.GetUserName()))
|
||||||
|
} else {
|
||||||
menus, _ := dao.GetMenuWithUser(dao.GetDB(), "结算权限", 0, 1, ctx.GetUserID())
|
menus, _ := dao.GetMenuWithUser(dao.GetDB(), "结算权限", 0, 1, ctx.GetUserID())
|
||||||
if len(menus) == 0 {
|
if len(menus) == 0 {
|
||||||
if marketInfoMap[k] != "" {
|
if marketInfoMap[k] != "" {
|
||||||
@@ -1087,6 +1092,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if len(valid) > 0 {
|
if len(valid) > 0 {
|
||||||
if globals.IsAddEvent {
|
if globals.IsAddEvent {
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ const (
|
|||||||
UserTypeOperator = 4
|
UserTypeOperator = 4
|
||||||
UserTypeBoss = 8
|
UserTypeBoss = 8
|
||||||
UserTypeRole = 16
|
UserTypeRole = 16
|
||||||
|
RoleUpdateSettle = 19 //修改市场权限
|
||||||
|
|
||||||
UserTypeNonConsumer = ^1
|
UserTypeNonConsumer = ^1
|
||||||
|
|
||||||
MemberTypeDiscountCard = 1 //会员折扣卡
|
MemberTypeDiscountCard = 1 //会员折扣卡
|
||||||
|
|||||||
Reference in New Issue
Block a user