69 lines
2.7 KiB
XML
69 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.ruoyi.system.mapper.RlFunctionMapper">
|
|
|
|
<resultMap type="RlFunction" id="RlFunctionResult">
|
|
<result property="functionId" column="function_id" />
|
|
<result property="modelId" column="model_id" />
|
|
<result property="function" column="function" />
|
|
</resultMap>
|
|
|
|
<sql id="selectRlFunctionVo">
|
|
select function_id, model_id, function from rl_function
|
|
</sql>
|
|
|
|
<select id="selectRlFunctionList" parameterType="RlFunction" resultMap="RlFunctionResult">
|
|
<include refid="selectRlFunctionVo"/>
|
|
<where>
|
|
<if test="modelId != null "> and model_id = #{modelId}</if>
|
|
<if test="function != null and function != ''"> and function = #{function}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectRlFunctionByFunctionId" parameterType="Long" resultMap="RlFunctionResult">
|
|
<include refid="selectRlFunctionVo"/>
|
|
where function_id = #{functionId}
|
|
</select>
|
|
|
|
<select id="selectRlFunctionByModelId" resultType="com.ruoyi.system.domain.RlFunction">
|
|
<include refid="selectRlFunctionVo"/>
|
|
where model_id = #{modelId}
|
|
</select>
|
|
|
|
<insert id="insertRlFunction" parameterType="RlFunction">
|
|
insert into rl_function
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="functionId != null">function_id,</if>
|
|
<if test="modelId != null">model_id,</if>
|
|
<if test="function != null">function,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="functionId != null">#{functionId},</if>
|
|
<if test="modelId != null">#{modelId},</if>
|
|
<if test="function != null">#{function},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateRlFunction" parameterType="RlFunction">
|
|
update rl_function
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="modelId != null">model_id = #{modelId},</if>
|
|
<if test="function != null">function = #{function},</if>
|
|
</trim>
|
|
where function_id = #{functionId}
|
|
</update>
|
|
|
|
<delete id="deleteRlFunctionByFunctionId" parameterType="Long">
|
|
delete from rl_function where function_id = #{functionId}
|
|
</delete>
|
|
|
|
<delete id="deleteRlFunctionByFunctionIds" parameterType="String">
|
|
delete from rl_function where function_id in
|
|
<foreach item="functionId" collection="array" open="(" separator="," close=")">
|
|
#{functionId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|