Browse Source

Merge remote-tracking branch 'remotes/origin/dev_bugfix_ljj'

dev
jianjun 3 years ago
parent
commit
74ee47f64e
  1. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java
  2. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  3. 20
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java

@ -99,9 +99,7 @@ public class NeighborHoodController {
lock = distributedLock.getLock(RedisKeys.getXiaoquEditLock(tokenDTO.getCustomerId()), 120L, 3L, TimeUnit.SECONDS); lock = distributedLock.getLock(RedisKeys.getXiaoquEditLock(tokenDTO.getCustomerId()), 120L, 3L, TimeUnit.SECONDS);
neighborHoodService.updateNeighborhood(customerId,formDTO); neighborHoodService.updateNeighborhood(customerId,formDTO);
} finally { } finally {
if (lock != null) { distributedLock.unLock(lock);
lock.unlock();
}
} }
return new Result(); return new Result();
} }

5
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -49,7 +49,6 @@ import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.*; import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.OrgInfoConstant;
import com.epmet.constant.SystemMessageType; import com.epmet.constant.SystemMessageType;
import com.epmet.constants.ImportTaskConstants; import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.IcResiUserDTO;
@ -261,9 +260,7 @@ public class IcResiUserController implements ResultDataResolver {
this.sendVolunteerMsg(tokenDto.getCustomerId(), resiUserId); this.sendVolunteerMsg(tokenDto.getCustomerId(), resiUserId);
} finally { } finally {
if (lock != null) { distributedLock.unLock(lock);
lock.unlock();
}
} }
return new Result(); return new Result();
} }

20
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -79,7 +79,6 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.compress.utils.Lists; import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.redisson.api.RLock;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -2214,9 +2213,22 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
return listPage.getResult(); return listPage.getResult();
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public List<String> changeIcResiUserBelongTo(TokenDto tokenDto, IcUserBelongToChangedFormDTO formDTO) { public List<String> changeIcResiUserBelongTo(TokenDto tokenDto, IcUserBelongToChangedFormDTO formDTO) {
List<String> resiUserIdList = baseDao.listUserIds(formDTO.getCustomerId(), formDTO.getSourceGridId());
if (StringUtils.isBlank(formDTO.getCustomerId()) || StringUtils.isBlank(formDTO.getSourceGridId())
||StringUtils.isBlank(formDTO.getTargetGridId())){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"参数错误","参数错误");
}
IcResiUserEntity entity = new IcResiUserEntity();
entity.setGridId(formDTO.getTargetGridId());
LambdaQueryWrapper<IcResiUserEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcResiUserEntity::getGridId,formDTO.getSourceGridId())
.eq(IcResiUserEntity::getCustomerId,formDTO.getCustomerId());
baseDao.update(entity,wrapper);
//不调用原来的更新居民了 太慢
/*List<String> resiUserIdList = baseDao.listUserIds(formDTO.getCustomerId(), formDTO.getSourceGridId());
if (CollectionUtils.isEmpty(resiUserIdList)) { if (CollectionUtils.isEmpty(resiUserIdList)) {
return null; return null;
} }
@ -2235,8 +2247,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
map.put(FieldConstant.ID, userId); map.put(FieldConstant.ID, userId);
this.edit(tokenDto, icResiUserFormDTOS); this.edit(tokenDto, icResiUserFormDTOS);
}); });
*/
return resiUserIdList; return null;
} }
/** /**

Loading…
Cancel
Save