AttZhejiangJgCheckDao.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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.AttZhejiangJgCheckDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttZhejiangJgCheck" id="attZhejiangJgCheckResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="departId" column="DEPART_ID"/>
  7. <result property="isCreateGroup" column="IS_CREATE_GROUP"/>
  8. <result property="isSureDepart" column="IS_SURE_DEPART"/>
  9. <result property="dataStat" column="DATA_STAT"/>
  10. <result property="isCreateTeam" column="IS_CREATE_TEAM"/>
  11. <result property="teamContain" column="TEAM_CONTAIN"/>
  12. <result property="lgtd" column="LGTD"/>
  13. <result property="lttd" column="LTTD"/>
  14. <result property="lgtdpc" column="LGTDPC"/>
  15. <result property="lttdpc" column="LTTDPC"/>
  16. <result property="isCreateYearPlan" column="IS_CREATE_YEAR_PLAN"/>
  17. <result property="isFindAndSlove" column="IS_FIND_AND_SLOVE"/>
  18. <result property="otherQuestion" column="OTHER_QUESTION"/>
  19. <result property="specialWay" column="SPECIAL_WAY"/>
  20. <result property="intm" column="INTM"/>
  21. <result property="uptm" column="UPTM"/>
  22. <result property="persId" column="PERS_ID"/>
  23. </resultMap>
  24. <sql id="table_columns">
  25. ID,
  26. DEPART_ID,
  27. IS_CREATE_GROUP,
  28. IS_SURE_DEPART,
  29. DATA_STAT,
  30. IS_CREATE_TEAM,
  31. TEAM_CONTAIN,
  32. LGTD,
  33. LTTD,
  34. LGTDPC,
  35. LTTDPC,
  36. IS_CREATE_YEAR_PLAN,
  37. IS_FIND_AND_SLOVE,
  38. OTHER_QUESTION,
  39. SPECIAL_WAY,
  40. INTM,
  41. UPTM,
  42. PERS_ID
  43. </sql>
  44. <sql id="entity_properties">
  45. #{id},
  46. #{departId},
  47. #{isCreateGroup},
  48. #{isSureDepart},
  49. #{dataStat},
  50. #{isCreateTeam},
  51. #{teamContain},
  52. #{lgtd},
  53. #{lttd},
  54. #{lgtdpc},
  55. #{lttdpc},
  56. #{isCreateYearPlan},
  57. #{isFindAndSlove},
  58. #{otherQuestion},
  59. #{specialWay},
  60. #{intm},
  61. #{uptm},
  62. #{persId}
  63. </sql>
  64. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  65. <sql id="page_where">
  66. <trim prefix="where" prefixOverrides="and | or ">
  67. <if test="departId != null and departId != ''">and DEPART_ID = #{departId}</if>
  68. <if test="isCreateGroup != null and isCreateGroup != ''">and IS_CREATE_GROUP = #{isCreateGroup}</if>
  69. <if test="isSureDepart != null and isSureDepart != ''">and IS_SURE_DEPART = #{isSureDepart}</if>
  70. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  71. <if test="isCreateTeam != null and isCreateTeam != ''">and IS_CREATE_TEAM = #{isCreateTeam}</if>
  72. <if test="teamContain != null and teamContain != ''">and TEAM_CONTAIN = #{teamContain}</if>
  73. <if test="lgtd != null and lgtd != ''">and LGTD = #{lgtd}</if>
  74. <if test="lttd != null and lttd != ''">and LTTD = #{lttd}</if>
  75. <if test="lgtdpc != null and lgtdpc != ''">and LGTDPC = #{lgtdpc}</if>
  76. <if test="lttdpc != null and lttdpc != ''">and LTTDPC = #{lttdpc}</if>
  77. <if test="isCreateYearPlan != null and isCreateYearPlan != ''">and IS_CREATE_YEAR_PLAN = #{isCreateYearPlan}</if>
  78. <if test="isFindAndSlove != null and isFindAndSlove != ''">and IS_FIND_AND_SLOVE = #{isFindAndSlove}</if>
  79. <if test="otherQuestion != null and otherQuestion != ''">and OTHER_QUESTION = #{otherQuestion}</if>
  80. <if test="specialWay != null and specialWay != ''">and SPECIAL_WAY = #{specialWay}</if>
  81. <if test="intm != null">and INTM = #{intm}</if>
  82. <if test="uptm != null">and UPTM = #{uptm}</if>
  83. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  84. </trim>
  85. </sql>
  86. <select id="get" resultMap="attZhejiangJgCheckResultMap" parameterType="String" >
  87. select <include refid="table_columns" /> from Att_ZHEJIANG_JG_CHECK where ID = #{id}
  88. </select>
  89. <select id="getBy" resultMap="attZhejiangJgCheckResultMap">
  90. select <include refid="table_columns" /> from Att_ZHEJIANG_JG_CHECK <include refid="page_where" />
  91. </select>
  92. <select id="findAll" resultMap="attZhejiangJgCheckResultMap">
  93. select <include refid="table_columns" /> from Att_ZHEJIANG_JG_CHECK
  94. </select>
  95. <select id="findList" resultMap="attZhejiangJgCheckResultMap">
  96. select <include refid="table_columns" /> from Att_ZHEJIANG_JG_CHECK <include refid="page_where" />
  97. </select>
  98. <select id="selectCount" resultType="int" >
  99. select count(ID) from Att_ZHEJIANG_JG_CHECK <include refid="page_where" />
  100. </select>
  101. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttZhejiangJgCheck">
  102. insert into Att_ZHEJIANG_JG_CHECK( <include refid="table_columns" /> )
  103. values ( <include refid="entity_properties" /> )
  104. </insert>
  105. <delete id="delete" parameterType="java.lang.String">
  106. delete from Att_ZHEJIANG_JG_CHECK where ID = #{id}
  107. </delete>
  108. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttZhejiangJgCheck">
  109. delete from Att_ZHEJIANG_JG_CHECK <include refid="page_where" />
  110. </delete>
  111. <update id="deleteInFlag" parameterType="java.lang.String">
  112. update Att_ZHEJIANG_JG_CHECK set flag_valid = 0 where ID = #{id}
  113. </update>
  114. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttZhejiangJgCheck">
  115. update Att_ZHEJIANG_JG_CHECK
  116. <trim prefix="set" suffixOverrides=",">
  117. <if test="departId != null and departId != ''">DEPART_ID = #{departId},</if>
  118. <if test="isCreateGroup != null and isCreateGroup != ''">IS_CREATE_GROUP = #{isCreateGroup},</if>
  119. <if test="isSureDepart != null and isSureDepart != ''">IS_SURE_DEPART = #{isSureDepart},</if>
  120. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  121. <if test="isCreateTeam != null and isCreateTeam != ''">IS_CREATE_TEAM = #{isCreateTeam},</if>
  122. <if test="teamContain != null and teamContain != ''">TEAM_CONTAIN = #{teamContain},</if>
  123. <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
  124. <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
  125. <if test="lgtdpc != null and lgtdpc != ''">LGTDPC = #{lgtdpc},</if>
  126. <if test="lttdpc != null and lttdpc != ''">LTTDPC = #{lttdpc},</if>
  127. <if test="isCreateYearPlan != null and isCreateYearPlan != ''">IS_CREATE_YEAR_PLAN = #{isCreateYearPlan},</if>
  128. <if test="isFindAndSlove != null and isFindAndSlove != ''">IS_FIND_AND_SLOVE = #{isFindAndSlove},</if>
  129. <if test="otherQuestion != null and otherQuestion != ''">OTHER_QUESTION = #{otherQuestion},</if>
  130. <if test="specialWay != null and specialWay != ''">SPECIAL_WAY = #{specialWay},</if>
  131. <if test="intm != null">INTM = #{intm},</if>
  132. <if test="uptm != null">UPTM = #{uptm},</if>
  133. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  134. </trim>
  135. <where>ID = #{id}</where>
  136. </update>
  137. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttZhejiangJgCheck">
  138. update Att_ZHEJIANG_JG_CHECK
  139. <trim prefix="set" suffixOverrides=",">
  140. <if test="departId != null and departId != ''">DEPART_ID = #{departId},</if>
  141. <if test="isCreateGroup != null and isCreateGroup != ''">IS_CREATE_GROUP = #{isCreateGroup},</if>
  142. <if test="isSureDepart != null and isSureDepart != ''">IS_SURE_DEPART = #{isSureDepart},</if>
  143. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  144. <if test="isCreateTeam != null and isCreateTeam != ''">IS_CREATE_TEAM = #{isCreateTeam},</if>
  145. <if test="teamContain != null and teamContain != ''">TEAM_CONTAIN = #{teamContain},</if>
  146. <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
  147. <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
  148. <if test="lgtdpc != null and lgtdpc != ''">LGTDPC = #{lgtdpc},</if>
  149. <if test="lttdpc != null and lttdpc != ''">LTTDPC = #{lttdpc},</if>
  150. <if test="isCreateYearPlan != null and isCreateYearPlan != ''">IS_CREATE_YEAR_PLAN = #{isCreateYearPlan},</if>
  151. <if test="isFindAndSlove != null and isFindAndSlove != ''">IS_FIND_AND_SLOVE = #{isFindAndSlove},</if>
  152. <if test="otherQuestion != null and otherQuestion != ''">OTHER_QUESTION = #{otherQuestion},</if>
  153. <if test="specialWay != null and specialWay != ''">SPECIAL_WAY = #{specialWay},</if>
  154. <if test="intm != null">INTM = #{intm},</if>
  155. <if test="uptm != null">UPTM = #{uptm},</if>
  156. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  157. </trim>
  158. <include refid="page_where" />
  159. </update>
  160. <!-- 其他自定义SQL -->
  161. </mapper>