فهرست منبع

患者信息表电话号码维护

cgp 7 ساعت پیش
والد
کامیت
5c12d6d56e
1فایلهای تغییر یافته به همراه11 افزوده شده و 1 حذف شده
  1. 11 1
      fs-doctor-app/src/main/java/com/fs/app/controller/FsDoctorPatientController.java

+ 11 - 1
fs-doctor-app/src/main/java/com/fs/app/controller/FsDoctorPatientController.java

@@ -213,6 +213,12 @@ public class FsDoctorPatientController extends AppBaseController {
         fsCompanyCustomer.setCompanyUserIds(companyUserIds);
         PageHelper.startPage(fsCompanyCustomer.getPageNum(), fsCompanyCustomer.getPageSize());
         List<FsCompanyCustomer> list = fsCompanyCustomerService.selectFsCompanyCustomerListByCompanyUserIds(fsCompanyCustomer);
+        //电话号码脱敏
+        for (FsCompanyCustomer item : list) {
+            if (item.getPhone() != null) {
+                item.setPhone(item.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+            }
+        }
         AjaxResult.put("data", new PageInfo<>(list));
         return AjaxResult;
     }
@@ -222,6 +228,10 @@ public class FsDoctorPatientController extends AppBaseController {
      */
     @GetMapping("/companyCustomer/{id}")
     public AjaxResult getCompanyCustomerInfo(@PathVariable Long id) {
-        return AjaxResult.success(fsCompanyCustomerService.selectFsCompanyCustomerById(id));
+        FsCompanyCustomer fsCompanyCustomer = fsCompanyCustomerService.selectFsCompanyCustomerById(id);
+        if (fsCompanyCustomer.getPhone() != null) {
+            fsCompanyCustomer.setPhone(fsCompanyCustomer.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+        }
+        return AjaxResult.success(fsCompanyCustomer);
     }
 }