TStationMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  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.TStationMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.TStation" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="org_id" property="orgId" jdbcType="VARCHAR" />
  7. <result column="sitename" property="sitename" jdbcType="VARCHAR" />
  8. <result column="sitecode" property="sitecode" jdbcType="VARCHAR" />
  9. <result column="address" property="address" jdbcType="VARCHAR" />
  10. <result column="brand" property="brand" jdbcType="VARCHAR" />
  11. <result column="model" property="model" jdbcType="VARCHAR" />
  12. <result column="signaltype" property="signaltype" jdbcType="VARCHAR" />
  13. <result column="serviceip" property="serviceip" jdbcType="VARCHAR" />
  14. <result column="serviceport" property="serviceport" jdbcType="INTEGER" />
  15. <result column="stringslogan" property="stringslogan" jdbcType="INTEGER" />
  16. <result column="porterrate" property="porterrate" jdbcType="VARCHAR" />
  17. <result column="databit" property="databit" jdbcType="VARCHAR" />
  18. <result column="checkbit" property="checkbit" jdbcType="VARCHAR" />
  19. <result column="islocal" property="islocal" jdbcType="INTEGER" />
  20. <result column="isline" property="isline" jdbcType="INTEGER" />
  21. <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
  22. <result column="remark" property="remark" jdbcType="VARCHAR" />
  23. <result column="v_cf_code" property="vCfCode" jdbcType="VARCHAR" />
  24. <result column="v_zd_type" property="vZdType" jdbcType="VARCHAR" />
  25. <result column="del_flag" property="delFlag" jdbcType="INTEGER" />
  26. </resultMap>
  27. <sql id="Example_Where_Clause" >
  28. <where >
  29. <foreach collection="oredCriteria" item="criteria" separator="or" >
  30. <if test="criteria.valid" >
  31. <trim prefix="(" suffix=")" prefixOverrides="and" >
  32. <foreach collection="criteria.criteria" item="criterion" >
  33. <choose >
  34. <when test="criterion.noValue" >
  35. and ${criterion.condition}
  36. </when>
  37. <when test="criterion.singleValue" >
  38. and ${criterion.condition} #{criterion.value}
  39. </when>
  40. <when test="criterion.betweenValue" >
  41. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  42. </when>
  43. <when test="criterion.listValue" >
  44. and ${criterion.condition}
  45. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  46. #{listItem}
  47. </foreach>
  48. </when>
  49. </choose>
  50. </foreach>
  51. </trim>
  52. </if>
  53. </foreach>
  54. </where>
  55. </sql>
  56. <sql id="Update_By_Example_Where_Clause" >
  57. <where >
  58. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  59. <if test="criteria.valid" >
  60. <trim prefix="(" suffix=")" prefixOverrides="and" >
  61. <foreach collection="criteria.criteria" item="criterion" >
  62. <choose >
  63. <when test="criterion.noValue" >
  64. and ${criterion.condition}
  65. </when>
  66. <when test="criterion.singleValue" >
  67. and ${criterion.condition} #{criterion.value}
  68. </when>
  69. <when test="criterion.betweenValue" >
  70. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  71. </when>
  72. <when test="criterion.listValue" >
  73. and ${criterion.condition}
  74. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  75. #{listItem}
  76. </foreach>
  77. </when>
  78. </choose>
  79. </foreach>
  80. </trim>
  81. </if>
  82. </foreach>
  83. </where>
  84. </sql>
  85. <sql id="Base_Column_List" >
  86. id, org_id, sitename, sitecode, address, brand, model, signaltype, serviceip, serviceport,
  87. stringslogan, porterrate, databit, checkbit, islocal, isline, updatetime, remark,
  88. v_cf_code, v_zd_type, del_flag
  89. </sql>
  90. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStationExample" >
  91. select
  92. <if test="distinct" >
  93. distinct
  94. </if>
  95. <include refid="Base_Column_List" />
  96. from t_station
  97. <if test="_parameter != null" >
  98. <include refid="Example_Where_Clause" />
  99. </if>
  100. <if test="orderByClause != null" >
  101. order by ${orderByClause}
  102. </if>
  103. </select>
  104. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  105. select
  106. <include refid="Base_Column_List" />
  107. from t_station
  108. where id = #{id,jdbcType=VARCHAR}
  109. </select>
  110. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  111. delete from t_station
  112. where id = #{id,jdbcType=VARCHAR}
  113. </delete>
  114. <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStationExample" >
  115. delete from t_station
  116. <if test="_parameter != null" >
  117. <include refid="Example_Where_Clause" />
  118. </if>
  119. </delete>
  120. <insert id="insert" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStation" >
  121. insert into t_station (id, org_id, sitename,
  122. sitecode, address, brand,
  123. model, signaltype, serviceip,
  124. serviceport, stringslogan, porterrate,
  125. databit, checkbit, islocal,
  126. isline, updatetime, remark,
  127. v_cf_code, v_zd_type, del_flag
  128. )
  129. values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{sitename,jdbcType=VARCHAR},
  130. #{sitecode,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{brand,jdbcType=VARCHAR},
  131. #{model,jdbcType=VARCHAR}, #{signaltype,jdbcType=VARCHAR}, #{serviceip,jdbcType=VARCHAR},
  132. #{serviceport,jdbcType=INTEGER}, #{stringslogan,jdbcType=INTEGER}, #{porterrate,jdbcType=VARCHAR},
  133. #{databit,jdbcType=VARCHAR}, #{checkbit,jdbcType=VARCHAR}, #{islocal,jdbcType=INTEGER},
  134. #{isline,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
  135. #{vCfCode,jdbcType=VARCHAR}, #{vZdType,jdbcType=VARCHAR}, #{delFlag,jdbcType=INTEGER}
  136. )
  137. </insert>
  138. <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStation" >
  139. insert into t_station
  140. <trim prefix="(" suffix=")" suffixOverrides="," >
  141. <if test="id != null" >
  142. id,
  143. </if>
  144. <if test="orgId != null" >
  145. org_id,
  146. </if>
  147. <if test="sitename != null" >
  148. sitename,
  149. </if>
  150. <if test="sitecode != null" >
  151. sitecode,
  152. </if>
  153. <if test="address != null" >
  154. address,
  155. </if>
  156. <if test="brand != null" >
  157. brand,
  158. </if>
  159. <if test="model != null" >
  160. model,
  161. </if>
  162. <if test="signaltype != null" >
  163. signaltype,
  164. </if>
  165. <if test="serviceip != null" >
  166. serviceip,
  167. </if>
  168. <if test="serviceport != null" >
  169. serviceport,
  170. </if>
  171. <if test="stringslogan != null" >
  172. stringslogan,
  173. </if>
  174. <if test="porterrate != null" >
  175. porterrate,
  176. </if>
  177. <if test="databit != null" >
  178. databit,
  179. </if>
  180. <if test="checkbit != null" >
  181. checkbit,
  182. </if>
  183. <if test="islocal != null" >
  184. islocal,
  185. </if>
  186. <if test="isline != null" >
  187. isline,
  188. </if>
  189. <if test="updatetime != null" >
  190. updatetime,
  191. </if>
  192. <if test="remark != null" >
  193. remark,
  194. </if>
  195. <if test="vCfCode != null" >
  196. v_cf_code,
  197. </if>
  198. <if test="vZdType != null" >
  199. v_zd_type,
  200. </if>
  201. <if test="delFlag != null" >
  202. del_flag,
  203. </if>
  204. </trim>
  205. <trim prefix="values (" suffix=")" suffixOverrides="," >
  206. <if test="id != null" >
  207. #{id,jdbcType=VARCHAR},
  208. </if>
  209. <if test="orgId != null" >
  210. #{orgId,jdbcType=VARCHAR},
  211. </if>
  212. <if test="sitename != null" >
  213. #{sitename,jdbcType=VARCHAR},
  214. </if>
  215. <if test="sitecode != null" >
  216. #{sitecode,jdbcType=VARCHAR},
  217. </if>
  218. <if test="address != null" >
  219. #{address,jdbcType=VARCHAR},
  220. </if>
  221. <if test="brand != null" >
  222. #{brand,jdbcType=VARCHAR},
  223. </if>
  224. <if test="model != null" >
  225. #{model,jdbcType=VARCHAR},
  226. </if>
  227. <if test="signaltype != null" >
  228. #{signaltype,jdbcType=VARCHAR},
  229. </if>
  230. <if test="serviceip != null" >
  231. #{serviceip,jdbcType=VARCHAR},
  232. </if>
  233. <if test="serviceport != null" >
  234. #{serviceport,jdbcType=INTEGER},
  235. </if>
  236. <if test="stringslogan != null" >
  237. #{stringslogan,jdbcType=INTEGER},
  238. </if>
  239. <if test="porterrate != null" >
  240. #{porterrate,jdbcType=VARCHAR},
  241. </if>
  242. <if test="databit != null" >
  243. #{databit,jdbcType=VARCHAR},
  244. </if>
  245. <if test="checkbit != null" >
  246. #{checkbit,jdbcType=VARCHAR},
  247. </if>
  248. <if test="islocal != null" >
  249. #{islocal,jdbcType=INTEGER},
  250. </if>
  251. <if test="isline != null" >
  252. #{isline,jdbcType=INTEGER},
  253. </if>
  254. <if test="updatetime != null" >
  255. #{updatetime,jdbcType=TIMESTAMP},
  256. </if>
  257. <if test="remark != null" >
  258. #{remark,jdbcType=VARCHAR},
  259. </if>
  260. <if test="vCfCode != null" >
  261. #{vCfCode,jdbcType=VARCHAR},
  262. </if>
  263. <if test="vZdType != null" >
  264. #{vZdType,jdbcType=VARCHAR},
  265. </if>
  266. <if test="delFlag != null" >
  267. #{delFlag,jdbcType=INTEGER},
  268. </if>
  269. </trim>
  270. </insert>
  271. <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStationExample" resultType="java.lang.Integer" >
  272. select count(*) from t_station
  273. <if test="_parameter != null" >
  274. <include refid="Example_Where_Clause" />
  275. </if>
  276. </select>
  277. <update id="updateByExampleSelective" parameterType="map" >
  278. update t_station
  279. <set >
  280. <if test="record.id != null" >
  281. id = #{record.id,jdbcType=VARCHAR},
  282. </if>
  283. <if test="record.orgId != null" >
  284. org_id = #{record.orgId,jdbcType=VARCHAR},
  285. </if>
  286. <if test="record.sitename != null" >
  287. sitename = #{record.sitename,jdbcType=VARCHAR},
  288. </if>
  289. <if test="record.sitecode != null" >
  290. sitecode = #{record.sitecode,jdbcType=VARCHAR},
  291. </if>
  292. <if test="record.address != null" >
  293. address = #{record.address,jdbcType=VARCHAR},
  294. </if>
  295. <if test="record.brand != null" >
  296. brand = #{record.brand,jdbcType=VARCHAR},
  297. </if>
  298. <if test="record.model != null" >
  299. model = #{record.model,jdbcType=VARCHAR},
  300. </if>
  301. <if test="record.signaltype != null" >
  302. signaltype = #{record.signaltype,jdbcType=VARCHAR},
  303. </if>
  304. <if test="record.serviceip != null" >
  305. serviceip = #{record.serviceip,jdbcType=VARCHAR},
  306. </if>
  307. <if test="record.serviceport != null" >
  308. serviceport = #{record.serviceport,jdbcType=INTEGER},
  309. </if>
  310. <if test="record.stringslogan != null" >
  311. stringslogan = #{record.stringslogan,jdbcType=INTEGER},
  312. </if>
  313. <if test="record.porterrate != null" >
  314. porterrate = #{record.porterrate,jdbcType=VARCHAR},
  315. </if>
  316. <if test="record.databit != null" >
  317. databit = #{record.databit,jdbcType=VARCHAR},
  318. </if>
  319. <if test="record.checkbit != null" >
  320. checkbit = #{record.checkbit,jdbcType=VARCHAR},
  321. </if>
  322. <if test="record.islocal != null" >
  323. islocal = #{record.islocal,jdbcType=INTEGER},
  324. </if>
  325. <if test="record.isline != null" >
  326. isline = #{record.isline,jdbcType=INTEGER},
  327. </if>
  328. <if test="record.updatetime != null" >
  329. updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
  330. </if>
  331. <if test="record.remark != null" >
  332. remark = #{record.remark,jdbcType=VARCHAR},
  333. </if>
  334. <if test="record.vCfCode != null" >
  335. v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
  336. </if>
  337. <if test="record.vZdType != null" >
  338. v_zd_type = #{record.vZdType,jdbcType=VARCHAR},
  339. </if>
  340. <if test="record.delFlag != null" >
  341. del_flag = #{record.delFlag,jdbcType=INTEGER},
  342. </if>
  343. </set>
  344. <if test="_parameter != null" >
  345. <include refid="Update_By_Example_Where_Clause" />
  346. </if>
  347. </update>
  348. <update id="updateByExample" parameterType="map" >
  349. update t_station
  350. set id = #{record.id,jdbcType=VARCHAR},
  351. org_id = #{record.orgId,jdbcType=VARCHAR},
  352. sitename = #{record.sitename,jdbcType=VARCHAR},
  353. sitecode = #{record.sitecode,jdbcType=VARCHAR},
  354. address = #{record.address,jdbcType=VARCHAR},
  355. brand = #{record.brand,jdbcType=VARCHAR},
  356. model = #{record.model,jdbcType=VARCHAR},
  357. signaltype = #{record.signaltype,jdbcType=VARCHAR},
  358. serviceip = #{record.serviceip,jdbcType=VARCHAR},
  359. serviceport = #{record.serviceport,jdbcType=INTEGER},
  360. stringslogan = #{record.stringslogan,jdbcType=INTEGER},
  361. porterrate = #{record.porterrate,jdbcType=VARCHAR},
  362. databit = #{record.databit,jdbcType=VARCHAR},
  363. checkbit = #{record.checkbit,jdbcType=VARCHAR},
  364. islocal = #{record.islocal,jdbcType=INTEGER},
  365. isline = #{record.isline,jdbcType=INTEGER},
  366. updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
  367. remark = #{record.remark,jdbcType=VARCHAR},
  368. v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
  369. v_zd_type = #{record.vZdType,jdbcType=VARCHAR},
  370. del_flag = #{record.delFlag,jdbcType=INTEGER}
  371. <if test="_parameter != null" >
  372. <include refid="Update_By_Example_Where_Clause" />
  373. </if>
  374. </update>
  375. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStation" >
  376. update t_station
  377. <set >
  378. <if test="orgId != null" >
  379. org_id = #{orgId,jdbcType=VARCHAR},
  380. </if>
  381. <if test="sitename != null" >
  382. sitename = #{sitename,jdbcType=VARCHAR},
  383. </if>
  384. <if test="sitecode != null" >
  385. sitecode = #{sitecode,jdbcType=VARCHAR},
  386. </if>
  387. <if test="address != null" >
  388. address = #{address,jdbcType=VARCHAR},
  389. </if>
  390. <if test="brand != null" >
  391. brand = #{brand,jdbcType=VARCHAR},
  392. </if>
  393. <if test="model != null" >
  394. model = #{model,jdbcType=VARCHAR},
  395. </if>
  396. <if test="signaltype != null" >
  397. signaltype = #{signaltype,jdbcType=VARCHAR},
  398. </if>
  399. <if test="serviceip != null" >
  400. serviceip = #{serviceip,jdbcType=VARCHAR},
  401. </if>
  402. <if test="serviceport != null" >
  403. serviceport = #{serviceport,jdbcType=INTEGER},
  404. </if>
  405. <if test="stringslogan != null" >
  406. stringslogan = #{stringslogan,jdbcType=INTEGER},
  407. </if>
  408. <if test="porterrate != null" >
  409. porterrate = #{porterrate,jdbcType=VARCHAR},
  410. </if>
  411. <if test="databit != null" >
  412. databit = #{databit,jdbcType=VARCHAR},
  413. </if>
  414. <if test="checkbit != null" >
  415. checkbit = #{checkbit,jdbcType=VARCHAR},
  416. </if>
  417. <if test="islocal != null" >
  418. islocal = #{islocal,jdbcType=INTEGER},
  419. </if>
  420. <if test="isline != null" >
  421. isline = #{isline,jdbcType=INTEGER},
  422. </if>
  423. <if test="updatetime != null" >
  424. updatetime = #{updatetime,jdbcType=TIMESTAMP},
  425. </if>
  426. <if test="remark != null" >
  427. remark = #{remark,jdbcType=VARCHAR},
  428. </if>
  429. <if test="vCfCode != null" >
  430. v_cf_code = #{vCfCode,jdbcType=VARCHAR},
  431. </if>
  432. <if test="vZdType != null" >
  433. v_zd_type = #{vZdType,jdbcType=VARCHAR},
  434. </if>
  435. <if test="delFlag != null" >
  436. del_flag = #{delFlag,jdbcType=INTEGER},
  437. </if>
  438. </set>
  439. where id = #{id,jdbcType=VARCHAR}
  440. </update>
  441. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStation" >
  442. update t_station
  443. set org_id = #{orgId,jdbcType=VARCHAR},
  444. sitename = #{sitename,jdbcType=VARCHAR},
  445. sitecode = #{sitecode,jdbcType=VARCHAR},
  446. address = #{address,jdbcType=VARCHAR},
  447. brand = #{brand,jdbcType=VARCHAR},
  448. model = #{model,jdbcType=VARCHAR},
  449. signaltype = #{signaltype,jdbcType=VARCHAR},
  450. serviceip = #{serviceip,jdbcType=VARCHAR},
  451. serviceport = #{serviceport,jdbcType=INTEGER},
  452. stringslogan = #{stringslogan,jdbcType=INTEGER},
  453. porterrate = #{porterrate,jdbcType=VARCHAR},
  454. databit = #{databit,jdbcType=VARCHAR},
  455. checkbit = #{checkbit,jdbcType=VARCHAR},
  456. islocal = #{islocal,jdbcType=INTEGER},
  457. isline = #{isline,jdbcType=INTEGER},
  458. updatetime = #{updatetime,jdbcType=TIMESTAMP},
  459. remark = #{remark,jdbcType=VARCHAR},
  460. v_cf_code = #{vCfCode,jdbcType=VARCHAR},
  461. v_zd_type = #{vZdType,jdbcType=VARCHAR},
  462. del_flag = #{delFlag,jdbcType=INTEGER}
  463. where id = #{id,jdbcType=VARCHAR}
  464. </update>
  465. </mapper>