|
|
@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
|
|
import com.epmet.bean.ResiExportBaseInfoData; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.*; |
|
|
|
import com.epmet.commons.tools.distributedlock.DistributedLock; |
|
|
|
import com.epmet.commons.tools.dto.form.DictListFormDTO; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.dto.result.DictListResultDTO; |
|
|
@ -78,6 +79,7 @@ import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.compress.utils.Lists; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
import org.redisson.api.RLock; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -153,6 +155,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
private UserBaseInfoDao userBaseInfoDao; |
|
|
|
@Autowired |
|
|
|
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|
|
|
@Autowired |
|
|
|
private DistributedLock distributedLock; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -467,6 +471,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public String edit(TokenDto tokenDto, List<IcResiUserFormDTO> formDTO) { |
|
|
|
RLock lock = null; |
|
|
|
try { |
|
|
|
lock = distributedLock.getLock(RedisKeys.getXiaoquEditLock(tokenDto.getCustomerId()), 120L, 3L,TimeUnit.SECONDS); |
|
|
|
//1.校验主表数据是否存在
|
|
|
|
String resiUserId = ""; |
|
|
|
LinkedHashMap<String, String> map = new LinkedHashMap<>(); |
|
|
@ -656,6 +663,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
} |
|
|
|
} |
|
|
|
return resiUserId; |
|
|
|
} finally { |
|
|
|
distributedLock.unlock(lock); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -2209,7 +2219,6 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
return listPage.getResult(); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
public List<String> changeIcResiUserBelongTo(TokenDto tokenDto, IcUserBelongToChangedFormDTO formDTO) { |
|
|
|
List<String> resiUserIdList = baseDao.listUserIds(formDTO.getCustomerId(), formDTO.getSourceGridId()); |
|
|
|