TDcsqtinfoMapper.xml 11 KB

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