工具发布流程和使用申请流程
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
<?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.rzdata.web.mapper.UseApplyItemMapper">
|
||||
|
||||
<resultMap type="UseApplyItem" id="UseApplyItemResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="applyId" column="apply_id" />
|
||||
<result property="toolId" column="tool_id" />
|
||||
<result property="toolCode" column="tool_code" />
|
||||
<result property="toolName" column="tool_name" />
|
||||
<result property="toolType" column="tool_type" />
|
||||
<result property="toolPrincipals" column="tool_principals" />
|
||||
<result property="toolPrincipalsName" column="tool_principals_name" />
|
||||
<result property="toolRespDept" column="tool_resp_dept" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUseApplyItemVo">
|
||||
select id, apply_id, tool_id, tool_code, tool_name, tool_type, tool_principals, tool_principals_name, tool_resp_dept from t_use_apply_item
|
||||
</sql>
|
||||
|
||||
<select id="selectUseApplyItemList" parameterType="UseApplyItem" resultMap="UseApplyItemResult">
|
||||
<include refid="selectUseApplyItemVo"/>
|
||||
<where>
|
||||
<if test="applyId != null and applyId != ''"> and apply_id = #{applyId}</if>
|
||||
<if test="toolId != null and toolId != ''"> and tool_id = #{toolId}</if>
|
||||
<if test="toolCode != null and toolCode != ''"> and tool_code = #{toolCode}</if>
|
||||
<if test="toolName != null and toolName != ''"> and tool_name like concat('%', #{toolName}, '%')</if>
|
||||
<if test="toolType != null and toolType != ''"> and tool_type = #{toolType}</if>
|
||||
<if test="toolPrincipals != null and toolPrincipals != ''"> and tool_principals = #{toolPrincipals}</if>
|
||||
<if test="toolPrincipalsName != null and toolPrincipalsName != ''"> and tool_principals_name like concat('%', #{toolPrincipalsName}, '%')</if>
|
||||
<if test="toolRespDept != null and toolRespDept != ''"> and tool_resp_dept = #{toolRespDept}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUseApplyItemById" parameterType="String" resultMap="UseApplyItemResult">
|
||||
<include refid="selectUseApplyItemVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUseApplyItem" parameterType="UseApplyItem">
|
||||
insert into t_use_apply_item
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="applyId != null">apply_id,</if>
|
||||
<if test="toolId != null">tool_id,</if>
|
||||
<if test="toolCode != null">tool_code,</if>
|
||||
<if test="toolName != null">tool_name,</if>
|
||||
<if test="toolType != null">tool_type,</if>
|
||||
<if test="toolPrincipals != null">tool_principals,</if>
|
||||
<if test="toolPrincipalsName != null">tool_principals_name,</if>
|
||||
<if test="toolRespDept != null">tool_resp_dept,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="applyId != null">#{applyId},</if>
|
||||
<if test="toolId != null">#{toolId},</if>
|
||||
<if test="toolCode != null">#{toolCode},</if>
|
||||
<if test="toolName != null">#{toolName},</if>
|
||||
<if test="toolType != null">#{toolType},</if>
|
||||
<if test="toolPrincipals != null">#{toolPrincipals},</if>
|
||||
<if test="toolPrincipalsName != null">#{toolPrincipalsName},</if>
|
||||
<if test="toolRespDept != null">#{toolRespDept},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUseApplyItem" parameterType="UseApplyItem">
|
||||
update t_use_apply_item
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="applyId != null">apply_id = #{applyId},</if>
|
||||
<if test="toolId != null">tool_id = #{toolId},</if>
|
||||
<if test="toolCode != null">tool_code = #{toolCode},</if>
|
||||
<if test="toolName != null">tool_name = #{toolName},</if>
|
||||
<if test="toolType != null">tool_type = #{toolType},</if>
|
||||
<if test="toolPrincipals != null">tool_principals = #{toolPrincipals},</if>
|
||||
<if test="toolPrincipalsName != null">tool_principals_name = #{toolPrincipalsName},</if>
|
||||
<if test="toolRespDept != null">tool_resp_dept = #{toolRespDept},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUseApplyItemById" parameterType="String">
|
||||
delete from t_use_apply_item where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUseApplyItemByIds" parameterType="String">
|
||||
delete from t_use_apply_item where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByApplyId" parameterType="String">
|
||||
delete from t_use_apply_item where apply_id = #{applyId}
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user