BisInspSvwtAreaRgstrWseDao.xml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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.BisInspSvwtAreaRgstrWseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspSvwtAreaRgstrWse" id="bisInspSvwtAreaRgstrWseResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isLchWse" column="IS_LCH_WSE"/>
  8. <result property="wseRegIsBuld" column="WSE_REG_IS_BULD"/>
  9. <result property="wseRegInfo" column="WSE_REG_INFO"/>
  10. <result property="lchWsePcpNum" column="LCH_WSE_PCP_NUM"/>
  11. <result property="lchWseFailPcpNum" column="LCH_WSE_FAIL_PCP_NUM"/>
  12. <result property="isHasWseFail" column="IS_HAS_WSE_FAIL"/>
  13. <result property="persId" column="PERS_ID"/>
  14. <result property="inTm" column="IN_TM"/>
  15. <result property="upTm" column="UP_TM"/>
  16. <result property="dataStat" column="DATA_STAT"/>
  17. </resultMap>
  18. <sql id="table_columns">
  19. ID,
  20. RGSTR_ID,
  21. IS_LCH_WSE,
  22. WSE_REG_IS_BULD,
  23. WSE_REG_INFO,
  24. LCH_WSE_PCP_NUM,
  25. LCH_WSE_FAIL_PCP_NUM,
  26. IS_HAS_WSE_FAIL,
  27. PERS_ID,
  28. IN_TM,
  29. UP_TM,
  30. DATA_STAT
  31. </sql>
  32. <sql id="entity_properties">
  33. #{id},
  34. #{rgstrId},
  35. #{isLchWse},
  36. #{wseRegIsBuld},
  37. #{wseRegInfo},
  38. #{lchWsePcpNum},
  39. #{lchWseFailPcpNum},
  40. #{isHasWseFail},
  41. #{persId},
  42. #{inTm},
  43. #{upTm},
  44. #{dataStat}
  45. </sql>
  46. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  47. <sql id="page_where">
  48. <trim prefix="where" prefixOverrides="and | or ">
  49. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  50. <if test="isLchWse != null and isLchWse != ''">and IS_LCH_WSE = #{isLchWse}</if>
  51. <if test="wseRegIsBuld != null and wseRegIsBuld != ''">and WSE_REG_IS_BULD = #{wseRegIsBuld}</if>
  52. <if test="wseRegInfo != null and wseRegInfo != ''">and WSE_REG_INFO = #{wseRegInfo}</if>
  53. <if test="lchWsePcpNum != null and lchWsePcpNum != ''">and LCH_WSE_PCP_NUM = #{lchWsePcpNum}</if>
  54. <if test="lchWseFailPcpNum != null and lchWseFailPcpNum != ''">and LCH_WSE_FAIL_PCP_NUM = #{lchWseFailPcpNum}</if>
  55. <if test="isHasWseFail != null and isHasWseFail != ''">and IS_HAS_WSE_FAIL = #{isHasWseFail}</if>
  56. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  57. <if test="inTm != null">and IN_TM = #{inTm}</if>
  58. <if test="upTm != null">and UP_TM = #{upTm}</if>
  59. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  60. </trim>
  61. </sql>
  62. <select id="get" resultMap="bisInspSvwtAreaRgstrWseResultMap" parameterType="String" >
  63. select <include refid="table_columns" /> from BIS_INSP_SVWT_AREA_RGSTR_WSE where ID = #{id}
  64. </select>
  65. <select id="getBy" resultMap="bisInspSvwtAreaRgstrWseResultMap">
  66. select <include refid="table_columns" /> from BIS_INSP_SVWT_AREA_RGSTR_WSE <include refid="page_where" />
  67. </select>
  68. <select id="findAll" resultMap="bisInspSvwtAreaRgstrWseResultMap">
  69. select <include refid="table_columns" /> from BIS_INSP_SVWT_AREA_RGSTR_WSE
  70. </select>
  71. <select id="findList" resultMap="bisInspSvwtAreaRgstrWseResultMap">
  72. select <include refid="table_columns" /> from BIS_INSP_SVWT_AREA_RGSTR_WSE <include refid="page_where" />
  73. </select>
  74. <select id="selectCount" resultType="int" >
  75. select count(ID) from BIS_INSP_SVWT_AREA_RGSTR_WSE <include refid="page_where" />
  76. </select>
  77. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtAreaRgstrWse">
  78. insert into BIS_INSP_SVWT_AREA_RGSTR_WSE( <include refid="table_columns" /> )
  79. values ( <include refid="entity_properties" /> )
  80. </insert>
  81. <delete id="delete" parameterType="java.lang.String">
  82. delete from BIS_INSP_SVWT_AREA_RGSTR_WSE where ID = #{id}
  83. </delete>
  84. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtAreaRgstrWse">
  85. delete from BIS_INSP_SVWT_AREA_RGSTR_WSE <include refid="page_where" />
  86. </delete>
  87. <update id="deleteInFlag" parameterType="java.lang.String">
  88. update BIS_INSP_SVWT_AREA_RGSTR_WSE set flag_valid = 0 where ID = #{id}
  89. </update>
  90. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtAreaRgstrWse">
  91. update BIS_INSP_SVWT_AREA_RGSTR_WSE
  92. <trim prefix="set" suffixOverrides=",">
  93. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  94. <if test="isLchWse != null and isLchWse != ''">IS_LCH_WSE = #{isLchWse},</if>
  95. <if test="wseRegIsBuld != null and wseRegIsBuld != ''">WSE_REG_IS_BULD = #{wseRegIsBuld},</if>
  96. <if test="wseRegInfo != null and wseRegInfo != ''">WSE_REG_INFO = #{wseRegInfo},</if>
  97. <if test="lchWsePcpNum != null">LCH_WSE_PCP_NUM = #{lchWsePcpNum},</if>
  98. <if test="lchWseFailPcpNum != null">LCH_WSE_FAIL_PCP_NUM = #{lchWseFailPcpNum},</if>
  99. <if test="isHasWseFail != null and isHasWseFail != ''">IS_HAS_WSE_FAIL = #{isHasWseFail},</if>
  100. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  101. <if test="inTm != null">IN_TM = #{inTm},</if>
  102. <if test="upTm != null">UP_TM = #{upTm},</if>
  103. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  104. </trim>
  105. <where>ID = #{id}</where>
  106. </update>
  107. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtAreaRgstrWse">
  108. update BIS_INSP_SVWT_AREA_RGSTR_WSE
  109. <trim prefix="set" suffixOverrides=",">
  110. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  111. <if test="isLchWse != null and isLchWse != ''">IS_LCH_WSE = #{isLchWse},</if>
  112. <if test="wseRegIsBuld != null and wseRegIsBuld != ''">WSE_REG_IS_BULD = #{wseRegIsBuld},</if>
  113. <if test="wseRegInfo != null and wseRegInfo != ''">WSE_REG_INFO = #{wseRegInfo},</if>
  114. <if test="lchWsePcpNum != null">LCH_WSE_PCP_NUM = #{lchWsePcpNum},</if>
  115. <if test="lchWseFailPcpNum != null">LCH_WSE_FAIL_PCP_NUM = #{lchWseFailPcpNum},</if>
  116. <if test="isHasWseFail != null and isHasWseFail != ''">IS_HAS_WSE_FAIL = #{isHasWseFail},</if>
  117. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  118. <if test="inTm != null">IN_TM = #{inTm},</if>
  119. <if test="upTm != null">UP_TM = #{upTm},</if>
  120. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  121. </trim>
  122. <include refid="page_where" />
  123. </update>
  124. <!-- 其他自定义SQL -->
  125. </mapper>