<?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.se.system.mapper.SysSoftMapper">
|
|
<resultMap type="SysSoft" id="SysSoftResult">
|
<result property="softId" column="soft_id" />
|
<result property="name" column="name" />
|
<result property="type" column="type" />
|
<result property="lic" column="lic" />
|
<result property="descr" column="descr" />
|
<result property="args" column="args" />
|
<result property="status" column="status" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="remark" column="remark" />
|
</resultMap>
|
|
<sql id="selectSysSoftVo">
|
select soft_id, name, type, lic, descr, args, status, create_by, create_time, update_by, update_time, remark from sys_soft
|
</sql>
|
|
<select id="selectSysSoftList" parameterType="SysSoft" resultMap="SysSoftResult">
|
<include refid="selectSysSoftVo"/>
|
<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="lic != null and lic != ''"> and lic = #{lic}</if>
|
<if test="descr != null and descr != ''"> and descr = #{descr}</if>
|
<if test="args != null and args != ''"> and args = #{args}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
</where>
|
</select>
|
|
<select id="selectSysSoftBySoftId" parameterType="Long" resultMap="SysSoftResult">
|
<include refid="selectSysSoftVo"/>
|
where soft_id = #{softId}
|
</select>
|
|
<insert id="insertSysSoft" parameterType="SysSoft" useGeneratedKeys="true" keyProperty="softId">
|
insert into sys_soft
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="name != null and name != ''">name,</if>
|
<if test="type != null">type,</if>
|
<if test="lic != null">lic,</if>
|
<if test="descr != null">descr,</if>
|
<if test="args != null">args,</if>
|
<if test="status != null">status,</if>
|
<if test="createBy != null">create_by,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateBy != null">update_by,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="remark != null">remark,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="name != null and name != ''">#{name},</if>
|
<if test="type != null">#{type},</if>
|
<if test="lic != null">#{lic},</if>
|
<if test="descr != null">#{descr},</if>
|
<if test="args != null">#{args},</if>
|
<if test="status != null">#{status},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="remark != null">#{remark},</if>
|
</trim>
|
</insert>
|
|
<update id="updateSysSoft" parameterType="SysSoft">
|
update sys_soft
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="name != null and name != ''">name = #{name},</if>
|
<if test="type != null">type = #{type},</if>
|
<if test="lic != null">lic = #{lic},</if>
|
<if test="descr != null">descr = #{descr},</if>
|
<if test="args != null">args = #{args},</if>
|
<if test="status != null">status = #{status},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
</trim>
|
where soft_id = #{softId}
|
</update>
|
|
<delete id="deleteSysSoftBySoftId" parameterType="Long">
|
delete from sys_soft where soft_id = #{softId}
|
</delete>
|
|
<delete id="deleteSysSoftBySoftIds" parameterType="String">
|
delete from sys_soft where soft_id in
|
<foreach item="softId" collection="array" open="(" separator="," close=")">
|
#{softId}
|
</foreach>
|
</delete>
|
</mapper>
|