|
@@ -1,234 +1,245 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?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">
|
|
|
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!-- namespace必须指向DAO接口 -->
|
|
<!-- namespace必须指向DAO接口 -->
|
|
<mapper namespace="com.jpsoft.picc.modules.base.dao.CompanyDAO">
|
|
<mapper namespace="com.jpsoft.picc.modules.base.dao.CompanyDAO">
|
|
- <resultMap id="CompanyMap" type="com.jpsoft.picc.modules.base.entity.Company">
|
|
|
|
- <id property="id" column="id_" />
|
|
|
|
- <result property="name" column="name_" />
|
|
|
|
- <result property="legalName" column="legal_name" />
|
|
|
|
- <result property="legalCard" column="legal_card" />
|
|
|
|
- <result property="legalCardFile" column="legal_card_file" />
|
|
|
|
- <result property="usccCode" column="uscc_code" />
|
|
|
|
- <result property="usccFiles" column="uscc_files" />
|
|
|
|
- <result property="type" column="type_" />
|
|
|
|
- <result property="businessNature" column="business_nature" />
|
|
|
|
- <result property="businessScope" column="business_scope" />
|
|
|
|
- <result property="industryType" column="industry_type" />
|
|
|
|
- <result property="employeesNumber" column="employees_number" />
|
|
|
|
- <result property="insuredNumber" column="insured_number" />
|
|
|
|
- <result property="person" column="person_" />
|
|
|
|
- <result property="tel" column="tel_" />
|
|
|
|
- <result property="mail" column="mail_" />
|
|
|
|
- <result property="postal" column="postal_" />
|
|
|
|
- <result property="address" column="address_" />
|
|
|
|
- <result property="companyStampFile" column="company_stamp_file" />
|
|
|
|
- <result property="promoter" column="promoter_" />
|
|
|
|
- <result property="remark" column="remark_" />
|
|
|
|
- <result property="buyId" column="buy_id" />
|
|
|
|
- <result property="status" column="status_" />
|
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
|
- <result property="delFlag" column="del_flag" />
|
|
|
|
- </resultMap>
|
|
|
|
- <insert id="insert" parameterType="com.jpsoft.picc.modules.base.entity.Company">
|
|
|
|
- <!--
|
|
|
|
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
|
- select sys_guid() from dual
|
|
|
|
- </selectKey>
|
|
|
|
- -->
|
|
|
|
- <![CDATA[
|
|
|
|
|
|
+ <resultMap id="CompanyMap" type="com.jpsoft.picc.modules.base.entity.Company">
|
|
|
|
+ <id property="id" column="id_"/>
|
|
|
|
+ <result property="name" column="name_"/>
|
|
|
|
+ <result property="legalName" column="legal_name"/>
|
|
|
|
+ <result property="legalPhone" column="legal_phone"/>
|
|
|
|
+ <result property="legalCard" column="legal_card"/>
|
|
|
|
+ <result property="legalCardFile" column="legal_card_file"/>
|
|
|
|
+ <result property="usccCode" column="uscc_code"/>
|
|
|
|
+ <result property="usccFiles" column="uscc_files"/>
|
|
|
|
+ <result property="type" column="type_"/>
|
|
|
|
+ <result property="businessNature" column="business_nature"/>
|
|
|
|
+ <result property="businessScope" column="business_scope"/>
|
|
|
|
+ <result property="industryType" column="industry_type"/>
|
|
|
|
+ <result property="employeesNumber" column="employees_number"/>
|
|
|
|
+ <result property="insuredNumber" column="insured_number"/>
|
|
|
|
+ <result property="person" column="person_"/>
|
|
|
|
+ <result property="tel" column="tel_"/>
|
|
|
|
+ <result property="mail" column="mail_"/>
|
|
|
|
+ <result property="postal" column="postal_"/>
|
|
|
|
+ <result property="address" column="address_"/>
|
|
|
|
+ <result property="companyStampFile" column="company_stamp_file"/>
|
|
|
|
+ <result property="promoter" column="promoter_"/>
|
|
|
|
+ <result property="remark" column="remark_"/>
|
|
|
|
+ <result property="buyId" column="buy_id"/>
|
|
|
|
+ <result property="status" column="status_"/>
|
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
|
+ </resultMap>
|
|
|
|
+ <insert id="insert" parameterType="com.jpsoft.picc.modules.base.entity.Company">
|
|
|
|
+ <!--
|
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
|
+ select sys_guid() from dual
|
|
|
|
+ </selectKey>
|
|
|
|
+ -->
|
|
|
|
+ <![CDATA[
|
|
insert into base_company
|
|
insert into base_company
|
|
- (id_,name_,legal_name,legal_card,legal_card_file,uscc_code,uscc_files,type_,business_nature,business_scope,industry_type,employees_number,insured_number,person_,tel_,mail_,postal_,address_,company_stamp_file,promoter_,remark_,buy_id,status_,create_by,create_time,update_by,update_time,del_flag)
|
|
|
|
|
|
+ (
|
|
|
|
+ id_,name_,legal_name,legal_phone,legal_card,legal_card_file
|
|
|
|
+ uscc_code,uscc_files,type_,business_nature,business_scope,
|
|
|
|
+ industry_type,employees_number,insured_number,person_,tel_,mail_,postal_,
|
|
|
|
+ address_,company_stamp_file,promoter_,remark_,buy_id,status_,
|
|
|
|
+ create_by,create_time,update_by,update_time,del_flag)
|
|
values
|
|
values
|
|
(
|
|
(
|
|
-#{id,jdbcType=VARCHAR}
|
|
|
|
-,#{name,jdbcType=VARCHAR}
|
|
|
|
-,#{legalName,jdbcType=VARCHAR}
|
|
|
|
-,#{legalCard,jdbcType=VARCHAR}
|
|
|
|
-,#{legalCardFile,jdbcType=VARCHAR}
|
|
|
|
-,#{usccCode,jdbcType=VARCHAR}
|
|
|
|
-,#{usccFiles,jdbcType=VARCHAR}
|
|
|
|
-,#{type,jdbcType=VARCHAR}
|
|
|
|
-,#{businessNature,jdbcType=VARCHAR}
|
|
|
|
-,#{businessScope,jdbcType=VARCHAR}
|
|
|
|
-,#{industryType,jdbcType=VARCHAR}
|
|
|
|
-,#{employeesNumber,jdbcType= NUMERIC }
|
|
|
|
-,#{insuredNumber,jdbcType= NUMERIC }
|
|
|
|
-,#{person,jdbcType=VARCHAR}
|
|
|
|
-,#{tel,jdbcType=VARCHAR}
|
|
|
|
-,#{mail,jdbcType=VARCHAR}
|
|
|
|
-,#{postal,jdbcType=VARCHAR}
|
|
|
|
-,#{address,jdbcType=VARCHAR}
|
|
|
|
-,#{companyStampFile,jdbcType=VARCHAR}
|
|
|
|
-,#{promoter,jdbcType=VARCHAR}
|
|
|
|
-,#{remark,jdbcType=VARCHAR}
|
|
|
|
-,#{buyId,jdbcType=VARCHAR}
|
|
|
|
-,#{status,jdbcType=VARCHAR}
|
|
|
|
-,#{createBy,jdbcType=VARCHAR}
|
|
|
|
-,#{createTime,jdbcType= TIMESTAMP }
|
|
|
|
-,#{updateBy,jdbcType=VARCHAR}
|
|
|
|
-,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
|
-,#{delFlag,jdbcType= NUMERIC }
|
|
|
|
|
|
+ #{id,jdbcType=VARCHAR}
|
|
|
|
+ ,#{name,jdbcType=VARCHAR}
|
|
|
|
+ ,#{legalPhone,jdbcType=VARCHAR}
|
|
|
|
+ ,#{legalName,jdbcType=VARCHAR}
|
|
|
|
+ ,#{legalCard,jdbcType=VARCHAR}
|
|
|
|
+ ,#{legalCardFile,jdbcType=VARCHAR}
|
|
|
|
+ ,#{usccCode,jdbcType=VARCHAR}
|
|
|
|
+ ,#{usccFiles,jdbcType=VARCHAR}
|
|
|
|
+ ,#{type,jdbcType=VARCHAR}
|
|
|
|
+ ,#{businessNature,jdbcType=VARCHAR}
|
|
|
|
+ ,#{businessScope,jdbcType=VARCHAR}
|
|
|
|
+ ,#{industryType,jdbcType=VARCHAR}
|
|
|
|
+ ,#{employeesNumber,jdbcType= NUMERIC }
|
|
|
|
+ ,#{insuredNumber,jdbcType= NUMERIC }
|
|
|
|
+ ,#{person,jdbcType=VARCHAR}
|
|
|
|
+ ,#{tel,jdbcType=VARCHAR}
|
|
|
|
+ ,#{mail,jdbcType=VARCHAR}
|
|
|
|
+ ,#{postal,jdbcType=VARCHAR}
|
|
|
|
+ ,#{address,jdbcType=VARCHAR}
|
|
|
|
+ ,#{companyStampFile,jdbcType=VARCHAR}
|
|
|
|
+ ,#{promoter,jdbcType=VARCHAR}
|
|
|
|
+ ,#{remark,jdbcType=VARCHAR}
|
|
|
|
+ ,#{buyId,jdbcType=VARCHAR}
|
|
|
|
+ ,#{status,jdbcType=VARCHAR}
|
|
|
|
+ ,#{createBy,jdbcType=VARCHAR}
|
|
|
|
+ ,#{createTime,jdbcType= TIMESTAMP }
|
|
|
|
+ ,#{updateBy,jdbcType=VARCHAR}
|
|
|
|
+ ,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
|
+ ,#{delFlag,jdbcType= NUMERIC }
|
|
)
|
|
)
|
|
]]>
|
|
]]>
|
|
- </insert>
|
|
|
|
- <delete id="delete" parameterType="string">
|
|
|
|
- delete from base_company where id_=#{id,jdbcType=VARCHAR}
|
|
|
|
- </delete>
|
|
|
|
- <update id="update" parameterType="com.jpsoft.picc.modules.base.entity.Company">
|
|
|
|
- update base_company
|
|
|
|
- <set>
|
|
|
|
- <if test="name!=null">
|
|
|
|
- name_=#{name,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="legalName!=null">
|
|
|
|
- legal_name=#{legalName,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="legalCard!=null">
|
|
|
|
- legal_card=#{legalCard,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="legalCardFile!=null">
|
|
|
|
- legal_card_file=#{legalCardFile,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="usccCode!=null">
|
|
|
|
- uscc_code=#{usccCode,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="usccFiles!=null">
|
|
|
|
- uscc_files=#{usccFiles,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="type!=null">
|
|
|
|
- type_=#{type,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="businessNature!=null">
|
|
|
|
- business_nature=#{businessNature,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="businessScope!=null">
|
|
|
|
- business_scope=#{businessScope,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="industryType!=null">
|
|
|
|
- industry_type=#{industryType,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="employeesNumber!=null">
|
|
|
|
- employees_number=#{employeesNumber,jdbcType= NUMERIC },
|
|
|
|
- </if>
|
|
|
|
- <if test="insuredNumber!=null">
|
|
|
|
- insured_number=#{insuredNumber,jdbcType= NUMERIC },
|
|
|
|
- </if>
|
|
|
|
- <if test="person!=null">
|
|
|
|
- person_=#{person,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="tel!=null">
|
|
|
|
- tel_=#{tel,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="mail!=null">
|
|
|
|
- mail_=#{mail,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="postal!=null">
|
|
|
|
- postal_=#{postal,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="address!=null">
|
|
|
|
- address_=#{address,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="companyStampFile!=null">
|
|
|
|
- company_stamp_file=#{companyStampFile,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="promoter!=null">
|
|
|
|
- promoter_=#{promoter,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="remark!=null">
|
|
|
|
- remark_=#{remark,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="buyId!=null">
|
|
|
|
- buy_id=#{buyId,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="status!=null">
|
|
|
|
- status_=#{status,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="createBy!=null">
|
|
|
|
- create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="createTime!=null">
|
|
|
|
- create_time=#{createTime,jdbcType= TIMESTAMP },
|
|
|
|
- </if>
|
|
|
|
- <if test="updateBy!=null">
|
|
|
|
- update_by=#{updateBy,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="updateTime!=null">
|
|
|
|
- update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
|
|
- </if>
|
|
|
|
- <if test="delFlag!=null">
|
|
|
|
- del_flag=#{delFlag,jdbcType= NUMERIC },
|
|
|
|
- </if>
|
|
|
|
- </set>
|
|
|
|
- where id_=#{id}
|
|
|
|
- </update>
|
|
|
|
- <select id="get" parameterType="string" resultMap="CompanyMap">
|
|
|
|
- select * from base_company where id_=#{0}
|
|
|
|
- </select>
|
|
|
|
- <select id="exist" parameterType="string" resultType="int">
|
|
|
|
- select count(*) from base_company where id_=#{0}
|
|
|
|
- </select>
|
|
|
|
- <select id="list" resultMap="CompanyMap">
|
|
|
|
- select * from base_company
|
|
|
|
- </select>
|
|
|
|
- <select id="search" parameterType="hashmap" resultMap="CompanyMap">
|
|
|
|
- <![CDATA[
|
|
|
|
|
|
+ </insert>
|
|
|
|
+ <delete id="delete" parameterType="string">
|
|
|
|
+ delete from base_company where id_=#{id,jdbcType=VARCHAR}
|
|
|
|
+ </delete>
|
|
|
|
+ <update id="update" parameterType="com.jpsoft.picc.modules.base.entity.Company">
|
|
|
|
+ update base_company
|
|
|
|
+ <set>
|
|
|
|
+ <if test="name!=null">
|
|
|
|
+ name_=#{name,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="legalName!=null">
|
|
|
|
+ legal_name=#{legalName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="legalPhone!=null">
|
|
|
|
+ legal_phone=#{legalPhone,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="legalCard!=null">
|
|
|
|
+ legal_card=#{legalCard,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="legalCardFile!=null">
|
|
|
|
+ legal_card_file=#{legalCardFile,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="usccCode!=null">
|
|
|
|
+ uscc_code=#{usccCode,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="usccFiles!=null">
|
|
|
|
+ uscc_files=#{usccFiles,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="type!=null">
|
|
|
|
+ type_=#{type,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="businessNature!=null">
|
|
|
|
+ business_nature=#{businessNature,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="businessScope!=null">
|
|
|
|
+ business_scope=#{businessScope,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="industryType!=null">
|
|
|
|
+ industry_type=#{industryType,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="employeesNumber!=null">
|
|
|
|
+ employees_number=#{employeesNumber,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="insuredNumber!=null">
|
|
|
|
+ insured_number=#{insuredNumber,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="person!=null">
|
|
|
|
+ person_=#{person,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="tel!=null">
|
|
|
|
+ tel_=#{tel,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mail!=null">
|
|
|
|
+ mail_=#{mail,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="postal!=null">
|
|
|
|
+ postal_=#{postal,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="address!=null">
|
|
|
|
+ address_=#{address,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyStampFile!=null">
|
|
|
|
+ company_stamp_file=#{companyStampFile,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="promoter!=null">
|
|
|
|
+ promoter_=#{promoter,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark!=null">
|
|
|
|
+ remark_=#{remark,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="buyId!=null">
|
|
|
|
+ buy_id=#{buyId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status!=null">
|
|
|
|
+ status_=#{status,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createBy!=null">
|
|
|
|
+ create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createTime!=null">
|
|
|
|
+ create_time=#{createTime,jdbcType= TIMESTAMP },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy!=null">
|
|
|
|
+ update_by=#{updateBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime!=null">
|
|
|
|
+ update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="delFlag!=null">
|
|
|
|
+ del_flag=#{delFlag,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where id_=#{id}
|
|
|
|
+ </update>
|
|
|
|
+ <select id="get" parameterType="string" resultMap="CompanyMap">
|
|
|
|
+ select * from base_company where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="exist" parameterType="string" resultType="int">
|
|
|
|
+ select count(*) from base_company where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="list" resultMap="CompanyMap">
|
|
|
|
+ select * from base_company
|
|
|
|
+ </select>
|
|
|
|
+ <select id="search" parameterType="hashmap" resultMap="CompanyMap">
|
|
|
|
+ <![CDATA[
|
|
select * from base_company where del_flag=0
|
|
select * from base_company where del_flag=0
|
|
]]>
|
|
]]>
|
|
- <if test="searchParams.name != null">
|
|
|
|
- and name_ like #{searchParams.name}
|
|
|
|
- </if>
|
|
|
|
- <if test="searchParams.legalName != null">
|
|
|
|
- and legal_name like #{searchParams.legalName}
|
|
|
|
- </if>
|
|
|
|
- <if test="searchParams.usccCode != null">
|
|
|
|
- and uscc_code like #{searchParams.usccCode}
|
|
|
|
- </if>
|
|
|
|
- <if test="searchParams.promoter != null">
|
|
|
|
- and promoter_ = #{searchParams.promoter}
|
|
|
|
- </if>
|
|
|
|
- <if test="searchParams.startTime != null">
|
|
|
|
- <![CDATA[
|
|
|
|
|
|
+ <if test="searchParams.name != null">
|
|
|
|
+ and name_ like #{searchParams.name}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.legalName != null">
|
|
|
|
+ and legal_name like #{searchParams.legalName}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.usccCode != null">
|
|
|
|
+ and uscc_code like #{searchParams.usccCode}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.promoter != null">
|
|
|
|
+ and promoter_ = #{searchParams.promoter}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.startTime != null">
|
|
|
|
+ <![CDATA[
|
|
and create_time >= str_to_date( #{searchParams.startTime},'%Y-%m-%d')
|
|
and create_time >= str_to_date( #{searchParams.startTime},'%Y-%m-%d')
|
|
]]>
|
|
]]>
|
|
- </if>
|
|
|
|
- <if test="searchParams.endTime != null">
|
|
|
|
- <![CDATA[
|
|
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.endTime != null">
|
|
|
|
+ <![CDATA[
|
|
and create_time < str_to_date( #{searchParams.endTime},'%Y-%m-%d')
|
|
and create_time < str_to_date( #{searchParams.endTime},'%Y-%m-%d')
|
|
]]>
|
|
]]>
|
|
- </if>
|
|
|
|
|
|
+ </if>
|
|
|
|
|
|
- <if test="searchParams.promotionList != null">
|
|
|
|
- and promoter_ in <foreach item="item" collection="searchParams.promotionList" open="(" separator="," close=")">
|
|
|
|
- #{item}
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="searchParams.promotionList != null">
|
|
|
|
+ and promoter_ in
|
|
|
|
+ <foreach item="item" collection="searchParams.promotionList" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
|
|
- <if test="searchParams.hasPromotion != null">
|
|
|
|
- <![CDATA[
|
|
|
|
|
|
+ <if test="searchParams.hasPromotion != null">
|
|
|
|
+ <![CDATA[
|
|
and ifnull(promoter_,'')<>''
|
|
and ifnull(promoter_,'')<>''
|
|
]]>
|
|
]]>
|
|
- </if>
|
|
|
|
- <foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
|
|
- ${sort.name} ${sort.order}
|
|
|
|
- </foreach>
|
|
|
|
- </select>
|
|
|
|
|
|
+ </if>
|
|
|
|
+ <foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
|
|
+ ${sort.name} ${sort.order}
|
|
|
|
+ </foreach>
|
|
|
|
+ </select>
|
|
<select id="findByCreateBy" resultMap="CompanyMap">
|
|
<select id="findByCreateBy" resultMap="CompanyMap">
|
|
- select * from base_company where create_by=#{0} and del_flag=0 limit 1
|
|
|
|
- </select>
|
|
|
|
- <select id="findByPromoter" resultMap="CompanyMap">
|
|
|
|
- select * from base_company where promoter_=#{0} and del_flag=0
|
|
|
|
- </select>
|
|
|
|
|
|
+ select * from base_company where create_by=#{0} and del_flag=0 limit 1
|
|
|
|
+ </select>
|
|
|
|
+ <select id="findByPromoter" resultMap="CompanyMap">
|
|
|
|
+ select * from base_company where promoter_=#{0} and del_flag=0
|
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="findByPromoterAndCreatTime" resultMap="CompanyMap">
|
|
|
|
- <![CDATA[
|
|
|
|
|
|
+ <select id="findByPromoterAndCreatTime" resultMap="CompanyMap">
|
|
|
|
+ <![CDATA[
|
|
select * from base_company where
|
|
select * from base_company where
|
|
promoter_=#{promoter} and del_flag=0
|
|
promoter_=#{promoter} and del_flag=0
|
|
and create_time >= str_to_date( #{startTime},'%Y-%m-%d')
|
|
and create_time >= str_to_date( #{startTime},'%Y-%m-%d')
|
|
and create_time < str_to_date( #{endTime},'%Y-%m-%d')
|
|
and create_time < str_to_date( #{endTime},'%Y-%m-%d')
|
|
]]>
|
|
]]>
|
|
- </select>
|
|
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|