ZsyzKgxxMapper.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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.ZsyzKgxxMapper">
  6. <resultMap type="ZsyzKgxx" id="ZsyzKgxxResult">
  7. <result property="id" column="id" />
  8. <result property="xmId" column="xm_id" />
  9. <result property="xmbh" column="xmbh" />
  10. <result property="xmxsmc" column="xmxsmc" />
  11. <result property="xmmc" column="xmmc" />
  12. <result property="kgrq" column="kgrq" />
  13. <result property="njgrq" column="njgrq" />
  14. <result property="sscrq" column="sscrq" />
  15. <result property="ntcsj" column="ntcsj" />
  16. <result property="rtsj" column="rtsj" />
  17. <result property="nrtsj" column="nrtsj" />
  18. <result property="kggjrsjh" column="kggjrsjh" />
  19. <result property="createBy" column="create_by" />
  20. <result property="createTime" column="create_time" />
  21. <result property="updateBy" column="update_by" />
  22. <result property="updateTime" column="update_time" />
  23. <result property="remark" column="remark" />
  24. </resultMap>
  25. <sql id="selectZsyzKgxxVo">
  26. select id, xm_id, xmbh,xmxsmc, xmmc, kgrq, njgrq, sscrq, ntcsj, rtsj, nrtsj, kggjrsjh, create_by, create_time, update_by, update_time, remark from zsyz_kgxx
  27. </sql>
  28. <select id="selectZsyzKgxxList" parameterType="ZsyzKgxx" resultMap="ZsyzKgxxResult">
  29. <include refid="selectZsyzKgxxVo"/>
  30. <where>
  31. <if test="xmId != null "> and xm_id = #{xmId}</if>
  32. <if test="xmbh != null and xmbh != ''"> and xmbh = #{xmbh}</if>
  33. <if test="xmxsmc != null and xmxsmc != ''"> and xmxsmc = #{xmxsmc}</if>
  34. <if test="xmmc != null and xmmc != ''"> and xmmc = #{xmmc}</if>
  35. <if test="kgrq != null "> and kgrq = #{kgrq}</if>
  36. <if test="njgrq != null "> and njgrq = #{njgrq}</if>
  37. <if test="sscrq != null "> and sscrq = #{sscrq}</if>
  38. <if test="ntcsj != null "> and ntcsj = #{ntcsj}</if>
  39. <if test="rtsj != null "> and rtsj = #{rtsj}</if>
  40. <if test="nrtsj != null "> and nrtsj = #{nrtsj}</if>
  41. <if test="kggjrsjh != null and kggjrsjh != ''"> and kggjrsjh = #{kggjrsjh}</if>
  42. </where>
  43. </select>
  44. <select id="selectZsyzKgxxById" parameterType="Long" resultMap="ZsyzKgxxResult">
  45. <include refid="selectZsyzKgxxVo"/>
  46. where xm_id = #{id}
  47. </select>
  48. <insert id="insertZsyzKgxx" parameterType="ZsyzKgxx" useGeneratedKeys="true" keyProperty="id">
  49. insert into zsyz_kgxx
  50. <trim prefix="(" suffix=")" suffixOverrides=",">
  51. <if test="xmId != null">xm_id,</if>
  52. <if test="xmbh != null">xmbh,</if>
  53. <if test="xmxsmc != null">xmxsmc,</if>
  54. <if test="xmmc != null">xmmc,</if>
  55. <if test="kgrq != null">kgrq,</if>
  56. <if test="njgrq != null">njgrq,</if>
  57. <if test="sscrq != null">sscrq,</if>
  58. <if test="ntcsj != null">ntcsj,</if>
  59. <if test="rtsj != null">rtsj,</if>
  60. <if test="nrtsj != null">nrtsj,</if>
  61. <if test="kggjrsjh != null and kggjrsjh != ''">kggjrsjh,</if>
  62. <if test="createBy != null">create_by,</if>
  63. <if test="createTime != null">create_time,</if>
  64. <if test="updateBy != null">update_by,</if>
  65. <if test="updateTime != null">update_time,</if>
  66. <if test="remark != null">remark,</if>
  67. </trim>
  68. <trim prefix="values (" suffix=")" suffixOverrides=",">
  69. <if test="xmId != null">#{xmId},</if>
  70. <if test="xmbh != null">#{xmbh},</if>
  71. <if test="xmxsmc != null">#{xmxsmc},</if>
  72. <if test="xmmc != null">#{xmmc},</if>
  73. <if test="kgrq != null">#{kgrq},</if>
  74. <if test="njgrq != null">#{njgrq},</if>
  75. <if test="sscrq != null">#{sscrq},</if>
  76. <if test="ntcsj != null">#{ntcsj},</if>
  77. <if test="rtsj != null">#{rtsj},</if>
  78. <if test="nrtsj != null">#{nrtsj},</if>
  79. <if test="kggjrsjh != null and kggjrsjh != ''">#{kggjrsjh},</if>
  80. <if test="createBy != null">#{createBy},</if>
  81. <if test="createTime != null">#{createTime},</if>
  82. <if test="updateBy != null">#{updateBy},</if>
  83. <if test="updateTime != null">#{updateTime},</if>
  84. <if test="remark != null">#{remark},</if>
  85. </trim>
  86. </insert>
  87. <update id="updateZsyzKgxx" parameterType="ZsyzKgxx">
  88. update zsyz_kgxx
  89. <trim prefix="SET" suffixOverrides=",">
  90. <if test="xmId != null">xm_id = #{xmId},</if>
  91. <if test="xmbh != null">xmbh = #{xmbh},</if>
  92. <if test="xmxsmc != null">xmxsmc = #{xmxsmc},</if>
  93. <if test="xmmc != null">xmmc = #{xmmc},</if>
  94. <if test="kgrq != null">kgrq = #{kgrq},</if>
  95. <if test="njgrq != null">njgrq = #{njgrq},</if>
  96. <if test="sscrq != null">sscrq = #{sscrq},</if>
  97. <if test="ntcsj != null">ntcsj = #{ntcsj},</if>
  98. <if test="rtsj != null">rtsj = #{rtsj},</if>
  99. <if test="nrtsj != null">nrtsj = #{nrtsj},</if>
  100. <if test="kggjrsjh != null and kggjrsjh != ''">kggjrsjh = #{kggjrsjh},</if>
  101. <if test="createBy != null">create_by = #{createBy},</if>
  102. <if test="createTime != null">create_time = #{createTime},</if>
  103. <if test="updateBy != null">update_by = #{updateBy},</if>
  104. <if test="updateTime != null">update_time = #{updateTime},</if>
  105. <if test="remark != null">remark = #{remark},</if>
  106. </trim>
  107. where id = #{id}
  108. </update>
  109. <delete id="deleteZsyzKgxxById" parameterType="Long">
  110. delete from zsyz_kgxx where id = #{id}
  111. </delete>
  112. <delete id="deleteZsyzKgxxByIds" parameterType="String">
  113. delete from zsyz_kgxx where id in
  114. <foreach item="id" collection="array" open="(" separator="," close=")">
  115. #{id}
  116. </foreach>
  117. </delete>
  118. </mapper>