feat: 单卡回收接口优化 & 店铺禁用登录拦截
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m0s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m0s
单卡回收优化: - 移除 from_shop_id 参数,系统自动识别卡所属店铺 - 保持直属下级限制,混合来源分别处理 - 新增 GetDistributedStandaloneByICCIDRange/GetDistributedStandaloneByFilters 方法 店铺禁用拦截: - 登录时检查关联店铺状态,禁用店铺无法登录 - 新增 CodeShopDisabled 错误码 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -71,7 +71,7 @@ func (s *Service) Create(ctx context.Context, req *dto.CreateShopRequest) (*dto.
|
||||
// 验证默认角色:必须存在、是客户角色且已启用
|
||||
defaultRole, err := s.roleStore.GetByID(ctx, req.DefaultRoleID)
|
||||
if err != nil {
|
||||
return nil, errors.New(errors.CodeNotFound, "默认角色不存在")
|
||||
return nil, errors.New(errors.CodeNotFound, "请选择默认角色")
|
||||
}
|
||||
if defaultRole.RoleType != constants.RoleTypeCustomer {
|
||||
return nil, errors.New(errors.CodeInvalidParam, "店铺默认角色必须是客户角色")
|
||||
|
||||
Reference in New Issue
Block a user