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.
59 lines
2.7 KiB
XML
59 lines
2.7 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.admin.dao.basic.BasicThirdSysDao">
|
|
|
|
<update id="updateBasicThiSys" parameterType="com.glxp.api.admin.entity.basic.BasicThirdSysEntity">
|
|
UPDATE basic_third_sys
|
|
<trim prefix="set" suffixOverrides=",">
|
|
<if test="thirdId != null">thirdId=#{thirdId},</if>
|
|
<if test="thirdName != null">thirdName=#{thirdName},</if>
|
|
<if test="guideUrl != null">guideUrl=#{guideUrl},</if>
|
|
<if test="remark != null">remark=#{remark},</if>
|
|
<if test="thridUrl != null">thridUrl=#{thridUrl},</if>
|
|
<if test="enabled != null">enabled=#{enabled},</if>
|
|
<if test="mainSys != null">mainSys=#{mainSys},</if>
|
|
<if test="thirdSysUrl != null">thirdSysUrl=#{thirdSysUrl},</if>
|
|
<if test="apikey != null">apikey=#{apikey},</if>
|
|
<if test="secretkey != null">secretkey=#{secretkey}</if>
|
|
</trim>
|
|
WHERE id=#{id}
|
|
</update>
|
|
|
|
<select id="filterBasicThiSys" parameterType="com.glxp.api.admin.req.basic.FilterBasicThirdSysRequest"
|
|
resultType="com.glxp.api.admin.entity.basic.BasicThirdSysEntity">
|
|
SELECT * FROM basic_third_sys
|
|
<where>
|
|
<if test="thirdId != '' and thirdId != null">
|
|
AND thirdId like concat('%',#{thirdId},'%')
|
|
</if>
|
|
<if test="thirdName != '' and thirdName != null">
|
|
AND thirdName like concat('%',#{thirdName},'%')
|
|
</if>
|
|
<if test="enabled != null">
|
|
AND enabled = #{enabled}
|
|
</if>
|
|
<if test="mainSys != '' and mainSys != null">
|
|
AND mainSys = #{mainSys}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<select id="selectByThirdId" parameterType="Map" resultType="com.glxp.api.admin.entity.basic.BasicThirdSysEntity">
|
|
select * FROM basic_third_sys WHERE thirdId = #{thirdId}
|
|
</select>
|
|
|
|
<select id="selectEnabledThirdId" resultType="java.lang.String">
|
|
select thirdId
|
|
from basic_third_sys
|
|
where enabled = true
|
|
</select>
|
|
<select id="selectCountByThirdName" resultType="java.lang.Integer">
|
|
select count(*) from basic_third_sys where thirdName =#{thirdName}
|
|
</select>
|
|
<select id="selectByThirdIdAndThirdName" resultType="com.glxp.api.admin.entity.basic.BasicThirdSysEntity">
|
|
select * from basic_third_sys where thirdId = #{thirdId} and thirdName = #{thirdName}
|
|
</select>
|
|
<select id="selectThirdNameByThirdId" resultType="java.lang.String">
|
|
select thirdName from basic_third_sys where thirdId = #{thirdId}
|
|
</select>
|
|
</mapper> |