|
@@ -1,52 +1,83 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.sckw.payment.dao.KwpSettlementRecordMapper">
|
|
<mapper namespace="com.sckw.payment.dao.KwpSettlementRecordMapper">
|
|
|
- <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementRecord">
|
|
|
|
|
- <!--@mbg.generated-->
|
|
|
|
|
- <!--@Table kwp_settlement_record-->
|
|
|
|
|
- <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
|
|
- <result column="ent_id" jdbcType="BIGINT" property="entId" />
|
|
|
|
|
- <result column="total_receive_money" jdbcType="DECIMAL" property="totalReceiveMoney" />
|
|
|
|
|
- <result column="exact_money" jdbcType="DECIMAL" property="exactMoney" />
|
|
|
|
|
- <result column="received_money" jdbcType="DECIMAL" property="receivedMoney" />
|
|
|
|
|
- <result column="overdue_exact_money" jdbcType="DECIMAL" property="overdueExactMoney" />
|
|
|
|
|
- <result column="total_pay_money" jdbcType="DECIMAL" property="totalPayMoney" />
|
|
|
|
|
- <result column="unpaid_money" jdbcType="DECIMAL" property="unpaidMoney" />
|
|
|
|
|
- <result column="paid_money" jdbcType="DECIMAL" property="paidMoney" />
|
|
|
|
|
- <result column="overdue_paid_money" jdbcType="DECIMAL" property="overduePaidMoney" />
|
|
|
|
|
- <result column="create_time" jdbcType="DATE" property="createTime" />
|
|
|
|
|
- <result column="order_type" jdbcType="INTEGER" property="orderType" />
|
|
|
|
|
- </resultMap>
|
|
|
|
|
- <sql id="Base_Column_List">
|
|
|
|
|
- <!--@mbg.generated-->
|
|
|
|
|
- id, ent_id, total_receive_money, exact_money, received_money, overdue_exact_money,
|
|
|
|
|
- total_pay_money, unpaid_money, paid_money, overdue_paid_money, create_time, order_type
|
|
|
|
|
- </sql>
|
|
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementRecord">
|
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
|
+ <!--@Table kwp_settlement_record-->
|
|
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id"/>
|
|
|
|
|
+ <result column="ent_id" jdbcType="BIGINT" property="entId"/>
|
|
|
|
|
+ <result column="total_receive_money" jdbcType="DECIMAL" property="totalReceiveMoney"/>
|
|
|
|
|
+ <result column="exact_money" jdbcType="DECIMAL" property="exactMoney"/>
|
|
|
|
|
+ <result column="received_money" jdbcType="DECIMAL" property="receivedMoney"/>
|
|
|
|
|
+ <result column="overdue_exact_money" jdbcType="DECIMAL" property="overdueExactMoney"/>
|
|
|
|
|
+ <result column="total_pay_money" jdbcType="DECIMAL" property="totalPayMoney"/>
|
|
|
|
|
+ <result column="unpaid_money" jdbcType="DECIMAL" property="unpaidMoney"/>
|
|
|
|
|
+ <result column="paid_money" jdbcType="DECIMAL" property="paidMoney"/>
|
|
|
|
|
+ <result column="overdue_paid_money" jdbcType="DECIMAL" property="overduePaidMoney"/>
|
|
|
|
|
+ <result column="create_time" jdbcType="DATE" property="createTime"/>
|
|
|
|
|
+ <result column="order_type" jdbcType="INTEGER" property="orderType"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
|
+ id,
|
|
|
|
|
+ ent_id,
|
|
|
|
|
+ total_receive_money,
|
|
|
|
|
+ exact_money,
|
|
|
|
|
+ received_money,
|
|
|
|
|
+ overdue_exact_money,
|
|
|
|
|
+ total_pay_money,
|
|
|
|
|
+ unpaid_money,
|
|
|
|
|
+ paid_money,
|
|
|
|
|
+ overdue_paid_money,
|
|
|
|
|
+ create_time,
|
|
|
|
|
+ order_type
|
|
|
|
|
+ </sql>
|
|
|
|
|
|
|
|
- <insert id="insertBatch">
|
|
|
|
|
- insert into kwp_settlement_record
|
|
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
- id, ent_id, total_receive_money, exact_money, received_money, overdue_exact_money,
|
|
|
|
|
- total_pay_money, unpaid_money, paid_money, overdue_paid_money, create_time, order_type
|
|
|
|
|
- </trim>
|
|
|
|
|
- values
|
|
|
|
|
- <foreach collection="list" item="item" separator=",">
|
|
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
- #{item.id,jdbcType=BIGINT},
|
|
|
|
|
- #{item.entId,jdbcType=BIGINT},
|
|
|
|
|
- #{item.totalReceiveMoney,jdbcType=DECIMAL},
|
|
|
|
|
- #{item.exactMoney,jdbcType=DECIMAL},
|
|
|
|
|
- #{item.receivedMoney,jdbcType=DECIMAL},
|
|
|
|
|
- #{item.overdueExactMoney,jdbcType=DECIMAL},
|
|
|
|
|
- #{item.totalPayMoney,jdbcType=DECIMAL},
|
|
|
|
|
- #{item.unpaidMoney,jdbcType=DECIMAL},
|
|
|
|
|
- #{item.paidMoney,jdbcType=DECIMAL},
|
|
|
|
|
- #{item.overduePaidMoney,jdbcType=DECIMAL},
|
|
|
|
|
- #{item.createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- #{item.orderType,jdbcType=INTEGER}
|
|
|
|
|
- </trim>
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </insert>
|
|
|
|
|
- <select id="countByDay">
|
|
|
|
|
|
|
+ <insert id="insertBatch">
|
|
|
|
|
+ insert into kwp_settlement_record
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ id, ent_id, total_receive_money, exact_money, received_money, overdue_exact_money,
|
|
|
|
|
+ total_pay_money, unpaid_money, paid_money, overdue_paid_money, create_time, order_type
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ values
|
|
|
|
|
+ <foreach collection="list" item="item" separator=",">
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ #{item.id,jdbcType=BIGINT},
|
|
|
|
|
+ #{item.entId,jdbcType=BIGINT},
|
|
|
|
|
+ #{item.totalReceiveMoney,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.exactMoney,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.receivedMoney,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.overdueExactMoney,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.totalPayMoney,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.unpaidMoney,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.paidMoney,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.overduePaidMoney,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{item.orderType,jdbcType=INTEGER}
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <select id="countByDay" resultType="com.sckw.payment.model.vo.SettlementRecord">
|
|
|
|
|
+ select sum(ksr.total_pay_money) totalPayMoney,
|
|
|
|
|
+ sum(ksr.exact_money) exactMoney,
|
|
|
|
|
+ sum(ksr.received_money) receivedMoney,
|
|
|
|
|
+ sum(ksr.overdue_exact_money) overdueExactMoney,
|
|
|
|
|
+ sum(ksr.total_pay_money) totalPayMoney,
|
|
|
|
|
+ sum(ksr.unpaid_money) unpaidMoney,
|
|
|
|
|
+ sum(ksr.paid_money) paidMoney,
|
|
|
|
|
+ sum(ksr.overdue_paid_money) overduePaidMoney
|
|
|
|
|
+ from kwp_settlement_record ksr
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="entId != null">
|
|
|
|
|
+ and ksr.ent_id = #{entId,jdbcType=BIGINT}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="time != null and time.size() != 0">
|
|
|
|
|
+ and ksr.create_time between
|
|
|
|
|
+ <foreach collection="time" open=" " separator="and" close=" " item="item">
|
|
|
|
|
+ #{item,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ group by ksr.create_time
|
|
|
</select>
|
|
</select>
|
|
|
</mapper>
|
|
</mapper>
|