DictDataMapper.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  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.xmnk.springbootbase.dao.DictDataMapper">
  4. <resultMap id="BaseResultMap" type="com.xmnk.springbootbase.entity.DictData">
  5. <!--
  6. WARNING - @mbg.generated
  7. -->
  8. <id column="dict_code" jdbcType="INTEGER" property="dictCode" />
  9. <result column="dict_sort" jdbcType="INTEGER" property="dictSort" />
  10. <result column="dict_label" jdbcType="VARCHAR" property="dictLabel" />
  11. <result column="dict_value" jdbcType="VARCHAR" property="dictValue" />
  12. <result column="dict_type" jdbcType="VARCHAR" property="dictType" />
  13. <result column="css_class" jdbcType="VARCHAR" property="cssClass" />
  14. <result column="list_class" jdbcType="VARCHAR" property="listClass" />
  15. <result column="is_default" jdbcType="CHAR" property="isDefault" />
  16. <result column="status" jdbcType="CHAR" property="status" />
  17. <result column="create_by" jdbcType="VARCHAR" property="createBy" />
  18. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  19. <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
  20. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  21. <result column="remark" jdbcType="VARCHAR" property="remark" />
  22. </resultMap>
  23. <sql id="Example_Where_Clause">
  24. <!--
  25. WARNING - @mbg.generated
  26. -->
  27. <where>
  28. <foreach collection="oredCriteria" item="criteria" separator="or">
  29. <if test="criteria.valid">
  30. <trim prefix="(" prefixOverrides="and" suffix=")">
  31. <foreach collection="criteria.criteria" item="criterion">
  32. <choose>
  33. <when test="criterion.noValue">
  34. and ${criterion.condition}
  35. </when>
  36. <when test="criterion.singleValue">
  37. and ${criterion.condition} #{criterion.value}
  38. </when>
  39. <when test="criterion.betweenValue">
  40. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  41. </when>
  42. <when test="criterion.listValue">
  43. and ${criterion.condition}
  44. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  45. #{listItem}
  46. </foreach>
  47. </when>
  48. </choose>
  49. </foreach>
  50. </trim>
  51. </if>
  52. </foreach>
  53. </where>
  54. </sql>
  55. <sql id="Update_By_Example_Where_Clause">
  56. <!--
  57. WARNING - @mbg.generated
  58. -->
  59. <where>
  60. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  61. <if test="criteria.valid">
  62. <trim prefix="(" prefixOverrides="and" suffix=")">
  63. <foreach collection="criteria.criteria" item="criterion">
  64. <choose>
  65. <when test="criterion.noValue">
  66. and ${criterion.condition}
  67. </when>
  68. <when test="criterion.singleValue">
  69. and ${criterion.condition} #{criterion.value}
  70. </when>
  71. <when test="criterion.betweenValue">
  72. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  73. </when>
  74. <when test="criterion.listValue">
  75. and ${criterion.condition}
  76. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  77. #{listItem}
  78. </foreach>
  79. </when>
  80. </choose>
  81. </foreach>
  82. </trim>
  83. </if>
  84. </foreach>
  85. </where>
  86. </sql>
  87. <sql id="Base_Column_List">
  88. <!--
  89. WARNING - @mbg.generated
  90. -->
  91. dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default,
  92. status, create_by, create_time, update_by, update_time, remark
  93. </sql>
  94. <select id="selectByExample" parameterType="com.xmnk.springbootbase.entity.DictDataExample" resultMap="BaseResultMap">
  95. <!--
  96. WARNING - @mbg.generated
  97. -->
  98. select
  99. <if test="distinct">
  100. distinct
  101. </if>
  102. 'true' as QUERYID,
  103. <include refid="Base_Column_List" />
  104. from sys_dict_data
  105. <if test="_parameter != null">
  106. <include refid="Example_Where_Clause" />
  107. </if>
  108. <if test="orderByClause != null">
  109. order by ${orderByClause}
  110. </if>
  111. </select>
  112. <delete id="deleteByExample" parameterType="com.xmnk.springbootbase.entity.DictDataExample">
  113. <!--
  114. WARNING - @mbg.generated
  115. -->
  116. delete from sys_dict_data
  117. <if test="_parameter != null">
  118. <include refid="Example_Where_Clause" />
  119. </if>
  120. </delete>
  121. <select id="countByExample" parameterType="com.xmnk.springbootbase.entity.DictDataExample" resultType="java.lang.Integer">
  122. <!--
  123. WARNING - @mbg.generated
  124. -->
  125. select count(*) from sys_dict_data
  126. <if test="_parameter != null">
  127. <include refid="Example_Where_Clause" />
  128. </if>
  129. </select>
  130. <update id="updateByExampleSelective" parameterType="map">
  131. <!--
  132. WARNING - @mbg.generated
  133. -->
  134. update sys_dict_data
  135. <set>
  136. <if test="record.dictCode != null">
  137. dict_code = #{record.dictCode,jdbcType=INTEGER},
  138. </if>
  139. <if test="record.dictSort != null">
  140. dict_sort = #{record.dictSort,jdbcType=INTEGER},
  141. </if>
  142. <if test="record.dictLabel != null">
  143. dict_label = #{record.dictLabel,jdbcType=VARCHAR},
  144. </if>
  145. <if test="record.dictValue != null">
  146. dict_value = #{record.dictValue,jdbcType=VARCHAR},
  147. </if>
  148. <if test="record.dictType != null">
  149. dict_type = #{record.dictType,jdbcType=VARCHAR},
  150. </if>
  151. <if test="record.cssClass != null">
  152. css_class = #{record.cssClass,jdbcType=VARCHAR},
  153. </if>
  154. <if test="record.listClass != null">
  155. list_class = #{record.listClass,jdbcType=VARCHAR},
  156. </if>
  157. <if test="record.isDefault != null">
  158. is_default = #{record.isDefault,jdbcType=CHAR},
  159. </if>
  160. <if test="record.status != null">
  161. status = #{record.status,jdbcType=CHAR},
  162. </if>
  163. <if test="record.createBy != null">
  164. create_by = #{record.createBy,jdbcType=VARCHAR},
  165. </if>
  166. <if test="record.createTime != null">
  167. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  168. </if>
  169. <if test="record.updateBy != null">
  170. update_by = #{record.updateBy,jdbcType=VARCHAR},
  171. </if>
  172. <if test="record.updateTime != null">
  173. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  174. </if>
  175. <if test="record.remark != null">
  176. remark = #{record.remark,jdbcType=VARCHAR},
  177. </if>
  178. </set>
  179. <if test="_parameter != null">
  180. <include refid="Update_By_Example_Where_Clause" />
  181. </if>
  182. </update>
  183. <update id="updateByExample" parameterType="map">
  184. <!--
  185. WARNING - @mbg.generated
  186. -->
  187. update sys_dict_data
  188. set dict_code = #{record.dictCode,jdbcType=INTEGER},
  189. dict_sort = #{record.dictSort,jdbcType=INTEGER},
  190. dict_label = #{record.dictLabel,jdbcType=VARCHAR},
  191. dict_value = #{record.dictValue,jdbcType=VARCHAR},
  192. dict_type = #{record.dictType,jdbcType=VARCHAR},
  193. css_class = #{record.cssClass,jdbcType=VARCHAR},
  194. list_class = #{record.listClass,jdbcType=VARCHAR},
  195. is_default = #{record.isDefault,jdbcType=CHAR},
  196. status = #{record.status,jdbcType=CHAR},
  197. create_by = #{record.createBy,jdbcType=VARCHAR},
  198. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  199. update_by = #{record.updateBy,jdbcType=VARCHAR},
  200. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  201. remark = #{record.remark,jdbcType=VARCHAR}
  202. <if test="_parameter != null">
  203. <include refid="Update_By_Example_Where_Clause" />
  204. </if>
  205. </update>
  206. <resultMap id="BaseResultMap" type="com.xmnk.springbootbase.entity.DictData">
  207. <!--
  208. WARNING - @mbg.generated
  209. -->
  210. <id column="dict_code" jdbcType="BIGINT" property="dictCode" />
  211. <result column="dict_sort" jdbcType="INTEGER" property="dictSort" />
  212. <result column="dict_label" jdbcType="VARCHAR" property="dictLabel" />
  213. <result column="dict_value" jdbcType="VARCHAR" property="dictValue" />
  214. <result column="dict_type" jdbcType="VARCHAR" property="dictType" />
  215. <result column="css_class" jdbcType="VARCHAR" property="cssClass" />
  216. <result column="list_class" jdbcType="VARCHAR" property="listClass" />
  217. <result column="is_default" jdbcType="CHAR" property="isDefault" />
  218. <result column="status" jdbcType="CHAR" property="status" />
  219. <result column="create_by" jdbcType="VARCHAR" property="createBy" />
  220. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  221. <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
  222. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  223. <result column="remark" jdbcType="VARCHAR" property="remark" />
  224. </resultMap>
  225. <sql id="Example_Where_Clause">
  226. <!--
  227. WARNING - @mbg.generated
  228. -->
  229. <where>
  230. <foreach collection="oredCriteria" item="criteria" separator="or">
  231. <if test="criteria.valid">
  232. <trim prefix="(" prefixOverrides="and" suffix=")">
  233. <foreach collection="criteria.criteria" item="criterion">
  234. <choose>
  235. <when test="criterion.noValue">
  236. and ${criterion.condition}
  237. </when>
  238. <when test="criterion.singleValue">
  239. and ${criterion.condition} #{criterion.value}
  240. </when>
  241. <when test="criterion.betweenValue">
  242. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  243. </when>
  244. <when test="criterion.listValue">
  245. and ${criterion.condition}
  246. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  247. #{listItem}
  248. </foreach>
  249. </when>
  250. </choose>
  251. </foreach>
  252. </trim>
  253. </if>
  254. </foreach>
  255. </where>
  256. </sql>
  257. <sql id="Update_By_Example_Where_Clause">
  258. <!--
  259. WARNING - @mbg.generated
  260. -->
  261. <where>
  262. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  263. <if test="criteria.valid">
  264. <trim prefix="(" prefixOverrides="and" suffix=")">
  265. <foreach collection="criteria.criteria" item="criterion">
  266. <choose>
  267. <when test="criterion.noValue">
  268. and ${criterion.condition}
  269. </when>
  270. <when test="criterion.singleValue">
  271. and ${criterion.condition} #{criterion.value}
  272. </when>
  273. <when test="criterion.betweenValue">
  274. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  275. </when>
  276. <when test="criterion.listValue">
  277. and ${criterion.condition}
  278. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  279. #{listItem}
  280. </foreach>
  281. </when>
  282. </choose>
  283. </foreach>
  284. </trim>
  285. </if>
  286. </foreach>
  287. </where>
  288. </sql>
  289. <sql id="Base_Column_List">
  290. <!--
  291. WARNING - @mbg.generated
  292. -->
  293. dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default,
  294. status, create_by, create_time, update_by, update_time, remark
  295. </sql>
  296. <select id="selectByExample" parameterType="com.xmnk.springbootbase.entity.DictDataExample" resultMap="BaseResultMap">
  297. <!--
  298. WARNING - @mbg.generated
  299. -->
  300. select
  301. <if test="distinct">
  302. distinct
  303. </if>
  304. 'true' as QUERYID,
  305. <include refid="Base_Column_List" />
  306. from sys_dict_data
  307. <if test="_parameter != null">
  308. <include refid="Example_Where_Clause" />
  309. </if>
  310. <if test="orderByClause != null">
  311. order by ${orderByClause}
  312. </if>
  313. </select>
  314. <delete id="deleteByExample" parameterType="com.xmnk.springbootbase.entity.DictDataExample">
  315. <!--
  316. WARNING - @mbg.generated
  317. -->
  318. delete from sys_dict_data
  319. <if test="_parameter != null">
  320. <include refid="Example_Where_Clause" />
  321. </if>
  322. </delete>
  323. <select id="countByExample" parameterType="com.xmnk.springbootbase.entity.DictDataExample" resultType="java.lang.Integer">
  324. <!--
  325. WARNING - @mbg.generated
  326. -->
  327. select count(*) from sys_dict_data
  328. <if test="_parameter != null">
  329. <include refid="Example_Where_Clause" />
  330. </if>
  331. </select>
  332. <update id="updateByExampleSelective" parameterType="map">
  333. <!--
  334. WARNING - @mbg.generated
  335. -->
  336. update sys_dict_data
  337. <set>
  338. <if test="record.dictCode != null">
  339. dict_code = #{record.dictCode,jdbcType=BIGINT},
  340. </if>
  341. <if test="record.dictSort != null">
  342. dict_sort = #{record.dictSort,jdbcType=INTEGER},
  343. </if>
  344. <if test="record.dictLabel != null">
  345. dict_label = #{record.dictLabel,jdbcType=VARCHAR},
  346. </if>
  347. <if test="record.dictValue != null">
  348. dict_value = #{record.dictValue,jdbcType=VARCHAR},
  349. </if>
  350. <if test="record.dictType != null">
  351. dict_type = #{record.dictType,jdbcType=VARCHAR},
  352. </if>
  353. <if test="record.cssClass != null">
  354. css_class = #{record.cssClass,jdbcType=VARCHAR},
  355. </if>
  356. <if test="record.listClass != null">
  357. list_class = #{record.listClass,jdbcType=VARCHAR},
  358. </if>
  359. <if test="record.isDefault != null">
  360. is_default = #{record.isDefault,jdbcType=CHAR},
  361. </if>
  362. <if test="record.status != null">
  363. status = #{record.status,jdbcType=CHAR},
  364. </if>
  365. <if test="record.createBy != null">
  366. create_by = #{record.createBy,jdbcType=VARCHAR},
  367. </if>
  368. <if test="record.createTime != null">
  369. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  370. </if>
  371. <if test="record.updateBy != null">
  372. update_by = #{record.updateBy,jdbcType=VARCHAR},
  373. </if>
  374. <if test="record.updateTime != null">
  375. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  376. </if>
  377. <if test="record.remark != null">
  378. remark = #{record.remark,jdbcType=VARCHAR},
  379. </if>
  380. </set>
  381. <if test="_parameter != null">
  382. <include refid="Update_By_Example_Where_Clause" />
  383. </if>
  384. </update>
  385. <update id="updateByExample" parameterType="map">
  386. <!--
  387. WARNING - @mbg.generated
  388. -->
  389. update sys_dict_data
  390. set dict_code = #{record.dictCode,jdbcType=BIGINT},
  391. dict_sort = #{record.dictSort,jdbcType=INTEGER},
  392. dict_label = #{record.dictLabel,jdbcType=VARCHAR},
  393. dict_value = #{record.dictValue,jdbcType=VARCHAR},
  394. dict_type = #{record.dictType,jdbcType=VARCHAR},
  395. css_class = #{record.cssClass,jdbcType=VARCHAR},
  396. list_class = #{record.listClass,jdbcType=VARCHAR},
  397. is_default = #{record.isDefault,jdbcType=CHAR},
  398. status = #{record.status,jdbcType=CHAR},
  399. create_by = #{record.createBy,jdbcType=VARCHAR},
  400. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  401. update_by = #{record.updateBy,jdbcType=VARCHAR},
  402. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  403. remark = #{record.remark,jdbcType=VARCHAR}
  404. <if test="_parameter != null">
  405. <include refid="Update_By_Example_Where_Clause" />
  406. </if>
  407. </update>
  408. </mapper>