Merge #132 into master from revert-56b85c33-20f063dc

Revert commit "Merge #128 into master from cc_20250512_uploadRentContract

* revert-56b85c33-20f063dc: (1 commits squashed)

  - Revert commit "Merge #128 into master from cc_20250512_uploadRentContract
    
    This reverts change request#128

Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>

CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/132
This commit is contained in:
正新
2026-05-12 09:56:16 +00:00
parent fcb6fb0770
commit 8caf3b1a6a
325 changed files with 262 additions and 14063 deletions

View File

@@ -378,23 +378,6 @@
</choose>
</select>
<select id="getStoreByRegionIds" resultMap="BaseResultMap">
SELECT * FROM store_${enterpriseId}
<where>
is_delete = 'effective' AND store_status != 'closed'
<if test="keyword != null and keyword != ''">
AND (store_name LIKE concat('%', #{keyword}, '%') OR store_num LIKE concat('%', #{keyword}, '%'))
</if>
<if test="regionIds != null and !regionIds.isEmpty()">
AND (
<foreach collection="regionIds" item="regionId" separator=" OR ">
region_path LIKE concat('%/', #{regionId}, '/%')
</foreach>
)
</if>
</where>
</select>
<select id="storeNumStatisticsByAd" resultType="java.util.Map">
SELECT YEAR(open_date) year, province, city, COUNT(1) store_num, QUARTER(open_date) quarter
FROM store_${enterpriseId}
@@ -422,6 +405,22 @@
</if>
</select>
<select id="getStoreByRegionIds" resultMap="BaseResultMap">
SELECT * FROM store_${enterpriseId}
<where>
is_delete = 'effective' AND store_status != 'closed'
<if test="keyword != null and keyword != ''">
AND (store_name LIKE concat('%', #{keyword}, '%') OR store_num LIKE concat('%', #{keyword}, '%'))
</if>
<if test="regionIds != null and !regionIds.isEmpty()">
AND (
<foreach collection="regionIds" item="regionId" separator=" OR ">
region_path LIKE concat('%/', #{regionId}, '/%')
</foreach>
)
</if>
</where>
</select>
<select id="getStoreAddress" resultType="com.cool.store.dto.store.StoreAddressDTO">
SELECT * FROM store_${enterpriseId}
@@ -467,119 +466,6 @@
WHERE store_id = #{storeId}
</select>
<select id="totalOpenStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
SELECT join_brand, COUNT(1) num
FROM store_${enterpriseId} a
<where>
a.is_delete = 'effective'
AND a.store_status IN ('open', 'close_up')
<if test="joinBrandList != null and joinBrandList.size() > 0">
AND a.join_brand IN
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="date != null">
AND DATE_FORMAT(a.open_date, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) &lt;= #{date}
</if>
<if test="domestic != null and domestic == 2">
AND LOCATE('_', a.store_num) > 0
</if>
<if test="domestic != null and domestic == 1">
AND LOCATE('_', a.store_num) = 0
</if>
AND NOT EXISTS (
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 1 AND a.store_num = b.store_num
)
</where>
GROUP BY join_brand
</select>
<select id="periodBeginStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
SELECT join_brand, COUNT(1) num
FROM store_${enterpriseId} a
<where>
a.is_delete = 'effective'
<if test="joinBrandList != null and joinBrandList.size() > 0">
AND a.join_brand IN
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="date != null">
AND DATE_FORMAT(a.open_date, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) &lt; #{date}
</if>
<if test="domestic != null and domestic == 2">
AND LOCATE('_', a.store_num) > 0
</if>
<if test="domestic != null and domestic == 1">
AND LOCATE('_', a.store_num) = 0
</if>
</where>
GROUP BY join_brand
</select>
<select id="newOpenStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
SELECT join_brand, COUNT(1) num
FROM store_${enterpriseId} a
<where>
a.is_delete = 'effective'
AND a.store_status IN ('open', 'close_up', 'closed')
<if test="joinBrandList != null and joinBrandList.size() > 0">
AND a.join_brand IN
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="date != null">
AND DATE_FORMAT(a.open_date, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) = #{date}
</if>
<if test="domestic != null and domestic == 2">
AND LOCATE('_', a.store_num) > 0
</if>
<if test="domestic != null and domestic == 1">
AND LOCATE('_', a.store_num) = 0
</if>
AND NOT EXISTS (
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 1 AND a.store_num = b.store_num
)
</where>
GROUP BY join_brand
</select>
<select id="closeStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
SELECT join_brand, COUNT(1) num
FROM store_${enterpriseId} a
<where>
a.is_delete = 'effective'
AND a.store_status = 'closed'
<if test="joinBrandList != null and joinBrandList.size() > 0">
AND a.join_brand IN
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="date != null">
AND DATE_FORMAT(a.close_store_time, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) = #{date}
</if>
<if test="domestic != null and domestic == 2">
AND LOCATE('_', a.store_num) > 0
AND EXISTS (
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 1 AND a.store_num = b.store_num AND b.domestic = 2
)
</if>
<if test="domestic != null and domestic == 1">
AND LOCATE('_', a.store_num) = 0
</if>
AND NOT EXISTS (
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 2 AND a.store_num = b.store_num
)
</where>
GROUP BY join_brand
</select>
<insert id="insertOrUpdateSoftOpenDate">
INSERT INTO store_extend_info_${enterpriseId}(store_id, soft_open_date)
VALUES