|
- <?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.simple.mapper.WxProfitSharingOrderMapper">
- <resultMap id="BaseResultMap" type="com.simple.domain.po.WxProfitSharingOrder">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
- <result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
- <result column="order_id" jdbcType="VARCHAR" property="orderId" />
- <result column="pay_amount" jdbcType="INTEGER" property="payAmount" />
- <result column="pay_time_end" jdbcType="TIMESTAMP" property="payTimeEnd" />
- <result column="pay_time_start" jdbcType="TIMESTAMP" property="payTimeStart" />
- <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
- <result column="sharing_order_id" jdbcType="VARCHAR" property="sharingOrderId" />
- <result column="error_msg" jdbcType="VARCHAR" property="errorMsg" />
- <result column="sharing_status" jdbcType="INTEGER" property="sharingStatus" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`merchant_id`,`order_id`,`pay_amount`,`pay_time_end`,`pay_time_start`,`transaction_id`,`sharing_order_id`,`error_msg`,`sharing_status`,`update_time`,`create_time`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
-
- </if>
-
- <if test=" null != tenantId ">
- and `tenant_id` = #{tenantId}
-
- </if>
-
- <if test=" null != merchantId ">
- and `merchant_id` = #{merchantId}
-
- </if>
-
- <if test=" null != orderId ">
- and `order_id` = #{orderId}
-
- </if>
-
- <if test=" null != payAmount ">
- and `pay_amount` = #{payAmount}
-
- </if>
-
- <if test=" null != payTimeEnd ">
- and `pay_time_end` = #{payTimeEnd}
-
- </if>
-
- <if test=" null != payTimeStart ">
- and `pay_time_start` = #{payTimeStart}
-
- </if>
-
- <if test=" null != transactionId ">
- and `transaction_id` like concat('%', #{transactionId},'%')
-
- </if>
-
- <if test=" null != sharingOrderId ">
- and `sharing_order_id` like concat('%', #{sharingOrderId},'%')
-
- </if>
-
- <if test=" null != errorMsg ">
- and `error_msg` like concat('%', #{errorMsg},'%')
-
- </if>
-
- <if test=" null != sharingStatus ">
- and `sharing_status` like concat('%', #{sharingStatus},'%')
-
- </if>
-
- <if test=" null != updateTime ">
- and `update_time` = #{updateTime}
-
- </if>
-
- <if test=" null != createTime ">
- and `create_time` = #{createTime}
-
- </if>
- <if test=" null != ids ">
- and id in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
- <if test=" null != sortColumns"> order by ${sortColumns} </if>
- </sql>
-
- <select id="findList" parameterType="com.simple.domain.po.WxProfitSharingOrder" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_profit_sharing_order
- <include refid="dynamicWhereConditions" />
- </select>
-
-
-
-
-
-
- </mapper>
|