Merge branch 'refs/heads/master' into cc_20251112_wallet

# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
This commit is contained in:
wangff
2025-11-27 16:38:50 +08:00
35 changed files with 1724 additions and 11 deletions

View File

@@ -0,0 +1,27 @@
<?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.decoration.DecorationTeamConfigMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.DecorationTeamConfigDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="team_name" jdbcType="VARCHAR" property="teamName" />
<result column="team_code" jdbcType="VARCHAR" property="teamCode" />
<result column="use_system" jdbcType="TINYINT" property="useSystem" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="TINYINT" property="deleted" />
</resultMap>
<select id="listByCondition" resultType="com.cool.store.dto.decoration.DecorationTeamDTO">
select
t.id,
t.team_name,
t.team_code,
t.use_system
from
zxjp_decoration_team_config t
where t.deleted = 0
</select>
</mapper>

View File

@@ -0,0 +1,68 @@
<?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.decoration.ShopDecorationAssignMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.ShopDecorationAssignDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
<result column="decoration_desc_status" jdbcType="TINYINT" property="decorationDescStatus" />
<result column="decoration_team_id" jdbcType="BIGINT" property="decorationTeamId" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
</resultMap>
<select id="countByTeamId" resultType="java.lang.Integer">
select count(1) from zxjp_shop_decoration_assign where decoration_team_id = #{teamId}
</select>
<select id="listByCondition" resultType="com.cool.store.dto.decoration.DecorationListDTO">
SELECT
zsda.id as id ,
zsda.shop_id AS shopId,
zsda.decoration_desc_status as decorationDescStatus,
zsda.decoration_team_id as teamId,
xsi.shop_name AS shopName,
xsi.shop_code AS shopCode,
xsi.region_id AS regionId,
xsi.province AS province,
xsi.city AS city,
xsi.district AS district,
xsi.detail_address AS detailAddress,
xsi.store_type AS storeType,
xsf.sign_type AS signType
FROM zxjp_shop_decoration_assign zsda
LEFT JOIN xfsg_shop_info xsi ON zsda.shop_id = xsi.id
LEFT JOIN xfsg_sign_franchise xsf ON zsda.shop_id = xsf.shop_id
<where>
<if test="keyword != null and keyword != ''">
AND (xsi.shop_name LIKE CONCAT('%', #{keyword}, '%') OR xsi.shop_code LIKE CONCAT('%', #{keyword}, '%'))
</if>
<if test="storeType != null">
AND xsi.store_type = #{storeType}
</if>
<if test="signType != null">
AND xsf.sign_type = #{signType}
</if>
<if test="regionId != null">
AND xsi.region_id = #{regionId}
</if>
<if test="decorationDescStatus != null">
AND zsda.decoration_desc_status = #{decorationDescStatus}
</if>
<if test="wantShopAreaIds != null and wantShopAreaIds.size() > 0">
and b.want_shop_area_id in
<foreach collection="wantShopAreaIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>

View File

@@ -0,0 +1,66 @@
<?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.decoration.TeamAreaMappingMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.TeamAreaMappingDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="team_id" jdbcType="BIGINT" property="teamId" />
<result column="open_city_id" jdbcType="BIGINT" property="openCityId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<!-- 批量插入 -->
<insert id="batchInsert" parameterType="java.util.List">
INSERT INTO zxjp_team_area_mapping (
team_id,
open_city_id
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.teamId},
#{item.openCityId}
)
</foreach>
</insert>
<!-- 根据团队id删除 更新团队id时候删除 -->
<delete id="deletedByTeamId" parameterType="java.lang.Long">
DELETE FROM zxjp_team_area_mapping
WHERE team_id = #{teamId}
</delete>
<!-- 根据ids删除 -->
<delete id="deletedIds" parameterType="java.util.List">
DELETE FROM zxjp_team_area_mapping
WHERE id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getByCityId" parameterType="java.lang.Long" resultType="com.cool.store.entity.decoration.TeamAreaMappingDO">
SELECT
*
FROM zxjp_team_area_mapping
WHERE open_city_id = #{cityId}
LIMIT 1
</select>
<select id="listByTeamIdList" parameterType="java.util.List" resultType="com.cool.store.dto.decoration.TeamAreaMappingDTO">
SELECT
a.team_id as teamId,
a.open_city_id as openCityId,
b.area_name as openCityName
FROM zxjp_team_area_mapping a
left join xfsg_open_area_info b on a.open_city_id = b.id
WHERE a.team_id IN
<foreach collection="teamIdList" item="teamId" open="(" separator="," close=")">
#{teamId}
</foreach>
</select>
</mapper>