diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/domain/HealthPersonInfo.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/domain/HealthPersonInfo.java index e908afe..eca2906 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/domain/HealthPersonInfo.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/domain/HealthPersonInfo.java @@ -175,5 +175,5 @@ public class HealthPersonInfo extends BaseEntity { private String doctorAdvices; private String placeIds; private String deptIds; - + private String encryptedSearchValue; } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java index e427e01..85152b3 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java @@ -50,6 +50,8 @@ public class HealthPersonInfoServiceImpl implements IHealthPersonInfoService { */ @Override public List selectHealthPersonInfoList(HealthPersonInfo healthPersonInfo) { + String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(healthPersonInfo.getArticleTitle()); + healthPersonInfo.setEncryptedSearchValue(encryptedSearchValue); List list=healthPersonInfoMapper.selectHealthPersonInfoList(healthPersonInfo); if(CollUtil.isNotEmpty(list)) { for(HealthPersonInfo vo : list) { diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonInfoMapper.xml index 9007687..d45ed53 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonInfoMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/health/HealthPersonInfoMapper.xml @@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join health_person_body_record d on a.user_id = d.user_id and d.if_latest = 1 where 1 = 1 - and(a.nick_name like concat('%', #{articleTitle}, '%') or a.phonenumber like concat('%', #{articleTitle}, '%') or b.doctor_num like concat('%', #{articleTitle}, '%')) + and(a.nick_name like concat('%', #{articleTitle}, '%') or a.phonenumber like concat('%', #{encryptedSearchValue}, '%') or b.doctor_num like concat('%', #{articleTitle}, '%')) and c.chronic_id in (${chronicIds})