wjj преди 3 часа
родител
ревизия
dd0a25627b

+ 5 - 0
fs-admin/src/main/java/com/fs/company/controller/CompanyVoiceRoboticController.java

@@ -71,6 +71,11 @@ public class CompanyVoiceRoboticController extends BaseController
     public TableDataInfo calleesList(Long id){
         startPage();
         List<CompanyVoiceRoboticCallees> list = companyVoiceRoboticCalleesService.selectCompanyVoiceRoboticCalleesListByRoboticId(id);
+        if(list != null && !list.isEmpty()){
+            for (CompanyVoiceRoboticCallees companyVoiceRoboticCallees : list) {
+                companyVoiceRoboticCallees.setPhone(null);
+            }
+        }
         return getDataTable(list);
     }
 

+ 5 - 0
fs-admin/src/main/java/com/fs/crm/controller/CrmCustomerContactsController.java

@@ -35,6 +35,11 @@ public class CrmCustomerContactsController extends BaseController
     {
         startPage();
         List<CrmCustomerContacts> list = crmCustomerContactsService.selectCrmCustomerContactsList(crmCustomerContacts);
+        if (list != null && !list.isEmpty()) {
+            for (CrmCustomerContacts customerContacts : list) {
+                customerContacts.setMobile(null);
+            }
+        }
         return getDataTable(list);
     }
 

+ 32 - 3
fs-admin/src/main/java/com/fs/crm/controller/CrmCustomerController.java

@@ -21,6 +21,7 @@ import com.fs.crm.service.ICrmCustomerService;
 import com.fs.crm.vo.CrmCustomerExportVO;
 import com.fs.crm.vo.CrmCustomerListVO;
 import com.fs.framework.web.service.TokenService;
+import com.fs.his.utils.PhoneUtil;
 import com.fs.system.service.ISysRoleService;
 import com.github.pagehelper.PageHelper;
 import org.springframework.beans.BeanUtils;
@@ -56,9 +57,34 @@ public class CrmCustomerController extends BaseController
         startPage();
         crmCustomer.setIsLine(1);
         List<CrmCustomerListVO> list = crmCustomerService.selectCrmCustomerListVO(crmCustomer);
+        if (list != null && !list.isEmpty()) {
+            list.forEach(customer -> {
+                if (customer.getMobile() != null && !customer.getMobile().isEmpty()) {
+                    // 如果手机号长度大于11,说明是加密的,需要解密后脱敏
+                    if (customer.getMobile().length() > 11) {
+                        customer.setMobile(PhoneUtil.decryptPhoneMk(customer.getMobile()));
+                    } else {
+                        // 如果是明文手机号,直接脱敏
+                        customer.setMobile(maskPhoneMiddleFive(customer.getMobile()));
+                    }
+                }
+            });
+        }
         return getDataTable(list);
     }
 
+    /**
+     * 手机号中间4位脱敏处理 (例如: 13812345678 -> 138****5678)
+     * @param phone 原始手机号
+     * @return 脱敏后的手机号
+     */
+    private String maskPhoneMiddleFive(String phone) {
+        if (phone == null || phone.isEmpty()) {
+            return phone;
+        }
+        return phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
+    }
+
     @PreAuthorize("@ss.hasPermi('crm:customer:addLine')")
     @Log(title = "创建线索客户", businessType = BusinessType.INSERT)
     @PostMapping("/addLine")
@@ -86,7 +112,9 @@ public class CrmCustomerController extends BaseController
     @GetMapping(value = "/queryLine/{customerId}")
     public AjaxResult getLineInfo(@PathVariable("customerId") Long customerId)
     {
-        return AjaxResult.success(crmCustomerService.selectCrmCustomerById(customerId));
+        CrmCustomer crmCustomer = crmCustomerService.selectCrmCustomerById(customerId);
+        crmCustomer.setMobile(null);
+        return AjaxResult.success(crmCustomer);
     }
 
 
