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.
129 lines
5.2 KiB
XML
129 lines
5.2 KiB
XML
3 years ago
|
<?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.admin.dao.inout.UnitMaintainPlatformDao">
|
||
|
<select id="getLinkPlatformList" resultType="com.glxp.api.admin.res.info.PlatformLinkResponse">
|
||
|
select up.id,
|
||
|
up.unitId,
|
||
|
u.name corpName,
|
||
|
u.corpType,
|
||
|
u.spell,
|
||
|
ap.name platformName,
|
||
|
ap.id platformId,
|
||
|
up.sourceAction,
|
||
|
up.targetAction,
|
||
|
up.invCode,
|
||
|
up.invSubCode
|
||
|
from io_unit_maintain_platform up
|
||
|
left join basic_corp u on up.unitId = u.erpId
|
||
|
left join auth_platform ap on up.platformId = ap.id
|
||
|
where up.customerId = #{customerId}
|
||
|
<if test="key != null and key != ''">
|
||
|
AND (u.erpId like concat('%', #{key}, '%')
|
||
|
or u.name like concat('%', #{key}, '%')
|
||
|
or u.spell like concat('%', #{key}, '%')
|
||
|
)
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectByCustomerId" resultType="com.glxp.api.admin.entity.inout.UnitMaintainPlatformEntity">
|
||
|
select *
|
||
|
from io_unit_maintain_platform
|
||
|
where customerId = #{customerId}
|
||
|
</select>
|
||
|
|
||
|
<update id="updateById" parameterType="com.glxp.api.admin.entity.inout.UnitMaintainPlatformEntity">
|
||
|
update io_unit_maintain_platform
|
||
|
<trim prefix="set" suffixOverrides=",">
|
||
|
<if test="unitId != null and unitId != ''">
|
||
|
unitId = #{unitId},
|
||
|
</if>
|
||
|
<if test="customerId != null">
|
||
|
customerId = #{customerId},
|
||
|
</if>
|
||
|
<if test="platformId != null and platformId != ''">
|
||
|
platformId = #{platformId},
|
||
|
</if>
|
||
|
<if test="sourceAction != null and sourceAction != ''">
|
||
|
sourceAction = #{sourceAction},
|
||
|
</if>
|
||
|
<if test="targetAction != null and targetAction != ''">
|
||
|
targetAction = #{targetAction},
|
||
|
</if>
|
||
|
<if test="invCode != null and invCode != ''">
|
||
|
invCode = #{invCode},
|
||
|
</if>
|
||
|
<if test="invSubCode != null and invSubCode != ''">
|
||
|
invSubCode = #{invSubCode},
|
||
|
</if>
|
||
|
<if test="appid != null and appid != ''">
|
||
|
appid = #{appid},
|
||
|
</if>
|
||
|
<if test="apiKey != null and apiKey != ''">
|
||
|
apiKey = #{apiKey},
|
||
|
</if>
|
||
|
<if test="secretKey != null and secretKey != ''">
|
||
|
secretKey = #{secretKey}
|
||
|
</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id"
|
||
|
parameterType="com.glxp.api.admin.entity.inout.UnitMaintainPlatformEntity">
|
||
|
insert into io_unit_maintain_platform (unitId, customerId, platformId, sourceAction, targetAction, invCode,
|
||
|
invSubCode, appid, apiKey, secretKey)
|
||
|
VALUES (#{unitId}, #{customerId}, #{platformId}, #{sourceAction}, #{targetAction}, #{invCode}, #{invSubCode},
|
||
|
#{appid}, #{apiKey}, #{secretKey})
|
||
|
</insert>
|
||
|
|
||
|
<select id="selectList" resultType="com.glxp.api.admin.entity.inout.UnitMaintainPlatformEntity">
|
||
|
select * from io_unit_maintain_platform
|
||
|
<where>
|
||
|
<if test="unitId != null and unitId != ''">
|
||
|
AND unitId = #{unitId}
|
||
|
</if>
|
||
|
<if test="customerId != null and customerId != ''">
|
||
|
AND customerId = #{customerId}
|
||
|
</if>
|
||
|
<if test="platformId != null and platformId != ''">
|
||
|
AND platformId = #{platformId}
|
||
|
</if>
|
||
|
<if test="sourceAction != null and sourceAction != ''">
|
||
|
AND sourceAction = #{sourceAction}
|
||
|
</if>
|
||
|
<if test="targetAction != null and targetAction != ''">
|
||
|
AND targetAction = #{targetAction}
|
||
|
</if>
|
||
|
<if test="invSubCode != null and invSubCode != ''">
|
||
|
AND invCode = #{invCode}
|
||
|
</if>
|
||
|
<if test="invSubCode != null and invSubCode != ''">
|
||
|
AND invSubCode = #{invSubCode}
|
||
|
</if>
|
||
|
<if test="appid != null and appid != ''">
|
||
|
AND appid = #{appid}
|
||
|
</if>
|
||
|
<if test="apiKey != null and apiKey != ''">
|
||
|
AND apiKey = #{apiKey}
|
||
|
</if>
|
||
|
<if test="secretKey != null and secretKey != ''">
|
||
|
AND secretKey = #{secretKey}
|
||
|
</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="findLinkData" resultType="com.glxp.api.admin.entity.inout.UnitMaintainPlatformEntity">
|
||
|
select * from io_unit_maintain_platform
|
||
|
<where>
|
||
|
<if test="unitId != null and unitId != ''">
|
||
|
AND unitId = #{unitId}
|
||
|
</if>
|
||
|
<if test="customerId != null">
|
||
|
AND customerId = #{customerId}
|
||
|
</if>
|
||
|
<if test="action != null and action != ''">
|
||
|
AND sourceAction = #{action}
|
||
|
</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
</mapper>
|