智能仲裁后端服务

TemplateManageMapper.xml 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.TemplateManageMapper">
  6. <resultMap type="TemplateManage" id="TemplateManageResult">
  7. <id property="id" column="id" />
  8. <result property="identifyId" column="identify_id" />
  9. <result property="temName" column="tem_name" />
  10. <result property="temType" column="tem_type" />
  11. <result property="temFormat" column="tem_format" />
  12. <result property="temOrigPath" column="tem_orig_path" />
  13. <result property="temRevisPath" column="tem_revis_path" />
  14. <result property="delFlag" column="del_flag" />
  15. <result property="fileName" column="file_name" />
  16. </resultMap>
  17. <insert id="insertTemplateManage" parameterType="TemplateManage" useGeneratedKeys="true" keyProperty="id">
  18. insert into template_manage(
  19. <if test="identifyId != null">identify_id,</if>
  20. <if test="temName != null and temName != ''">tem_name,</if>
  21. <if test="temType != null">tem_type,</if>
  22. <if test="temFormat != null and temFormat != '' ">tem_format,</if>
  23. <if test="temOrigPath != null and temOrigPath != '' ">tem_orig_path,</if>
  24. <if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path,</if>
  25. <if test="createBy != null and createBy != '' ">create_by,</if>
  26. <if test="fileName != null and fileName != '' ">file_name,</if>
  27. del_flag,create_time
  28. )values(
  29. <if test="identifyId != null">#{identifyId},</if>
  30. <if test="temName != null and temName != ''">#{temName},</if>
  31. <if test="temType != null">#{temType},</if>
  32. <if test="temFormat != null and temFormat != ''">#{temFormat},</if>
  33. <if test="temOrigPath != null and temOrigPath != ''">#{temOrigPath},</if>
  34. <if test="temRevisPath != null and temRevisPath != ''">#{temRevisPath},</if>
  35. <if test="createBy != null and createBy != ''">#{createBy},</if>
  36. <if test="fileName != null and fileName != ''">#{fileName},</if>
  37. 0,sysdate()
  38. )
  39. </insert>
  40. <update id="updateTemplateManage" parameterType="TemplateManage">
  41. update template_manage
  42. <set>
  43. <if test="identifyId != null">identify_id = #{identifyId},</if>
  44. <if test="temName != null and temName != ''">tem_name = #{temName},</if>
  45. <if test="temType != null">tem_type = #{temType},</if>
  46. <if test="temFormat != null and temFormat != '' ">tem_format = #{temFormat},</if>
  47. <if test="temOrigPath != null and temOrigPath != ''">tem_orig_path = #{temOrigPath},</if>
  48. <if test="delFlag != null ">del_flag = #{delFlag},</if>
  49. <if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path = #{temRevisPath},</if>
  50. <if test="updateBy != null and updateBy != '' ">update_by = #{updateBy},</if>
  51. <if test="fileName != null and fileName != '' ">file_name = #{fileName},</if>
  52. update_time = sysdate()
  53. </set>
  54. <where>
  55. <if test="id != null">
  56. AND id = #{id}
  57. </if>
  58. </where>
  59. </update>
  60. <select id="selectTemplateList" parameterType="TemplateManage" resultMap="TemplateManageResult">
  61. SELECT id, identify_id ,tem_name , tem_type,tem_format,tem_orig_path,tem_revis_path ,file_name
  62. FROM template_manage
  63. <where>
  64. <if test="id != null">
  65. AND id = #{id}
  66. </if>
  67. <if test="identifyId != null">
  68. AND identify_id = #{identifyId}
  69. </if>
  70. <if test="temName != null and temName != ''">
  71. AND tem_name = #{temName}
  72. </if>
  73. <if test="temType != null ">
  74. AND tem_type = #{temType}
  75. </if>
  76. AND del_flag =0
  77. </where>
  78. </select>
  79. </mapper>