Browse Source

Merge branch 'dev_special_focus_update'

master
zxc 3 years ago
parent
commit
41eb7a62c3
  1. 26
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/TopArticleFormDTO.java
  2. 11
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
  3. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java
  4. 17
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  5. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNoticeDTO.java
  6. 13
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java
  7. 3
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java
  8. 50
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeV2FormDTO.java
  9. 11
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
  10. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNoticeController.java
  11. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNoticeEntity.java
  12. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNoticeService.java
  13. 132
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java
  14. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java
  15. 10
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.71__icnotice_sendres.sql
  16. 7
      epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml
  17. 25
      epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml
  18. 1
      epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml

26
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/TopArticleFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Description
* @Author yzm
* @Date 2022/9/21 15:13
*/
@Data
public class TopArticleFormDTO {
/**
* 文章id
*/
@NotBlank(message = "文章id不能为空")
private String articleId;
/**
* top
* cancel_top
*/
@NotBlank(message = "type不能为空,置顶:top,取消置顶:cancel_top")
private String type;
}

11
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java

@ -424,6 +424,17 @@ public class ArticleController {
return new Result<PageData<PublishedListResultDTO>>().ok(articleService.articleListV2(formDTO));
}
/**
* 文章置顶取消置顶
* @param formDTO
* @return
*/
@PostMapping("topArticle")
public Result topArticle(@RequestBody TopArticleFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
articleService.topArticle(formDTO.getArticleId(),formDTO.getType());
return new Result();
}
/**
* @param tokenDTO
* @return

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java

@ -255,4 +255,6 @@ public interface ArticleService extends BaseService<ArticleEntity> {
PageData<PublishedListResultDTO> articleListV2(ArticleListFormDTO formDTO);
PublishedListResultDTO detailV2(ArticleListFormDTO formDTO);
void topArticle(String articleId, String type);
}

17
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -1775,4 +1775,21 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
return resultDTO;
}
@Override
public void topArticle(String articleId, String type) {
ArticleEntity articleEntity = baseDao.selectById(articleId);
if (null != articleEntity) {
/**
* top
* cancel_top
*/
if ("top".equals(type)) {
articleEntity.setIsTop(NumConstant.ONE);
} else if ("cancel_top".equals(type)) {
articleEntity.setIsTop(NumConstant.ZERO);
}
baseDao.updateById(articleEntity);
}
}
}

4
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNoticeDTO.java

@ -106,4 +106,8 @@ public class IcNoticeDTO implements Serializable {
@JsonIgnore
private Date updatedTime;
/**
* 发送结果1成功,0失败
*/
private String sendRes;
}

13
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java

