You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
3.4 KiB
XML
105 lines
3.4 KiB
XML
<?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.glxp.api.dao.thrsys.ThrSystemBusApiDao">
|
|
<update id="updateSysBusApi" parameterType="com.glxp.api.entity.thrsys.ThrSystemBusApiEntity">
|
|
UPDATE thr_system_bus_api
|
|
<trim prefix="set" suffixOverrides=",">
|
|
<if test="code != null">
|
|
code=#{code},
|
|
</if>
|
|
<if test="name != null">
|
|
`name`=#{name},
|
|
</if>
|
|
<if test="thirdBuyCode != null">
|
|
`thirdBuyCode`=#{thirdBuyCode},
|
|
</if>
|
|
<if test="thirdSys != null">
|
|
thirdSys=#{thirdSys},
|
|
</if>
|
|
<if test="url != null">
|
|
url=#{url},
|
|
</if>
|
|
<if test="type != null">
|
|
`type`=#{type},
|
|
</if>
|
|
<if test="remark != null">
|
|
remark=#{remark},
|
|
</if>
|
|
</trim>
|
|
WHERE id = #{id}
|
|
</update>
|
|
|
|
<select id="filterSysBusApi" parameterType="com.glxp.api.req.thrsys.FilterBasicThirdSysDetailRequest"
|
|
resultType="com.glxp.api.entity.thrsys.ThrSystemBusApiEntity">
|
|
SELECT thr_system_bus_api.*, tbo.name thirdBuyName
|
|
FROM thr_system_bus_api
|
|
left join thr_bustype_origin tbo on thr_system_bus_api.thirdBuyCode = tbo.action
|
|
<where>
|
|
<if test="key != '' and key != null">
|
|
AND code = #{code}
|
|
</if>
|
|
<if test="type != '' and type != null">
|
|
AND type = #{type}
|
|
</if>
|
|
<if test="code != '' and code != null">
|
|
AND code = #{code}
|
|
</if>
|
|
<if test="thirdSysFk != '' and thirdSysFk != null">
|
|
AND thr_system_bus_api.thirdSys = #{thirdSysFk}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
|
|
<insert id="insertSysBusApi" keyProperty="id"
|
|
parameterType="com.glxp.api.entity.thrsys.ThrSystemBusApiEntity">
|
|
insert
|
|
ignore
|
|
INTO thr_system_bus_api
|
|
(`code`, `name`, thirdBuyCode, `thirdSys`, url, `type`, remark)
|
|
values (#{code},
|
|
#{name},
|
|
#{thirdBuyCode},
|
|
#{thirdSys},
|
|
#{url},
|
|
#{type},
|
|
#{remark})
|
|
</insert>
|
|
|
|
<insert id="saveBusTypes">
|
|
insert into thr_system_bus_api (code, `name`, thirdBuyCode, thirdSys, type)
|
|
values
|
|
<foreach collection="list" index="index" item="item" separator=",">
|
|
(#{item.code},
|
|
#{item.name},
|
|
#{item.thirdBuyCode},
|
|
#{item.thirdSys},
|
|
#{item.type})
|
|
</foreach>
|
|
</insert>
|
|
|
|
<delete id="deleteById">
|
|
delete
|
|
from thr_system_bus_api
|
|
where id = #{id}
|
|
</delete>
|
|
<select id="selectByCode" resultType="com.glxp.api.entity.thrsys.ThrSystemBusApiEntity">
|
|
select *
|
|
from thr_system_bus_api
|
|
where code = #{code}
|
|
</select>
|
|
|
|
<select id="selectAllCode" resultType="java.lang.String">
|
|
select code
|
|
from thr_system_bus_api
|
|
</select>
|
|
|
|
<select id="countByThirdSysAndType" resultType="int">
|
|
select count(*)
|
|
from thr_system_bus_api
|
|
where thirdSys = #{thirdSys}
|
|
and type = #{type}
|
|
</select>
|
|
</mapper>
|