|
- <?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.iformall.mapper.WxCashOutMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCashOut">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
- <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
- <result column="total_fee" jdbcType="INTEGER" property="totalFee" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="audio_remark" jdbcType="VARCHAR" property="audioRemark" />
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
- <result column="b_user_id" jdbcType="BIGINT" property="bUserId" />
- <result column="phone" jdbcType="VARCHAR" property="phone" />
- <result column="wx_b_open_id" jdbcType="VARCHAR" property="wxBOpenId" />
- <result column="wx_b_open_head_img" jdbcType="VARCHAR" property="wxBOpenHeadImg" />
- <result column="audio_date" jdbcType="TIMESTAMP" property="audioDate" />
- <result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
- <result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
- <result column="recive_open_id" jdbcType="VARCHAR" property="reciveOpenId" />
- <result column="recive_nick_name" jdbcType="VARCHAR" property="reciveNickName" />
- <result column="wx_pay_no" jdbcType="VARCHAR" property="wxPayNo" />
- <result column="wx_pay_time" jdbcType="VARCHAR" property="wxPayTime" />
- <result column="fail_remark" jdbcType="VARCHAR" property="failRemark" />
- <result column="real_name" jdbcType="VARCHAR" property="realName" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`total_fee`,`status`,`audio_remark`,`create_date`,`update_date`,`b_user_id`,`phone`,
- `wx_b_open_id`,`wx_b_open_head_img`,`audio_date`,`merchant_id`,`merchant_name`,`recive_open_id`,`recive_nick_name`,
- `wx_pay_no`,`wx_pay_time`,`fail_remark`,`real_name`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
- </if>
-
- <if test=" null != tenantId and '' != tenantId">
- and `tenant_id` = #{tenantId}
- </if>
- <if test=" null != parentTenantId and '' != parentTenantId">
- and `parent_tenant_id` = #{parentTenantId}
- </if>
-
- <if test=" null != createDateBegin">
- and `create_date` >= #{createDateBegin}
- </if>
-
- <if test=" null != createDateEnd">
- and `create_date` <= #{createDateEnd}
- </if>
-
- <if test=" null != merchantId">
- and `merchant_id` = #{merchantId}
- </if>
-
- <if test=" null != merchantName ">
- and `merchant_name` like concat('%', #{merchantName},'%')
- </if>
-
- <if test=" null != realName ">
- and `real_name` like concat('%', #{realName},'%')
- </if>
-
- <if test=" null != status ">
- and `status` = #{status}
- </if>
-
- <if test=" null != statusList ">
- and status in
- <foreach collection="statusList" index="index" item="statusItem" open="(" separator="," close=")">
- #{statusItem}
- </foreach>
- </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="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_cash_out where id = #{id} and tenant_id=#{tenantId}
- </select>
-
- <select id="findList" parameterType="com.iformall.domain.po.WxCashOut" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_cash_out
- <include refid="dynamicWhereConditions" />
- </select>
-
- <update id="updateStatus" parameterType="com.iformall.domain.po.WxCashOut">
- update wx_cash_out
- set `status` = #{status},
- <if test=" null != failRemark and '' != failRemark">
- `fail_remark` = #{failRemark},
- </if>
- <if test=" null != audioRemark and '' != audioRemark">
- `audio_remark` = #{audioRemark},
- </if>
- <if test=" null != audioDate">
- `audio_date` = #{audioDate},
- </if>
- `update_date` = #{updateDate}
- where id=#{id}
- <if test=" null != tenantId and '' != tenantId">
- and `tenant_id` = #{tenantId}
- </if>
- <if test=" null != parentTenantId and '' != parentTenantId">
- and `parent_tenant_id` = #{parentTenantId}
- </if>
- </update>
-
- </mapper>
|