Merge #98 into master from cc_20260408_trans
feat:mock 处理
* cc_20260408_trans: (22 commits squashed)
- feat:分账
- feat:分账接口
- feat:分账单管理
- feat:分账管理
- feat:分账管理
- feat:userIdName
- feat:提现
- feat:调整
- feat:accountName
- feat:accountName
- feat:mock
- feat:关联门店
- feat:待充值待认款
- feat:待充值待认款
- feat:payer_account_no
- feat:payeeAccountName
- feat:payeeAccountNo
- feat:page
- feat:枚举
- feat:接口请求方式调整get->post
- feat:mock 处理
- Merge branch 'master' into cc_20260408_trans
# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/constants/RedisConstant.java
#	coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/98
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
<?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.AdjustmentOrderMapper">
|
||||
|
||||
<!-- 根据调整单号查询 -->
|
||||
<select id="getByAdjustmentNo" resultType="com.cool.store.entity.AdjustmentOrderDO">
|
||||
select *
|
||||
from zxjp_adjustment_order
|
||||
where adjustment_no = #{adjustmentNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据状态查询 -->
|
||||
<select id="listByStatus" resultType="com.cool.store.entity.AdjustmentOrderDO">
|
||||
select *
|
||||
from zxjp_adjustment_order
|
||||
where status = #{status}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 根据关联分账单号查询 -->
|
||||
<select id="listByRelatedSplitNo" resultType="com.cool.store.entity.AdjustmentOrderDO">
|
||||
select *
|
||||
from zxjp_adjustment_order
|
||||
where related_split_no = #{relatedSplitNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据门店ID查询 -->
|
||||
<select id="listByStoreId" resultType="com.cool.store.entity.AdjustmentOrderDO">
|
||||
select *
|
||||
from zxjp_adjustment_order
|
||||
where store_id = #{storeId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 批量更新状态 -->
|
||||
<update id="batchUpdateStatus">
|
||||
update zxjp_adjustment_order
|
||||
set status = #{status}
|
||||
where id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据ID更新关联分账单号 -->
|
||||
<update id="updateRelatedSplitNo">
|
||||
update zxjp_adjustment_order
|
||||
set related_split_no = #{relatedSplitNo}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="pageQuery" resultType="com.cool.store.response.AdjustmentOrderResponse">
|
||||
select
|
||||
a.*,
|
||||
b.store_name as storeName,
|
||||
b.store_num as storeNum,
|
||||
a.pay_time as payTime
|
||||
from zxjp_adjustment_order a
|
||||
left join store_${enterpriseId} b
|
||||
on a.store_id = b.store_id
|
||||
where a.deleted = 0
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
and (b.store_name like concat('%', #{request.keyword}, '%')
|
||||
or b.store_num like concat('%', #{request.keyword}, '%'))
|
||||
</if>
|
||||
<if test="request.adjustmentNo != null and request.adjustmentNo != ''">
|
||||
and a.adjustment_no like concat('%', #{request.adjustmentNo}, '%')
|
||||
</if>
|
||||
<if test="request.storeId != null and request.storeId != ''">
|
||||
and a.store_id = #{request.storeId}
|
||||
</if>
|
||||
<if test="request.expenseTypeCode != null and request.expenseTypeCode != ''">
|
||||
and a.expense_type_code = #{request.expenseTypeCode}
|
||||
</if>
|
||||
<if test="request.adjustType != null">
|
||||
and a.adjust_type = #{request.adjustType}
|
||||
</if>
|
||||
<if test="request.statusList != null and request.statusList.size() > 0">
|
||||
and a.status in
|
||||
<foreach collection="request.statusList" item="status" open="(" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.adjustReason != null and request.adjustReason != ''">
|
||||
and a.adjust_reason like concat('%', #{request.adjustReason}, '%')
|
||||
</if>
|
||||
<if test="request.businessTypeCode != null and request.businessTypeCode != ''">
|
||||
and a.business_type_code = #{request.businessTypeCode}
|
||||
</if>
|
||||
<if test="request.claimStartTime != null">
|
||||
and a.claim_time >= #{request.claimStartTime}
|
||||
</if>
|
||||
<if test="request.claimEndTime != null">
|
||||
and a.claim_time <= #{request.claimEndTime}
|
||||
</if>
|
||||
<if test="request.expenseSheetType != null and request.expenseSheetType != ''">
|
||||
and a.expense_sheet_type = #{request.expenseSheetType}
|
||||
</if>
|
||||
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?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.ExpenseMappingMapper">
|
||||
|
||||
<!-- 根据网商交易流水号查询 -->
|
||||
<select id="getByTradeNo" resultType="com.cool.store.entity.ExpenseMappingDO">
|
||||
select *
|
||||
from zxjp_expense_mapping
|
||||
where trade_no = #{tradeNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据费用单号查询 -->
|
||||
<select id="getByRelatedAdjustmentNo" resultType="com.cool.store.entity.ExpenseMappingDO">
|
||||
select *
|
||||
from zxjp_expense_mapping
|
||||
where related_adjustment_no = #{relatedAdjustmentNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据交易流水号列表批量查询 -->
|
||||
<select id="listByTradeNos" resultType="com.cool.store.entity.ExpenseMappingDO">
|
||||
select *
|
||||
from zxjp_expense_mapping
|
||||
where trade_no in
|
||||
<foreach collection="tradeNos" item="tradeNo" open="(" separator="," close=")">
|
||||
#{tradeNo}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 根据费用单号查询列表 -->
|
||||
<select id="listByRelatedAdjustmentNo" resultType="com.cool.store.entity.ExpenseMappingDO">
|
||||
select *
|
||||
from zxjp_expense_mapping
|
||||
where related_adjustment_no = #{relatedAdjustmentNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据费用单号列表批量查询 -->
|
||||
<select id="listByRelatedAdjustmentNoList" resultType="com.cool.store.entity.ExpenseMappingDO">
|
||||
select *
|
||||
from zxjp_expense_mapping
|
||||
where related_adjustment_no in
|
||||
<foreach collection="relatedAdjustmentNos" item="relatedAdjustmentNo" open="(" separator="," close=")">
|
||||
#{relatedAdjustmentNo}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
insert into zxjp_expense_mapping (related_adjustment_no, trade_no)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.relatedAdjustmentNo}, #{item.tradeNo})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,146 @@
|
||||
<?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.SplitOrderMapper">
|
||||
|
||||
<!-- 根据分账单号查询 -->
|
||||
<select id="getBySplitNo" resultType="com.cool.store.entity.SplitOrderDO">
|
||||
select *
|
||||
from zxjp_split_order
|
||||
where split_no = #{splitNo}
|
||||
</select>
|
||||
|
||||
<!-- 根据状态查询 -->
|
||||
<select id="listByStatus" resultType="com.cool.store.entity.SplitOrderDO">
|
||||
select *
|
||||
from zxjp_split_order
|
||||
where status = #{status}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 根据关联单据号查询 -->
|
||||
<select id="listByRelatedDocNo" resultType="com.cool.store.entity.SplitOrderDO">
|
||||
select *
|
||||
from zxjp_split_order
|
||||
where related_doc_no = #{relatedDocNo}
|
||||
and status in
|
||||
<foreach collection="statusList" item="status" open="(" separator="," close=")">
|
||||
#{status}
|
||||
</foreach>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 根据门店ID查询 -->
|
||||
<select id="listByStoreId" resultType="com.cool.store.entity.SplitOrderDO">
|
||||
select *
|
||||
from zxjp_split_order
|
||||
where related_store_id = #{storeId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 批量更新状态 -->
|
||||
<update id="batchUpdateStatus">
|
||||
update zxjp_split_order
|
||||
set status = #{status}
|
||||
where id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="pageQuery" resultType="com.cool.store.entity.SplitOrderDO">
|
||||
select *
|
||||
from zxjp_split_order a
|
||||
where deleted = 0
|
||||
<if test="request.splitNo != null and request.splitNo != ''">
|
||||
and split_no like concat('%', #{request.splitNo}, '%')
|
||||
</if>
|
||||
<if test="request.splitType != null">
|
||||
and split_type = #{request.splitType}
|
||||
</if>
|
||||
<if test="request.payerAccountName != null and request.payerAccountName != ''">
|
||||
and payer_account_name like concat('%', #{request.payerAccountName}, '%')
|
||||
</if>
|
||||
<if test="request.payeeAccountName != null and request.payeeAccountName != ''">
|
||||
and payee_account_name like concat('%', #{request.payeeAccountName}, '%')
|
||||
</if>
|
||||
<if test="request.expenseTypeCode != null and request.expenseTypeCode != ''">
|
||||
and expense_type_code = #{request.expenseTypeCode}
|
||||
</if>
|
||||
<if test="request.relatedStoreId != null and request.relatedStoreId != ''">
|
||||
and related_store_id = #{request.relatedStoreId}
|
||||
</if>
|
||||
<if test="request.relatedDocNo != null and request.relatedDocNo != ''">
|
||||
and related_doc_no like concat('%', #{request.relatedDocNo}, '%')
|
||||
</if>
|
||||
<if test="request.status != null and request.status != ''">
|
||||
and status = #{request.status}
|
||||
</if>
|
||||
<if test="request.source != null">
|
||||
and source = #{request.source}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 分页查询(关联门店信息) -->
|
||||
<select id="pageQueryWithStore" resultType="com.cool.store.response.SplitOrderResponse">
|
||||
SELECT
|
||||
a.id,
|
||||
a.split_no AS splitNo,
|
||||
a.split_type AS splitType,
|
||||
a.related_store_id AS relatedStoreId,
|
||||
b.store_name AS storeName,
|
||||
b.store_num AS storeNum,
|
||||
a.payer_account_name AS payerAccountName,
|
||||
a.payee_account_name AS payeeAccountName,
|
||||
a.payer_account_no AS payerAccountNo,
|
||||
a.payee_account_no AS payeeAccountNo,
|
||||
a.expense_type_code AS expenseTypeCode,
|
||||
a.split_amount AS splitAmount,
|
||||
a.related_doc_no AS relatedDocNo,
|
||||
a.remark,
|
||||
a.status,
|
||||
a.confirmer,
|
||||
a.confirm_time AS confirmTime,
|
||||
a.create_user_id AS createUserId,
|
||||
a.create_time AS createTime,
|
||||
a.source
|
||||
FROM zxjp_split_order a
|
||||
LEFT JOIN store_${enterpriseId} b ON a.related_store_id = b.store_id
|
||||
WHERE a.deleted = 0
|
||||
<if test="request.splitNo != null and request.splitNo != ''">
|
||||
AND a.split_no LIKE CONCAT('%', #{request.splitNo}, '%')
|
||||
</if>
|
||||
<if test="request.splitType != null">
|
||||
AND a.split_type = #{request.splitType}
|
||||
</if>
|
||||
<if test="request.payerAccountName != null and request.payerAccountName != ''">
|
||||
AND a.payer_account_name LIKE CONCAT('%', #{request.payerAccountName}, '%')
|
||||
</if>
|
||||
<if test="request.payeeAccountName != null and request.payeeAccountName != ''">
|
||||
AND a.payee_account_name LIKE CONCAT('%', #{request.payeeAccountName}, '%')
|
||||
</if>
|
||||
<if test="request.expenseTypeCode != null and request.expenseTypeCode != ''">
|
||||
AND a.expense_type_code = #{request.expenseTypeCode}
|
||||
</if>
|
||||
<if test="request.relatedStoreId != null and request.relatedStoreId != ''">
|
||||
AND a.related_store_id = #{request.relatedStoreId}
|
||||
</if>
|
||||
<if test="request.relatedDocNo != null and request.relatedDocNo != ''">
|
||||
AND a.related_doc_no LIKE CONCAT('%', #{request.relatedDocNo}, '%')
|
||||
</if>
|
||||
<if test="request.status != null and request.status != ''">
|
||||
AND a.status = #{request.status}
|
||||
</if>
|
||||
<if test="request.source != null">
|
||||
AND a.source = #{request.source}
|
||||
</if>
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
AND (b.store_name LIKE CONCAT('%', #{request.keyword}, '%') OR b.store_num LIKE CONCAT('%', #{request.keyword}, '%'))
|
||||
</if>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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.WithdrawApplicationMapper">
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="pageQuery" resultType="com.cool.store.dto.wallet.WithdrawApplicationDTO">
|
||||
SELECT
|
||||
id,
|
||||
withdraw_no AS withdrawNo,
|
||||
account_name AS accountName,
|
||||
amount,
|
||||
bank_card_no AS bankCardNo,
|
||||
bank_name AS bankName,
|
||||
status,
|
||||
fail_reason AS failReason,
|
||||
create_user_id AS createUserId,
|
||||
create_time AS createTime,
|
||||
update_time AS updateTime
|
||||
FROM zxjp_withdraw_application
|
||||
WHERE 1=1
|
||||
<if test="request.withdrawNo != null and request.withdrawNo != ''">
|
||||
AND withdraw_no LIKE CONCAT('%', #{request.withdrawNo}, '%')
|
||||
</if>
|
||||
<if test="request.accountName != null and request.accountName != ''">
|
||||
AND account_name LIKE CONCAT('%', #{request.accountName}, '%')
|
||||
</if>
|
||||
<if test="request.startTime != null">
|
||||
AND create_time >= #{request.startTime}
|
||||
</if>
|
||||
<if test="request.endTime != null">
|
||||
AND create_time <= #{request.endTime}
|
||||
</if>
|
||||
<if test="request.status != null">
|
||||
AND status = #{request.status}
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -71,4 +71,11 @@
|
||||
WHERE pay_status = 3 AND module = #{module} AND type = #{type} AND batch_code IS NOT NULL
|
||||
GROUP BY batch_code
|
||||
</select>
|
||||
|
||||
<select id="transferTradeList" resultMap="BaseResultMap">
|
||||
SELECT *
|
||||
FROM zxjp_wallet_trade
|
||||
WHERE pay_status = 3 AND module = #{module} AND type = #{type}
|
||||
order by id desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user