TWarningThresholdMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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="com.chinaitop.depot.intelligent.basicdata.mapper.TWarningThresholdMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.TWarningThreshold" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="org_id" property="orgId" jdbcType="VARCHAR" />
  7. <result column="v_cf_code" property="vCfCode" jdbcType="VARCHAR" />
  8. <result column="w_module" property="wModule" jdbcType="VARCHAR" />
  9. <result column="w_name" property="wName" jdbcType="VARCHAR" />
  10. <result column="w_state" property="wState" jdbcType="INTEGER" />
  11. <result column="threshold" property="threshold" jdbcType="DECIMAL" />
  12. <result column="w_update_person" property="wUpdatePerson" jdbcType="VARCHAR" />
  13. <result column="w_update_time" property="wUpdateTime" jdbcType="TIMESTAMP" />
  14. <result column="del_flag" property="delFlag" jdbcType="INTEGER" />
  15. </resultMap>
  16. <sql id="Example_Where_Clause" >
  17. <where >
  18. <foreach collection="oredCriteria" item="criteria" separator="or" >
  19. <if test="criteria.valid" >
  20. <trim prefix="(" suffix=")" prefixOverrides="and" >
  21. <foreach collection="criteria.criteria" item="criterion" >
  22. <choose >
  23. <when test="criterion.noValue" >
  24. and ${criterion.condition}
  25. </when>
  26. <when test="criterion.singleValue" >
  27. and ${criterion.condition} #{criterion.value}
  28. </when>
  29. <when test="criterion.betweenValue" >
  30. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  31. </when>
  32. <when test="criterion.listValue" >
  33. and ${criterion.condition}
  34. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  35. #{listItem}
  36. </foreach>
  37. </when>
  38. </choose>
  39. </foreach>
  40. </trim>
  41. </if>
  42. </foreach>
  43. </where>
  44. </sql>
  45. <sql id="Update_By_Example_Where_Clause" >
  46. <where >
  47. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  48. <if test="criteria.valid" >
  49. <trim prefix="(" suffix=")" prefixOverrides="and" >
  50. <foreach collection="criteria.criteria" item="criterion" >
  51. <choose >
  52. <when test="criterion.noValue" >
  53. and ${criterion.condition}
  54. </when>
  55. <when test="criterion.singleValue" >
  56. and ${criterion.condition} #{criterion.value}
  57. </when>
  58. <when test="criterion.betweenValue" >
  59. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  60. </when>
  61. <when test="criterion.listValue" >
  62. and ${criterion.condition}
  63. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  64. #{listItem}
  65. </foreach>
  66. </when>
  67. </choose>
  68. </foreach>
  69. </trim>
  70. </if>
  71. </foreach>
  72. </where>
  73. </sql>
  74. <sql id="Base_Column_List" >
  75. id, org_id, v_cf_code, w_module, w_name, w_state, threshold, w_update_person, w_update_time,
  76. del_flag
  77. </sql>
  78. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarningThresholdExample" >
  79. select
  80. <if test="distinct" >
  81. distinct
  82. </if>
  83. <include refid="Base_Column_List" />
  84. from t_warning_threshold
  85. <if test="_parameter != null" >
  86. <include refid="Example_Where_Clause" />
  87. </if>
  88. <if test="orderByClause != null" >
  89. order by ${orderByClause}
  90. </if>
  91. </select>
  92. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  93. select
  94. <include refid="Base_Column_List" />
  95. from t_warning_threshold
  96. where id = #{id,jdbcType=VARCHAR}
  97. </select>
  98. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  99. delete from t_warning_threshold
  100. where id = #{id,jdbcType=VARCHAR}
  101. </delete>
  102. <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarningThresholdExample" >
  103. delete from t_warning_threshold
  104. <if test="_parameter != null" >
  105. <include refid="Example_Where_Clause" />
  106. </if>
  107. </delete>
  108. <insert id="insert" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarningThreshold" >
  109. insert into t_warning_threshold (id, org_id, v_cf_code,
  110. w_module, w_name, w_state,
  111. threshold, w_update_person, w_update_time,
  112. del_flag)
  113. values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{vCfCode,jdbcType=VARCHAR},
  114. #{wModule,jdbcType=VARCHAR}, #{wName,jdbcType=VARCHAR}, #{wState,jdbcType=INTEGER},
  115. #{threshold,jdbcType=DECIMAL}, #{wUpdatePerson,jdbcType=VARCHAR}, #{wUpdateTime,jdbcType=TIMESTAMP},
  116. #{delFlag,jdbcType=INTEGER})
  117. </insert>
  118. <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarningThreshold" >
  119. insert into t_warning_threshold
  120. <trim prefix="(" suffix=")" suffixOverrides="," >
  121. <if test="id != null" >
  122. id,
  123. </if>
  124. <if test="orgId != null" >
  125. org_id,
  126. </if>
  127. <if test="vCfCode != null" >
  128. v_cf_code,
  129. </if>
  130. <if test="wModule != null" >
  131. w_module,
  132. </if>
  133. <if test="wName != null" >
  134. w_name,
  135. </if>
  136. <if test="wState != null" >
  137. w_state,
  138. </if>
  139. <if test="threshold != null" >
  140. threshold,
  141. </if>
  142. <if test="wUpdatePerson != null" >
  143. w_update_person,
  144. </if>
  145. <if test="wUpdateTime != null" >
  146. w_update_time,
  147. </if>
  148. <if test="delFlag != null" >
  149. del_flag,
  150. </if>
  151. </trim>
  152. <trim prefix="values (" suffix=")" suffixOverrides="," >
  153. <if test="id != null" >
  154. #{id,jdbcType=VARCHAR},
  155. </if>
  156. <if test="orgId != null" >
  157. #{orgId,jdbcType=VARCHAR},
  158. </if>
  159. <if test="vCfCode != null" >
  160. #{vCfCode,jdbcType=VARCHAR},
  161. </if>
  162. <if test="wModule != null" >
  163. #{wModule,jdbcType=VARCHAR},
  164. </if>
  165. <if test="wName != null" >
  166. #{wName,jdbcType=VARCHAR},
  167. </if>
  168. <if test="wState != null" >
  169. #{wState,jdbcType=INTEGER},
  170. </if>
  171. <if test="threshold != null" >
  172. #{threshold,jdbcType=DECIMAL},
  173. </if>
  174. <if test="wUpdatePerson != null" >
  175. #{wUpdatePerson,jdbcType=VARCHAR},
  176. </if>
  177. <if test="wUpdateTime != null" >
  178. #{wUpdateTime,jdbcType=TIMESTAMP},
  179. </if>
  180. <if test="delFlag != null" >
  181. #{delFlag,jdbcType=INTEGER},
  182. </if>
  183. </trim>
  184. </insert>
  185. <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarningThresholdExample" resultType="java.lang.Integer" >
  186. select count(*) from t_warning_threshold
  187. <if test="_parameter != null" >
  188. <include refid="Example_Where_Clause" />
  189. </if>
  190. </select>
  191. <update id="updateByExampleSelective" parameterType="map" >
  192. update t_warning_threshold
  193. <set >
  194. <if test="record.id != null" >
  195. id = #{record.id,jdbcType=VARCHAR},
  196. </if>
  197. <if test="record.orgId != null" >
  198. org_id = #{record.orgId,jdbcType=VARCHAR},
  199. </if>
  200. <if test="record.vCfCode != null" >
  201. v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
  202. </if>
  203. <if test="record.wModule != null" >
  204. w_module = #{record.wModule,jdbcType=VARCHAR},
  205. </if>
  206. <if test="record.wName != null" >
  207. w_name = #{record.wName,jdbcType=VARCHAR},
  208. </if>
  209. <if test="record.wState != null" >
  210. w_state = #{record.wState,jdbcType=INTEGER},
  211. </if>
  212. <if test="record.threshold != null" >
  213. threshold = #{record.threshold,jdbcType=DECIMAL},
  214. </if>
  215. <if test="record.wUpdatePerson != null" >
  216. w_update_person = #{record.wUpdatePerson,jdbcType=VARCHAR},
  217. </if>
  218. <if test="record.wUpdateTime != null" >
  219. w_update_time = #{record.wUpdateTime,jdbcType=TIMESTAMP},
  220. </if>
  221. <if test="record.delFlag != null" >
  222. del_flag = #{record.delFlag,jdbcType=INTEGER},
  223. </if>
  224. </set>
  225. <if test="_parameter != null" >
  226. <include refid="Update_By_Example_Where_Clause" />
  227. </if>
  228. </update>
  229. <update id="updateByExample" parameterType="map" >
  230. update t_warning_threshold
  231. set id = #{record.id,jdbcType=VARCHAR},
  232. org_id = #{record.orgId,jdbcType=VARCHAR},
  233. v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
  234. w_module = #{record.wModule,jdbcType=VARCHAR},
  235. w_name = #{record.wName,jdbcType=VARCHAR},
  236. w_state = #{record.wState,jdbcType=INTEGER},
  237. threshold = #{record.threshold,jdbcType=DECIMAL},
  238. w_update_person = #{record.wUpdatePerson,jdbcType=VARCHAR},
  239. w_update_time = #{record.wUpdateTime,jdbcType=TIMESTAMP},
  240. del_flag = #{record.delFlag,jdbcType=INTEGER}
  241. <if test="_parameter != null" >
  242. <include refid="Update_By_Example_Where_Clause" />
  243. </if>
  244. </update>
  245. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarningThreshold" >
  246. update t_warning_threshold
  247. <set >
  248. <if test="orgId != null" >
  249. org_id = #{orgId,jdbcType=VARCHAR},
  250. </if>
  251. <if test="vCfCode != null" >
  252. v_cf_code = #{vCfCode,jdbcType=VARCHAR},
  253. </if>
  254. <if test="wModule != null" >
  255. w_module = #{wModule,jdbcType=VARCHAR},
  256. </if>
  257. <if test="wName != null" >
  258. w_name = #{wName,jdbcType=VARCHAR},
  259. </if>
  260. <if test="wState != null" >
  261. w_state = #{wState,jdbcType=INTEGER},
  262. </if>
  263. <if test="threshold != null" >
  264. threshold = #{threshold,jdbcType=DECIMAL},
  265. </if>
  266. <if test="wUpdatePerson != null" >
  267. w_update_person = #{wUpdatePerson,jdbcType=VARCHAR},
  268. </if>
  269. <if test="wUpdateTime != null" >
  270. w_update_time = #{wUpdateTime,jdbcType=TIMESTAMP},
  271. </if>
  272. <if test="delFlag != null" >
  273. del_flag = #{delFlag,jdbcType=INTEGER},
  274. </if>
  275. </set>
  276. where id = #{id,jdbcType=VARCHAR}
  277. </update>
  278. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarningThreshold" >
  279. update t_warning_threshold
  280. set org_id = #{orgId,jdbcType=VARCHAR},
  281. v_cf_code = #{vCfCode,jdbcType=VARCHAR},
  282. w_module = #{wModule,jdbcType=VARCHAR},
  283. w_name = #{wName,jdbcType=VARCHAR},
  284. w_state = #{wState,jdbcType=INTEGER},
  285. threshold = #{threshold,jdbcType=DECIMAL},
  286. w_update_person = #{wUpdatePerson,jdbcType=VARCHAR},
  287. w_update_time = #{wUpdateTime,jdbcType=TIMESTAMP},
  288. del_flag = #{delFlag,jdbcType=INTEGER}
  289. where id = #{id,jdbcType=VARCHAR}
  290. </update>
  291. <update id="updateByMap" parameterType="map">
  292. update t_warning_threshold
  293. set del_flag = #{delFlag,jdbcType=INTEGER}
  294. where v_cf_code = #{vCfCode,jdbcType=VARCHAR}
  295. </update>
  296. </mapper>