Ver Fonte

增加店铺列表证件照时间筛选,以及字段返回

Guos há 1 mês atrás
pai
commit
d7c2ad002c

+ 0 - 6
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreScrmController.java

@@ -100,9 +100,6 @@ public class FsStoreScrmController extends BaseController {
     {
         startPage();
         List<FsStoreScrm> list = fsStoreService.selectFsStoreList(fsStore);
-        for (FsStoreScrm store : list) {
-            store.setPhone(ParseUtils.parsePhone(store.getPhone()));
-        }
         return getDataTable(list);
     }
 
@@ -123,9 +120,6 @@ public class FsStoreScrmController extends BaseController {
     {
         storeAuditLogUtil.generateOperId();
         List<FsStoreScrm> list = fsStoreService.selectFsStoreList(fsStore);
-        for (FsStoreScrm store : list) {
-            store.setPhone(ParseUtils.parsePhone(store.getPhone()));
-        }
         ExcelUtil<FsStoreScrm> util = new ExcelUtil<FsStoreScrm>(FsStoreScrm.class);
         return util.exportExcel(list, "店铺管理数据");
     }

+ 15 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreScrm.java

@@ -461,6 +461,11 @@ public class FsStoreScrm extends BaseEntity {
      * **/
     private LocalDate qualificationUpdateTime;
 
+    /**
+     * 下次需要更新时间
+     * **/
+    private LocalDate nextQualificationUpdateTime;
+
     /**
      * 资质更新剩余天数
      **/
@@ -526,4 +531,14 @@ public class FsStoreScrm extends BaseEntity {
      * **/
     private Long permStatus;
 
+    /**
+     * 资质更新剩余天数最小值
+     **/
+    private Integer daysDiffMin;
+
+    /**
+     * 资质更新剩余天数最大值
+     **/
+    private Integer daysDiffMax;
+
 }

+ 23 - 2
fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml

@@ -882,7 +882,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selecStorePageList" resultType="com.fs.hisStore.domain.FsStoreScrm">
         SELECT
         store_id,full_name,delivery_type,send_phone, brokerage_rate,refund_phone,refund_address,refund_consignee,
-        city_ids, store_name, descs, brokerage_type,logo_url, address, lng, lat, phone, license_images,
+        city_ids, store_name, descs, brokerage_type,logo_url, address, lng, lat,
+        CASE
+            WHEN phone IS NOT NULL AND phone != '' THEN CONCAT(LEFT(phone, 3), '****', RIGHT(phone, 4))
+            ELSE phone
+        END AS phone,
+        license_images,
         status, create_time, update_time, sales_count, balance, total_money, is_audit, account, password, shipping_type,
         enterprise_address,legal_person_name,unified_social_credit_code,
         business_scope,selectable_product_types,business_license,business_license_expire_start,business_license_expire_end,drug_license,
@@ -895,7 +900,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         drug_code,medical_device1_code,medical_device2_code,medical_device3_code,food_code,medical_code,other_special_qualification_code,
         quality_assurance_agreement_code,settlement_agreement_code,title_name_one,title_Name_two,title_Name_three,
         qualification_update_time,
-        DATEDIFF(qualification_update_time, NOW()) AS days_diff,
+        DATE_ADD(qualification_update_time, INTERVAL 6 MONTH) as next_qualification_update_time,
+        DATEDIFF(DATE_ADD(qualification_update_time, INTERVAL 6 MONTH), NOW()) AS days_diff,
         ( SELECT COUNT(*) FROM fs_store_product_scrm sps WHERE sps.store_id = ss.store_id ) AS productCount
         FROM
         fs_store_scrm ss
@@ -907,6 +913,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isAudit != null "> and is_audit = #{isAudit}</if>
             <if test="account != null  and account != ''"> and account like concat('%', #{account}, '%')</if>
             <if test="queryStoreId != null "> or store_id = #{queryStoreId}</if>
+            <if test="daysDiffMax != null">
+                <!-- 判断剩余天数范围 -->
+                <if test="daysDiffMax == 0">
+                    AND DATEDIFF(DATE_ADD(qualification_update_time, INTERVAL 6 MONTH), NOW()) &lt; 0
+                </if>
+                <if test="daysDiffMax == 7">
+                    AND DATEDIFF(DATE_ADD(qualification_update_time, INTERVAL 6 MONTH), NOW()) BETWEEN 1 AND 7
+                </if>
+                <if test="daysDiffMax == 15">
+                    AND DATEDIFF(DATE_ADD(qualification_update_time, INTERVAL 6 MONTH), NOW()) BETWEEN 1 AND 15
+                </if>
+                <if test="daysDiffMax == 30">
+                    AND DATEDIFF(DATE_ADD(qualification_update_time, INTERVAL 6 MONTH), NOW()) BETWEEN 1 AND 30
+                </if>
+            </if>
         </where>
         order by store_id desc
     </select>