SrTempfieldMapper.xml 12 KB

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