Merge branch 'refs/heads/master' into cc_2021104_twelve_points

# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
#	coolstore-partner-common/src/main/java/com/cool/store/enums/JoinModeEnum.java
This commit is contained in:
wangff
2025-12-02 19:34:14 +08:00
193 changed files with 10187 additions and 167 deletions

View File

@@ -0,0 +1,45 @@
<?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.ContractConfigMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.ContractConfigDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="brand" jdbcType="VARCHAR" property="brand" />
<result column="contract_name" jdbcType="VARCHAR" property="contractName" />
<result column="party_a" jdbcType="VARCHAR" property="partyA" />
<result column="party_b" jdbcType="VARCHAR" property="partyB" />
<result column="party_c" jdbcType="VARCHAR" property="partyC" />
<result column="franchise_mode" jdbcType="VARCHAR" property="franchiseMode" />
<result column="fadada_template_id" jdbcType="VARCHAR" property="fadadaTemplateId" />
<result column="serial_number" jdbcType="INTEGER" property="serialNumber" />
<result column="payee_name" jdbcType="VARCHAR" property="payeeName"/>
<result column="deleted" jdbcType="TINYINT" property="deleted" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<select id="queryContractConfigByBrand" resultMap="BaseResultMap">
select * from xfsg_contract_config where brand = #{brand} and serial_number = #{serialNumber} and deleted = 0
</select>
<select id="queryContractConfigList" resultMap="BaseResultMap">
select * from xfsg_contract_config
where deleted = 0
<if test="brand!=null and brand !=''">
and brand = #{brand}
</if>
</select>
<select id="queryContractConfigListByBrandAndMode" resultMap="BaseResultMap">
select * from xfsg_contract_config
where deleted = 0
<if test="brand!=null and brand !=''">
and brand = #{brand}
</if>
<if test="mode!=null and mode !=''">
and franchise_mode like concat('%,',#{mode},',%')
</if>
</select>
</mapper>

View File

@@ -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>
@@ -309,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

View File

@@ -3,7 +3,19 @@
<mapper namespace="com.cool.store.mapper.SignFranchiseMapper">
<update id="updateAuditByShopId">
update xfsg_sign_franchise
set audit_id = #{auditId}
<set>
<if test="auditId!=null">
audit_id = #{auditId},
</if>
<if test="dto!=null">
<if test="dto.infoConsistencyFlag != null">
info_consistency_flag = #{dto.infoConsistencyFlag},
</if>
<if test="dto.reason != null and dto.reason != ''">
reason = #{dto.reason},
</if>
</if>
</set>
where shop_id = #{shopId}
</update>
<update id="dateHandle">

View File

@@ -139,7 +139,7 @@
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}, '%')
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}
@@ -157,7 +157,7 @@
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}, '%')
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}
@@ -172,7 +172,7 @@
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}, '%')
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}

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>

View File

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

View File

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

View File

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