Merge remote-tracking branch 'origin/master' into cc_20250903_big_screen

# Conflicts:
#	coolstore-partner-web/src/main/java/com/cool/store/config/SignValidateFilter.java
This commit is contained in:
wangff
2025-10-15 11:28:38 +08:00
48 changed files with 829 additions and 176 deletions

View File

@@ -44,6 +44,12 @@
<result column="join_brand" property="joinBrand" jdbcType="TINYINT"/>
<result column="store_type" property="storeType" jdbcType="TINYINT"/>
<result column="mini_program_order_store_name" property="miniProgramOrderStoreName"/>
<result column="is_iot" property="isIot" jdbcType="TINYINT"/>
<result column="addressee_name" property="addresseeName" jdbcType="VARCHAR"/>
<result column="addressee_mobile" property="addresseeMobile" jdbcType="VARCHAR"/>
<result column="addressee_area" property="addresseeArea" jdbcType="VARCHAR"/>
<result column="addressee_address" property="addresseeAddress" jdbcType="VARCHAR"/>
<result column="branch" property="branch" jdbcType="TINYINT"/>
</resultMap>
<select id="getByStoreId" resultMap="BaseResultMap">
@@ -88,6 +94,15 @@
</select>
<select id="listByMobile" resultMap="BaseResultMap">
select a.*
from store_${enterpriseId} a left join store_master_signer_info_${enterpriseId} b on a.store_id = b.store_id
<where>
and a.is_delete = 'effective'
<if test="mobile!=null and mobile !=''">
and ( b.signer1_mobile = #{mobile} or b.signer2_mobile = #{mobile})
</if>
</where>
union
select *
from store_${enterpriseId}
<where>
@@ -99,37 +114,65 @@
</select>
<select id="getSubStoreByRegionIdsAndMobile" resultType="com.cool.store.response.MiniShopsResponse">
select store_id as storeId, store_name as shopName, store_num as shopCode, store_address as detailAddress
from store_${enterpriseId}
where is_delete = 'effective'
<if test="storeName!=null and storeName!=''">
and store_name like concat('%', #{storeName}, '%')
</if>
<if test="storeNum!=null and storeNum!=''">
and store_num = #{storeNum}
</if>
and (
<if test="regionIdList != null and regionIdList.size >0 ">
<foreach collection="regionIdList" item="regionId" separator=" or " open=" (" close=" )">
region_path like concat('%/', #{regionId}, '/%')
</foreach>
</if>
<if test="mobile!=null and mobile !=''">
<choose>
<when test="regionIdList != null and regionIdList.size >0 ">
or `extend_field` like concat('%', #{mobile}, '%')
</when>
<otherwise>
`extend_field` like concat('%', #{mobile}, '%')
</otherwise>
</choose>
</if>
)
<choose>
<!-- 情况1regionIdList不为空使用UNION优化 -->
<when test="regionIdList != null and regionIdList.size > 0">
SELECT store_id as storeId, store_name as shopName, store_num as shopCode, store_address as detailAddress
FROM store_${enterpriseId} a
WHERE a.is_delete = 'effective' and a.store_status != 'closed'
<if test="storeName!=null and storeName!=''">
AND a.store_name LIKE CONCAT('%', #{storeName}, '%')
</if>
<if test="storeNum!=null and storeNum!=''">
AND a.store_num = #{storeNum}
</if>
AND (
<foreach collection="regionIdList" item="regionId" separator=" OR ">
a.region_path LIKE CONCAT('%/', #{regionId}, '/%')
</foreach>
)
UNION
SELECT a.store_id as storeId, a.store_name as shopName, a.store_num as shopCode, a.store_address as detailAddress
FROM store_${enterpriseId} a
INNER JOIN store_master_signer_info_${enterpriseId} b ON a.store_id = b.store_id
WHERE a.is_delete = 'effective' and a.store_status != 'closed'
<if test="storeName!=null and storeName!=''">
AND a.store_name LIKE CONCAT('%', #{storeName}, '%')
</if>
<if test="storeNum!=null and storeNum!=''">
AND a.store_num = #{storeNum}
</if>
AND (b.signer1_mobile = #{mobile} OR b.signer2_mobile = #{mobile})
</when>
<!-- 情况2regionIdList为空直接查询关联表 -->
<otherwise>
SELECT a.store_id as storeId, a.store_name as shopName, a.store_num as shopCode, a.store_address as detailAddress
FROM store_${enterpriseId} a
INNER JOIN store_master_signer_info_${enterpriseId} b ON a.store_id = b.store_id
WHERE a.is_delete = 'effective' and a.store_status != 'closed'
<if test="storeName!=null and storeName!=''">
AND a.store_name LIKE CONCAT('%', #{storeName}, '%')
</if>
<if test="storeNum!=null and storeNum!=''">
AND a.store_num = #{storeNum}
</if>
AND (b.signer1_mobile = #{mobile} OR b.signer2_mobile = #{mobile})
</otherwise>
</choose>
</select>
<select id="list" resultMap="BaseResultMap">
select *
from store_${enterpriseId} where is_delete = 'effective' order by id asc
from store_${enterpriseId}
where is_delete = 'effective'
<if test="isIot != null">
AND is_iot = #{isIot}
</if>
order by id asc
</select>
<select id="getStoreAreaList" resultType="com.cool.store.dto.store.StoreAreaDTO">

View File

@@ -208,7 +208,8 @@
b.deadline as deadline,
b.publisher_user_id as publishUserId,
b.message_content as messageContent,
b.process_type as processType
b.process_type as processType,
b.handle_keyword as handleKeyword
from
zxjp_store_message a
left join zxjp_message_template b on a.message_template_id = b.id

View File

@@ -397,7 +397,7 @@
and eu.active = true
-- and sr.source = 'create'
<if test="positionType != null and positionType != '' ">
and sr.position_type = #{positionType}
and (sr.position_type = #{positionType} or sr.id in (180000000,120000000,40000000))
</if>
and eu.user_status = '1'
</select>

View File

@@ -55,7 +55,7 @@
</foreach>
</if>
<if test="positionType!=null and positionType!=''">
and b.position_type =#{positionType}
and (b.position_type =#{positionType} or b.id in (180000000,120000000,40000000) )
</if>
<if test="notRoleAuth!=null and notRoleAuth!=''">
and b.role_auth !=#{notRoleAuth}

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.store.StoreMasterSignerInfoMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.store.StoreMasterSignerInfoDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
<result column="signer1_name" jdbcType="VARCHAR" property="signer1Name" />
<result column="signer1_mobile" jdbcType="VARCHAR" property="signer1Mobile" />
<result column="signer1_id_card_no" jdbcType="VARCHAR" property="signer1IdCardNo" />
<result column="signer1_id_card_front" jdbcType="VARCHAR" property="signer1IdCardFront" />
<result column="signer1_id_card_back" jdbcType="VARCHAR" property="signer1IdCardBack" />
<result column="signer2_name" jdbcType="VARCHAR" property="signer2Name" />
<result column="signer2_mobile" jdbcType="VARCHAR" property="signer2Mobile" />
<result column="signer2_id_card_no" jdbcType="VARCHAR" property="signer2IdCardNo" />
<result column="signer2_id_card_front" jdbcType="VARCHAR" property="signer2IdCardFront" />
<result column="signer2_id_card_back" jdbcType="VARCHAR" property="signer2IdCardBack" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, store_id, signer1_name, signer1_mobile, signer1_id_card_no, signer1_id_card_front,
signer1_id_card_back, signer2_name, signer2_mobile, signer2_id_card_no, signer2_id_card_front,
signer2_id_card_back, create_time, update_time
</sql>
<select id="selectByStoreIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from store_master_signer_info_${enterpriseId}
where store_id in
<foreach item="storeId" collection="storeIds" open="(" separator="," close=")">
#{storeId}
</foreach>
</select>
</mapper>