fix:店员可编辑店长问题处理
This commit is contained in:
parent
a81faf4ba4
commit
f3e11fd368
@ -148,6 +148,7 @@ public enum ResultCode {
|
||||
CLERK_ALREADY_EXIT_ERROR(20030, "店员已经存在"),
|
||||
CLERK_DISABLED_ERROR(20031, "店员已禁用"),
|
||||
CLERK_CURRENT_SUPPER(20032, "无法删除当前登录店员"),
|
||||
CANT_EDIT_CLERK_SHOPKEEPER(20033, "无法在店员管理编辑店员信息"),
|
||||
/**
|
||||
* 权限
|
||||
*/
|
||||
|
@ -148,6 +148,10 @@ public class ClerkServiceImpl extends ServiceImpl<ClerkMapper, Clerk> implements
|
||||
@Override
|
||||
public Clerk updateClerk(ClerkEditDTO clerkEditDTO) {
|
||||
Clerk clerk = this.getById(clerkEditDTO.getId());
|
||||
if(clerk.getShopkeeper()){
|
||||
throw new ServiceException(ResultCode.CANT_EDIT_CLERK_SHOPKEEPER);
|
||||
}
|
||||
|
||||
if (clerk != null) {
|
||||
//校验当前店员是否是当前店铺的
|
||||
if (!clerk.getStoreId().equals(UserContext.getCurrentUser().getStoreId())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user