76 lines
3.1 KiB
XML
Raw Permalink Normal View History

2026-03-10 14:30:24 +08:00
<?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="CompPayInfo">
<insert id="addCompPayInfo" parameterType="CompPayInfo">
INSERT INTO CompPayInfo ( compPayInfoId,account,batchCode,remitter,
remitMethod,remitDate,description,totalUser,totalAmount,importer,
created,finance,finanDate,checker,checkDesc,checkDate,status,memo )
Values ( #{compPayInfoId},#{account},#{batchCode},#{remitter},
#{remitMethod},#{remitDate},#{description},#{totalUser},#{totalAmount},#{importer},
#{created},#{finance},#{finanDate},#{checker},#{checkDesc},#{checkDate},#{status},#{memo})
</insert>
<update id="editCompPayInfo" parameterType="CompPayInfo">
UPDATE CompPayInfo
SET compPayInfoId=#{compPayInfoId},account=#{account},batchCode=#{batchCode},
remitter=#{remitter},remitMethod=#{remitMethod},remitDate=#{remitDate},
description=#{description},totalUser=#{totalUser},totalAmount=#{totalAmount},
importer=#{importer},created=#{created},finance=#{finance},finanDate=#{finanDate},
checker=#{checker},checkDesc=#{checkDesc},checkDate=#{checkDate},status=#{status},memo=#{memo},
totalfees=#{totalfees},proxyer=#{proxyer},importerId=#{importerId},pic=#{pic}
WHERE compPayInfoId=#{compPayInfoId}
</update>
<select id="getCompPayInfo" parameterType="java.lang.Integer" resultType="CompPayInfo">
SELECT compPayInfoId,account,batchCode,remitter,remitMethod,remitDate,
description,totalUser,totalAmount,importer,created,finance,finanDate,
checker,checkDesc,checkDate,status,memo,totalfees,proxyer,importerId,pic
FROM CompPayInfo
WHERE compPayInfoId=#{compPayInfoId}
</select>
<select id="getSeqCompPayInfo" resultType="Integer" useCache="false" flushCache="true">
SELECT nextval('seq_compPayInfoId')
</select>
<select id="getCompPayInfoCount" parameterType="java.lang.Integer" resultType="java.lang.Integer">
SELECT COUNT(*)
FROM compPayInfoId
WHERE status = #{status}
</select>
<select id="getCompPayInfos" parameterType="java.lang.Integer" resultType="CompPayInfo">
SELECT compPayInfoId,account,batchCode,remitter,remitMethod,remitDate,
'' as description,totalUser,totalAmount,importer,created,finance,finanDate,
checker,'' as checkDesc,checkDate,status,'' as memo
FROM CompPayInfo
WHERE status = #{status}
ORDER BY compPayInfoId
<if test="pageSize!=null">
LIMIT #{pageSize}
</if>
<if test="offset!=null">
OFFSET #{offset}
</if>
</select>
<select id="getCompPayInfoByTime" parameterType="java.util.Map" resultType="java.util.HashMap">
SELECT compPayInfoId,totalFees
FROM CompPayInfo
WHERE created&gt;= #{startTime} and proxyer = #{proxyerId}
ORDER BY compPayInfoId
</select>
<update id="setCompPayInfoTotalFees" parameterType="java.util.Map">
update comppayinfo set totalfees=#{totalFees} where compPayInfoId = #{compPayInfoId}
</update>
</mapper>