ZsyzShyjMapper.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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.system.mapper.projectV2.ZsyzShyjMapper">
  6. <resultMap type="ZsyzShyj" id="ZsyzShyjResult">
  7. <result property="id" column="id" />
  8. <result property="xmId" column="xm_id" />
  9. <result property="xmbh" column="xmbh" />
  10. <result property="shrId" column="shr_id" />
  11. <result property="shrxm" column="shrxm" />
  12. <result property="xmjd" column="xmjd" />
  13. <result property="shjg" column="shjg" />
  14. <result property="shyj" column="shyj" />
  15. <result property="shsj" column="shsj" />
  16. <result property="createBy" column="create_by" />
  17. <result property="createTime" column="create_time" />
  18. <result property="updateBy" column="update_by" />
  19. <result property="updateTime" column="update_time" />
  20. <result property="remark" column="remark" />
  21. </resultMap>
  22. <sql id="selectZsyzShyjVo">
  23. select id, xm_id, xmbh, shr_id, shrxm, xmjd, shjg, shyj, shsj, create_by, create_time, update_by, update_time, remark from zsyz_shyj
  24. </sql>
  25. <select id="selectZsyzShyjList" parameterType="ZsyzShyj" resultMap="ZsyzShyjResult">
  26. <include refid="selectZsyzShyjVo"/>
  27. <where>
  28. <if test="xmId != null "> and xm_id = #{xmId}</if>
  29. <if test="xmbh != null and xmbh != ''"> and xmbh = #{xmbh}</if>
  30. <if test="shrId != null "> and shr_id = #{shrId}</if>
  31. <if test="shrxm != null and shrxm != ''"> and shrxm = #{shrxm}</if>
  32. <if test="xmjd != null and xmjd != ''"> and xmjd = #{xmjd}</if>
  33. <if test="shjg != null and shjg != ''"> and shjg = #{shjg}</if>
  34. <if test="shyj != null and shyj != ''"> and shyj = #{shyj}</if>
  35. <if test="shsj != null and shsj != ''"> and shsj = #{shsj}</if>
  36. </where>
  37. </select>
  38. <select id="selectZsyzShyjById" parameterType="Long" resultMap="ZsyzShyjResult">
  39. <include refid="selectZsyzShyjVo"/>
  40. where id = #{id}
  41. </select>
  42. <insert id="insertZsyzShyj" parameterType="ZsyzShyj" useGeneratedKeys="true" keyProperty="id">
  43. insert into zsyz_shyj
  44. <trim prefix="(" suffix=")" suffixOverrides=",">
  45. <if test="xmId != null">xm_id,</if>
  46. <if test="xmbh != null">xmbh,</if>
  47. <if test="shrId != null">shr_id,</if>
  48. <if test="shrxm != null and shrxm != ''">shrxm,</if>
  49. <if test="xmjd != null and xmjd != ''">xmjd,</if>
  50. <if test="shjg != null and shjg != ''">shjg,</if>
  51. <if test="shyj != null">shyj,</if>
  52. <if test="shsj != null">shsj,</if>
  53. <if test="createBy != null">create_by,</if>
  54. <if test="createTime != null">create_time,</if>
  55. <if test="updateBy != null">update_by,</if>
  56. <if test="updateTime != null">update_time,</if>
  57. <if test="remark != null">remark,</if>
  58. </trim>
  59. <trim prefix="values (" suffix=")" suffixOverrides=",">
  60. <if test="xmId != null">#{xmId},</if>
  61. <if test="xmbh != null">#{xmbh},</if>
  62. <if test="shrId != null">#{shrId},</if>
  63. <if test="shrxm != null and shrxm != ''">#{shrxm},</if>
  64. <if test="xmjd != null and xmjd != ''">#{xmjd},</if>
  65. <if test="shjg != null and shjg != ''">#{shjg},</if>
  66. <if test="shyj != null">#{shyj},</if>
  67. <if test="shsj != null">#{shsj},</if>
  68. <if test="createBy != null">#{createBy},</if>
  69. <if test="createTime != null">#{createTime},</if>
  70. <if test="updateBy != null">#{updateBy},</if>
  71. <if test="updateTime != null">#{updateTime},</if>
  72. <if test="remark != null">#{remark},</if>
  73. </trim>
  74. </insert>
  75. <update id="updateZsyzShyj" parameterType="ZsyzShyj">
  76. update zsyz_shyj
  77. <trim prefix="SET" suffixOverrides=",">
  78. <if test="xmId != null">xm_id = #{xmId},</if>
  79. <if test="xmbh != null">xmbh = #{xmbh},</if>
  80. <if test="shrId != null">shr_id = #{shrId},</if>
  81. <if test="shrxm != null and shrxm != ''">shrxm = #{shrxm},</if>
  82. <if test="xmjd != null and xmjd != ''">xmjd = #{xmjd},</if>
  83. <if test="shjg != null and shjg != ''">shjg = #{shjg},</if>
  84. <if test="shyj != null">shyj = #{shyj},</if>
  85. <if test="shsj != null">shsj = #{shsj},</if>
  86. <if test="createBy != null">create_by = #{createBy},</if>
  87. <if test="createTime != null">create_time = #{createTime},</if>
  88. <if test="updateBy != null">update_by = #{updateBy},</if>
  89. <if test="updateTime != null">update_time = #{updateTime},</if>
  90. <if test="remark != null">remark = #{remark},</if>
  91. </trim>
  92. where id = #{id}
  93. </update>
  94. <delete id="deleteZsyzShyjById" parameterType="Long">
  95. delete from zsyz_shyj where id = #{id}
  96. </delete>
  97. <delete id="deleteZsyzShyjByIds" parameterType="String">
  98. delete from zsyz_shyj where id in
  99. <foreach item="id" collection="array" open="(" separator="," close=")">
  100. #{id}
  101. </foreach>
  102. </delete>
  103. </mapper>