Merge branch 'master' into cc_20250905_franchiseAgreement
# Conflicts: # coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java # coolstore-partner-model/src/main/java/com/cool/store/response/AddSignFranchiseResponse.java # coolstore-partner-service/src/main/java/com/cool/store/service/impl/PushServiceImpl.java # coolstore-partner-service/src/main/java/com/cool/store/service/impl/SignFranchiseServiceImpl.java # coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCTestController.java
This commit is contained in:
@@ -38,6 +38,9 @@
|
||||
<if test="keyword!=null and keyword !=''">
|
||||
and region_name like CONCAT('%',#{keyword},'%')
|
||||
</if>
|
||||
<if test="joinBrand != null">
|
||||
and join_brand = #{joinBrand}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<result column="user_region_ids" jdbcType="LONGVARCHAR" property="userRegionIds"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, name, remark, mobile, email, main_admin, is_admin, unionid,
|
||||
id, user_id, name, remark, mobile, email, main_admin, is_admin, unionid,departments,
|
||||
avatar, jobnumber, is_leader, is_leader_in_depts, face_url, user_status, create_time,
|
||||
third_oa_unique_flag
|
||||
</sql>
|
||||
@@ -82,6 +82,21 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getUserInfoByUserMobileList" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from
|
||||
enterprise_user_${enterpriseId}
|
||||
<where>
|
||||
<if test="mobileList !=null and mobileList.size>0">
|
||||
<foreach collection="mobileList" item="mobile" open="and mobile in (" close=")" separator=",">
|
||||
#{mobile}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="searchUserByRegionIdsAndKeyword" resultMap="BaseResultMap">
|
||||
select
|
||||
@@ -220,4 +235,10 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getUserLoginByUnionid" resultType="com.cool.store.entity.login.UserLoginDO">
|
||||
SELECT user_id, mobile, password
|
||||
FROM enterprise_user
|
||||
WHERE unionid = #{unionid} AND active = true
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -195,4 +195,23 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectLastBindRecord" resultType="com.cool.store.dto.wechat.ServiceAccountOpenIdDTO">
|
||||
select
|
||||
b.partner_id as partnerId,
|
||||
b.union_id as unionId,
|
||||
b.service_account_open_id as serviceAccountOpenId,
|
||||
MAX(b.update_time) as lastUpdateTime
|
||||
from xfsg_partner_user_info a
|
||||
left join xfsg_partner_user_wechat_bind b
|
||||
on a.partner_id = b.partner_id
|
||||
where b.partner_id is not null
|
||||
and service_account_open_id is not null
|
||||
<if test="mobileList !=null and mobileList.size>0">
|
||||
<foreach collection="mobileList" open="and mobile in (" close=")" separator="," item="mobile">
|
||||
#{mobile}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY b.partner_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -75,7 +75,11 @@
|
||||
publish_time as publishTime,
|
||||
publisher_user_id as publishUserId,
|
||||
create_user_id as createUserId,
|
||||
create_time as createTime
|
||||
create_time as createTime,
|
||||
handle_person_info as handlePersonInfo,
|
||||
jump_type as jumpType,
|
||||
jump_url as jumpUrl,
|
||||
store_info as storeInfo
|
||||
FROM zxjp_message_template
|
||||
WHERE deleted = 0
|
||||
<if test="request.moduleCode != null">
|
||||
@@ -127,4 +131,14 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getByKeyword" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
*
|
||||
FROM zxjp_message_template
|
||||
WHERE deleted = 0
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND handle_keyword = #{keyword,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -8,6 +8,8 @@
|
||||
<result column="open_id" property="openId" jdbcType="VARCHAR" />
|
||||
<result column="bind_time" property="bindTime" jdbcType="TIMESTAMP" />
|
||||
<result column="partner_id" property="partnerId" jdbcType="VARCHAR" />
|
||||
<result column="union_id" property="unionId" jdbcType="VARCHAR" />
|
||||
<result column="service_account_open_id" property="serviceAccountOpenId" jdbcType="VARCHAR" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
||||
</resultMap>
|
||||
@@ -17,15 +19,33 @@
|
||||
open_id,
|
||||
bind_time,
|
||||
partner_id,
|
||||
union_id,
|
||||
create_time
|
||||
) VALUES (
|
||||
#{openId, jdbcType=VARCHAR},
|
||||
#{bindTime, jdbcType=TIMESTAMP},
|
||||
#{partnerId, jdbcType=VARCHAR},
|
||||
#{unionId, jdbcType=VARCHAR},
|
||||
#{createTime, jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.cool.store.entity.PartnerUserWechatBindDO">
|
||||
UPDATE xfsg_partner_user_wechat_bind
|
||||
<set>
|
||||
<if test="unionId != null">
|
||||
union_id = #{unionId, jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateByUnionId" >
|
||||
UPDATE xfsg_partner_user_wechat_bind
|
||||
set service_account_open_id = #{serviceAccountOpenId}
|
||||
where union_id = #{unionId}
|
||||
</update>
|
||||
|
||||
<select id="selectByPartnerAndOpenId" resultMap="BaseResultMap">
|
||||
select * from xfsg_partner_user_wechat_bind where partner_id = #{partnerId} and open_id = #{openId}
|
||||
</select>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<result column="manager_region_id" jdbcType="BIGINT" property="managerRegionId"/>
|
||||
<result column="shop_decoration_attributes" jdbcType="INTEGER" property="shopDecorationAttributes"/>
|
||||
<result column="hqt_shop_id" jdbcType="VARCHAR" property="hqtShopId"/>
|
||||
<result column="store_id" jdbcType="VARCHAR" property="storeId"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="allColumn">
|
||||
@@ -46,17 +47,17 @@
|
||||
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
|
||||
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
|
||||
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id,store_type
|
||||
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id
|
||||
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id,store_id
|
||||
</sql>
|
||||
|
||||
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name,
|
||||
store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
|
||||
development_manager,want_shop_area_id,investment_manager) values
|
||||
development_manager,want_shop_area_id,investment_manager,store_id) values
|
||||
<foreach collection="shopInfoList" item="shop" separator=",">
|
||||
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName},
|
||||
#{shop.storeNum},#{shop.supervisorUserId},#{shop.createTime},#{shop.joinMode},#{shop.franchiseBrand},#{shop.developmentManager},
|
||||
#{shop.wantShopAreaId},#{shop.investmentManager})
|
||||
#{shop.wantShopAreaId},#{shop.investmentManager},#{shop.storeId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -278,7 +279,11 @@
|
||||
from
|
||||
xfsg_shop_info a
|
||||
left join store_${enterpriseId} b on a.shop_code = b.store_num
|
||||
where b.store_id is not null and a.id in
|
||||
where a.shop_code is not null
|
||||
and a.shop_code !=''
|
||||
and b.store_id is not null
|
||||
and b.is_delete = 'effective'
|
||||
and a.id in
|
||||
<foreach collection="shopIds" item="shopId" separator="," open="(" close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
@@ -305,7 +310,8 @@
|
||||
a.franchise_brand as franchiseBrand,
|
||||
a.shop_status as shopStatus,
|
||||
a.detail_address as shopAddress,
|
||||
a.manager_region_id as managerRegionId
|
||||
a.manager_region_id as managerRegionId,
|
||||
a.store_id as storeId
|
||||
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
|
||||
<if test="request.contractStartTime !=null and request.contractEndTime != null">
|
||||
left join xfsg_sign_franchise c on a.id = c.shop_id
|
||||
|
||||
@@ -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>
|
||||
<!-- 情况1:regionIdList不为空,使用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}, '%') or a.store_num 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}, '%') or a.store_num 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>
|
||||
|
||||
<!-- 情况2:regionIdList为空,直接查询关联表 -->
|
||||
<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}, '%') or a.store_num 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">
|
||||
@@ -179,4 +222,37 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="batchInsertOrUpdateOrderTime">
|
||||
INSERT INTO store_extend_info_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
store_id,
|
||||
latest_order_time
|
||||
</trim>
|
||||
VALUES
|
||||
<foreach collection="dtoList" item="dto" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{dto.storeId},
|
||||
#{dto.latestOrderTime}
|
||||
</trim>
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
store_id = VALUES(store_id),
|
||||
latest_order_time = VALUES(latest_order_time),
|
||||
update_time = now(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<select id="getAllStoreIdAndNum" resultType="com.cool.store.entity.StoreDO">
|
||||
SELECT store_id, store_num
|
||||
FROM store_${enterpriseId}
|
||||
WHERE is_delete = 'effective'
|
||||
<if test="storeStatus != null and !storeStatus.isEmpty()">
|
||||
AND store_status IN
|
||||
<foreach item="item" collection="storeStatus" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<result column="operator_list" property="operatorList" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO zxjp_store_message (
|
||||
store_id,
|
||||
store_code,
|
||||
@@ -160,9 +160,12 @@
|
||||
a.process_status as processStatus,
|
||||
a.create_time as createTime,
|
||||
b.module_code as moduleCode,
|
||||
b.matter_type as matterType,
|
||||
b.message_title as messageTitle,
|
||||
b.message_image as messageImage,
|
||||
b.today_task as todayTask
|
||||
b.today_task as todayTask,
|
||||
b.jump_type as jumpType,
|
||||
b.jump_url as jumpUrl
|
||||
from zxjp_store_message a
|
||||
left join zxjp_message_template b on a.message_template_id = b.id
|
||||
<where>
|
||||
@@ -205,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
|
||||
@@ -213,6 +217,24 @@
|
||||
a.id = #{id}
|
||||
</select>
|
||||
|
||||
<update id="batchUpdateHandle">
|
||||
UPDATE zxjp_store_message
|
||||
SET
|
||||
process_status = 1,
|
||||
process_time = NOW(),
|
||||
read_status = 1,
|
||||
read_time = NOW(),
|
||||
update_time = NOW()
|
||||
<where>
|
||||
<if test="id != null">
|
||||
AND message_template_id = #{id}
|
||||
</if>
|
||||
and store_code IN
|
||||
<foreach item="item" collection="storeCodeList" index="index" separator="," close=")" open="(">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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,1762761165005))
|
||||
</if>
|
||||
and eu.user_status = '1'
|
||||
</select>
|
||||
|
||||
@@ -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,1762761165005))
|
||||
</if>
|
||||
<if test="notRoleAuth!=null and notRoleAuth!=''">
|
||||
and b.role_auth !=#{notRoleAuth}
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,106 @@
|
||||
<?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.wallet.OpenBankInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.wallet.OpenBankInfoDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
|
||||
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
|
||||
<result column="signer_name" jdbcType="VARCHAR" property="signerName" />
|
||||
<result column="signer_id_card" jdbcType="VARCHAR" property="signerIdCard" />
|
||||
<result column="signer_phone" jdbcType="VARCHAR" property="signerPhone" />
|
||||
<result column="signer_id_card_front" jdbcType="VARCHAR" property="signerIdCardFront" />
|
||||
<result column="signer_id_card_back" jdbcType="VARCHAR" property="signerIdCardBack" />
|
||||
<result column="business_license_name" jdbcType="VARCHAR" property="businessLicenseName" />
|
||||
<result column="business_license_code" jdbcType="VARCHAR" property="businessLicenseCode" />
|
||||
<result column="business_license_photo" jdbcType="VARCHAR" property="businessLicensePhoto" />
|
||||
<result column="legal_is_signer" jdbcType="TINYINT" property="legalIsSigner" />
|
||||
<result column="legal_name" jdbcType="VARCHAR" property="legalName" />
|
||||
<result column="legal_id_card" jdbcType="VARCHAR" property="legalIdCard" />
|
||||
<result column="legal_id_card_expire_time" jdbcType="VARCHAR" property="legalIdCardExpireTime" />
|
||||
<result column="legal_phone" jdbcType="VARCHAR" property="legalPhone" />
|
||||
<result column="legal_id_card_front" jdbcType="VARCHAR" property="legalIdCardFront" />
|
||||
<result column="legal_id_card_back" jdbcType="VARCHAR" property="legalIdCardBack" />
|
||||
<result column="settlement_card" jdbcType="VARCHAR" property="settlementCard" />
|
||||
<result column="bank_branch_name" jdbcType="VARCHAR" property="bankBranchName" />
|
||||
<result column="bank_branch_code" jdbcType="VARCHAR" property="bankBranchCode" />
|
||||
<result column="bank_reserved_phone" jdbcType="VARCHAR" property="bankReservedPhone" />
|
||||
<result column="source" jdbcType="TINYINT" property="source" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getOpenBankInfo" resultMap="BaseResultMap">
|
||||
select * from zxjp_open_bank_info where store_code = #{storeCode}
|
||||
</select>
|
||||
|
||||
<update id="updateByStoreCode" parameterType="com.cool.store.entity.wallet.OpenBankInfoDO">
|
||||
UPDATE zxjp_open_bank_info
|
||||
<set>
|
||||
<if test="dto.storeId != null and dto.storeId != ''">
|
||||
store_id = #{dto.storeId},
|
||||
</if>
|
||||
<if test="dto.signerName != null and dto.signerName != ''">
|
||||
signer_name = #{dto.signerName},
|
||||
</if>
|
||||
<if test="dto.signerIdCard != null and dto.signerIdCard != ''">
|
||||
signer_id_card = #{dto.signerIdCard},
|
||||
</if>
|
||||
<if test="dto.signerPhone != null and dto.signerPhone != ''">
|
||||
signer_phone = #{dto.signerPhone},
|
||||
</if>
|
||||
<if test="dto.signerIdCardFront != null and dto.signerIdCardFront != ''">
|
||||
signer_id_card_front = #{dto.signerIdCardFront},
|
||||
</if>
|
||||
<if test="dto.signerIdCardBack != null and dto.signerIdCardBack != ''">
|
||||
signer_id_card_back = #{dto.signerIdCardBack},
|
||||
</if>
|
||||
<if test="dto.businessLicenseName != null and dto.businessLicenseName != ''">
|
||||
business_license_name = #{dto.businessLicenseName},
|
||||
</if>
|
||||
<if test="dto.businessLicenseCode != null and dto.businessLicenseCode != ''">
|
||||
business_license_code = #{dto.businessLicenseCode},
|
||||
</if>
|
||||
<if test="dto.businessLicensePhoto != null and dto.businessLicensePhoto != ''">
|
||||
business_license_photo = #{dto.businessLicensePhoto},
|
||||
</if>
|
||||
<if test="dto.legalIsSigner != null">
|
||||
legal_is_signer = #{dto.legalIsSigner},
|
||||
</if>
|
||||
<if test="dto.legalName != null and dto.legalName != ''">
|
||||
legal_name = #{dto.legalName},
|
||||
</if>
|
||||
<if test="dto.legalIdCard != null and dto.legalIdCard != ''">
|
||||
legal_id_card = #{dto.legalIdCard},
|
||||
</if>
|
||||
<if test="dto.legalIdCardExpireTime != null and dto.legalIdCardExpireTime != ''">
|
||||
legal_id_card_expire_time = #{dto.legalIdCardExpireTime},
|
||||
</if>
|
||||
<if test="dto.legalPhone != null and dto.legalPhone != ''">
|
||||
legal_phone = #{dto.legalPhone},
|
||||
</if>
|
||||
<if test="dto.legalIdCardFront != null and dto.legalIdCardFront != ''">
|
||||
legal_id_card_front = #{dto.legalIdCardFront},
|
||||
</if>
|
||||
<if test="dto.legalIdCardBack != null and dto.legalIdCardBack != ''">
|
||||
legal_id_card_back = #{dto.legalIdCardBack},
|
||||
</if>
|
||||
<if test="dto.settlementCard != null and dto.settlementCard != ''">
|
||||
settlement_card = #{dto.settlementCard},
|
||||
</if>
|
||||
<if test="dto.bankBranchName != null and dto.bankBranchName != ''">
|
||||
bank_branch_name = #{dto.bankBranchName},
|
||||
</if>
|
||||
<if test="dto.bankBranchCode != null and dto.bankBranchCode != ''">
|
||||
bank_branch_code = #{dto.bankBranchCode},
|
||||
</if>
|
||||
<if test="dto.bankReservedPhone != null and dto.bankReservedPhone != ''">
|
||||
bank_reserved_phone = #{dto.bankReservedPhone},
|
||||
</if>
|
||||
<if test="dto.source != null">
|
||||
source = #{dto.source},
|
||||
</if>
|
||||
</set>
|
||||
WHERE store_code = #{dto.storeCode}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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.wallet.TempOpenWalletInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.wallet.TempOpenWalletInfoDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
|
||||
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
|
||||
<result column="store_mode" jdbcType="VARCHAR" property="storeMode" />
|
||||
<result column="ledger_name" jdbcType="VARCHAR" property="ledgerName" />
|
||||
<result column="ledger_status" jdbcType="VARCHAR" property="ledgerStatus" />
|
||||
<result column="business_type" jdbcType="VARCHAR" property="businessType" />
|
||||
<result column="business_reg_name" jdbcType="VARCHAR" property="businessRegName" />
|
||||
<result column="business_license_no" jdbcType="VARCHAR" property="businessLicenseNo" />
|
||||
<result column="business_address" jdbcType="VARCHAR" property="businessAddress" />
|
||||
<result column="province" jdbcType="VARCHAR" property="province" />
|
||||
<result column="city" jdbcType="VARCHAR" property="city" />
|
||||
<result column="district" jdbcType="VARCHAR" property="district" />
|
||||
<result column="legal_person_name" jdbcType="VARCHAR" property="legalPersonName" />
|
||||
<result column="legal_person_id_no" jdbcType="VARCHAR" property="legalPersonIdNo" />
|
||||
<result column="legal_id_start_date" jdbcType="DATE" property="legalIdStartDate" />
|
||||
<result column="legal_id_expire_date" jdbcType="DATE" property="legalIdExpireDate" />
|
||||
<result column="settler_name" jdbcType="VARCHAR" property="settlerName" />
|
||||
<result column="settler_id_no" jdbcType="VARCHAR" property="settlerIdNo" />
|
||||
<result column="settler_id_start_date" jdbcType="DATE" property="settlerIdStartDate" />
|
||||
<result column="settler_id_expire_date" jdbcType="DATE" property="settlerIdExpireDate" />
|
||||
<result column="bank_branch_name" jdbcType="VARCHAR" property="bankBranchName" />
|
||||
<result column="bank_branch_no" jdbcType="VARCHAR" property="bankBranchNo" />
|
||||
<result column="settlement_card_no" jdbcType="VARCHAR" property="settlementCardNo" />
|
||||
<result column="bank_reserved_phone" jdbcType="VARCHAR" property="bankReservedPhone" />
|
||||
<result column="accounting_relation" jdbcType="VARCHAR" property="accountingRelation" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getTempOpenWalletInfoByStoreCode" resultMap="BaseResultMap">
|
||||
select * from zxjp_temp_open_wallet_info where store_code = #{storeCode}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?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.wallet.WalletPaymentOrderMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.wallet.WalletPaymentOrderDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
|
||||
<result column="payment_id" jdbcType="VARCHAR" property="paymentId" />
|
||||
<result column="type" jdbcType="TINYINT" property="type" />
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
||||
<result column="expire_time" jdbcType="VARCHAR" property="expireTime" />
|
||||
<result column="order_status" jdbcType="BIT" property="orderStatus" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user