|
- <?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.WxOrderMapper">
- <resultMap id="BaseResultMap" type="com.simple.domain.po.WxOrder">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
- <result column="coupon_id" jdbcType="BIGINT" property="couponId" />
- <result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
- <result column="payment" jdbcType="DECIMAL" property="payment" />
- <result column="payment_time" jdbcType="TIMESTAMP" property="paymentTime" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="coupon_status" jdbcType="INTEGER" property="couponStatus" />
- <result column="validDate" jdbcType="TIMESTAMP" property="validDate" />
- <result column="refund" jdbcType="INTEGER" property="refund" />
- <result column="refund_time" jdbcType="TIMESTAMP" property="refundTime" />
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`coupon_id`,`c_user_id`,`payment`,`payment_time`,`status`,`coupon_status`,`validDate`,`refund`,`refund_time`,`create_date`,`update_date`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
-
- </if>
-
- <if test=" null != tenantId ">
- and `tenant_id` like concat('%', #{tenantId},'%')
-
- </if>
-
- <if test=" null != couponId ">
- and `coupon_id` = #{couponId}
-
- </if>
-
- <if test=" null != cUserId ">
- and `c_user_id` = #{cUserId}
-
- </if>
-
- <if test=" null != payment ">
- and `payment` = #{payment}
-
- </if>
-
- <if test=" null != paymentTime ">
- and `payment_time` = #{paymentTime}
-
- </if>
-
- <if test=" null != status ">
- and `status` = #{status}
-
- </if>
-
- <if test=" null != couponStatus ">
- and `coupon_status` = #{couponStatus}
-
- </if>
-
- <if test=" null != validDate ">
- and `validDate` = #{validDate}
-
- </if>
-
- <if test=" null != refund ">
- and `refund` = #{refund}
-
- </if>
-
- <if test=" null != refundTime ">
- and `refund_time` = #{refundTime}
-
- </if>
-
- <if test=" null != createDate ">
- and `create_date` = #{createDate}
-
- </if>
-
- <if test=" null != updateDate ">
- and `update_date` = #{updateDate}
-
- </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.WxOrder" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_order
- <include refid="dynamicWhereConditions" />
- </select>
-
-
-
-
-
-
- </mapper>
|