|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?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.WxProfitSharingResultMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxProfitSharingResult">
- <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="merchant_id" jdbcType="BIGINT" property="merchantId" />
- <result column="b_tenant_id" jdbcType="VARCHAR" property="bTenantId" />
- <result column="sharing_order_id" jdbcType="BIGINT" property="sharingOrderId" />
- <result column="sharing_receiver_id" jdbcType="BIGINT" property="sharingReceiverId" />
- <result column="pay_amount" jdbcType="INTEGER" property="payAmount" />
- <result column="is_private" jdbcType="INTEGER" property="isPrivate" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="sharing_status" jdbcType="INTEGER" property="sharingStatus" />
- <result column="finish_time" jdbcType="VARCHAR" property="finishTime" />
- <result column="failed_reason" jdbcType="VARCHAR" property="failedReason" />
- <result column="description" jdbcType="VARCHAR" property="description" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`b_tenant_id`,`sharing_order_id`,`sharing_receiver_id`,`pay_amount`,`is_private`,`update_time`,`create_time`,`sharing_status`,`finish_time`,`failed_reason`,`description`
- </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 != merchantId ">
- and `merchant_id` = #{merchantId}
- </if>
-
- <if test=" null != bTenantId ">
- and `b_tenant_id` = #{bTenantId}
- </if>
-
- <if test=" null != sharingOrderId ">
- and `sharing_order_id` = #{sharingOrderId}
-
- </if>
-
- <if test=" null != sharingReceiverId ">
- and `sharing_receiver_id` = #{sharingReceiverId}
-
- </if>
-
- <if test=" null != payAmount ">
- and `pay_amount` = #{payAmount}
-
- </if>
- <if test=" null != isPrivate ">
- and `is_private` = #{isPrivate}
-
- </if>
-
- <if test=" null != updateTime ">
- and `update_time` = #{updateTime}
-
- </if>
-
- <if test=" null != createTime ">
- and `create_time` = #{createTime}
-
- </if>
-
- <if test=" null != sharingStatus ">
- and `sharing_status` = #{sharingStatus}
-
- </if>
-
- <if test=" null != finishTime ">
- and `finish_time` like concat('%', #{finishTime},'%')
-
- </if>
-
- <if test=" null != failedReason ">
- and `failed_reason` like concat('%', #{failedReason},'%')
-
- </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.iformall.domain.po.WxProfitSharingResult" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_profit_sharing_result
- <include refid="dynamicWhereConditions" />
- </select>
-
- <delete id="deleteBySharingOrderId" parameterType="java.util.HashMap" >
- delete from wx_profit_sharing_result
- where `tenant_id` = #{tenantId}
- and `sharing_order_id` = #{sharingOrderId}
- </delete>
-
-
-
-
-
-
- </mapper>
|