BisInspWtgthRgstrPayDao.xml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.com.goldenwater.dcproj.dao.BisInspWtgthRgstrPayDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWtgthRgstrPay" id="bisInspWtgthRgstrPayResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isExpiry" column="IS_EXPIRY"/>
  8. <result property="isConform" column="IS_CONFORM"/>
  9. <result property="isCmpRgstr" column="IS_CMP_RGSTR"/>
  10. <result property="isCmpChk" column="IS_CMP_CHK"/>
  11. <result property="isWtrPay" column="IS_WTR_PAY"/>
  12. <result property="isSysSend" column="IS_SYS_SEND"/>
  13. <result property="isUseElc" column="IS_USE_ELC"/>
  14. <result property="persId" column="PERS_ID"/>
  15. <result property="intm" column="INTM"/>
  16. <result property="uptm" column="UPTM"/>
  17. <result property="groupId" column="GROUP_ID"/>
  18. <result property="dataStat" column="DATA_STAT"/>
  19. </resultMap>
  20. <sql id="table_columns">
  21. ID,
  22. RGSTR_ID,
  23. IS_EXPIRY,
  24. IS_CONFORM,
  25. IS_CMP_RGSTR,
  26. IS_CMP_CHK,
  27. IS_WTR_PAY,
  28. IS_SYS_SEND,
  29. IS_USE_ELC,
  30. PERS_ID,
  31. INTM,
  32. UPTM,
  33. GROUP_ID,
  34. DATA_STAT
  35. </sql>
  36. <sql id="entity_properties">
  37. #{id},
  38. #{rgstrId},
  39. #{isExpiry},
  40. #{isConform},
  41. #{isCmpRgstr},
  42. #{isCmpChk},
  43. #{isWtrPay},
  44. #{isSysSend},
  45. #{isUseElc},
  46. #{persId},
  47. #{intm},
  48. #{uptm},
  49. #{groupId},
  50. #{dataStat}
  51. </sql>
  52. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  53. <sql id="page_where">
  54. <trim prefix="where" prefixOverrides="and | or ">
  55. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  56. <if test="isExpiry != null and isExpiry != ''">and IS_EXPIRY = #{isExpiry}</if>
  57. <if test="isConform != null and isConform != ''">and IS_CONFORM = #{isConform}</if>
  58. <if test="isCmpRgstr != null and isCmpRgstr != ''">and IS_CMP_RGSTR = #{isCmpRgstr}</if>
  59. <if test="isCmpChk != null and isCmpChk != ''">and IS_CMP_CHK = #{isCmpChk}</if>
  60. <if test="isWtrPay != null and isWtrPay != ''">and IS_WTR_PAY = #{isWtrPay}</if>
  61. <if test="isSysSend != null and isSysSend != ''">and IS_SYS_SEND = #{isSysSend}</if>
  62. <if test="isUseElc != null and isUseElc != ''">and IS_USE_ELC = #{isUseElc}</if>
  63. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  64. <if test="intm != null">and INTM = #{intm}</if>
  65. <if test="uptm != null">and UPTM = #{uptm}</if>
  66. <if test="groupId != null and groupId != ''">and GROUP_ID = #{groupId}</if>
  67. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  68. and DATA_STAT='0'
  69. </trim>
  70. </sql>
  71. <select id="get" resultMap="bisInspWtgthRgstrPayResultMap" parameterType="String" >
  72. select <include refid="table_columns" /> from BIS_INSP_WTGTH_RGSTR_PAY where RGSTR_ID = #{id}
  73. </select>
  74. <select id="getBy" resultMap="bisInspWtgthRgstrPayResultMap">
  75. select <include refid="table_columns" /> from BIS_INSP_WTGTH_RGSTR_PAY <include refid="page_where" />
  76. </select>
  77. <select id="findAll" resultMap="bisInspWtgthRgstrPayResultMap">
  78. select <include refid="table_columns" /> from BIS_INSP_WTGTH_RGSTR_PAY
  79. </select>
  80. <select id="findList" resultMap="bisInspWtgthRgstrPayResultMap">
  81. select <include refid="table_columns" /> from BIS_INSP_WTGTH_RGSTR_PAY <include refid="page_where" />
  82. </select>
  83. <select id="selectCount" resultType="int" >
  84. select count(ID) from BIS_INSP_WTGTH_RGSTR_PAY <include refid="page_where" />
  85. </select>
  86. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtgthRgstrPay">
  87. insert into BIS_INSP_WTGTH_RGSTR_PAY( <include refid="table_columns" /> )
  88. values ( <include refid="entity_properties" /> )
  89. </insert>
  90. <delete id="delete" parameterType="java.lang.String">
  91. update BIS_INSP_WTGTH_RGSTR_PAY set DATA_STAT='9' where ID = #{id}
  92. </delete>
  93. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtgthRgstrPay">
  94. update BIS_INSP_WTGTH_RGSTR_PAY set DATA_STAT='9' <include refid="page_where" />
  95. </delete>
  96. <update id="deleteInFlag" parameterType="java.lang.String">
  97. update BIS_INSP_WTGTH_RGSTR_PAY set DATA_STAT = '9' where ID = #{id}
  98. </update>
  99. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtgthRgstrPay">
  100. update BIS_INSP_WTGTH_RGSTR_PAY
  101. <trim prefix="set" suffixOverrides=",">
  102. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  103. <if test="isExpiry != null and isExpiry != ''">IS_EXPIRY = #{isExpiry},</if>
  104. <if test="isConform != null and isConform != ''">IS_CONFORM = #{isConform},</if>
  105. <if test="isCmpRgstr != null and isCmpRgstr != ''">IS_CMP_RGSTR = #{isCmpRgstr},</if>
  106. <if test="isCmpChk != null and isCmpChk != ''">IS_CMP_CHK = #{isCmpChk},</if>
  107. <if test="isWtrPay != null and isWtrPay != ''">IS_WTR_PAY = #{isWtrPay},</if>
  108. <if test="isSysSend != null and isSysSend != ''">IS_SYS_SEND = #{isSysSend},</if>
  109. <if test="isUseElc != null and isUseElc != ''">IS_USE_ELC = #{isUseElc},</if>
  110. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  111. <if test="intm != null">INTM = #{intm},</if>
  112. <if test="uptm != null">UPTM = #{uptm},</if>
  113. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  114. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  115. </trim>
  116. <where>ID = #{id}</where>
  117. </update>
  118. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtgthRgstrPay">
  119. update BIS_INSP_WTGTH_RGSTR_PAY
  120. <trim prefix="set" suffixOverrides=",">
  121. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  122. <if test="isExpiry != null and isExpiry != ''">IS_EXPIRY = #{isExpiry},</if>
  123. <if test="isConform != null and isConform != ''">IS_CONFORM = #{isConform},</if>
  124. <if test="isCmpRgstr != null and isCmpRgstr != ''">IS_CMP_RGSTR = #{isCmpRgstr},</if>
  125. <if test="isCmpChk != null and isCmpChk != ''">IS_CMP_CHK = #{isCmpChk},</if>
  126. <if test="isWtrPay != null and isWtrPay != ''">IS_WTR_PAY = #{isWtrPay},</if>
  127. <if test="isSysSend != null and isSysSend != ''">IS_SYS_SEND = #{isSysSend},</if>
  128. <if test="isUseElc != null and isUseElc != ''">IS_USE_ELC = #{isUseElc},</if>
  129. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  130. <if test="intm != null">INTM = #{intm},</if>
  131. <if test="uptm != null">UPTM = #{uptm},</if>
  132. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  133. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  134. </trim>
  135. <include refid="page_where" />
  136. </update>
  137. <!-- 其他自定义SQL -->
  138. </mapper>