调解系统后端服务

SealManageMapper.xml 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.dept.SealManageMapper">
  6. <resultMap type="com.ruoyi.wisdomarbitrate.domain.dto.dept.SealManage" id="SealManageResult">
  7. <id property="id" column="id" />
  8. <result property="identifyId" column="identify_id" />
  9. <result property="sealName" column="seal_name" />
  10. <result property="sealId" column="seal_id" />
  11. <result property="annexId" column="annex_id" />
  12. <result property="sealStatus" column="seal_status" />
  13. <result property="isUse" column="is_use" />
  14. </resultMap>
  15. <select id="selectSealList" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.dept.SealManage" resultMap="SealManageResult">
  16. SELECT id, identify_id ,seal_name , seal_id,annex_id,seal_status,is_use
  17. FROM ms_seal_manage
  18. <where>
  19. <if test="identifyId != null">
  20. AND identify_id = #{identifyId}
  21. </if>
  22. <if test="sealStatus != null">
  23. AND seal_status = #{sealStatus}
  24. </if>
  25. <if test="sealId != null and sealId != ''">
  26. AND seal_id = #{sealId}
  27. </if>
  28. </where>
  29. </select>
  30. <insert id="insertSealManage" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.dept.SealManage" useGeneratedKeys="true" keyProperty="id">
  31. insert into ms_seal_manage(
  32. <if test="identifyId != null">identify_id,</if>
  33. <if test="sealName != null and sealName != ''">seal_name,</if>
  34. <if test="sealId != null and sealId != ''">seal_id,</if>
  35. <if test="annexId != null">annex_id,</if>
  36. <if test="sealStatus != null">seal_status,</if>
  37. <if test="isUse != null">is_use</if>
  38. )values(
  39. <if test="identifyId != null">#{identifyId},</if>
  40. <if test="sealName != null and sealName != ''">#{sealName},</if>
  41. <if test="sealId != null and sealId != ''">#{sealId},</if>
  42. <if test="annexId != null">#{annexId},</if>
  43. <if test="sealStatus != null">#{sealStatus},</if>
  44. <if test="isUse != null">#{isUse}</if>
  45. )
  46. </insert>
  47. <update id="updateSealManage" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.dept.SealManage">
  48. update ms_seal_manage
  49. <set>
  50. <if test="identifyId != null">identify_id = #{identifyId},</if>
  51. <if test="sealName != null">seal_name = #{sealName},</if>
  52. <if test="sealId != null ">seal_id = #{sealId},</if>
  53. <if test="annexId != null ">annex_id = #{annexId},</if>
  54. <if test="sealStatus != null ">seal_status = #{sealStatus},</if>
  55. <if test="isUse != null ">is_use = #{isUse}</if>
  56. </set>
  57. <where>
  58. <if test="id != null">
  59. AND id = #{id}
  60. </if>
  61. </where>
  62. </update>
  63. </mapper>