七月迭代短暂完结,还有很多后端的关键东西没有弄,这是一版赶时间做的东西
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
This commit is contained in:
@@ -38,6 +38,9 @@ func (s *UpdateService) Update(ctx context.Context, shopID uint, request *dto.Up
|
||||
if userType == constants.UserTypeAgent && request.BusinessOwnerAccountIDSet {
|
||||
return nil, errors.New(errors.CodeForbidden, "无权限设置店铺业务员")
|
||||
}
|
||||
if userType == constants.UserTypeAgent && request.ClientLoginDisabled != nil && middleware.GetShopIDFromContext(ctx) != shopID {
|
||||
return nil, errors.New(errors.CodeForbidden, "无权限修改其他店铺的C端登录限制")
|
||||
}
|
||||
if userType != constants.UserTypeSuperAdmin && userType != constants.UserTypePlatform && userType != constants.UserTypeAgent {
|
||||
return nil, errors.New(errors.CodeForbidden, "无权限操作该资源或资源不存在")
|
||||
}
|
||||
@@ -59,6 +62,9 @@ func (s *UpdateService) Update(ctx context.Context, shopID uint, request *dto.Up
|
||||
}
|
||||
shop.BusinessOwnerAccountID = ownerID
|
||||
}
|
||||
if request.ClientLoginDisabled != nil {
|
||||
shop.ClientLoginDisabled = *request.ClientLoginDisabled
|
||||
}
|
||||
shop.ShopName = request.ShopName
|
||||
shop.ContactName = request.ContactName
|
||||
shop.ContactPhone = request.ContactPhone
|
||||
|
||||
Reference in New Issue
Block a user