ソースを参照

手机号加密&数据库表维护

lmx 2 週間 前
コミット
610661f577

+ 1 - 0
fs-company/src/main/java/com/fs/company/controller/company/CompanyVoiceRoboticCallLogCallphoneController.java

@@ -55,6 +55,7 @@ public class CompanyVoiceRoboticCallLogCallphoneController extends BaseControlle
                 companyVoiceRoboticCallLogCallphone.setCallerIds(calleeIds);
                 companyVoiceRoboticCallLogCallphone.setCallerIds(calleeIds);
                 startPage();
                 startPage();
                 List<CompanyVoiceRoboticCallLogCallphone> list = companyVoiceRoboticCallLogCallphoneService.selectCompanyVoiceRoboticCallLogCallphoneListData(companyVoiceRoboticCallLogCallphone);
                 List<CompanyVoiceRoboticCallLogCallphone> list = companyVoiceRoboticCallLogCallphoneService.selectCompanyVoiceRoboticCallLogCallphoneListData(companyVoiceRoboticCallLogCallphone);
+
                 return getDataTable(list);
                 return getDataTable(list);
             } else {
             } else {
                 return getDataTable(new ArrayList<>());
                 return getDataTable(new ArrayList<>());

+ 8 - 0
fs-company/src/main/java/com/fs/company/controller/crm/CrmCustomerController.java

@@ -80,6 +80,10 @@ public class CrmCustomerController extends BaseController
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         PageHelper.startPage(param.getPageNum(), param.getPageSize());
         PageHelper.startPage(param.getPageNum(), param.getPageSize());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
+        if(!StringUtils.isEmpty(param.getEncryptedMobile())){
+            param.setMobile(PhoneUtil.encryptPhone(param.getEncryptedMobile()));
+            param.setEncryptedMobile(null);
+        }
         List<CrmLineCustomerListQueryVO> list = crmCustomerService.selectCrmLineCustomerListQuery(param);
         List<CrmLineCustomerListQueryVO> list = crmCustomerService.selectCrmLineCustomerListQuery(param);
         if (list != null) {
         if (list != null) {
             for (CrmLineCustomerListQueryVO vo : list) {
             for (CrmLineCustomerListQueryVO vo : list) {
@@ -195,6 +199,10 @@ public class CrmCustomerController extends BaseController
         if(!StringUtils.isEmpty(param.getCreateTimeRange())){
         if(!StringUtils.isEmpty(param.getCreateTimeRange())){
             param.setCustomerCreateTime(param.getCreateTimeRange().split("--"));
             param.setCustomerCreateTime(param.getCreateTimeRange().split("--"));
         }
         }
+        if(!StringUtils.isEmpty(param.getEncryptedMobile())){
+            param.setMobile(PhoneUtil.encryptPhone(param.getEncryptedMobile()));
+            param.setEncryptedMobile(null);
+        }
         List<CrmMyCustomerListQueryVO> list = crmCustomerService.selectCrmMyCustomerListQuery(param);
         List<CrmMyCustomerListQueryVO> list = crmCustomerService.selectCrmMyCustomerListQuery(param);
         if (list != null) {
         if (list != null) {
             for (CrmMyCustomerListQueryVO vo : list) {
             for (CrmMyCustomerListQueryVO vo : list) {

+ 2 - 1
fs-service/src/main/java/com/fs/company/service/impl/CompanyVoiceRoboticCallLogCallphoneServiceImpl.java

@@ -29,6 +29,7 @@ import com.fs.company.vo.CompanyVoiceRoboticCallLogCount;
 import com.fs.company.vo.easycall.EasyCallCallPhoneVO;
 import com.fs.company.vo.easycall.EasyCallCallPhoneVO;
 import com.fs.core.config.TenantConfigContext;
 import com.fs.core.config.TenantConfigContext;
 import com.fs.crm.service.ICrmCustomerPropertyService;
 import com.fs.crm.service.ICrmCustomerPropertyService;
+import com.fs.his.utils.PhoneUtil;
 import com.fs.qw.domain.QwUser;
 import com.fs.qw.domain.QwUser;
 import com.fs.qw.mapper.QwUserMapper;
 import com.fs.qw.mapper.QwUserMapper;
 import com.fs.sensitive.DTO.AgentSensitiveWordDetectResultDTO;
 import com.fs.sensitive.DTO.AgentSensitiveWordDetectResultDTO;
@@ -357,7 +358,7 @@ public class CompanyVoiceRoboticCallLogCallphoneServiceImpl extends ServiceImpl<
                     companyVoiceRoboticCallLog.setRecordPath(result.getWavfile());
                     companyVoiceRoboticCallLog.setRecordPath(result.getWavfile());
                     companyVoiceRoboticCallLog.setCallType(2);
                     companyVoiceRoboticCallLog.setCallType(2);
                     companyVoiceRoboticCallLog.setContentList(result.getDialogue());
                     companyVoiceRoboticCallLog.setContentList(result.getDialogue());
-                    companyVoiceRoboticCallLog.setCallerNum(result.getTelephone());
+                    companyVoiceRoboticCallLog.setCallerNum(PhoneUtil.encryptPhone(result.getTelephone()));
                     companyVoiceRoboticCallLog.setCalleeNum(result.getCallerNumber());
                     companyVoiceRoboticCallLog.setCalleeNum(result.getCallerNumber());
                     companyVoiceRoboticCallLog.setUuid(result.getUuid());
                     companyVoiceRoboticCallLog.setUuid(result.getUuid());
                     Long createTime = result.getCalloutTime();
                     Long createTime = result.getCalloutTime();

+ 3 - 0
fs-service/src/main/java/com/fs/crm/param/CrmLineCustomerListQueryParam.java

@@ -25,6 +25,9 @@ public class CrmLineCustomerListQueryParam extends BaseQueryParam
     @Excel(name = "手机")
     @Excel(name = "手机")
     private String mobile;
     private String mobile;
 
 
+    /** 加密手机 */
+    private String encryptedMobile;
+
     /** 性别 */
     /** 性别 */
     @Excel(name = "性别",readConverterExp = "1=男,2=女")
     @Excel(name = "性别",readConverterExp = "1=男,2=女")
     private Integer sex;
     private Integer sex;

+ 3 - 0
fs-service/src/main/java/com/fs/crm/param/CrmMyCustomerListQueryParam.java

@@ -27,6 +27,9 @@ public class CrmMyCustomerListQueryParam extends BaseQueryParam
     @Excel(name = "手机")
     @Excel(name = "手机")
     private String mobile;
     private String mobile;
 
 
+    /** 加密手机 */
+    private String encryptedMobile;
+
     /** 性别 */
     /** 性别 */
     @Excel(name = "性别",readConverterExp = "1=男,2=女")
     @Excel(name = "性别",readConverterExp = "1=男,2=女")
     private Integer sex;
     private Integer sex;

+ 2 - 2
fs-service/src/main/resources/db/tenant-initTable.sql

@@ -3073,8 +3073,8 @@ CREATE TABLE `crm_customer`
     `historical_communication` text NULL COMMENT '历史沟通内容',
     `historical_communication` text NULL COMMENT '历史沟通内容',
     `effective_customer` tinyint NULL DEFAULT NULL COMMENT '有效客户:1:有效,0或者空:无效',
     `effective_customer` tinyint NULL DEFAULT NULL COMMENT '有效客户:1:有效,0或者空:无效',
     `ai_call_remark` varchar(500) NULL DEFAULT NULL COMMENT 'AI外呼备注',
     `ai_call_remark` varchar(500) NULL DEFAULT NULL COMMENT 'AI外呼备注',
-    `effective_record_path` varchar(1000) NULL DEFAULT NULL COMMENT '最后一次设置有效时录音',
-    `last_effective_callphone_log_id` bigint NULL DEFAULT NULL COMMENT '最后一次设置有效时外呼记录id',
+    `effective_record_path` varchar(1000) NULL DEFAULT NULL COMMENT '最后一次设置录音',
+    `last_effective_callphone_log_id` bigint NULL DEFAULT NULL COMMENT '最后一次设置外呼记录id',
     PRIMARY KEY (`customer_id`) USING BTREE,
     PRIMARY KEY (`customer_id`) USING BTREE,
     UNIQUE INDEX `customer_code`(`customer_code`) USING BTREE,
     UNIQUE INDEX `customer_code`(`customer_code`) USING BTREE,
     INDEX                   `create_user_id`(`create_user_id`) USING BTREE,
     INDEX                   `create_user_id`(`create_user_id`) USING BTREE,