| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?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.wisdomarbitrate.mapper.TemplateManageMapper">
- <resultMap type="TemplateManage" id="TemplateManageResult">
- <id property="id" column="id" />
- <result property="identifyId" column="identify_id" />
- <result property="temName" column="tem_name" />
- <result property="temType" column="tem_type" />
- <result property="temFormat" column="tem_format" />
- <result property="temOrigPath" column="tem_orig_path" />
- <result property="temRevisPath" column="tem_revis_path" />
- <result property="delFlag" column="del_flag" />
- <result property="fileName" column="file_name" />
- </resultMap>
-
- <insert id="insertTemplateManage" parameterType="TemplateManage" useGeneratedKeys="true" keyProperty="id">
- insert into template_manage(
- <if test="identifyId != null">identify_id,</if>
- <if test="temName != null and temName != ''">tem_name,</if>
- <if test="temType != null">tem_type,</if>
- <if test="temFormat != null and temFormat != '' ">tem_format,</if>
- <if test="temOrigPath != null and temOrigPath != '' ">tem_orig_path,</if>
- <if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path,</if>
- <if test="createBy != null and createBy != '' ">create_by,</if>
- <if test="fileName != null and fileName != '' ">file_name,</if>
- del_flag,create_time
- )values(
- <if test="identifyId != null">#{identifyId},</if>
- <if test="temName != null and temName != ''">#{temName},</if>
- <if test="temType != null">#{temType},</if>
- <if test="temFormat != null and temFormat != ''">#{temFormat},</if>
- <if test="temOrigPath != null and temOrigPath != ''">#{temOrigPath},</if>
- <if test="temRevisPath != null and temRevisPath != ''">#{temRevisPath},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="fileName != null and fileName != ''">#{fileName},</if>
- 0,sysdate()
- )
- </insert>
-
- <update id="updateTemplateManage" parameterType="TemplateManage">
- update template_manage
- <set>
- <if test="identifyId != null">identify_id = #{identifyId},</if>
- <if test="temName != null and temName != ''">tem_name = #{temName},</if>
- <if test="temType != null">tem_type = #{temType},</if>
- <if test="temFormat != null and temFormat != '' ">tem_format = #{temFormat},</if>
- <if test="temOrigPath != null and temOrigPath != ''">tem_orig_path = #{temOrigPath},</if>
- <if test="delFlag != null ">del_flag = #{delFlag},</if>
- <if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path = #{temRevisPath},</if>
- <if test="updateBy != null and updateBy != '' ">update_by = #{updateBy},</if>
- <if test="fileName != null and fileName != '' ">file_name = #{fileName},</if>
- update_time = sysdate()
- </set>
- <where>
- <if test="id != null">
- AND id = #{id}
- </if>
-
- </where>
- </update>
-
- <select id="selectTemplateList" parameterType="TemplateManage" resultMap="TemplateManageResult">
- SELECT id, identify_id ,tem_name , tem_type,tem_format,tem_orig_path,tem_revis_path ,file_name
- FROM template_manage
- <where>
- <if test="id != null">
- AND id = #{id}
- </if>
- <if test="identifyId != null">
- AND identify_id = #{identifyId}
- </if>
- <if test="temName != null and temName != ''">
- AND tem_name = #{temName}
- </if>
- <if test="temType != null ">
- AND tem_type = #{temType}
- </if>
- AND del_flag =0
- </where>
- </select>
-
- </mapper>
|