SysParameterMapper.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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.base.mysqlmapper.SysParameterMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.base.mysqlmodel.SysParameter">
  5. <id column="SP_ID" property="spId" jdbcType="INTEGER" />
  6. <result column="HI_ID" property="hiId" jdbcType="INTEGER"/>
  7. <result column="SP_Classify" property="spClassify" jdbcType="INTEGER" />
  8. <result column="SP_ParmDm" property="spParmdm" jdbcType="VARCHAR" />
  9. <result column="SP_Des" property="spDes" jdbcType="VARCHAR" />
  10. <result column="SP_Type" property="spType" jdbcType="VARCHAR" />
  11. <result column="SP_Value" property="spValue" jdbcType="VARCHAR" />
  12. <result column="UI_ID" property="uiId" jdbcType="VARCHAR" />
  13. <result column="SP_Date" property="spDate" jdbcType="TIMESTAMP" />
  14. <result column="SP_IsDel" property="spIsdel" jdbcType="INTEGER" />
  15. <result column="SP_PinyinCode" property="spPincode" jdbcType="VARCHAR"/>
  16. <result column="SP_WubiCode" property="spWubicode" jdbcType="VARCHAR"/>
  17. <result column="SP_OtherCode" property="spOthercode" jdbcType="VARCHAR"/>
  18. </resultMap>
  19. <sql id="Base_Column_List" >
  20. SP_ID, HI_ID,SP_Classify, SP_ParmDm, SP_Des, SP_Type, SP_Value, UI_ID, SP_Date, SP_IsDel,SP_PinyinCode,SP_WubiCode,SP_OtherCode
  21. </sql>
  22. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  23. select
  24. <include refid="Base_Column_List" />
  25. from sys_parameter
  26. where SP_ID = #{spId,jdbcType=INTEGER}
  27. </select>
  28. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  29. delete from sys_parameter
  30. where SP_ID = #{spId,jdbcType=INTEGER}
  31. </delete>
  32. <insert id="insert" parameterType="com.xinxin.topro.base.mysqlmodel.SysParameter" >
  33. insert into sys_parameter (SP_ID, HI_ID,SP_Classify, SP_ParmDm,
  34. SP_Des, SP_Type, SP_Value,
  35. UI_ID, SP_Date, SP_IsDel,SP_PinyinCode,SP_WubiCode,SP_OtherCode
  36. )
  37. values (#{spId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER},#{spClassify,jdbcType=INTEGER}, #{spParmdm,jdbcType=VARCHAR},
  38. #{spDes,jdbcType=VARCHAR}, #{spType,jdbcType=VARCHAR}, #{spValue,jdbcType=VARCHAR},
  39. #{uiId,jdbcType=VARCHAR}, #{spDate,jdbcType=TIMESTAMP}, #{spIsdel,jdbcType=INTEGER},
  40. #{spPincode,jdbcType=VARCHAR},#{spWubicode,jdbcType=VARCHAR},#{spOthercode,jdbcType=VARCHAR}
  41. )
  42. </insert>
  43. <insert id="insertSelective" parameterType="com.xinxin.topro.base.mysqlmodel.SysParameter" >
  44. insert into sys_parameter
  45. <trim prefix="(" suffix=")" suffixOverrides="," >
  46. <if test="spId != null" >
  47. SP_ID,
  48. </if>
  49. <if test="spClassify != null" >
  50. SP_Classify,
  51. </if>
  52. <if test="spParmdm != null" >
  53. SP_ParmDm,
  54. </if>
  55. <if test="spDes != null" >
  56. SP_Des,
  57. </if>
  58. <if test="spType != null" >
  59. SP_Type,
  60. </if>
  61. <if test="spValue != null" >
  62. SP_Value,
  63. </if>
  64. <if test="uiId != null" >
  65. UI_ID,
  66. </if>
  67. <if test="spDate != null" >
  68. SP_Date,
  69. </if>
  70. <if test="spIsdel != null" >
  71. SP_IsDel,
  72. </if>
  73. <if test="spPincode != null">
  74. SP_PinyinCode,
  75. </if>
  76. <if test="spWubicode">
  77. SP_WubiCode,
  78. </if>
  79. <if test="spOthercode">
  80. SP_OtherCode,
  81. </if>
  82. </trim>
  83. <trim prefix="values (" suffix=")" suffixOverrides="," >
  84. <if test="spId != null" >
  85. #{spId,jdbcType=INTEGER},
  86. </if>
  87. <if test="spClassify != null" >
  88. #{spClassify,jdbcType=INTEGER},
  89. </if>
  90. <if test="spParmdm != null" >
  91. #{spParmdm,jdbcType=VARCHAR},
  92. </if>
  93. <if test="spDes != null" >
  94. #{spDes,jdbcType=VARCHAR},
  95. </if>
  96. <if test="spType != null" >
  97. #{spType,jdbcType=VARCHAR},
  98. </if>
  99. <if test="spValue != null" >
  100. #{spValue,jdbcType=VARCHAR},
  101. </if>
  102. <if test="uiId != null" >
  103. #{uiId,jdbcType=VARCHAR},
  104. </if>
  105. <if test="spDate != null" >
  106. #{spDate,jdbcType=TIMESTAMP},
  107. </if>
  108. <if test="spIsdel != null" >
  109. #{spIsdel,jdbcType=INTEGER},
  110. </if>
  111. <if test="spPincode !=null">
  112. #{spPincode,jdbcType=VARCHAR},
  113. </if>
  114. <if test="spWubicode !=null">
  115. #{spWubicode,jdbcType=VARCHAR},
  116. </if>
  117. <if test="spOthercode !=null">
  118. #{spOthercode,jdbcType=VARCHAR},
  119. </if>
  120. </trim>
  121. </insert>
  122. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.base.mysqlmodel.SysParameter" >
  123. update sys_parameter
  124. <set >
  125. <if test="spClassify != null" >
  126. SP_Classify = #{spClassify,jdbcType=INTEGER},
  127. </if>
  128. <if test="spParmdm != null" >
  129. SP_ParmDm = #{spParmdm,jdbcType=VARCHAR},
  130. </if>
  131. <if test="spDes != null" >
  132. SP_Des = #{spDes,jdbcType=VARCHAR},
  133. </if>
  134. <if test="spType != null" >
  135. SP_Type = #{spType,jdbcType=VARCHAR},
  136. </if>
  137. <if test="spValue != null" >
  138. SP_Value = #{spValue,jdbcType=VARCHAR},
  139. </if>
  140. <if test="uiId != null" >
  141. UI_ID = #{uiId,jdbcType=VARCHAR},
  142. </if>
  143. <if test="spDate != null" >
  144. SP_Date = #{spDate,jdbcType=TIMESTAMP},
  145. </if>
  146. <if test="spIsdel != null" >
  147. SP_IsDel = #{spIsdel,jdbcType=INTEGER},
  148. </if>
  149. <if test="spPincode !=null">
  150. #{spPincode,jdbcType=VARCHAR},
  151. </if>
  152. <if test="spWubicode !=null">
  153. #{spWubicode,jdbcType=VARCHAR},
  154. </if>
  155. <if test="spOthercode !=null">
  156. #{spOthercode,jdbcType=VARCHAR},
  157. </if>
  158. </set>
  159. where SP_ID = #{spId,jdbcType=INTEGER}
  160. </update>
  161. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.base.mysqlmodel.SysParameter" >
  162. update sys_parameter
  163. set SP_Classify = #{spClassify,jdbcType=INTEGER},
  164. HI_ID = #{hiId,jdbcType=INTEGER},
  165. SP_ParmDm = #{spParmdm,jdbcType=VARCHAR},
  166. SP_Des = #{spDes,jdbcType=VARCHAR},
  167. SP_Type = #{spType,jdbcType=VARCHAR},
  168. SP_Value = #{spValue,jdbcType=VARCHAR},
  169. UI_ID = #{uiId,jdbcType=VARCHAR},
  170. SP_Date = #{spDate,jdbcType=TIMESTAMP},
  171. SP_IsDel = #{spIsdel,jdbcType=INTEGER},
  172. SP_PinyinCode = #{spPincode,jdbcType=VARCHAR},
  173. SP_WubiCode = #{spWubicode,jdbcType=VARCHAR},
  174. SP_OtherCode = #{spPincode,jdbcType=VARCHAR}
  175. where SP_ID = #{spId,jdbcType=INTEGER}
  176. </update>
  177. <select id="selectValueByPramDM" resultType="java.lang.String" parameterType="java.lang.String">
  178. select SP_VALUE
  179. FROM sys_parameter
  180. WHERE SP_Classify = 1 and SP_IsDel = 0 and SP_ParmDm=#{spParmdm,jdbcType=VARCHAR}
  181. </select>
  182. <select id="selectValueByHiIdPramDM" resultType="java.lang.String">
  183. select SP_VALUE
  184. FROM sys_parameter
  185. WHERE SP_Classify = 1 and SP_IsDel = 0 and SP_ParmDm = #{pramDM,jdbcType=VARCHAR}
  186. and HI_ID = #{hiId,jdbcType=INTEGER}
  187. </select>
  188. <select id="selectByParamDm" resultType="com.xinxin.topro.base.mysqlmodel.SysParameter"
  189. parameterType="java.lang.String">
  190. select
  191. SP_ID spId,
  192. HI_ID hiId,
  193. SP_Classify spClassify,
  194. SP_ParmDm spParmdm,
  195. SP_Des spDes,
  196. SP_Type spType,
  197. SP_Value spValue,
  198. UI_ID uiId,
  199. SP_Date spDate,
  200. SP_IsDel spIsdel,
  201. SP_PinyinCode spPincode,
  202. SP_WubiCode spWubicode,
  203. SP_OtherCode spOthercode
  204. from sys_parameter
  205. where SP_IsDel = 0
  206. and SP_ParmDm = #{spParmDm,jdbcType=VARCHAR}
  207. </select>
  208. <select id="selectAll" resultMap="BaseResultMap">
  209. select
  210. SP_ID spId,
  211. HI_ID hiId,
  212. SP_Classify spClassify,
  213. SP_ParmDm spParmdm,
  214. SP_Des spDes,
  215. SP_Type spType,
  216. SP_Value spValue,
  217. UI_ID uiId,
  218. SP_Date spDate,
  219. SP_IsDel spIsdel,
  220. SP_PinyinCode spPincode,
  221. SP_WubiCode spWubicode,
  222. SP_OtherCode spOthercode
  223. from sys_parameter
  224. where SP_IsDel = 0;
  225. </select>
  226. <select id="selectAllClassify" resultMap="BaseResultMap" parameterType="java.lang.Integer">
  227. select
  228. SP_ID spId,
  229. HI_ID hiId,
  230. SP_Classify spClassify,
  231. SP_ParmDm spParmdm,
  232. SP_Des spDes,
  233. SP_Type spType,
  234. SP_Value spValue,
  235. UI_ID uiId,
  236. SP_Date spDate,
  237. SP_IsDel spIsdel,
  238. SP_PinyinCode spPincode,
  239. SP_WubiCode spWubicode,
  240. SP_OtherCode spOthercode
  241. from sys_parameter
  242. where SP_IsDel = 0
  243. and SP_Classify= #{classify,jdbcType=VARCHAR}
  244. </select>
  245. <select id="selectByClassifyName">
  246. </select>
  247. </mapper>