|
|
@@ -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()) < 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>
|