DicQuestionDirectoryMapper.xml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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.xinxin.topro.sysservice.dao.mysqlmapper.DicQuestionDirectoryMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionDirectory" >
  5. <id column="DQD_ID" property="dqdId" jdbcType="INTEGER" />
  6. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  7. <result column="DQD_Name" property="dqdName" jdbcType="VARCHAR" />
  8. <result column="DQD_Sup_ID" property="dqdSupId" jdbcType="INTEGER" />
  9. <result column="DQD_Sort" property="dqdSort" jdbcType="INTEGER" />
  10. <result column="DQD_Level" property="dqdLevel" jdbcType="INTEGER" />
  11. <result column="DQD_PinyinCode" property="dqdPinyincode" jdbcType="VARCHAR" />
  12. <result column="DQD_WubiCode" property="dqdWubicode" jdbcType="VARCHAR" />
  13. <result column="DQD_OtherCode" property="dqdOthercode" jdbcType="VARCHAR" />
  14. <result column="DQD_IsDel" property="dqdIsdel" jdbcType="INTEGER" />
  15. <result column="DQD_Operation_Time" property="dqdOperationTime" jdbcType="TIMESTAMP" />
  16. <result column="DQD_Operator" property="dqdOperator" jdbcType="VARCHAR" />
  17. </resultMap>
  18. <resultMap id="ResultMapWithBLOBs" type="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionDirectory" extends="BaseResultMap" >
  19. <result column="DQD_Remark" property="dqdRemark" jdbcType="LONGVARCHAR" />
  20. </resultMap>
  21. <sql id="Base_Column_List" >
  22. DQD_ID, HI_ID, DQD_Name, DQD_Sup_ID, DQD_Sort, DQD_Level, DQD_PinyinCode, DQD_WubiCode,
  23. DQD_OtherCode, DQD_IsDel, DQD_Operation_Time, DQD_Operator
  24. </sql>
  25. <sql id="Blob_Column_List" >
  26. DQD_Remark
  27. </sql>
  28. <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
  29. select
  30. <include refid="Base_Column_List" />
  31. ,
  32. <include refid="Blob_Column_List" />
  33. from dic_question_directory
  34. where DQD_ID = #{dqdId,jdbcType=INTEGER}
  35. </select>
  36. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  37. delete from dic_question_directory
  38. where DQD_ID = #{dqdId,jdbcType=INTEGER}
  39. </delete>
  40. <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionDirectory" >
  41. insert into dic_question_directory (DQD_ID, HI_ID, DQD_Name,
  42. DQD_Sup_ID, DQD_Sort, DQD_Level,
  43. DQD_PinyinCode, DQD_WubiCode, DQD_OtherCode,
  44. DQD_IsDel, DQD_Operation_Time, DQD_Operator,
  45. DQD_Remark)
  46. values (#{dqdId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{dqdName,jdbcType=VARCHAR},
  47. #{dqdSupId,jdbcType=INTEGER}, #{dqdSort,jdbcType=INTEGER}, #{dqdLevel,jdbcType=INTEGER},
  48. #{dqdPinyincode,jdbcType=VARCHAR}, #{dqdWubicode,jdbcType=VARCHAR}, #{dqdOthercode,jdbcType=VARCHAR},
  49. #{dqdIsdel,jdbcType=INTEGER}, now(), #{dqdOperator,jdbcType=VARCHAR},
  50. #{dqdRemark,jdbcType=LONGVARCHAR})
  51. </insert>
  52. <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionDirectory" >
  53. insert into dic_question_directory
  54. <trim prefix="(" suffix=")" suffixOverrides="," >
  55. <if test="dqdId != null" >
  56. DQD_ID,
  57. </if>
  58. <if test="hiId != null" >
  59. HI_ID,
  60. </if>
  61. <if test="dqdName != null" >
  62. DQD_Name,
  63. </if>
  64. <if test="dqdSupId != null" >
  65. DQD_Sup_ID,
  66. </if>
  67. <if test="dqdSort != null" >
  68. DQD_Sort,
  69. </if>
  70. <if test="dqdLevel != null" >
  71. DQD_Level,
  72. </if>
  73. <if test="dqdPinyincode != null" >
  74. DQD_PinyinCode,
  75. </if>
  76. <if test="dqdWubicode != null" >
  77. DQD_WubiCode,
  78. </if>
  79. <if test="dqdOthercode != null" >
  80. DQD_OtherCode,
  81. </if>
  82. <if test="dqdIsdel != null" >
  83. DQD_IsDel,
  84. </if>
  85. <if test="dqdOperationTime != null" >
  86. DQD_Operation_Time,
  87. </if>
  88. <if test="dqdOperator != null" >
  89. DQD_Operator,
  90. </if>
  91. <if test="dqdRemark != null" >
  92. DQD_Remark,
  93. </if>
  94. </trim>
  95. <trim prefix="values (" suffix=")" suffixOverrides="," >
  96. <if test="dqdId != null" >
  97. #{dqdId,jdbcType=INTEGER},
  98. </if>
  99. <if test="hiId != null" >
  100. #{hiId,jdbcType=INTEGER},
  101. </if>
  102. <if test="dqdName != null" >
  103. #{dqdName,jdbcType=VARCHAR},
  104. </if>
  105. <if test="dqdSupId != null" >
  106. #{dqdSupId,jdbcType=INTEGER},
  107. </if>
  108. <if test="dqdSort != null" >
  109. #{dqdSort,jdbcType=INTEGER},
  110. </if>
  111. <if test="dqdLevel != null" >
  112. #{dqdLevel,jdbcType=INTEGER},
  113. </if>
  114. <if test="dqdPinyincode != null" >
  115. #{dqdPinyincode,jdbcType=VARCHAR},
  116. </if>
  117. <if test="dqdWubicode != null" >
  118. #{dqdWubicode,jdbcType=VARCHAR},
  119. </if>
  120. <if test="dqdOthercode != null" >
  121. #{dqdOthercode,jdbcType=VARCHAR},
  122. </if>
  123. <if test="dqdIsdel != null" >
  124. #{dqdIsdel,jdbcType=INTEGER},
  125. </if>
  126. <if test="dqdOperationTime != null" >
  127. #{dqdOperationTime,jdbcType=TIMESTAMP},
  128. </if>
  129. <if test="dqdOperator != null" >
  130. #{dqdOperator,jdbcType=VARCHAR},
  131. </if>
  132. <if test="dqdRemark != null" >
  133. #{dqdRemark,jdbcType=LONGVARCHAR},
  134. </if>
  135. </trim>
  136. </insert>
  137. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionDirectory" >
  138. update dic_question_directory
  139. <set >
  140. <if test="hiId != null" >
  141. HI_ID = #{hiId,jdbcType=INTEGER},
  142. </if>
  143. <if test="dqdName != null" >
  144. DQD_Name = #{dqdName,jdbcType=VARCHAR},
  145. </if>
  146. <if test="dqdSupId != null" >
  147. DQD_Sup_ID = #{dqdSupId,jdbcType=INTEGER},
  148. </if>
  149. <if test="dqdSort != null" >
  150. DQD_Sort = #{dqdSort,jdbcType=INTEGER},
  151. </if>
  152. <if test="dqdLevel != null" >
  153. DQD_Level = #{dqdLevel,jdbcType=INTEGER},
  154. </if>
  155. <if test="dqdPinyincode != null" >
  156. DQD_PinyinCode = #{dqdPinyincode,jdbcType=VARCHAR},
  157. </if>
  158. <if test="dqdWubicode != null" >
  159. DQD_WubiCode = #{dqdWubicode,jdbcType=VARCHAR},
  160. </if>
  161. <if test="dqdOthercode != null" >
  162. DQD_OtherCode = #{dqdOthercode,jdbcType=VARCHAR},
  163. </if>
  164. <if test="dqdIsdel != null" >
  165. DQD_IsDel = #{dqdIsdel,jdbcType=INTEGER},
  166. </if>
  167. <if test="dqdOperationTime != null" >
  168. DQD_Operation_Time = #{dqdOperationTime,jdbcType=TIMESTAMP},
  169. </if>
  170. <if test="dqdOperator != null" >
  171. DQD_Operator = #{dqdOperator,jdbcType=VARCHAR},
  172. </if>
  173. <if test="dqdRemark != null" >
  174. DQD_Remark = #{dqdRemark,jdbcType=LONGVARCHAR},
  175. </if>
  176. </set>
  177. where DQD_ID = #{dqdId,jdbcType=INTEGER}
  178. </update>
  179. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionDirectory" >
  180. update dic_question_directory
  181. set HI_ID = #{hiId,jdbcType=INTEGER},
  182. DQD_Name = #{dqdName,jdbcType=VARCHAR},
  183. DQD_Sup_ID = #{dqdSupId,jdbcType=INTEGER},
  184. DQD_Sort = #{dqdSort,jdbcType=INTEGER},
  185. DQD_Level = #{dqdLevel,jdbcType=INTEGER},
  186. DQD_PinyinCode = #{dqdPinyincode,jdbcType=VARCHAR},
  187. DQD_WubiCode = #{dqdWubicode,jdbcType=VARCHAR},
  188. DQD_OtherCode = #{dqdOthercode,jdbcType=VARCHAR},
  189. DQD_IsDel = #{dqdIsdel,jdbcType=INTEGER},
  190. DQD_Operation_Time = #{dqdOperationTime,jdbcType=TIMESTAMP},
  191. DQD_Operator = #{dqdOperator,jdbcType=VARCHAR},
  192. DQD_Remark = #{dqdRemark,jdbcType=LONGVARCHAR}
  193. where DQD_ID = #{dqdId,jdbcType=INTEGER}
  194. </update>
  195. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionDirectory" >
  196. update dic_question_directory
  197. set HI_ID = #{hiId,jdbcType=INTEGER},
  198. DQD_Name = #{dqdName,jdbcType=VARCHAR},
  199. DQD_Sup_ID = #{dqdSupId,jdbcType=INTEGER},
  200. DQD_Sort = #{dqdSort,jdbcType=INTEGER},
  201. DQD_Level = #{dqdLevel,jdbcType=INTEGER},
  202. DQD_PinyinCode = #{dqdPinyincode,jdbcType=VARCHAR},
  203. DQD_WubiCode = #{dqdWubicode,jdbcType=VARCHAR},
  204. DQD_OtherCode = #{dqdOthercode,jdbcType=VARCHAR},
  205. DQD_IsDel = #{dqdIsdel,jdbcType=INTEGER},
  206. DQD_Operation_Time = #{dqdOperationTime,jdbcType=TIMESTAMP},
  207. DQD_Operator = #{dqdOperator,jdbcType=VARCHAR}
  208. where DQD_ID = #{dqdId,jdbcType=INTEGER}
  209. </update>
  210. <select id="selectDirectoryList" resultMap="ResultMapWithBLOBs" >
  211. select
  212. <include refid="Base_Column_List" />
  213. ,
  214. <include refid="Blob_Column_List" />
  215. from dic_question_directory
  216. where DQD_IsDel = 0
  217. and HI_ID = #{hiId,jdbcType=INTEGER}
  218. </select>
  219. <select id="selectCountBySupId" resultType="java.lang.Integer">
  220. select count(1) from dic_question_directory
  221. where DQD_IsDel = 0
  222. and DQD_Sup_ID = #{dqdSupId,jdbcType=INTEGER}
  223. </select>
  224. <update id="updateDel" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicQuestionDirectory" >
  225. update dic_question_directory
  226. set
  227. DQD_IsDel = #{dqdIsdel,jdbcType=INTEGER},
  228. DQD_Operation_Time = now(),
  229. DQD_Operator = #{dqdOperator,jdbcType=VARCHAR}
  230. where DQD_ID = #{dqdId,jdbcType=INTEGER}
  231. </update>
  232. </mapper>