| | |
| | | |
| | | @Override |
| | | public R export(ComActAcidRecordDTO comActAcidRecordDTO) { |
| | | List<ComActAcidRecordExcelVO> comActAcidRecordExcelVOS=this.baseMapper.export(comActAcidRecordDTO); |
| | | List<ComActAcidRecordExcelReturn> comActAcidRecordExcelVOS=this.baseMapper.export(comActAcidRecordDTO); |
| | | comActAcidRecordExcelVOS.forEach(comActAcidRecordExcelVO -> { |
| | | if(StringUtils.isNotEmpty(comActAcidRecordExcelVO.getTouristCity())&&comActAcidRecordExcelVO.getTouristCity().contains("[")){ |
| | | JSONArray jsonArray = JSON.parseArray(comActAcidRecordExcelVO.getTouristCity()); |
| | |
| | | } |
| | | if(StringUtils.isEmpty(comActAcidRecordVO.getLocalCity())){ |
| | | rabbitTemplate.convertAndSend("huacheng.acid.exchange", "huacheng.acid.key", comActAcidRecordVO, message -> { |
| | | message.getMessageProperties().setHeader("x-delay", 24*60*60*1000); |
| | | message.getMessageProperties().setHeader("x-delay", 2*60*60*1000); |
| | | return message; |
| | | }); |
| | | } |
| | |
| | | } |
| | | return R.ok(comAcidStaticVOS); |
| | | } |
| | | |
| | | @Override |
| | | public R updateLocalCity(ComActAcidRecordVO comActAcidRecordVO) { |
| | | ComActAcidRecord comActAcidRecord=new ComActAcidRecord(); |
| | | BeanUtils.copyProperties(comActAcidRecordVO,comActAcidRecord); |
| | | if(StringUtils.isNotEmpty(comActAcidRecord.getLocalCity())){ |
| | | ComActAcidDangerMember comActAcidDangerMember= comActAcidDangerMemberDao.selectOne(new QueryWrapper<ComActAcidDangerMember>().lambda().eq(ComActAcidDangerMember::getRecordId,comActAcidRecordVO.getId())); |
| | | if(comActAcidDangerMember!=null){ |
| | | if(comActAcidDangerMember.getType()==2){ |
| | | this.comActAcidDangerMemberDao.deleteById(comActAcidDangerMember.getId()); |
| | | } |
| | | else { |
| | | comActAcidDangerMember.setRelationName(comActAcidRecord.getLocalCity()); |
| | | this.comActAcidDangerMemberDao.updateById(comActAcidDangerMember); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(this.baseMapper.updateById(comActAcidRecord)); |
| | | } |
| | | } |