老数据数据处理

This commit is contained in:
shuo.wang
2025-05-12 17:12:05 +08:00
parent 6e2274af88
commit db4c7b2bd9
43 changed files with 1604 additions and 205 deletions

View File

@@ -53,6 +53,12 @@
create_time,update_time,create_user,
update_user,c_shop_name,settler_bank_back_photo_url,settler_is_same_partner,juridical_is_same_partner
</sql>
<insert id="batchInsertSpecific">
<foreach collection="list" item="item" index="index" separator=";">
insert into xfsg_build_information (shop_id)
VALUE(#{item})
</foreach>
</insert>
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.BuildInformationDO">
select shop_id as shopId, c_shop_name as cShopName
from xfsg_build_information

View File

@@ -6,6 +6,32 @@
set first_year_fee = "6000",
first_year_manage_fee = "7200"
</update>
<update id="updateBill">
<foreach collection="list" item="item" index="index" separator=";">
update xfsg_franchise_fee
<set>
<if test="item.yearFranchiseFee !=null and item.yearFranchiseFee!=''">
year_franchise_fee = #{item.yearFranchiseFee},
</if>
<if test="item.firstYearManageFee !=null and item.firstYearManageFee!=''">
first_year_manage_fee = #{item.firstYearManageFee},
</if>
<if test="item.firstYearFee!=null and item.firstYearFee!=''">
first_year_fee= #{item.firstYearFee},
</if>
<if test="item.loanMargin !=null and item.loanMargin!=''">
loan_margin = #{item.loanMargin},
</if>
<if test="item.performanceBond !=null and item.performanceBond!=''">
performance_bond = #{item.performanceBond},
</if>
<if test="item.discountReason !=null and item.discountReason!=''">
discount_reason = #{item.discountReason},
</if>
</set>
where shop_id = #{item.shopId}
</foreach>
</update>
<select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO">
select *
@@ -34,5 +60,13 @@
#{shopId}
</foreach>
</select>
<select id="getFranchiseFeeByShopIds" resultType="com.cool.store.entity.FranchiseFeeDO">
select *
from xfsg_franchise_fee
where shop_id in
<foreach collection="shopIds" item="shopId" open="(" separator="," close=")">
#{shopId}
</foreach>
</select>
</mapper>

View File

@@ -41,6 +41,23 @@
receiving_create_time, receiving_update_time, receiving_create_user, receiving_update_user,
declare_goods_type
</sql>
<insert id="batchInsertSpecific">
<foreach collection="list" item="item" index="index" separator=";">
insert into xfsg_order_sys_info (
shop_id,addressee_province,addressee_city,addressee_district,addressee_address,declare_goods_logistics_warehouse,receiving_ms_bank_account)
values(
#{item.shopId},
#{item.addresseeProvince},
#{item.addresseeCity},
#{item.addresseeDistrict},
#{item.addresseeAddress},
#{item.declareGoodsLogisticsWarehouse},
#{item.orderCreateTime},
#{item.receivingMsBankAccount},
#{item.receivingCreateTime}
)
</foreach>
</insert>
<update id="updateAddresseeAddress">
update xfsg_order_sys_info
<set>
@@ -59,6 +76,32 @@
</set>
where shop_id = #{update.shopId}
</update>
<update id="batchUpdateSpecific">
<foreach collection="list" separator=";" index="index" item="item">
update xfsg_order_sys_info
<set>
<if test="item.addresseeAddress != null and item.addresseeAddress != ''">
addressee_address = #{item.addresseeAddress},
</if>
<if test="item.addresseeProvince !=null and item.addresseeProvince != ''">
addressee_province = #{item.addresseeProvince},
</if>
<if test="item.addresseeCity !=null and item.addresseeCity != ''">
addressee_city = #{item.addresseeCity},
</if>
<if test="item.addresseeDistrict !=null and item.addresseeDistrict != ''">
addressee_district = #{item.addresseeDistrict},
</if>
<if test="item.declareGoodsLogisticsWarehouse !=null and item.declareGoodsLogisticsWarehouse != ''">
declare_goods_logistics_warehouse = #{item.declareGoodsLogisticsWarehouse},
</if>
<if test="item.receivingMsBankAccount !=null and item.receivingMsBankAccount != ''">
receiving_ms_bank_account = #{item.receivingMsBankAccount},
</if>
</set>
where shop_id = #{item.shopId}
</foreach>
</update>
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.OrderSysInfoDO">
select
shop_id as shopId,

View File

@@ -130,5 +130,17 @@
picture_obj = #{update.pictureObj}
where id = #{update.id}
</update>
<update id="updateMonthRent">
<foreach collection="list" separator=";" index="index" item="item">
update xfsg_point_detail_info
<set>
<if test="item.monthRent != null">
month_rent = #{item.monthRent},
</if>
update_time = now()
</set>
where id = #{item.id}
</foreach>
</update>
</mapper>

View File

@@ -80,7 +80,8 @@
left join store_${eid} c on b.shop_code = c.store_num
where a.deleted = 0 and a.development_manager = #{request.developmentManager}
<if test="request.keyword != null and request.keyword != ''">
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%', #{request.keyword},
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%',
#{request.keyword},
'%'))
</if>
<if test="request.developmentStartTime != null and request.developmentStartTime != ''">
@@ -114,7 +115,8 @@
</foreach>
</if>
<if test="request.areaCode!=null and request.areaCode!=''">
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code = #{request.areaCode})
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
#{request.areaCode})
</if>
order by a.id desc
</select>
@@ -185,7 +187,8 @@
left join store_${eid} c on b.shop_code = c.store_num
where a.deleted = 0 and a.point_status in (4,5,6,7)
<if test="request.keyword != null and request.keyword != ''">
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%', #{request.keyword},
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%',
#{request.keyword},
'%'))
</if>
<if test="request.developmentManager != null and request.developmentManager != ''">
@@ -216,7 +219,8 @@
and a.storage_status = #{request.storageStatus}
</if>
<if test="request.areaCode!=null and request.areaCode!=''">
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code = #{request.areaCode})
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
#{request.areaCode})
</if>
order by a.id desc
</select>
@@ -297,11 +301,11 @@
from xfsg_point_info a
LEFT JOIN xfsg_point_detail_info c on a.id = c.point_id
where a.deleted = 0
<if test = "request.keyword!=null and request.keyword !=''">
and a.point_name like concat('%', #{request.keyword}, '%')
<if test="request.keyword!=null and request.keyword !=''">
and a.point_name like concat('%', #{request.keyword}, '%')
</if>
<if test = "request.type == 1">
and a.point_status in( 4,5)
<if test="request.type == 1">
and a.point_status in( 4,5)
</if>
<if test="request.type == 2">
and a.line_id = #{request.lineId}
@@ -354,5 +358,20 @@
point_location = #{request.pointLocation}
where id = #{request.id}
</update>
<update id="updateAddress">
<foreach collection="list" item="item" index="index" separator=";">
update xfsg_point_info
<set>
<if test="item.province != null and item.province !=''">province = #{item.province},</if>
<if test="item.address !=null and item.address !=''">address = #{item.address},</if>
<if test="item.city !=null and item.city !=''">city = #{item.city},</if>
<if test="item.district !=null and item.district !=''">district = #{item.district},</if>
<if test="item.pointArea !=null and item.pointArea!=''">
point_area = #{item.pointArea}
</if>
</set>
where id = #{item.id}
</foreach>
</update>
</mapper>

View File

@@ -20,4 +20,10 @@
account,password,remark,
create_time,create_user
</sql>
<insert id="batchInsert">
<foreach collection="list" separator=";" index="index" item="item">
insert into xfsg_pos_and_order_info (shop_id,type,account,password,remark,create_time,create_user)
values (#{item.shopId},#{item.type},#{item.account},#{item.password},#{item.remark},#{item.createTime},#{item.createUser})
</foreach>
</insert>
</mapper>

View File

@@ -1,203 +1,216 @@
<?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.ShopAccountMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.ShopAccountDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="system_name" jdbcType="VARCHAR" property="systemName" />
<result column="account" jdbcType="VARCHAR" property="account" />
<result column="bound_phone" jdbcType="VARCHAR" property="boundPhone" />
<result column="password_salt" jdbcType="VARCHAR" property="passwordSalt" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="status" jdbcType="BIT" property="status" />
<result column="entry_status" jdbcType="TINYINT" property="entryStatus" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="last_sync_time" jdbcType="TIMESTAMP" property="lastSyncTime" />
<result column="secondary_password" jdbcType="VARCHAR" property="secondaryPassword" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<resultMap id="BaseResultMap" type="com.cool.store.entity.ShopAccountDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="shop_id" jdbcType="INTEGER" property="shopId"/>
<result column="system_name" jdbcType="VARCHAR" property="systemName"/>
<result column="account" jdbcType="VARCHAR" property="account"/>
<result column="bound_phone" jdbcType="VARCHAR" property="boundPhone"/>
<result column="password_salt" jdbcType="VARCHAR" property="passwordSalt"/>
<result column="password" jdbcType="VARCHAR" property="password"/>
<result column="status" jdbcType="BIT" property="status"/>
<result column="entry_status" jdbcType="TINYINT" property="entryStatus"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="last_sync_time" jdbcType="TIMESTAMP" property="lastSyncTime"/>
<result column="secondary_password" jdbcType="VARCHAR" property="secondaryPassword"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
</resultMap>
<!-- 批量新增 -->
<insert id="batchInsert">
INSERT INTO xfsg_shop_account (
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
last_sync_time,
secondary_password,
remark
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.shopId},
#{item.systemName},
#{item.account},
#{item.boundPhone},
#{item.passwordSalt},
#{item.password},
#{item.status},
#{item.entryStatus},
#{item.lastSyncTime},
#{item.secondaryPassword},
#{item.remark}
)
</foreach>
</insert>
<!-- 批量新增 -->
<insert id="batchInsert">
INSERT INTO xfsg_shop_account (
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
last_sync_time,
secondary_password,
remark
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.shopId},
#{item.systemName},
#{item.account},
#{item.boundPhone},
#{item.passwordSalt},
#{item.password},
#{item.status},
#{item.entryStatus},
#{item.lastSyncTime},
#{item.secondaryPassword},
#{item.remark}
)
</foreach>
</insert>
<!-- 根据shopId查询多条数据 -->
<select id="selectByShopId" resultMap="BaseResultMap">
SELECT
id,
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
create_time,
last_sync_time,
secondary_password,
remark
FROM
xfsg_shop_account
WHERE
shop_id = #{shopId}
order by id
</select>
<!-- 根据shopId查询多条数据 -->
<select id="selectByShopId" resultMap="BaseResultMap">
SELECT
id,
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
create_time,
last_sync_time,
secondary_password,
remark
FROM
xfsg_shop_account
WHERE
shop_id = #{shopId}
order by id
</select>
<select id="selectByShopIdAndSystemName" resultMap="BaseResultMap">
SELECT
id,
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
create_time,
last_sync_time,
secondary_password,
remark
FROM
xfsg_shop_account
WHERE
shop_id = #{shopId}
and system_name = #{systemName}
</select>
<select id="selectByShopIdAndSystemName" resultMap="BaseResultMap">
SELECT
id,
shop_id,
system_name,
account,
bound_phone,
password_salt,
password,
status,
entry_status,
create_time,
last_sync_time,
secondary_password,
remark
FROM
xfsg_shop_account
WHERE
shop_id = #{shopId}
and system_name = #{systemName}
</select>
<!-- 根据shopId与system_name修改status -->
<update id="updateStatusByShopIdAndSystemName">
UPDATE
xfsg_shop_account
<set>
<if test="status != null">
status = #{status},
</if>
<if test="syncTime != null">
last_sync_time = #{syncTime},
</if>
<if test="ylsCode != null">
account = #{ylsCode},
</if>
</set>
WHERE
shop_id = #{shopId}
and system_name in
<foreach close=")" collection="systemNameList" item="systemName" open="(" separator=",">
#{systemName}
</foreach>
</update>
<!-- 根据shopId与system_name修改status -->
<update id="updateStatusByShopIdAndSystemName">
UPDATE
xfsg_shop_account
<set>
<if test="status != null">
status = #{status},
</if>
<if test="syncTime != null">
last_sync_time = #{syncTime},
</if>
<if test="ylsCode != null">
account = #{ylsCode},
</if>
</set>
WHERE
shop_id = #{shopId}
and system_name in
<foreach close=")" collection="systemNameList" item="systemName" open="(" separator=",">
#{systemName}
</foreach>
</update>
<update id="updateEntryStatusByShopIdAndSystemName">
UPDATE
xfsg_shop_account
SET
entry_status = #{entryStatus,jdbcType=BIT}
WHERE
shop_id = #{shopId}
and system_name in
<foreach close=")" collection="systemNameList" item="systemName" open="(" separator=",">
#{systemName}
</foreach>
</update>
<update id="updateEntryStatusByShopIdAndSystemName">
UPDATE
xfsg_shop_account
SET
entry_status = #{entryStatus,jdbcType=BIT}
WHERE
shop_id = #{shopId}
and system_name in
<foreach close=")" collection="systemNameList" item="systemName" open="(" separator=",">
#{systemName}
</foreach>
</update>
<update id="updateAccountByShopIdAndSystemName">
UPDATE
xfsg_shop_account
SET
account = #{account},
password = #{password},
status = #{status}
WHERE
shop_id = #{shopId}
AND system_name = #{systemName}
</update>
<update id="updateAccountByShopIdAndSystemName">
UPDATE
xfsg_shop_account
SET
account = #{account},
password = #{password},
status = #{status}
WHERE
shop_id = #{shopId}
AND system_name = #{systemName}
</update>
<!-- 批量修改密码和密码盐 -->
<update id="batchUpdatePasswordByShopIds">
UPDATE
xfsg_shop_account
SET
password = #{password},
secondary_password = #{secondaryPassword},
password_salt = #{passwordSalt},
last_sync_time = #{lastSyncTime,jdbcType=TIMESTAMP}
WHERE
system_name in ('火码POS','云流水','新掌柜')
and shop_id IN
<foreach close=")" collection="shopIds" item="shopId" open="(" separator=",">
#{shopId}
</foreach>
</update>
<!-- 批量修改密码和密码盐 -->
<update id="batchUpdatePasswordByShopIds">
UPDATE
xfsg_shop_account
SET
password = #{password},
secondary_password = #{secondaryPassword},
password_salt = #{passwordSalt},
last_sync_time = #{lastSyncTime,jdbcType=TIMESTAMP}
WHERE
system_name in ('火码POS','云流水','新掌柜')
and shop_id IN
<foreach close=")" collection="shopIds" item="shopId" open="(" separator=",">
#{shopId}
</foreach>
</update>
<update id="dateHandle">
<foreach collection="list" item="item" separator=";">
<foreach collection="list" item="item" separator=";">
update xfsg_shop_account
<set>
<if test="item.passwordSalt != null">
password_salt = #{item.passwordSalt},
</if>
<if test="item.password != null">
password = #{item.password},
</if>
<if test="item.secondaryPassword != null">
secondary_password = #{item.secondaryPassword},
</if>
</set>
where id = #{item.id}
</foreach>
</update>
<update id="updateStatusDataHandle">
update xfsg_shop_account
<set>
<if test="item.passwordSalt != null">
password_salt = #{item.passwordSalt},
</if>
<if test="item.password != null">
password = #{item.password},
</if>
<if test="item.secondaryPassword != null">
secondary_password = #{item.secondaryPassword},
</if>
status = 5
</set>
where id = #{item.id}
</foreach>
where
shop_id in
<foreach collection="list" item="shopId" open="(" close=")" separator=",">
#{shopId}
</foreach>
and system_name in ('火码POS','云流水','新掌柜')
</update>
<select id="getALlFail">
select * from xfsg_shop_account WHERE
system_name in ('火码POS')
and status = 6
</select>
<select id="getSpecificByShopIds" resultType="com.cool.store.entity.ShopAccountDO">
select shop_id as shopId,system_name as systemName,status from xfsg_shop_account
where shop_id in
<foreach collection="shopIds" item="shopId" open="(" close=")" separator=",">
#{shopId}
</foreach>
select * from xfsg_shop_account WHERE
system_name in ('火码POS')
and status = 6
</select>
<select id="getPasswordIsNull" resultType="java.lang.Long">
SELECT shop_id as shopId FROM xfsg_shop_account
WHERE `password` is null and `system_name` = '火码POS'
<select id="getSpecificByShopIds" resultType="com.cool.store.entity.ShopAccountDO">
select shop_id as shopId,system_name as systemName,status from xfsg_shop_account
where shop_id in
<foreach collection="shopIds" item="shopId" open="(" close=")" separator=",">
#{shopId}
</foreach>
</select>
<select id="getPasswordIsNull" resultType="java.lang.Long">
SELECT shop_id as shopId FROM xfsg_shop_account
WHERE `password` is null and `system_name` = '火码POS'
</select>
</select>
</mapper>

View File

@@ -185,6 +185,52 @@
and shop_sub_stage = #{update.shopSubStage}
</foreach>
</update>
<update id="dataUpdateShopStageInfo">
<foreach collection="list" item="item" separator=";">
update
xfsg_shop_stage_info
set
shop_sub_stage_status = #{shopSubStageStatus},
is_terminated = #{isTerminated},
remark = #{remark},
actual_complete_time = #{item.endTime}
where
shop_id = #{item.shopId}
and shop_sub_stage = #{shopSubStage}
</foreach>
</update>
<update id="dataUpdateStatus">
update
xfsg_shop_stage_info
set
shop_sub_stage_status = #{shopSubStageStatus},
is_terminated = #{isTerminated},
remark = #{remark},
actual_complete_time = now()
where
shop_id in
<foreach collection=" list" open="(" separator="," close=")" item="item" index="index">
#{item}
</foreach>
and shop_sub_stage = #{shopSubStage}
and shop_sub_stage_status != #{shopSubStageStatus}
</update>
<update id="dataUpdateAcceptanceStatus">
update
xfsg_shop_stage_info
set
shop_sub_stage_status = #{shopSubStageStatus},
is_terminated = #{isTerminated},
remark = #{remark}
where
shop_id in
<foreach collection=" list" open="(" separator="," close=")" item="item" index="index">
#{item}
</foreach>
and shop_sub_stage = #{shopSubStage}
and shop_sub_stage_status = -100
</update>
<select id="getRentContractToDoPage" resultType="com.cool.store.vo.shop.RentInfoToDoVO">
select

View File

@@ -10,6 +10,44 @@
update xfsg_sign_franchise
set sign_type = 1
</update>
<update id="updateSpecific">
<foreach collection="list" separator=";" item ="item" index="index">
update xfsg_sign_franchise
<set>
<if test="item.contractCode != null">
contract_code = #{item.contractCode},
</if>
<if test="item.contractStartTime != null">
contract_start_time = #{item.contractStartTime},
</if>
<if test="item.contractEndTime != null">
contract_end_time = #{item.contractEndTime},
</if>
<if test="item.partnershipSignatorySecond != null and item.partnershipSignatorySecond != ''">
partnership_signatory_second = #{item.partnershipSignatorySecond},
</if>
<if test="item.partnershipSignatorySecondIdNumber != null and item.partnershipSignatorySecondIdNumber!=''">
partnership_signatory_second_id_number = #{item.partnershipSignatorySecondIdNumber},
</if>
<if test="item.partnershipSignatorySecondMobile !=null and item.partnershipSignatorySecondMobile != '' ">
partnership_signatory_second_mobile = #{item.partnershipSignatorySecondMobile},
</if>
<if test="item.introductionAward !=null and item.introductionAward !=''">
introduction_award = #{item.introductionAward},
</if>
<if test="item.introduceStore !=null and item.introduceStore!=''">
introduce_store = #{item.introduceStore},
</if>
<if test="item.introducer!=null and item.introducer!=''">
introducer = #{item.introducer},
</if>
<if test="item.protectiveDistance!=null">
protective_distance = #{item.protectiveDistance},
</if>
</set>
where shop_id = #{item.shopId}
</foreach>
</update>
<select id="selectByShopId" resultType="com.cool.store.entity.SignFranchiseDO">
select *
from xfsg_sign_franchise
@@ -28,4 +66,11 @@
</foreach>
</if>
</select>
<select id="selectAllByShopIds" resultType="com.cool.store.entity.SignFranchiseDO">
select * from xfsg_sign_franchise
where shop_id in
<foreach collection="list" open="(" separator="," close=")" item="item" index="index">
#{item}
</foreach>
</select>
</mapper>