|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <?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.TtMerchantPoiMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.TtMerchantPoi">
- <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="supplier_ext_id" jdbcType="VARCHAR" property="supplierExtId"/>
- <result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/>
- <result column="merchant_province" jdbcType="VARCHAR" property="merchantProvince"/>
- <result column="merchant_city" jdbcType="VARCHAR" property="merchantCity"/>
- <result column="merchant_addr" jdbcType="VARCHAR" property="merchantAddr"/>
- <result column="longitude" jdbcType="DECIMAL" property="longitude"/>
- <result column="latitude" jdbcType="DECIMAL" property="latitude"/>
-
- <result column="amap_id" jdbcType="VARCHAR" property="amapId"/>
- <result column="extra" jdbcType="VARCHAR" property="extra"/>
-
- <result column="poi_id" jdbcType="VARCHAR" property="poiId"/>
- <result column="poi_name" jdbcType="VARCHAR" property="poiName"/>
- <result column="province" jdbcType="VARCHAR" property="province"/>
- <result column="city" jdbcType="VARCHAR" property="city"/>
- <result column="address" jdbcType="VARCHAR" property="address"/>
-
- <result column="task_id" jdbcType="VARCHAR" property="taskId"/>
- <result column="match_status" jdbcType="INTEGER" property="matchStatus"/>
- <result column="mismatch_status_desc" jdbcType="VARCHAR" property="mismatchStatusDesc"/>
-
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
-
- <result column="supplier_id" jdbcType="VARCHAR" property="supplierId"/>
- <result column="sync_status" jdbcType="INTEGER" property="syncStatus"/>
- <result column="last_sync_status" jdbcType="INTEGER" property="lastSyncStatus"/>
- <result column="fail_reason" jdbcType="VARCHAR" property="failReason"/>
-
-
- <result column="biz_licence_path" jdbcType="VARCHAR" property="bizLicencePath"/>
- <result column="biz_licence_status" jdbcType="VARCHAR" property="bizLicenceStatus"/>
- <result column="contract_path" jdbcType="VARCHAR" property="contractPath"/>
- <result column="contract_status" jdbcType="VARCHAR" property="contractStatus"/>
- <result column="qual_material" jdbcType="VARCHAR" property="qualMaterial"/>
- <result column="qual_material_status" jdbcType="VARCHAR" property="qualMaterialStatus"/>
- <result column="additional_qual" jdbcType="VARCHAR" property="additionalQual"/>
- <result column="additional_qual_status" jdbcType="VARCHAR" property="additionalQualStatus"/>
- <result column="expire_time" jdbcType="VARCHAR" property="expireTime"/>
-
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`supplier_ext_id`,
- `merchant_name`,`merchant_province`,`merchant_city`,`merchant_addr`,`longitude`,`latitude`,
- `amap_id`,`extra`,
- `poi_id`,`poi_name`,`province`,`city`,`address`,
- `task_id`,`match_status`,`mismatch_status_desc`,
- `create_date`,`update_date`,
- `supplier_id`,`sync_status`,`last_sync_status`,`fail_reason`,
- `biz_licence_path`,`biz_licence_status`,`contract_path`,`contract_status`,`qual_material`,`qual_material_status`,`additional_qual`,`additional_qual_status`,`expire_time`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where is_del = 0
-
- <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 != supplierExtId and '' != supplierExtId">
- and `supplier_ext_id` = #{supplierExtId}
- </if>
-
- <if test=" null != poiId and ''!= poiId ">
- and `poi_id` = #{poiId}
- </if>
-
- <if test=" null != poiName and ''!= poiName ">
- and `poi_name` like concat('%', #{poiName},'%')
- </if>
-
- <if test=" null != merchantName and ''!= merchantName ">
- and `merchant_name` like concat('%', #{merchantName},'%')
- </if>
-
- <if test=" null != taskId and ''!= taskId ">
- and `task_id` = #{taskId}
- </if>
-
- <if test=" null != matchStatus">
- and `match_status` = #{matchStatus}
- </if>
-
- <if test=" null != supplierId and '' != supplierId">
- and `supplier_id` = #{supplierId}
- </if>
-
- <if test=" null != syncStatus">
- and `sync_status` = #{syncStatus}
- </if>
-
- <if test=" null != lastSyncStatus">
- and `last_sync_status` = #{lastSyncStatus}
- </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.TtMerchantPoi" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from tt_merchant_poi
- <include refid="dynamicWhereConditions"/>
- </select>
-
- <select id="findIdList" parameterType="com.iformall.domain.po.TtMerchantPoi" resultType="Long">
- select id
- from tt_merchant_poi
- <include refid="dynamicWhereConditions"/>
- </select>
-
- <select id="findTaskIdList" parameterType="com.iformall.domain.po.TtMerchantPoi" resultType="String">
- select distinct `tenant_id`,`parent_tenant_id`,`task_id`
- from tt_merchant_poi
- <include refid="dynamicWhereConditions"/>
- </select>
-
- <update id="deleteByUpdate" parameterType="Long">
- update tt_merchant_poi set is_del = 1
- where id = #{id}
- </update>
-
- </mapper>
|