ZsyzShyjMapper.xml 5.5 KB

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