|
- <?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.WxMerchantCorpMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMerchantCorp">
- <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="corp_papers_type" jdbcType="INTEGER" property="corpPapersType" />
- <result column="corp_papers_number" jdbcType="VARCHAR" property="corpPapersNumber" />
- <result column="corp_papers_person" jdbcType="VARCHAR" property="corpPapersPerson" />
- <result column="corp_papers_pic_face" jdbcType="VARCHAR" property="corpPapersPicFace" />
- <result column="corp_papers_pic_back" jdbcType="VARCHAR" property="corpPapersPicBack" />
- <result column="corp_papers_address" jdbcType="VARCHAR" property="corpPapersAddress" />
- <result column="corp_papers_register_number" jdbcType="VARCHAR" property="corpPapersRegisterNumber" />
- <result column="corp_papers_file" jdbcType="VARCHAR" property="corpPapersFile" />
- <result column="corp_contract_path" jdbcType="VARCHAR" property="corpContractPath" />
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`corp_papers_type`,`corp_papers_number`,`corp_papers_person`,`corp_papers_pic_face`,`corp_papers_pic_back`,`corp_papers_address`,`corp_papers_register_number`,`corp_papers_file`,`corp_contract_path`,`create_date`,`update_date`
- </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 != corpPapersType "> and `corp_papers_type` = #{corpPapersType} </if>
- <if test=" null != corpPapersNumber "> and `corp_papers_number` = #{corpPapersNumber} </if>
- <if test=" null != corpPapersPerson "> and `corp_papers_person` = #{corpPapersPerson} </if>
- <if test=" null != corpPapersPicFace "> and `corp_papers_pic_face` = #{corpPapersPicFace} </if>
- <if test=" null != corpPapersPicBack "> and `corp_papers_pic_back` = #{corpPapersPicBack} </if>
- <if test=" null != corpPapersAddress "> and `corp_papers_address` = #{corpPapersAddress} </if>
- <if test=" null != corpPapersRegisterNumber "> and `corp_papers_register_number` = #{corpPapersRegisterNumber} </if>
- <if test=" null != corpPapersFile "> and `corp_papers_file` = #{corpPapersFile} </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.iformall.domain.po.WxMerchantCorp" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_merchant_corp
- <include refid="dynamicWhereConditions" />
- </select>
-
-
- </mapper>
|