@@ -197,9 +225,9 @@ public class CrmCustomerController extends BaseController
         }
         List<CrmCustomerListVO> list = crmCustomerService.selectCrmCustomerListQueryParam(crmCustomer);
         if (list != null) {
-            boolean checkPhone = isCheckPhone();
+            //boolean checkPhone = isCheckPhone();
             for (CrmCustomerListVO vo : list) {
-                if(vo.getMobile()!=null && !checkPhone){
+                if(vo.getMobile()!=null){
                     vo.setMobile(vo.getMobile().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
                 }
 
@@ -232,6 +260,7 @@ public class CrmCustomerController extends BaseController
     public R getInfo(@PathVariable("customerId") Long customerId)
     {
         CrmCustomer customer=crmCustomerService.selectCrmCustomerById(customerId);
+        customer.setMobile(null);
         Company company=companyService.selectCompanyById(customer.getCompanyId());
         return R.ok().put("customer",customer).put("company",company);
     }

+ 27 - 0
fs-admin/src/main/java/com/fs/his/controller/FsImportMemberController.java

@@ -8,6 +8,7 @@ import java.util.Map;
 
 import com.alibaba.excel.EasyExcel;
 import com.fs.his.dto.MemberExcelDTO;
+import com.fs.his.utils.PhoneUtil;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -45,9 +46,35 @@ public class FsImportMemberController extends BaseController
     {
         startPage();
         List<FsImportMember> list = fsImportMemberService.selectFsImportMemberList(fsImportMember);
+        if(list != null && !list.isEmpty()) {
+            // 对手机号进行脱敏处理
+            list.forEach(member -> {
+                if (member.getMemberPhone() != null && !member.getMemberPhone().isEmpty()) {
+                    // 如果手机号长度大于11,说明是加密的,需要解密后脱敏
+                    if (member.getMemberPhone().length() > 11) {
+                        member.setMemberPhone(PhoneUtil.decryptPhoneMk(member.getMemberPhone()));
+                    } else {
+                        // 如果是明文手机号,直接脱敏
+                        member.setMemberPhone(maskPhoneMiddleFive(member.getMemberPhone()));
+                    }
+                }
+            });
+        }
         return getDataTable(list);
     }
 
+    /**
+     * 手机号中间4位脱敏处理 (例如: 13812345678 -> 138****5678)
+     * @param phone 原始手机号
+     * @return 脱敏后的手机号
+     */
+    private String maskPhoneMiddleFive(String phone) {
+        if (phone == null || phone.isEmpty()) {
+            return phone;
+        }
+        return phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
+    }
+
     /**
      * 导出导入会员列表
      */

+ 2 - 1
fs-admin/src/main/java/com/fs/his/controller/FsIntegralOrderController.java

@@ -151,7 +151,8 @@ public class FsIntegralOrderController extends BaseController
         if (userPhone.length()>11){
             userPhone = decryptPhone(userPhone);
         }
-        return R.ok().put("userPhone",userPhone);
+        //return R.ok().put("userPhone",userPhone);
+        return R.ok();
     }
 
     /**

+ 2 - 1
fs-admin/src/main/java/com/fs/his/controller/FsPackageOrderController.java

@@ -132,7 +132,8 @@ public class FsPackageOrderController extends BaseController
         if (phone!=null&&phone.length()>11){
             phone=decryptPhone(phone);
         }
-        return R.ok().put("data",phone);
+        //return R.ok().put("data",phone);
+        return R.ok();
     }
 
     /**

+ 2 - 1
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java

@@ -519,7 +519,8 @@ public class FsStoreOrderScrmController extends BaseController {
     {
         FsStoreOrderScrm order = fsStoreOrderService.selectFsStoreOrderById(id);
         String userPhone = order.getUserPhone();
-        return R.ok().put("userPhone",userPhone);
+        //return R.ok().put("userPhone",userPhone);
+        return R.ok();
     }
 
     @PreAuthorize("@ss.hasPermi('store:storeOrder:express')")