TJctableMapper.xml 16 KB

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