Browse Source

Merge remote-tracking branch 'origin/dev_compare_data'

master
yinzuomei 3 years ago
parent
commit
babd8019ff
  1. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatUserInfoResultDTO.java
  2. 13
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java
  3. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java
  4. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java
  5. 12
      epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatUserInfoResultDTO.java

@ -32,4 +32,9 @@ public class NatUserInfoResultDTO implements Serializable {
* 18大类 某一类的 是否值用于比较 同步数据结果确定是否要插入到表中
*/
private String categoryColumn;
/**
* ic_nat表ID
*/
private String id;
}

13
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java

@ -25,6 +25,7 @@ import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.service.IcEpidemicSpecialAttentionService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.FilenameUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -243,4 +244,16 @@ public class IcEpidemicSpecialAttentionController {
return new Result<NatPieResultDTO>().ok(icEpidemicSpecialAttentionService.pie(tokenDto));
}
/**
* 批量删除 ic_epidemic_special_attention
* @param ids
* @return
*/
@PostMapping("delete")
public Result delete(@RequestBody List<String> ids){
if(CollectionUtils.isNotEmpty(ids)){
icEpidemicSpecialAttentionService.delete(ids);
}
return new Result();
}
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java

@ -82,7 +82,7 @@ public interface IcEpidemicSpecialAttentionService extends BaseService<IcEpidemi
* @author generator
* @date 2022-03-28
*/
void delete(String[] ids);
void delete(List<String> ids);
/**
* Desc: 疫苗接种关注名单疫苗接种关注名单列表

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java

@ -131,9 +131,9 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
public void delete( List<String> ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
baseDao.deleteBatchIds(ids);
}
/**

12
epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml

@ -158,6 +158,7 @@
<select id="getExistNatInfo" resultType="com.epmet.dto.result.NatUserInfoResultDTO">
<foreach collection="list" item="l" separator="UNION ALL">
SELECT
ID,
USER_ID,
ID_CARD
FROM ic_nat
@ -194,30 +195,29 @@
<trim prefix="set" suffixOverrides=",">
<trim prefix="NAT_TIME =(case" suffix="end),">
<foreach collection="list" item="l">
when USER_ID = #{l.userId} AND ID_CARD = #{l.idCard} then #{l.natTime}
when ID = #{l.id} then #{l.natTime}
</foreach>
</trim>
<trim prefix="NAT_ADDRESS =(case" suffix="end),">
<foreach collection="list" item="l">
when USER_ID = #{l.userId} AND ID_CARD = #{l.idCard} then #{l.natAddress}
when ID = #{l.id} then #{l.natAddress}
</foreach>
</trim>
<trim prefix="NAT_RESULT =(case" suffix="end),">
<foreach collection="list" item="l">
when USER_ID = #{l.userId} AND ID_CARD = #{l.idCard} then #{l.natResult}
when ID = #{l.id} then #{l.natResult}
</foreach>
</trim>
<trim prefix="MOBILE =(case" suffix="end),">
<foreach collection="list" item="l">
when USER_ID = #{l.userId} AND ID_CARD = #{l.idCard} then #{l.mobile}
when ID = #{l.id} then #{l.mobile}
</foreach>
</trim>
UPDATED_TIME = NOW()
</trim>
WHERE DEL_FLAG = '0'
<foreach collection="list" item="l" separator=",">
AND USER_ID = #{l.userId}
AND ID_CARD = #{l.idCard}
AND ID = #{l.id}
</foreach>
</update>

Loading…
Cancel
Save