|  |  | @ -2,22 +2,24 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | <!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" > | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | <mapper namespace="com.glxp.api.admin.dao.thrsys.ThrCorpDao"> |  |  |  | <mapper namespace="com.glxp.api.admin.dao.thrsys.ThrCorpDao"> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     <select id="filterThrCorps" parameterType="com.glxp.api.admin.req.thrsys.FilterThrCorpRequest" |  |  |  |     <select id="filterThrCorps" parameterType="com.glxp.api.admin.req.thrsys.FilterThrCorpRequest" | 
			
		
	
		
		
			
				
					
					|  |  |  |             resultType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> |  |  |  |             resultType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         SELECT * FROM thr_corp |  |  |  |         SELECT * | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         FROM thr_corp | 
			
		
	
		
		
			
				
					
					|  |  |  |         <where> |  |  |  |         <where> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="unitId != '' and unitId != null"> |  |  |  |             <if test="unitId != '' and unitId != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND unitId like concat('%',#{unitId},'%') |  |  |  |                 AND unitId like concat('%', #{unitId}, '%') | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="name != '' and name != null"> |  |  |  |             <if test="name != '' and name != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND ( name LIKE concat('%',#{name},'%') or spell LIKE concat('%',#{name},'%') ) |  |  |  |                 AND (name LIKE concat('%', #{name}, '%') or spell LIKE concat('%', #{name}, '%')) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="thirdSysFk != '' and thirdSysFk != null"> |  |  |  |             <if test="thirdSysFk != '' and thirdSysFk != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                 AND thirdSysFk = #{thirdSysFk} |  |  |  |                 AND thirdSysFk = #{thirdSysFk} | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="lastUpdateTime!=null and lastUpdateTime!=''"> |  |  |  |             <if test="lastUpdateTime != null and lastUpdateTime != ''"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 <![CDATA[   and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>=  DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')   ]]> |  |  |  |                 <![CDATA[ | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 ]]> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </if> |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </where> |  |  |  |         </where> | 
			
		
	
		
		
			
				
					
					|  |  |  |         ORDER BY updateTime DESC |  |  |  |         ORDER BY updateTime DESC | 
			
		
	
	
		
		
			
				
					|  |  | @ -26,45 +28,36 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <insert id="insertThrCorps" keyProperty="id" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> |  |  |  |     <insert id="insertThrCorps" keyProperty="id" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         replace |  |  |  |         replace | 
			
		
	
		
		
			
				
					
					|  |  |  |         INTO thr_corp |  |  |  |                 INTO thr_corp | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         ( |  |  |  |                 (unitId, name, spell, addr, creditNo, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         unitId,name,spell,addr,creditNo, |  |  |  |                  contact, mobile, thirdSysFk, updateTime, kfdm) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         contact,mobile,thirdSysFk,updateTime |  |  |  |         values (#{unitId}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |                 #{name}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         values |  |  |  |                 #{spell}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             ( |  |  |  |                 #{addr}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{unitId}, |  |  |  |                 #{creditNo}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{name}, |  |  |  |                 #{contact}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{spell}, |  |  |  |                 #{mobile}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{addr}, |  |  |  |                 #{thirdSysFk}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{creditNo}, |  |  |  |                 #{updateTime}, #{kfdm}) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{contact}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{mobile}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{thirdSysFk}, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         #{updateTime} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     </insert> |  |  |  |     </insert> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <insert id="insertThrCorpss" keyProperty="id" parameterType="java.util.List"> |  |  |  |     <insert id="insertThrCorpss" keyProperty="id" parameterType="java.util.List"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         replace INTO thr_corp |  |  |  |         replace INTO thr_corp | 
			
		
	
		
		
			
				
					
					|  |  |  |         ( |  |  |  |                 (unitId, name, spell, addr, creditNo, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         unitId,name,spell,addr,creditNo, |  |  |  |                  contact, mobile, thirdSysFk, updateTime, kfdm) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         contact,mobile,thirdSysFk,updateTime |  |  |  |                 values | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         values |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         <foreach collection="thrCorpEntitys" item="item" index="index" |  |  |  |         <foreach collection="thrCorpEntitys" item="item" index="index" | 
			
		
	
		
		
			
				
					
					|  |  |  |                  separator=","> |  |  |  |                  separator=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |             ( |  |  |  |             (#{item.unitId}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.unitId}, |  |  |  |              #{item.name}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.name}, |  |  |  |              #{item.spell}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.spell}, |  |  |  |              #{item.addr}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.addr}, |  |  |  |              #{item.creditNo}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.creditNo}, |  |  |  |              #{item.contact}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.contact}, |  |  |  |              #{item.mobile}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.mobile}, |  |  |  |              #{item.thirdSysFk}, #{item.updateTime}, #{item.kfdm}) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             #{item.thirdSysFk},#{item.updateTime} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             ) |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         </foreach> |  |  |  |         </foreach> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </insert> |  |  |  |     </insert> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -87,33 +80,51 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |     <update id="updateThrCorps" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> |  |  |  |     <update id="updateThrCorps" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         UPDATE thr_corp |  |  |  |         UPDATE thr_corp | 
			
		
	
		
		
			
				
					
					|  |  |  |         <trim prefix="set" suffixOverrides=","> |  |  |  |         <trim prefix="set" suffixOverrides=","> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="unitId != null">unitId=#{unitId},</if> |  |  |  |             <if test="unitId != null"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="name != null">name=#{name},</if> |  |  |  |                 unitId=#{unitId}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="spell != null">spell=#{spell},</if> |  |  |  |             </if> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="addr != null">addr=#{addr},</if> |  |  |  |             <if test="name != null"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="creditNo != null">creditNo=#{creditNo},</if> |  |  |  |                 name=#{name}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="contact != null">contact=#{contact},</if> |  |  |  |             </if> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="mobile != null">mobile=#{mobile},</if> |  |  |  |             <if test="spell != null"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if> |  |  |  |                 spell=#{spell}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             <if test="updateTime != null">updateTime=#{updateTime},</if> |  |  |  |             </if> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |             <if test="addr != null"> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 addr=#{addr}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="creditNo != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 creditNo=#{creditNo}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="contact != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 contact=#{contact}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="mobile != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 mobile=#{mobile}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="thirdSysFk != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 thirdSysFk=#{thirdSysFk}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="updateTime != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 updateTime=#{updateTime}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <if test="kfdm != null"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 kfdm=#{kfdm} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |  |         </trim> |  |  |  |         </trim> | 
			
		
	
		
		
			
				
					
					|  |  |  |         WHERE id = #{id} |  |  |  |         WHERE id = #{id} | 
			
		
	
		
		
			
				
					
					|  |  |  |     </update> |  |  |  |     </update> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     <insert id="importThrCorp" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> |  |  |  |     <insert id="importThrCorp" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         replace |  |  |  |         replace | 
			
		
	
		
		
			
				
					
					|  |  |  |         into thr_corp (unitId, spell, addr, creditNo, contact, mobile, thirdSysFk, name, updateTime) |  |  |  |                 into thr_corp (unitId, spell, addr, creditNo, contact, mobile, thirdSysFk, name, updateTime, kfdm) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         values ( |  |  |  |         values (#{unitId}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{unitId}, |  |  |  |                 #{spell}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{spell}, |  |  |  |                 #{addr}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{addr}, |  |  |  |                 #{creditNo}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{creditNo}, |  |  |  |                 #{contact}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{contact}, |  |  |  |                 #{mobile}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{mobile}, |  |  |  |                 #{thirdSysFk}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{thirdSysFk}, |  |  |  |                 #{name}, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{name}, |  |  |  |                 #{updateTime}, #{kfdm}) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         #{updateTime} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         ) |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     </insert> |  |  |  |     </insert> | 
			
		
	
		
		
			
				
					
					|  |  |  | </mapper> |  |  |  | </mapper> | 
			
				
				
			
		
	
		
		
	
	
		
		
			
				
					|  |  | 
 |