You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
3.1 KiB

3 months 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.ruoyi.system.mapper.PlatformLibMapper">
<resultMap type="PlatformLib" id="PlatformLibResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="specsJson" column="specs_json" />
3 months ago
<result property="iconUrl" column="icon_url" />
3 months ago
</resultMap>
<sql id="selectPlatformLibVo">
3 months ago
select id, name, type, specs_json,icon_url from platform_lib
3 months ago
</sql>
<select id="selectPlatformLibList" parameterType="PlatformLib" resultMap="PlatformLibResult">
<include refid="selectPlatformLibVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="specsJson != null and specsJson != ''"> and specs_json = #{specsJson}</if>
3 months ago
<if test="iconUrl != null and iconUrl != ''"> and icon_url = #{iconUrl}</if>
3 months ago
</where>
</select>
<select id="selectPlatformLibById" parameterType="Long" resultMap="PlatformLibResult">
<include refid="selectPlatformLibVo"/>
where id = #{id}
</select>
<insert id="insertPlatformLib" parameterType="PlatformLib" useGeneratedKeys="true" keyProperty="id">
insert into platform_lib
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="type != null and type != ''">type,</if>
<if test="specsJson != null and specsJson != ''">specs_json,</if>
3 months ago
<if test="iconUrl != null and iconUrl != ''">icon_url,</if>
3 months ago
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="specsJson != null and specsJson != ''">#{specsJson},</if>
3 months ago
<if test="iconUrl != null and iconUrl != ''">#{iconUrl},</if>
3 months ago
</trim>
</insert>
<update id="updatePlatformLib" parameterType="PlatformLib">
update platform_lib
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="specsJson != null and specsJson != ''">specs_json = #{specsJson},</if>
3 months ago
<if test="iconUrl != null and iconUrl != ''">icon_url = #{iconUrl},</if>
3 months ago
</trim>
where id = #{id}
</update>
<delete id="deletePlatformLibById" parameterType="Long">
delete from platform_lib where id = #{id}
</delete>
<delete id="deletePlatformLibByIds" parameterType="String">
delete from platform_lib where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>