KwsEnterpriseDao.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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.sckw.system.dao.KwsEnterpriseDao">
  4. <resultMap id="BaseResultMap" type="com.sckw.system.model.KwsEnterprise">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="firm_name" jdbcType="VARCHAR" property="firmName" />
  7. <result column="code" jdbcType="VARCHAR" property="code" />
  8. <result column="contacts" jdbcType="VARCHAR" property="contacts" />
  9. <result column="telephone" jdbcType="VARCHAR" property="telephone" />
  10. <result column="legal_name" jdbcType="VARCHAR" property="legalName" />
  11. <result column="legal_telephone" jdbcType="VARCHAR" property="legalTelephone" />
  12. <result column="head" jdbcType="VARCHAR" property="head" />
  13. <result column="integral" jdbcType="INTEGER" property="integral" />
  14. <result column="balance" jdbcType="DECIMAL" property="balance" />
  15. <result column="experience" jdbcType="INTEGER" property="experience" />
  16. <result column="member_level" jdbcType="INTEGER" property="memberLevel" />
  17. <result column="reg_time" jdbcType="TIMESTAMP" property="regTime" />
  18. <result column="reg_source" jdbcType="VARCHAR" property="regSource" />
  19. <result column="org_code" jdbcType="VARCHAR" property="orgCode" />
  20. <result column="city_code" jdbcType="INTEGER" property="cityCode" />
  21. <result column="detail_address" jdbcType="VARCHAR" property="detailAddress" />
  22. <result column="lat" jdbcType="VARCHAR" property="lat" />
  23. <result column="lng" jdbcType="VARCHAR" property="lng" />
  24. <result column="approval" jdbcType="INTEGER" property="approval" />
  25. <result column="approval_time" jdbcType="TIMESTAMP" property="approvalTime" />
  26. <result column="manager" jdbcType="BIGINT" property="manager" />
  27. <result column="remark" jdbcType="VARCHAR" property="remark" />
  28. <result column="status" jdbcType="INTEGER" property="status" />
  29. <result column="create_by" jdbcType="BIGINT" property="createBy" />
  30. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  31. <result column="update_by" jdbcType="BIGINT" property="updateBy" />
  32. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  33. <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
  34. </resultMap>
  35. <sql id="Base_Column_List">
  36. id, firm_name, code, contacts, telephone, legal_name, legal_telephone, head, integral,
  37. balance, experience, member_level, reg_time, reg_source, org_code, city_code, detail_address,
  38. lat, lng, approval, approval_time, manager, remark, status, create_by, create_time,
  39. update_by, update_time, del_flag
  40. </sql>
  41. <select id="selectByKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  42. select
  43. <include refid="Base_Column_List" />
  44. from kws_enterprise
  45. where id = #{id,jdbcType=BIGINT}
  46. </select>
  47. <insert id="insert" parameterType="com.sckw.system.model.KwsEnterprise">
  48. insert into kws_enterprise
  49. <trim prefix="(" suffix=")" suffixOverrides=",">
  50. <if test="id != null">
  51. id,
  52. </if>
  53. <if test="firmName != null">
  54. firm_name,
  55. </if>
  56. <if test="code != null">
  57. code,
  58. </if>
  59. <if test="contacts != null">
  60. contacts,
  61. </if>
  62. <if test="telephone != null">
  63. telephone,
  64. </if>
  65. <if test="legalName != null">
  66. legal_name,
  67. </if>
  68. <if test="legalTelephone != null">
  69. legal_telephone,
  70. </if>
  71. <if test="head != null">
  72. head,
  73. </if>
  74. <if test="integral != null">
  75. integral,
  76. </if>
  77. <if test="balance != null">
  78. balance,
  79. </if>
  80. <if test="experience != null">
  81. experience,
  82. </if>
  83. <if test="memberLevel != null">
  84. member_level,
  85. </if>
  86. <if test="regTime != null">
  87. reg_time,
  88. </if>
  89. <if test="regSource != null">
  90. reg_source,
  91. </if>
  92. <if test="orgCode != null">
  93. org_code,
  94. </if>
  95. <if test="cityCode != null">
  96. city_code,
  97. </if>
  98. <if test="detailAddress != null">
  99. detail_address,
  100. </if>
  101. <if test="lat != null">
  102. lat,
  103. </if>
  104. <if test="lng != null">
  105. lng,
  106. </if>
  107. <if test="approval != null">
  108. approval,
  109. </if>
  110. <if test="approvalTime != null">
  111. approval_time,
  112. </if>
  113. <if test="manager != null">
  114. manager,
  115. </if>
  116. <if test="remark != null">
  117. remark,
  118. </if>
  119. <if test="status != null">
  120. status,
  121. </if>
  122. <if test="createBy != null">
  123. create_by,
  124. </if>
  125. <if test="createTime != null">
  126. create_time,
  127. </if>
  128. <if test="updateBy != null">
  129. update_by,
  130. </if>
  131. <if test="updateTime != null">
  132. update_time,
  133. </if>
  134. <if test="delFlag != null">
  135. del_flag,
  136. </if>
  137. </trim>
  138. <trim prefix="values (" suffix=")" suffixOverrides=",">
  139. <if test="id != null">
  140. #{id,jdbcType=BIGINT},
  141. </if>
  142. <if test="firmName != null">
  143. #{firmName,jdbcType=VARCHAR},
  144. </if>
  145. <if test="code != null">
  146. #{code,jdbcType=VARCHAR},
  147. </if>
  148. <if test="contacts != null">
  149. #{contacts,jdbcType=VARCHAR},
  150. </if>
  151. <if test="telephone != null">
  152. #{telephone,jdbcType=VARCHAR},
  153. </if>
  154. <if test="legalName != null">
  155. #{legalName,jdbcType=VARCHAR},
  156. </if>
  157. <if test="legalTelephone != null">
  158. #{legalTelephone,jdbcType=VARCHAR},
  159. </if>
  160. <if test="head != null">
  161. #{head,jdbcType=VARCHAR},
  162. </if>
  163. <if test="integral != null">
  164. #{integral,jdbcType=INTEGER},
  165. </if>
  166. <if test="balance != null">
  167. #{balance,jdbcType=DECIMAL},
  168. </if>
  169. <if test="experience != null">
  170. #{experience,jdbcType=INTEGER},
  171. </if>
  172. <if test="memberLevel != null">
  173. #{memberLevel,jdbcType=INTEGER},
  174. </if>
  175. <if test="regTime != null">
  176. #{regTime,jdbcType=TIMESTAMP},
  177. </if>
  178. <if test="regSource != null">
  179. #{regSource,jdbcType=VARCHAR},
  180. </if>
  181. <if test="orgCode != null">
  182. #{orgCode,jdbcType=VARCHAR},
  183. </if>
  184. <if test="cityCode != null">
  185. #{cityCode,jdbcType=INTEGER},
  186. </if>
  187. <if test="detailAddress != null">
  188. #{detailAddress,jdbcType=VARCHAR},
  189. </if>
  190. <if test="lat != null">
  191. #{lat,jdbcType=VARCHAR},
  192. </if>
  193. <if test="lng != null">
  194. #{lng,jdbcType=VARCHAR},
  195. </if>
  196. <if test="approval != null">
  197. #{approval,jdbcType=INTEGER},
  198. </if>
  199. <if test="approvalTime != null">
  200. #{approvalTime,jdbcType=TIMESTAMP},
  201. </if>
  202. <if test="manager != null">
  203. #{manager,jdbcType=BIGINT},
  204. </if>
  205. <if test="remark != null">
  206. #{remark,jdbcType=VARCHAR},
  207. </if>
  208. <if test="status != null">
  209. #{status,jdbcType=INTEGER},
  210. </if>
  211. <if test="createBy != null">
  212. #{createBy,jdbcType=BIGINT},
  213. </if>
  214. <if test="createTime != null">
  215. #{createTime,jdbcType=TIMESTAMP},
  216. </if>
  217. <if test="updateBy != null">
  218. #{updateBy,jdbcType=BIGINT},
  219. </if>
  220. <if test="updateTime != null">
  221. #{updateTime,jdbcType=TIMESTAMP},
  222. </if>
  223. <if test="delFlag != null">
  224. #{delFlag,jdbcType=INTEGER},
  225. </if>
  226. </trim>
  227. </insert>
  228. <insert id="insertPPPPP" parameterType="com.sckw.system.model.KwsEnterprise">
  229. insert into kws_enterprise
  230. <trim prefix="(" suffix=")" suffixOverrides=",">
  231. <if test="id != null">
  232. id,
  233. </if>
  234. <if test="firmName != null">
  235. firm_name,
  236. </if>
  237. <if test="code != null">
  238. code,
  239. </if>
  240. <if test="contacts != null">
  241. contacts,
  242. </if>
  243. <if test="telephone != null">
  244. telephone,
  245. </if>
  246. <if test="legalName != null">
  247. legal_name,
  248. </if>
  249. <if test="legalTelephone != null">
  250. legal_telephone,
  251. </if>
  252. <if test="head != null">
  253. head,
  254. </if>
  255. <if test="integral != null">
  256. integral,
  257. </if>
  258. <if test="balance != null">
  259. balance,
  260. </if>
  261. <if test="experience != null">
  262. experience,
  263. </if>
  264. <if test="memberLevel != null">
  265. member_level,
  266. </if>
  267. <if test="regTime != null">
  268. reg_time,
  269. </if>
  270. <if test="regSource != null">
  271. reg_source,
  272. </if>
  273. <if test="orgCode != null">
  274. org_code,
  275. </if>
  276. <if test="cityCode != null">
  277. city_code,
  278. </if>
  279. <if test="detailAddress != null">
  280. detail_address,
  281. </if>
  282. <if test="lat != null">
  283. lat,
  284. </if>
  285. <if test="lng != null">
  286. lng,
  287. </if>
  288. <if test="approval != null">
  289. approval,
  290. </if>
  291. <if test="approvalTime != null">
  292. approval_time,
  293. </if>
  294. <if test="manager != null">
  295. manager,
  296. </if>
  297. <if test="remark != null">
  298. remark,
  299. </if>
  300. <if test="status != null">
  301. status,
  302. </if>
  303. <if test="createBy != null">
  304. create_by,
  305. </if>
  306. <if test="createTime != null">
  307. create_time,
  308. </if>
  309. <if test="updateBy != null">
  310. update_by,
  311. </if>
  312. <if test="updateTime != null">
  313. update_time,
  314. </if>
  315. <if test="delFlag != null">
  316. del_flag,
  317. </if>
  318. </trim>
  319. <trim prefix="values (" suffix=")" suffixOverrides=",">
  320. <if test="id != null">
  321. #{id,jdbcType=BIGINT},
  322. </if>
  323. <if test="firmName != null">
  324. #{firmName,jdbcType=VARCHAR},
  325. </if>
  326. <if test="code != null">
  327. #{code,jdbcType=VARCHAR},
  328. </if>
  329. <if test="contacts != null">
  330. #{contacts,jdbcType=VARCHAR},
  331. </if>
  332. <if test="telephone != null">
  333. #{telephone,jdbcType=VARCHAR},
  334. </if>
  335. <if test="legalName != null">
  336. #{legalName,jdbcType=VARCHAR},
  337. </if>
  338. <if test="legalTelephone != null">
  339. #{legalTelephone,jdbcType=VARCHAR},
  340. </if>
  341. <if test="head != null">
  342. #{head,jdbcType=VARCHAR},
  343. </if>
  344. <if test="integral != null">
  345. #{integral,jdbcType=INTEGER},
  346. </if>
  347. <if test="balance != null">
  348. #{balance,jdbcType=DECIMAL},
  349. </if>
  350. <if test="experience != null">
  351. #{experience,jdbcType=INTEGER},
  352. </if>
  353. <if test="memberLevel != null">
  354. #{memberLevel,jdbcType=INTEGER},
  355. </if>
  356. <if test="regTime != null">
  357. #{regTime,jdbcType=TIMESTAMP},
  358. </if>
  359. <if test="regSource != null">
  360. #{regSource,jdbcType=VARCHAR},
  361. </if>
  362. <if test="orgCode != null">
  363. #{orgCode,jdbcType=VARCHAR},
  364. </if>
  365. <if test="cityCode != null">
  366. #{cityCode,jdbcType=INTEGER},
  367. </if>
  368. <if test="detailAddress != null">
  369. #{detailAddress,jdbcType=VARCHAR},
  370. </if>
  371. <if test="lat != null">
  372. #{lat,jdbcType=VARCHAR},
  373. </if>
  374. <if test="lng != null">
  375. #{lng,jdbcType=VARCHAR},
  376. </if>
  377. <if test="approval != null">
  378. #{approval,jdbcType=INTEGER},
  379. </if>
  380. <if test="approvalTime != null">
  381. #{approvalTime,jdbcType=TIMESTAMP},
  382. </if>
  383. <if test="manager != null">
  384. #{manager,jdbcType=BIGINT},
  385. </if>
  386. <if test="remark != null">
  387. #{remark,jdbcType=VARCHAR},
  388. </if>
  389. <if test="status != null">
  390. #{status,jdbcType=INTEGER},
  391. </if>
  392. <if test="createBy != null">
  393. #{createBy,jdbcType=BIGINT},
  394. </if>
  395. <if test="createTime != null">
  396. #{createTime,jdbcType=TIMESTAMP},
  397. </if>
  398. <if test="updateBy != null">
  399. #{updateBy,jdbcType=BIGINT},
  400. </if>
  401. <if test="updateTime != null">
  402. #{updateTime,jdbcType=TIMESTAMP},
  403. </if>
  404. <if test="delFlag != null">
  405. #{delFlag,jdbcType=INTEGER},
  406. </if>
  407. </trim>
  408. </insert>
  409. <update id="update" parameterType="com.sckw.system.model.KwsEnterprise">
  410. update kws_enterprise
  411. <set>
  412. <if test="firmName != null">
  413. firm_name = #{firmName,jdbcType=VARCHAR},
  414. </if>
  415. <if test="code != null">
  416. code = #{code,jdbcType=VARCHAR},
  417. </if>
  418. <if test="contacts != null">
  419. contacts = #{contacts,jdbcType=VARCHAR},
  420. </if>
  421. <if test="telephone != null">
  422. telephone = #{telephone,jdbcType=VARCHAR},
  423. </if>
  424. <if test="legalName != null">
  425. legal_name = #{legalName,jdbcType=VARCHAR},
  426. </if>
  427. <if test="legalTelephone != null">
  428. legal_telephone = #{legalTelephone,jdbcType=VARCHAR},
  429. </if>
  430. <if test="head != null">
  431. head = #{head,jdbcType=VARCHAR},
  432. </if>
  433. <if test="integral != null">
  434. integral = #{integral,jdbcType=INTEGER},
  435. </if>
  436. <if test="balance != null">
  437. balance = #{balance,jdbcType=DECIMAL},
  438. </if>
  439. <if test="experience != null">
  440. experience = #{experience,jdbcType=INTEGER},
  441. </if>
  442. <if test="memberLevel != null">
  443. member_level = #{memberLevel,jdbcType=INTEGER},
  444. </if>
  445. <if test="regTime != null">
  446. reg_time = #{regTime,jdbcType=TIMESTAMP},
  447. </if>
  448. <if test="regSource != null">
  449. reg_source = #{regSource,jdbcType=VARCHAR},
  450. </if>
  451. <if test="orgCode != null">
  452. org_code = #{orgCode,jdbcType=VARCHAR},
  453. </if>
  454. <if test="cityCode != null">
  455. city_code = #{cityCode,jdbcType=INTEGER},
  456. </if>
  457. <if test="detailAddress != null">
  458. detail_address = #{detailAddress,jdbcType=VARCHAR},
  459. </if>
  460. <if test="lat != null">
  461. lat = #{lat,jdbcType=VARCHAR},
  462. </if>
  463. <if test="lng != null">
  464. lng = #{lng,jdbcType=VARCHAR},
  465. </if>
  466. <if test="approval != null">
  467. approval = #{approval,jdbcType=INTEGER},
  468. </if>
  469. <if test="approvalTime != null">
  470. approval_time = #{approvalTime,jdbcType=TIMESTAMP},
  471. </if>
  472. <if test="manager != null">
  473. manager = #{manager,jdbcType=BIGINT},
  474. </if>
  475. <if test="remark != null">
  476. remark = #{remark,jdbcType=VARCHAR},
  477. </if>
  478. <if test="status != null">
  479. status = #{status,jdbcType=INTEGER},
  480. </if>
  481. <if test="createBy != null">
  482. create_by = #{createBy,jdbcType=BIGINT},
  483. </if>
  484. <if test="createTime != null">
  485. create_time = #{createTime,jdbcType=TIMESTAMP},
  486. </if>
  487. <if test="updateBy != null">
  488. update_by = #{updateBy,jdbcType=BIGINT},
  489. </if>
  490. <if test="updateTime != null">
  491. update_time = #{updateTime,jdbcType=TIMESTAMP},
  492. </if>
  493. <if test="delFlag != null">
  494. del_flag = #{delFlag,jdbcType=INTEGER},
  495. </if>
  496. </set>
  497. where id = #{id,jdbcType=BIGINT}
  498. </update>
  499. </mapper>