Merge branch 'cc_20260415_trans'

This commit is contained in:
suzhuhong
2026-04-20 16:43:02 +08:00
23 changed files with 702 additions and 17 deletions

View File

@@ -14,11 +14,17 @@
<result column="allocation_status" property="allocationStatus" jdbcType="INTEGER"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="deleted" property="deleted" jdbcType="TINYINT"/>
</resultMap>
<sql id="Base_Column_List">
id, order_id, shop_id, pay_no, expense_type, payee_name, payee_code,
pay_amount, allocation_status, create_time, update_time
pay_amount, allocation_status, create_time, update_time, remark, deleted
</sql>
<sql id="Not_Deleted_Condition">
deleted = 0
</sql>
<select id="getById" resultMap="BaseResultMap">
@@ -31,6 +37,7 @@
SELECT <include refid="Base_Column_List"/>
FROM zxjp_pre_allocation_record
WHERE order_id = #{orderId}
AND <include refid="Not_Deleted_Condition"/>
ORDER BY create_time DESC
</select>
@@ -38,6 +45,7 @@
SELECT <include refid="Base_Column_List"/>
FROM zxjp_pre_allocation_record
WHERE shop_id = #{shopId}
AND <include refid="Not_Deleted_Condition"/>
ORDER BY create_time DESC
</select>
@@ -45,14 +53,16 @@
SELECT <include refid="Base_Column_List"/>
FROM zxjp_pre_allocation_record
WHERE shop_id = #{shopId}
and expense_type = #{expenseType}
AND expense_type = #{expenseType}
ORDER BY create_time DESC
limit 1
</select>
<select id="queryPageByPayNo" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/>
FROM zxjp_pre_allocation_record
WHERE pay_no = #{payNo}
AND <include refid="Not_Deleted_Condition"/>
ORDER BY create_time DESC
</select>
@@ -130,6 +140,23 @@
</foreach>
</delete>
<update id="softDeleteById">
UPDATE zxjp_pre_allocation_record
SET deleted = 1,
update_time = NOW()
WHERE id = #{id}
AND <include refid="Not_Deleted_Condition"/>
</update>
<update id="softDeleteByIds">
UPDATE zxjp_pre_allocation_record
SET deleted = 1,
update_time = NOW()
WHERE id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
AND <include refid="Not_Deleted_Condition"/>
</update>
</mapper>

View File

@@ -72,6 +72,12 @@
GROUP BY batch_code
</select>
<select id="getPayingOrder" resultMap="BaseResultMap">
SELECT *
FROM zxjp_wallet_trade
WHERE pay_status = 3 AND module = #{module} AND type = #{type} AND batch_code IS NULL
</select>
<select id="transferTradeList" resultMap="BaseResultMap">
SELECT *
FROM zxjp_wallet_trade