|
|
|
@ -291,14 +291,10 @@ public class PrivilageAccountServiceImpl extends ServiceImpl<PrivilageAccountDOM
|
|
|
|
|
|
|
|
|
|
//店长维护用户店铺关系1.店长。4.导购
|
|
|
|
|
if (shopId != null && (privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DZ.getRoleCode()) || privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DG.getRoleCode()))) {
|
|
|
|
|
QueryWrapper<PoiStoreStaff> oldStaffQw = new QueryWrapper<>();
|
|
|
|
|
oldStaffQw.eq("user_id", userId).eq("status", "1").last("limit 1");
|
|
|
|
|
PoiStoreStaff oldStaffs = poiStoreStaffDOMapper.selectOne(oldStaffQw);
|
|
|
|
|
|
|
|
|
|
QueryWrapper<PoiStoreStaff> staffQw = new QueryWrapper<>();
|
|
|
|
|
staffQw.eq("staff_code", account).eq("status", "1");
|
|
|
|
|
List<PoiStoreStaff> staffs = poiStoreStaffDOMapper.selectList(staffQw);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(staffs) && !oldStaffs.getStaffCode().equals(account)) {
|
|
|
|
|
if (CollectionUtils.isNotEmpty(staffs)) {
|
|
|
|
|
return AccountEnum.ACCOUNT_MODIFY_STATUS_STAFF_EXISTS.getType();
|
|
|
|
|
}
|
|
|
|
|
privilageDomainService.saveOneShop(userId, modifyAccountInput.getAccount(), shopId, modifyAccountInput.getType());
|
|
|
|
|