@ -35,6 +35,9 @@ public class IcTripReportRecordDTO implements Serializable {
@ExcelIgnore
private String id;
@ExcelIgnore
private String epidemicId;
/**
* 居民端用户所在网格id,数字社区居民所属网格id
*/
@ -73,6 +76,11 @@ public class IcTripReportRecordDTO implements Serializable {
@ExcelProperty("手机号")
private String mobile;
/**
* 真实手机号不打码
*/
private String realMobile;
/**
* 身份证号
*/
@ -80,6 +88,11 @@ public class IcTripReportRecordDTO implements Serializable {
@ExcelProperty("身份证号")
private String idCard;
/**
* 真实身份证号
*/
private String realIdCard;
/**
* 用户id
*/

3
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java

@ -60,5 +60,8 @@ public class SendNoticeFormDTO implements Serializable {
* 身份证
*/
private String idCard;
private String realIdCard;
}
}

50
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeV2FormDTO.java

@ -0,0 +1,50 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.List;
/**
* @Description
* @Author yzm
* @Date 2022/9/21 17:06
*/
@Data
public class SendNoticeV2FormDTO {
// token获取
private String customerId;
private String staffId;
// 前端传入
/**
* 用户列表
*/
@NotEmpty(message = "业务数据id不能为空", groups = CustomerClientShowGroup.class)
private List<String> bdIds;
/**
* 通知渠道通知渠道 0小程序通知1短信通知
*/
@NotEmpty(message = "请选择通知渠道", groups = CustomerClientShowGroup.class)
private List<String> channel;
/**
* v1:通知来源 0 行程上报1 疫苗接种2 核酸检测
* v2:0行程上报1疫苗接种关注名单2重点人群关注名单-隔离防疫原核酸检测关注名单
*/
@NotEmpty(message = "通知来源不能为空", groups = CustomerClientShowGroup.class)
private String origin;
/**
* 通知内容
*/
@Size(min = 1, max = 500, message = "通知内容不超过500字", groups = CustomerClientShowGroup.class)
private String content;
// 接口内赋值
/**
* 组织名
*/
private String orgName;
}

11
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java

@ -38,10 +38,21 @@ public class VaccinationListResultDTO implements Serializable {
*/
private String mobile;
/**
* 真实手机号
*/
private String realMobile;
/**
* 身份证
*/
private String idCard;
/**
* 真实的身份证
*/
private String realIdCard;
private String sex;
/**

16
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNoticeController.java

@ -4,7 +4,6 @@ import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
@ -15,6 +14,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcNoticeDTO;
import com.epmet.dto.form.IcNoticeFormDTO;
import com.epmet.dto.form.SendNoticeFormDTO;
import com.epmet.dto.form.SendNoticeV2FormDTO;
import com.epmet.dto.form.SendPointNoticeFormDTO;
import com.epmet.dto.result.CommunityInfoResultDTO;
import com.epmet.feign.GovOrgFeignClient;
@ -108,4 +108,18 @@ public class IcNoticeController {
return new Result();
}
/**
* 行程上报重点人群关注名单疫苗接种关注名单这几个页面的发送通知
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("sendNoticeV2")
public Result sendNoticeV2(@LoginUser TokenDto tokenDto, @RequestBody SendNoticeV2FormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, CustomerClientShowGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
icNoticeService.sendNoticeV2(formDTO);
return new Result();
}
}

4
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNoticeEntity.java

@ -57,4 +57,8 @@ public class IcNoticeEntity extends BaseEpmetEntity {
*/
private String orgName;
/**
* 发送结果1成功,0失败
*/
private String sendRes;
}

7
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNoticeService.java

@ -5,6 +5,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcNoticeDTO;
import com.epmet.dto.form.IcNoticeFormDTO;
import com.epmet.dto.form.SendNoticeFormDTO;
import com.epmet.dto.form.SendNoticeV2FormDTO;
import com.epmet.dto.form.SendPointNoticeFormDTO;
import com.epmet.entity.IcNoticeEntity;
@ -115,4 +116,10 @@ public interface IcNoticeService extends BaseService<IcNoticeEntity> {
* @return
*/
Map<String, Date> getUserLatestNoticeTime(String customerId,List<String> idCardSet);
/**
* 行程上报重点人群关注名单疫苗接种关注名单这几个页面的发送通知
* @param formDTO
*/
void sendNoticeV2(SendNoticeV2FormDTO formDTO);
}

132
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java

@ -7,17 +7,23 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.*;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.ChannelEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.SmsTemplateConstant;
import com.epmet.constant.UserMessageTypeConstant;
import com.epmet.dao.IcEpidemicSpecialAttentionDao;
import com.epmet.dao.IcNoticeDao;
import com.epmet.dao.IcTripReportRecordDao;
import com.epmet.dto.IcNoticeDTO;
import com.epmet.dto.UserBaseInfoDTO;
import com.epmet.dto.form.*;
import com.epmet.entity.IcEpidemicSpecialAttentionEntity;
import com.epmet.entity.IcNoticeEntity;
import com.epmet.entity.IcTripReportRecordEntity;
import com.epmet.feign.MessageFeignClient;
import com.epmet.service.IcNoticeService;
import com.epmet.service.UserBaseInfoService;
@ -26,6 +32,7 @@ import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -47,6 +54,10 @@ public class IcNoticeServiceImpl extends BaseServiceImpl<IcNoticeDao, IcNoticeEn
private MessageFeignClient messageFeignClient;
@Resource
private UserBaseInfoService userBaseInfoService;
@Autowired
private IcTripReportRecordDao icTripReportRecordDao;
@Autowired
private IcEpidemicSpecialAttentionDao icEpidemicSpecialAttentionDao;
@Override
public PageData<IcNoticeDTO> page(IcNoticeFormDTO formDTO) {
@ -144,9 +155,11 @@ public class IcNoticeServiceImpl extends BaseServiceImpl<IcNoticeDao, IcNoticeEn
entity.setContent(formDTO.getContent());
entity.setOrigin(formDTO.getOrigin());
entity.setUserId(item.getUserId());
entity.setMobile(item.getMobile());
entity.setMobile(StringUtils.isNotBlank(item.getMobile()) ? item.getMobile() : "");
entity.setIdCard(item.getIdCard());
entity.setOrgName(finalOrgName);
// 发送结果:1成功,0失败 默认插入发送成功。下面没有找到居民端的用户id,会更新
entity.setSendRes(NumConstant.ONE_STR);
return entity;
}).collect(Collectors.toList());
insertBatch(entityList);
@ -158,40 +171,45 @@ public class IcNoticeServiceImpl extends BaseServiceImpl<IcNoticeDao, IcNoticeEn
entityList.forEach(item -> {
if (StringUtils.isNotBlank(item.getIdCard())) {
//根据身份证获取居民ID
//根据身份证获取居民ID 如果一个客户下,存在多个身份证号相同的而用户,该接口只返回一个
List<UserBaseInfoDTO> userList = userBaseInfoService.getCommonIdNumUser(item.getCustomerId(), item.getIdCard());
if (CollectionUtils.isNotEmpty(userList)) {
userList.forEach(user -> {
// userList.forEach(user -> {
UserBaseInfoDTO userBaseInfoDTO=userList.get(NumConstant.ZERO);
UserMessageFormDTO messageFormDTO = new UserMessageFormDTO();
messageFormDTO.setCustomerId(item.getCustomerId());
messageFormDTO.setApp(AppClientConstant.APP_GOV);
messageFormDTO.setGridId(StrConstant.STAR);
messageFormDTO.setUserId(user.getUserId());
messageFormDTO.setUserId(userBaseInfoDTO.getUserId());
messageFormDTO.setTitle("您有一条通知消息!");
messageFormDTO.setMessageContent(item.getContent());
messageFormDTO.setReadFlag(Constant.UNREAD);
messageFormDTO.setMessageType(UserMessageTypeConstant.ANTIEPIDEMIC);
messageFormDTO.setTargetId(item.getId());
msgList.add(messageFormDTO);
});
item.setUserId(userBaseInfoDTO.getUserId());
// });
}else{
// 没有找到居民端的用户id,发送失败
item.setSendRes(NumConstant.ZERO_STR);
}
baseDao.updateById(item);
}
//TODO 短信消息
if (StringUtils.isNotBlank(item.getMobile())) {
/*if (StringUtils.isNotBlank(item.getMobile())) {
ProjectSendMsgFormDTO sms = new ProjectSendMsgFormDTO();
sms.setCustomerId(item.getCustomerId());
sms.setMobile(item.getMobile());
sms.setAliyunTemplateCode(SmsTemplateConstant.PROJECT_OVERDUE);
sms.setParameterKey("send_msg");
smsList.add(sms);
}
}*/
});
//发送小程序消息
Result result = messageFeignClient.saveUserMessageList(msgList);
if (!result.success()) {
log.error("发送小程序消息失败" + JSON.toJSONString(result));
}
//TODO 发送短信
}
/**
@ -326,4 +344,102 @@ public class IcNoticeServiceImpl extends BaseServiceImpl<IcNoticeDao, IcNoticeEn
return map;
}
/**
* 行程上报重点人群关注名单疫苗接种关注名单这几个页面的发送通知
*
* @param formDTO
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void sendNoticeV2(SendNoticeV2FormDTO formDTO) {
String orgName = "";
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null != staffInfo) {
orgName = staffInfo.getAgencyName();
}
// 保存消息
String channel = StringUtils.join(formDTO.getChannel(), StrConstant.COMMA);
String finalOrgName = orgName;
List<SendNoticeFormDTO.UserListBean> userBeanList = null;
List<IcNoticeEntity> entityList = new ArrayList<>();
for (String bdId : formDTO.getBdIds()) {
IcNoticeEntity entity = new IcNoticeEntity();
entity.setCustomerId(formDTO.getCustomerId());
entity.setChannel(channel);
entity.setContent(formDTO.getContent());
entity.setOrigin(formDTO.getOrigin());
// 这时候还不知道居民端的用户id
entity.setUserId(StrConstant.EPMETY_STR);
entity.setOrgName(finalOrgName);
// 发送结果:1成功,0失败 默认插入发送成功。下面没有找到居民端的用户id,会更新
entity.setSendRes(NumConstant.ONE_STR);
// v2:0行程上报,1疫苗接种关注名单,2隔离防疫原核酸检测
// 身份证号手机号
if (NumConstant.ZERO_STR.equals(formDTO.getOrigin())) {
IcTripReportRecordEntity icTripReportRecordEntity = icTripReportRecordDao.selectById(bdId);
if(null==icTripReportRecordEntity){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "ic_trip_report_record不存在id=" + bdId + "的记录", "获取身份证手机号为空");
}
entity.setMobile(icTripReportRecordEntity.getMobile());
entity.setIdCard(icTripReportRecordEntity.getIdCard());
} else if (NumConstant.ONE_STR.equals(formDTO.getOrigin()) || NumConstant.TWO_STR.equals(formDTO.getOrigin())) {
IcEpidemicSpecialAttentionEntity icEpidemicSpecialAttentionEntity = icEpidemicSpecialAttentionDao.selectById(bdId);
if (null == icEpidemicSpecialAttentionEntity) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "ic_epidemic_special_attention不存在id=" + bdId + "的记录", "获取身份证手机号为空");
}
entity.setMobile(icEpidemicSpecialAttentionEntity.getMobile());
entity.setIdCard(icEpidemicSpecialAttentionEntity.getIdCard());
}
entityList.add(entity);
}
if (CollectionUtils.isEmpty(entityList)) {
return;
}
insertBatch(entityList);
// 通知渠道通知渠道 0小程序通知,1短信通知
for (String channelValue : formDTO.getChannel()) {
if ("0".equals(channelValue)) {
// 小程序通知
List<UserMessageFormDTO> msgList = new ArrayList<>();
entityList.forEach(item -> {
// 根据身份证获取居民ID 如果一个客户下,存在多个身份证号相同的而用户,该接口只返回一个
List<UserBaseInfoDTO> userList = userBaseInfoService.getCommonIdNumUser(item.getCustomerId(), item.getIdCard());
if (CollectionUtils.isNotEmpty(userList)) {
UserBaseInfoDTO userBaseInfoDTO = userList.get(NumConstant.ZERO);
UserMessageFormDTO messageFormDTO = new UserMessageFormDTO();
messageFormDTO.setCustomerId(item.getCustomerId());
messageFormDTO.setApp(AppClientConstant.APP_GOV);
messageFormDTO.setGridId(StrConstant.STAR);
messageFormDTO.setUserId(userBaseInfoDTO.getUserId());
messageFormDTO.setTitle("您有一条通知消息!");
messageFormDTO.setMessageContent(item.getContent());
messageFormDTO.setReadFlag(Constant.UNREAD);
messageFormDTO.setMessageType(UserMessageTypeConstant.ANTIEPIDEMIC);
messageFormDTO.setTargetId(item.getId());
msgList.add(messageFormDTO);
item.setUserId(userBaseInfoDTO.getUserId());
} else {
// 没有找到居民端的用户id,发送失败
item.setSendRes(NumConstant.ZERO_STR);
}
baseDao.updateById(item);
});
// 发送小程序消息-站内信
Result result = messageFeignClient.saveUserMessageList(msgList);
if (!result.success()) {
log.warn("发送小程序消息失败" + JSON.toJSONString(result));
}
} else {
// 短信通知再说 todo
}
}
}
}

1
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java

@ -221,6 +221,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
//关注类型,核酸检测:2,疫苗接种:1;行程上报:0
dto.setAttentionType(NumConstant.TWO);
dto.setReason("有重点区域行程");
dto.setIsolatedState(NumConstant.ONE_STR);
list.add(dto);
vaccinationAddFormDTO.setList(list);
epidemicSpecialAttentionService.vaccinationAdd( vaccinationAddFormDTO);

10
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.71__icnotice_sendres.sql

@ -0,0 +1,10 @@
ALTER TABLE ic_notice ADD COLUMN SEND_RES VARCHAR ( 1 ) NOT NULL DEFAULT '1' COMMENT '发送结果:1成功,0失败' after ORG_NAME;
update ic_notice n
set n.SEND_RES='1'
where n.USER_ID is not null
and n.USER_ID !='';
update ic_notice n
set n.SEND_RES='0'
where (n.USER_ID is null
or n.USER_ID ='');

7
epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml

@ -71,7 +71,9 @@
SELECT a.id,
a.`NAME`,
a.MOBILE,
a.MOBILE as realMobile,
a.ID_CARD,
a.ID_CARD as realIdCard,
IFNULL(a.reason,'') AS reason,
a.REMARK,
b.VILLAGE_ID,
@ -86,13 +88,14 @@
WHERE a.DEL_FLAG = 0
AND concat(a.pids,':',ORG_ID) like concat('%',#{orgId},'%')
AND a.ATTENTION_TYPE = #{attentionType}
AND a.IS_ATTENTION = 1
<if test='null != name and "" != name'>
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
</if>
<if test='null != mobile and "" != mobile'>
AND a.MOBILE LIKE CONCAT('%',#{mobile},'%')
</if>
<if test='null != mobile and "" != mobile'>
<if test='null != idCard and "" != idCard'>
AND a.ID_CARD LIKE CONCAT('%',#{idCard},'%')
</if>
<if test='null != villageId and "" != villageId'>
@ -125,7 +128,9 @@
a.`NAME`,
a.customer_id as customerId,
a.MOBILE,
a.MOBILE as realMobile,
a.ID_CARD,
a.ID_CARD as realIdCard,
a.REMARK,
a.REASON,
b.VILLAGE_ID,

25
epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml

@ -26,35 +26,38 @@
<select id="pageList" parameterType="com.epmet.dto.form.PageTripReportFormDTO" resultType="com.epmet.dto.IcTripReportRecordDTO">
SELECT
r.*,
r.CREATED_TIME AS reportTime
FROM
ic_trip_report_record r
a.ID AS epidemicId,
r.CREATED_TIME AS reportTime,
r.ID_CARD as realIdCard,
r.MOBILE as realMobile
FROM ic_trip_report_record r
LEFT JOIN ic_epidemic_special_attention a ON (a.ID_CARD = r.ID_CARD AND a.DEL_FLAG = 0 AND a.IS_ATTENTION = 1 AND a.ATTENTION_TYPE = 2)
WHERE
r.DEL_FLAG = '0'
AND r.CUSTOMER_ID = #{customerId}
<if test='null != agencyId and "" != agencyId'>
AND (AGENCY_ID = #{agencyId} OR pids like concat('%', #{agencyId}, '%'))
AND (r.AGENCY_ID = #{agencyId} OR r.pids like concat('%', #{agencyId}, '%'))
</if>
<if test='null != name and "" != name'>
AND NAME like concat('%',#{name},'%')
AND r.NAME like concat('%',#{name},'%')
</if>
<if test='null != mobile and "" != mobile'>
AND MOBILE like concat('%',#{mobile},'%')
AND r.MOBILE like concat('%',#{mobile},'%')
</if>
<if test='null != idCard and "" != idCard'>
AND ID_CARD like concat('%',#{idCard},'%')
AND r.ID_CARD like concat('%',#{idCard},'%')
</if>
<if test='null != sourceAddressCode and "" != sourceAddressCode'>
AND SOURCE_ADDRESS_CODE like concat(#{sourceAddressCode},'%')
AND r.SOURCE_ADDRESS_CODE like concat(#{sourceAddressCode},'%')
</if>
<if test='null != sourceAddress and "" != sourceAddress'>
AND SOURCE_ADDRESS like concat('%',#{sourceAddress},'%')
AND r.SOURCE_ADDRESS like concat('%',#{sourceAddress},'%')
</if>
<if test='null != startDate and "" != startDate'>
AND ARRIVE_DATE <![CDATA[ >= ]]> #{startDate}
AND r.ARRIVE_DATE <![CDATA[ >= ]]> #{startDate}
</if>
<if test='null != endDate and "" != endDate'>
AND ARRIVE_DATE <![CDATA[ <= ]]> #{endDate}
AND r.ARRIVE_DATE <![CDATA[ <= ]]> #{endDate}
</if>
<if test='null != id and "" != id'>
AND r.id=#{id}

1
epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml

@ -128,6 +128,7 @@
WHERE DEL_FLAG = '0'
AND customer_id = #{customerId}
and id_num=#{idNum}
limit 1
</select>
<select id="selectCountIdNum" parameterType="map" resultType="java.lang.Integer">

Loading…
Cancel
Save