|
|
|
@ -2,10 +2,10 @@
|
|
|
|
|
<!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.ThrCorpImportDetailDao">
|
|
|
|
|
|
|
|
|
|
<select id="filterCorpDetailImport" parameterType="com.glxp.api.admin.req.basic.FilterUdiIpLogRequest"
|
|
|
|
|
resultType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity">
|
|
|
|
|
SELECT * FROM thr_corp_import_detail
|
|
|
|
|
SELECT *
|
|
|
|
|
FROM thr_corp_import_detail
|
|
|
|
|
<where>
|
|
|
|
|
<if test="genKey != '' and genKey != null">
|
|
|
|
|
AND genKeyFk = #{genKey}
|
|
|
|
@ -20,20 +20,15 @@
|
|
|
|
|
AND thirdSysFk = #{thirdSysFk}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertCorpDetailImport" keyProperty="id"
|
|
|
|
|
parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity">
|
|
|
|
|
insert INTO thr_corp_import_detail
|
|
|
|
|
(
|
|
|
|
|
unitId,name,spell,addr,creditNo,
|
|
|
|
|
contact,mobile,thirdSysFk,updateTime ,genKeyFk
|
|
|
|
|
)
|
|
|
|
|
values
|
|
|
|
|
(
|
|
|
|
|
#{unitId},
|
|
|
|
|
(unitId, name, spell, addr, creditNo,
|
|
|
|
|
contact, mobile, thirdSysFk, updateTime, genKeyFk, kfdm)
|
|
|
|
|
values (#{unitId},
|
|
|
|
|
#{name},
|
|
|
|
|
#{spell},
|
|
|
|
|
#{addr},
|
|
|
|
@ -42,55 +37,80 @@
|
|
|
|
|
#{mobile},
|
|
|
|
|
#{thirdSysFk},
|
|
|
|
|
#{updateTime},
|
|
|
|
|
#{genKeyFk}
|
|
|
|
|
)
|
|
|
|
|
#{genKeyFk}, #{kfdm})
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<insert id="insertCorpDetailImports" keyProperty="id" parameterType="java.util.List">
|
|
|
|
|
insert INTO thr_corp_import_detail
|
|
|
|
|
(
|
|
|
|
|
unitId,name,spell,addr,creditNo,
|
|
|
|
|
contact,mobile,thirdSysFk ,updateTime ,genKeyFk )
|
|
|
|
|
(unitId, name, spell, addr, creditNo,
|
|
|
|
|
contact, mobile, thirdSysFk, updateTime, genKeyFk, kfdm)
|
|
|
|
|
values
|
|
|
|
|
<foreach collection="corps" item="item" index="index"
|
|
|
|
|
separator=",">
|
|
|
|
|
(
|
|
|
|
|
#{item.unitId},
|
|
|
|
|
(#{item.unitId},
|
|
|
|
|
#{item.name},
|
|
|
|
|
#{item.spell},
|
|
|
|
|
#{item.addr},
|
|
|
|
|
#{item.creditNo},
|
|
|
|
|
#{item.contact},
|
|
|
|
|
#{item.mobile},
|
|
|
|
|
#{item.thirdSysFk} ,#{item.updateTime},#{item.genKeyFk} )
|
|
|
|
|
#{item.thirdSysFk}, #{item.updateTime}, #{item.genKeyFk}, #{item.kfdm})
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
<delete id="deleteById" parameterType="Map">
|
|
|
|
|
DELETE FROM thr_corp_import_detail WHERE id = #{id}
|
|
|
|
|
DELETE
|
|
|
|
|
FROM thr_corp_import_detail
|
|
|
|
|
WHERE id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByGenkey" parameterType="Map">
|
|
|
|
|
DELETE FROM thr_corp_import_detail WHERE genKeyFk = #{genKey}
|
|
|
|
|
DELETE
|
|
|
|
|
FROM thr_corp_import_detail
|
|
|
|
|
WHERE genKeyFk = #{genKey}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<update id="updateCorpDetailImport" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpImportDetailEntity">
|
|
|
|
|
UPDATE thr_corp_import_detail
|
|
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
|
<if test="unitId != null">unitId=#{unitId},</if>
|
|
|
|
|
<if test="name != null">name=#{name},</if>
|
|
|
|
|
<if test="spell != null">spell=#{spell},</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="genKeyFk != null">genKeyFk=#{genKeyFk},</if>
|
|
|
|
|
<if test="unitId != null">
|
|
|
|
|
unitId=#{unitId},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null">
|
|
|
|
|
name=#{name},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spell != null">
|
|
|
|
|
spell=#{spell},
|
|
|
|
|
</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="genKeyFk != null">
|
|
|
|
|
genKeyFk=#{genKeyFk},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="kfdm != null">
|
|
|
|
|
kfdm=#{kfdm},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
WHERE id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByTime">
|
|
|
|
|
Delete From thr_corp_import_detail
|
|
|
|
|
Delete
|
|
|
|
|
From thr_corp_import_detail
|
|
|
|
|
where date(updateTime) <= date(DATE_SUB(NOW(), INTERVAL 30 day))
|
|
|
|
|
</delete>
|
|
|
|
|
</mapper>
|