| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?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.sckw.payment.dao.KwpSettlementLogisticsMapper">
- <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementLogistics">
- <!--@mbg.generated-->
- <!--@Table kwp_settlement_logistics-->
- <id column="id" jdbcType="BIGINT" property="id"/>
- <result column="ent_id" jdbcType="BIGINT" property="entId"/>
- <result column="l_ledger_id" jdbcType="BIGINT" property="lLedgerId"/>
- <result column="sl_order_no" jdbcType="VARCHAR" property="slOrderNo"/>
- <result column="name" jdbcType="VARCHAR" property="name"/>
- <result column="total_price" jdbcType="DECIMAL" property="totalPrice"/>
- <result column="actual_price" jdbcType="DECIMAL" property="actualPrice"/>
- <result column="receipt_time" jdbcType="TIMESTAMP" property="receiptTime"/>
- <result column="remark" jdbcType="VARCHAR" property="remark"/>
- <result column="audit_user" jdbcType="VARCHAR" property="auditUser"/>
- <result column="audit_phone" jdbcType="VARCHAR" property="auditPhone"/>
- <result column="success_user" jdbcType="VARCHAR" property="successUser"/>
- <result column="success_phone" jdbcType="VARCHAR" property="successPhone"/>
- <result column="status" jdbcType="INTEGER" property="status"/>
- <result column="create_by" jdbcType="BIGINT" property="createBy"/>
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
- <result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- id,
- ent_id,
- l_ledger_id,
- sl_order_no,
- `name`,
- total_price,
- actual_price,
- receipt_time,
- remark,
- audit_user,
- audit_phone,
- success_user,
- success_phone,
- `status`,
- create_by,
- create_time,
- update_by,
- update_time,
- del_flag
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- <!--@mbg.generated-->
- select
- <include refid="Base_Column_List"/>
- from kwp_settlement_logistics
- where id = #{id,jdbcType=BIGINT}
- </select>
- <select id="pageSelect" resultType="com.sckw.payment.model.dto.LedgerLogisticsDto">
- select s.id,
- s.ent_id,
- s.l_ledger_id,
- s.sl_order_no,
- s.`name`,
- s.total_price,
- s.actual_price,
- s.receipt_time,
- s.remark,
- s.audit_user,
- s.audit_phone,
- s.success_user,
- s.success_phone,
- s.`status`,
- s.create_by,
- s.create_time,
- s.update_by,
- s.update_time,
- s.del_flag,
- l.name as ledger_name
- from kwp_settlement_logistics s
- inner join kwp_ledger_logistics l
- on s.l_ledger_id = l.id
- <where>
- <if test="settlementReq.status != null">
- and s.status = #{settlementReq.status}
- </if>
- <if test="settlementReq.startCreateTime != null and settlementReq.endCreateTime != null">
- and s.create_time between #{settlementReq.startCreateTime,jdbcType=TIMESTAMP}
- and #{settlementReq.endCreateTime,jdbcType=TIMESTAMP}
- </if>
- <if test="settlementReq.startReceiptTime != null and settlementReq.endReceiptTime != null">
- and s.receipt_time between #{settlementReq.startReceiptTime,jdbcType=TIMESTAMP}
- and #{settlementReq.endReceiptTime,jdbcType=TIMESTAMP}
- </if>
- <if test="settlementReq.keywords != null and settlementReq.keywords != ''">
- and (
- l.l_ledger_no like concat('%'
- , #{settlementReq.keywords}
- , '%')
- )
- </if>
- </where>
- order by update_time desc
- </select>
- </mapper>
|