DemandMapper.xml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877
  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.goafanti.common.dao.DemandMapper" >
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.Demand" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="serial_number" property="serialNumber" jdbcType="INTEGER" />
  7. <result column="data_category" property="dataCategory" jdbcType="INTEGER" />
  8. <result column="name" property="name" jdbcType="VARCHAR" />
  9. <result column="keyword" property="keyword" jdbcType="VARCHAR" />
  10. <result column="info_sources" property="infoSources" jdbcType="INTEGER" />
  11. <result column="industry_category_a" property="industryCategoryA" jdbcType="INTEGER" />
  12. <result column="industry_category_b" property="industryCategoryB" jdbcType="INTEGER" />
  13. <result column="industry_category_c" property="industryCategoryC" jdbcType="INTEGER" />
  14. <result column="demand_type" property="demandType" jdbcType="INTEGER" />
  15. <result column="problem_des" property="problemDes" jdbcType="VARCHAR" />
  16. <result column="technical_requirements" property="technicalRequirements" jdbcType="VARCHAR" />
  17. <result column="picture_url" property="pictureUrl" jdbcType="VARCHAR" />
  18. <result column="text_file_url" property="textFileUrl" jdbcType="VARCHAR" />
  19. <result column="video_url" property="videoUrl" jdbcType="VARCHAR" />
  20. <result column="fixed_budget" property="fixedBudget" jdbcType="DECIMAL" />
  21. <result column="fixed_cycle" property="fixedCycle" jdbcType="VARCHAR" />
  22. <result column="people_number" property="peopleNumber" jdbcType="INTEGER" />
  23. <result column="fixed_scheme" property="fixedScheme" jdbcType="VARCHAR" />
  24. <result column="cost_escrow" property="costEscrow" jdbcType="DECIMAL" />
  25. <result column="budget_cost" property="budgetCost" jdbcType="DECIMAL" />
  26. <result column="validity_period" property="validityPeriod" jdbcType="TIMESTAMP" />
  27. <result column="employer_id" property="employerId" jdbcType="VARCHAR" />
  28. <result column="employer_name" property="employerName" jdbcType="VARCHAR" />
  29. <result column="employer_address" property="employerAddress" jdbcType="VARCHAR" />
  30. <result column="employer_contacts" property="employerContacts" jdbcType="VARCHAR" />
  31. <result column="employer_contacts_mobile" property="employerContactsMobile" jdbcType="VARCHAR" />
  32. <result column="employer_contacts_mailbox" property="employerContactsMailbox" jdbcType="VARCHAR" />
  33. <result column="contacts" property="contacts" jdbcType="INTEGER" />
  34. <result column="status" property="status" jdbcType="INTEGER" />
  35. <result column="release_status" property="releaseStatus" jdbcType="INTEGER" />
  36. <result column="release_date" property="releaseDate" jdbcType="TIMESTAMP" />
  37. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  38. <result column="principal_id" property="principalId" jdbcType="VARCHAR" />
  39. <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
  40. <result column="audit_status" property="auditStatus" jdbcType="INTEGER" />
  41. <result column="tech_broker_id" property="techBrokerId" jdbcType="VARCHAR" />
  42. </resultMap>
  43. <sql id="Base_Column_List" >
  44. id, serial_number, data_category, name, keyword, info_sources, industry_category_a,
  45. industry_category_b, industry_category_c, demand_type, problem_des, technical_requirements,
  46. picture_url, text_file_url, video_url, fixed_budget, fixed_cycle, people_number,
  47. fixed_scheme, cost_escrow, budget_cost, validity_period, employer_id, employer_name,
  48. employer_address, employer_contacts, employer_contacts_mobile, employer_contacts_mailbox,
  49. contacts, status, release_status, release_date, create_time, principal_id, deleted_sign,
  50. audit_status, tech_broker_id
  51. </sql>
  52. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  53. select
  54. <include refid="Base_Column_List" />
  55. from demand
  56. where id = #{id,jdbcType=VARCHAR}
  57. </select>
  58. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  59. delete from demand
  60. where id = #{id,jdbcType=VARCHAR}
  61. </delete>
  62. <insert id="insert" parameterType="com.goafanti.common.model.Demand" >
  63. insert into demand (id, serial_number, data_category,
  64. name, keyword, info_sources,
  65. industry_category_a, industry_category_b, industry_category_c,
  66. demand_type, problem_des, technical_requirements,
  67. picture_url, text_file_url, video_url,
  68. fixed_budget, fixed_cycle, people_number,
  69. fixed_scheme, cost_escrow, budget_cost,
  70. validity_period, employer_id, employer_name,
  71. employer_address, employer_contacts, employer_contacts_mobile,
  72. employer_contacts_mailbox, contacts, status,
  73. release_status, release_date, create_time,
  74. principal_id, deleted_sign, audit_status, tech_broker_id)
  75. values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER},
  76. #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{infoSources,jdbcType=INTEGER},
  77. #{industryCategoryA,jdbcType=INTEGER}, #{industryCategoryB,jdbcType=INTEGER}, #{industryCategoryC,jdbcType=INTEGER},
  78. #{demandType,jdbcType=INTEGER}, #{problemDes,jdbcType=VARCHAR}, #{technicalRequirements,jdbcType=VARCHAR},
  79. #{pictureUrl,jdbcType=VARCHAR}, #{textFileUrl,jdbcType=VARCHAR}, #{videoUrl,jdbcType=VARCHAR},
  80. #{fixedBudget,jdbcType=DECIMAL}, #{fixedCycle,jdbcType=VARCHAR}, #{peopleNumber,jdbcType=INTEGER},
  81. #{fixedScheme,jdbcType=VARCHAR}, #{costEscrow,jdbcType=DECIMAL}, #{budgetCost,jdbcType=DECIMAL},
  82. #{validityPeriod,jdbcType=TIMESTAMP}, #{employerId,jdbcType=VARCHAR}, #{employerName,jdbcType=VARCHAR},
  83. #{employerAddress,jdbcType=VARCHAR}, #{employerContacts,jdbcType=VARCHAR}, #{employerContactsMobile,jdbcType=VARCHAR},
  84. #{employerContactsMailbox,jdbcType=VARCHAR}, #{contacts,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
  85. #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
  86. #{principalId,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER},
  87. #{techBrokerId,jdbcType=VARCHAR})
  88. </insert>
  89. <insert id="insertSelective" parameterType="com.goafanti.common.model.Demand" >
  90. insert into demand
  91. <trim prefix="(" suffix=")" suffixOverrides="," >
  92. <if test="id != null" >
  93. id,
  94. </if>
  95. <if test="serialNumber != null" >
  96. serial_number,
  97. </if>
  98. <if test="dataCategory != null" >
  99. data_category,
  100. </if>
  101. <if test="name != null" >
  102. name,
  103. </if>
  104. <if test="keyword != null" >
  105. keyword,
  106. </if>
  107. <if test="infoSources != null" >
  108. info_sources,
  109. </if>
  110. <if test="industryCategoryA != null" >
  111. industry_category_a,
  112. </if>
  113. <if test="industryCategoryB != null" >
  114. industry_category_b,
  115. </if>
  116. <if test="industryCategoryC != null" >
  117. industry_category_c,
  118. </if>
  119. <if test="demandType != null" >
  120. demand_type,
  121. </if>
  122. <if test="problemDes != null" >
  123. problem_des,
  124. </if>
  125. <if test="technicalRequirements != null" >
  126. technical_requirements,
  127. </if>
  128. <if test="pictureUrl != null" >
  129. picture_url,
  130. </if>
  131. <if test="textFileUrl != null" >
  132. text_file_url,
  133. </if>
  134. <if test="videoUrl != null" >
  135. video_url,
  136. </if>
  137. <if test="fixedBudget != null" >
  138. fixed_budget,
  139. </if>
  140. <if test="fixedCycle != null" >
  141. fixed_cycle,
  142. </if>
  143. <if test="peopleNumber != null" >
  144. people_number,
  145. </if>
  146. <if test="fixedScheme != null" >
  147. fixed_scheme,
  148. </if>
  149. <if test="costEscrow != null" >
  150. cost_escrow,
  151. </if>
  152. <if test="budgetCost != null" >
  153. budget_cost,
  154. </if>
  155. <if test="validityPeriod != null" >
  156. validity_period,
  157. </if>
  158. <if test="employerId != null" >
  159. employer_id,
  160. </if>
  161. <if test="employerName != null" >
  162. employer_name,
  163. </if>
  164. <if test="employerAddress != null" >
  165. employer_address,
  166. </if>
  167. <if test="employerContacts != null" >
  168. employer_contacts,
  169. </if>
  170. <if test="employerContactsMobile != null" >
  171. employer_contacts_mobile,
  172. </if>
  173. <if test="employerContactsMailbox != null" >
  174. employer_contacts_mailbox,
  175. </if>
  176. <if test="contacts != null" >
  177. contacts,
  178. </if>
  179. <if test="status != null" >
  180. status,
  181. </if>
  182. <if test="releaseStatus != null" >
  183. release_status,
  184. </if>
  185. <if test="releaseDate != null" >
  186. release_date,
  187. </if>
  188. <if test="createTime != null" >
  189. create_time,
  190. </if>
  191. <if test="principalId != null" >
  192. principal_id,
  193. </if>
  194. <if test="deletedSign != null" >
  195. deleted_sign,
  196. </if>
  197. <if test="auditStatus != null" >
  198. audit_status,
  199. </if>
  200. <if test="techBrokerId != null" >
  201. tech_broker_id,
  202. </if>
  203. </trim>
  204. <trim prefix="values (" suffix=")" suffixOverrides="," >
  205. <if test="id != null" >
  206. #{id,jdbcType=VARCHAR},
  207. </if>
  208. <if test="serialNumber != null" >
  209. #{serialNumber,jdbcType=INTEGER},
  210. </if>
  211. <if test="dataCategory != null" >
  212. #{dataCategory,jdbcType=INTEGER},
  213. </if>
  214. <if test="name != null" >
  215. #{name,jdbcType=VARCHAR},
  216. </if>
  217. <if test="keyword != null" >
  218. #{keyword,jdbcType=VARCHAR},
  219. </if>
  220. <if test="infoSources != null" >
  221. #{infoSources,jdbcType=INTEGER},
  222. </if>
  223. <if test="industryCategoryA != null" >
  224. #{industryCategoryA,jdbcType=INTEGER},
  225. </if>
  226. <if test="industryCategoryB != null" >
  227. #{industryCategoryB,jdbcType=INTEGER},
  228. </if>
  229. <if test="industryCategoryC != null" >
  230. #{industryCategoryC,jdbcType=INTEGER},
  231. </if>
  232. <if test="demandType != null" >
  233. #{demandType,jdbcType=INTEGER},
  234. </if>
  235. <if test="problemDes != null" >
  236. #{problemDes,jdbcType=VARCHAR},
  237. </if>
  238. <if test="technicalRequirements != null" >
  239. #{technicalRequirements,jdbcType=VARCHAR},
  240. </if>
  241. <if test="pictureUrl != null" >
  242. #{pictureUrl,jdbcType=VARCHAR},
  243. </if>
  244. <if test="textFileUrl != null" >
  245. #{textFileUrl,jdbcType=VARCHAR},
  246. </if>
  247. <if test="videoUrl != null" >
  248. #{videoUrl,jdbcType=VARCHAR},
  249. </if>
  250. <if test="fixedBudget != null" >
  251. #{fixedBudget,jdbcType=DECIMAL},
  252. </if>
  253. <if test="fixedCycle != null" >
  254. #{fixedCycle,jdbcType=VARCHAR},
  255. </if>
  256. <if test="peopleNumber != null" >
  257. #{peopleNumber,jdbcType=INTEGER},
  258. </if>
  259. <if test="fixedScheme != null" >
  260. #{fixedScheme,jdbcType=VARCHAR},
  261. </if>
  262. <if test="costEscrow != null" >
  263. #{costEscrow,jdbcType=DECIMAL},
  264. </if>
  265. <if test="budgetCost != null" >
  266. #{budgetCost,jdbcType=DECIMAL},
  267. </if>
  268. <if test="validityPeriod != null" >
  269. #{validityPeriod,jdbcType=TIMESTAMP},
  270. </if>
  271. <if test="employerId != null" >
  272. #{employerId,jdbcType=VARCHAR},
  273. </if>
  274. <if test="employerName != null" >
  275. #{employerName,jdbcType=VARCHAR},
  276. </if>
  277. <if test="employerAddress != null" >
  278. #{employerAddress,jdbcType=VARCHAR},
  279. </if>
  280. <if test="employerContacts != null" >
  281. #{employerContacts,jdbcType=VARCHAR},
  282. </if>
  283. <if test="employerContactsMobile != null" >
  284. #{employerContactsMobile,jdbcType=VARCHAR},
  285. </if>
  286. <if test="employerContactsMailbox != null" >
  287. #{employerContactsMailbox,jdbcType=VARCHAR},
  288. </if>
  289. <if test="contacts != null" >
  290. #{contacts,jdbcType=INTEGER},
  291. </if>
  292. <if test="status != null" >
  293. #{status,jdbcType=INTEGER},
  294. </if>
  295. <if test="releaseStatus != null" >
  296. #{releaseStatus,jdbcType=INTEGER},
  297. </if>
  298. <if test="releaseDate != null" >
  299. #{releaseDate,jdbcType=TIMESTAMP},
  300. </if>
  301. <if test="createTime != null" >
  302. #{createTime,jdbcType=TIMESTAMP},
  303. </if>
  304. <if test="principalId != null" >
  305. #{principalId,jdbcType=VARCHAR},
  306. </if>
  307. <if test="deletedSign != null" >
  308. #{deletedSign,jdbcType=INTEGER},
  309. </if>
  310. <if test="auditStatus != null" >
  311. #{auditStatus,jdbcType=INTEGER},
  312. </if>
  313. <if test="techBrokerId != null" >
  314. #{techBrokerId,jdbcType=VARCHAR},
  315. </if>
  316. </trim>
  317. </insert>
  318. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Demand" >
  319. update demand
  320. <set >
  321. <if test="serialNumber != null" >
  322. serial_number = #{serialNumber,jdbcType=INTEGER},
  323. </if>
  324. <if test="dataCategory != null" >
  325. data_category = #{dataCategory,jdbcType=INTEGER},
  326. </if>
  327. <if test="name != null" >
  328. name = #{name,jdbcType=VARCHAR},
  329. </if>
  330. <if test="keyword != null" >
  331. keyword = #{keyword,jdbcType=VARCHAR},
  332. </if>
  333. <if test="infoSources != null" >
  334. info_sources = #{infoSources,jdbcType=INTEGER},
  335. </if>
  336. <if test="industryCategoryA != null" >
  337. industry_category_a = #{industryCategoryA,jdbcType=INTEGER},
  338. </if>
  339. <if test="industryCategoryB != null" >
  340. industry_category_b = #{industryCategoryB,jdbcType=INTEGER},
  341. </if>
  342. <if test="industryCategoryC != null" >
  343. industry_category_c = #{industryCategoryC,jdbcType=INTEGER},
  344. </if>
  345. <if test="demandType != null" >
  346. demand_type = #{demandType,jdbcType=INTEGER},
  347. </if>
  348. <if test="problemDes != null" >
  349. problem_des = #{problemDes,jdbcType=VARCHAR},
  350. </if>
  351. <if test="technicalRequirements != null" >
  352. technical_requirements = #{technicalRequirements,jdbcType=VARCHAR},
  353. </if>
  354. <if test="pictureUrl != null" >
  355. picture_url = #{pictureUrl,jdbcType=VARCHAR},
  356. </if>
  357. <if test="textFileUrl != null" >
  358. text_file_url = #{textFileUrl,jdbcType=VARCHAR},
  359. </if>
  360. <if test="videoUrl != null" >
  361. video_url = #{videoUrl,jdbcType=VARCHAR},
  362. </if>
  363. <if test="fixedBudget != null" >
  364. fixed_budget = #{fixedBudget,jdbcType=DECIMAL},
  365. </if>
  366. <if test="fixedCycle != null" >
  367. fixed_cycle = #{fixedCycle,jdbcType=VARCHAR},
  368. </if>
  369. <if test="peopleNumber != null" >
  370. people_number = #{peopleNumber,jdbcType=INTEGER},
  371. </if>
  372. <if test="fixedScheme != null" >
  373. fixed_scheme = #{fixedScheme,jdbcType=VARCHAR},
  374. </if>
  375. <if test="costEscrow != null" >
  376. cost_escrow = #{costEscrow,jdbcType=DECIMAL},
  377. </if>
  378. <if test="budgetCost != null" >
  379. budget_cost = #{budgetCost,jdbcType=DECIMAL},
  380. </if>
  381. <if test="validityPeriod != null" >
  382. validity_period = #{validityPeriod,jdbcType=TIMESTAMP},
  383. </if>
  384. <if test="employerId != null" >
  385. employer_id = #{employerId,jdbcType=VARCHAR},
  386. </if>
  387. <if test="employerName != null" >
  388. employer_name = #{employerName,jdbcType=VARCHAR},
  389. </if>
  390. <if test="employerAddress != null" >
  391. employer_address = #{employerAddress,jdbcType=VARCHAR},
  392. </if>
  393. <if test="employerContacts != null" >
  394. employer_contacts = #{employerContacts,jdbcType=VARCHAR},
  395. </if>
  396. <if test="employerContactsMobile != null" >
  397. employer_contacts_mobile = #{employerContactsMobile,jdbcType=VARCHAR},
  398. </if>
  399. <if test="employerContactsMailbox != null" >
  400. employer_contacts_mailbox = #{employerContactsMailbox,jdbcType=VARCHAR},
  401. </if>
  402. <if test="contacts != null" >
  403. contacts = #{contacts,jdbcType=INTEGER},
  404. </if>
  405. <if test="status != null" >
  406. status = #{status,jdbcType=INTEGER},
  407. </if>
  408. <if test="releaseStatus != null" >
  409. release_status = #{releaseStatus,jdbcType=INTEGER},
  410. </if>
  411. <if test="releaseDate != null" >
  412. release_date = #{releaseDate,jdbcType=TIMESTAMP},
  413. </if>
  414. <if test="createTime != null" >
  415. create_time = #{createTime,jdbcType=TIMESTAMP},
  416. </if>
  417. <if test="principalId != null" >
  418. principal_id = #{principalId,jdbcType=VARCHAR},
  419. </if>
  420. <if test="deletedSign != null" >
  421. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  422. </if>
  423. <if test="auditStatus != null" >
  424. audit_status = #{auditStatus,jdbcType=INTEGER},
  425. </if>
  426. <if test="techBrokerId != null" >
  427. tech_broker_id = #{techBrokerId,jdbcType=VARCHAR},
  428. </if>
  429. </set>
  430. where id = #{id,jdbcType=VARCHAR}
  431. </update>
  432. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Demand" >
  433. update demand
  434. set serial_number = #{serialNumber,jdbcType=INTEGER},
  435. data_category = #{dataCategory,jdbcType=INTEGER},
  436. name = #{name,jdbcType=VARCHAR},
  437. keyword = #{keyword,jdbcType=VARCHAR},
  438. info_sources = #{infoSources,jdbcType=INTEGER},
  439. industry_category_a = #{industryCategoryA,jdbcType=INTEGER},
  440. industry_category_b = #{industryCategoryB,jdbcType=INTEGER},
  441. industry_category_c = #{industryCategoryC,jdbcType=INTEGER},
  442. demand_type = #{demandType,jdbcType=INTEGER},
  443. problem_des = #{problemDes,jdbcType=VARCHAR},
  444. technical_requirements = #{technicalRequirements,jdbcType=VARCHAR},
  445. picture_url = #{pictureUrl,jdbcType=VARCHAR},
  446. text_file_url = #{textFileUrl,jdbcType=VARCHAR},
  447. video_url = #{videoUrl,jdbcType=VARCHAR},
  448. fixed_budget = #{fixedBudget,jdbcType=DECIMAL},
  449. fixed_cycle = #{fixedCycle,jdbcType=VARCHAR},
  450. people_number = #{peopleNumber,jdbcType=INTEGER},
  451. fixed_scheme = #{fixedScheme,jdbcType=VARCHAR},
  452. cost_escrow = #{costEscrow,jdbcType=DECIMAL},
  453. budget_cost = #{budgetCost,jdbcType=DECIMAL},
  454. validity_period = #{validityPeriod,jdbcType=TIMESTAMP},
  455. employer_id = #{employerId,jdbcType=VARCHAR},
  456. employer_name = #{employerName,jdbcType=VARCHAR},
  457. employer_address = #{employerAddress,jdbcType=VARCHAR},
  458. employer_contacts = #{employerContacts,jdbcType=VARCHAR},
  459. employer_contacts_mobile = #{employerContactsMobile,jdbcType=VARCHAR},
  460. employer_contacts_mailbox = #{employerContactsMailbox,jdbcType=VARCHAR},
  461. contacts = #{contacts,jdbcType=INTEGER},
  462. status = #{status,jdbcType=INTEGER},
  463. release_status = #{releaseStatus,jdbcType=INTEGER},
  464. release_date = #{releaseDate,jdbcType=TIMESTAMP},
  465. create_time = #{createTime,jdbcType=TIMESTAMP},
  466. principal_id = #{principalId,jdbcType=VARCHAR},
  467. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  468. audit_status = #{auditStatus,jdbcType=INTEGER},
  469. tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
  470. where id = #{id,jdbcType=VARCHAR}
  471. </update>
  472. <select id="findManageUserDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
  473. select
  474. d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
  475. d.name, d.keyword, d.info_sources as infoSources,
  476. ui.username, d.demand_type as demandType, d.validity_period as validityPeriod,
  477. d.employer_name as employerName, ui.province, d.status,
  478. d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,
  479. d.employer_id as employerId, d.audit_status as auditStatus
  480. from demand d
  481. LEFT JOIN user_identity ui on d.employer_id = ui.uid
  482. LEFT JOIN admin a on a.id = d.tech_broker_id
  483. <if test="mid != null">
  484. LEFT JOIN user u on d.employer_id = u.id
  485. </if>
  486. where d.deleted_sign = 0 and d.data_category = 0
  487. <if test="mid != null">
  488. and u.mid = #{mid,jdbcType=VARCHAR}
  489. </if>
  490. <if test="principal != null">
  491. and d.principal_id = #{principal,jdbcType=VARCHAR}
  492. </if>
  493. <if test="techBroker != null">
  494. and d.tech_broker_id = #{techBroker,jdbcType=VARCHAR}
  495. </if>
  496. <if test="province != null">
  497. and ui.province = #{province,jdbcType=VARCHAR}
  498. </if>
  499. <if test="auditStatus != null">
  500. and d.audit_status = #{auditStatus,jdbcType=INTEGER}
  501. </if>
  502. <if test="serialNumber != null">
  503. and d.serial_number = #{serialNumber,jdbcType=INTEGER}
  504. </if>
  505. <if test="name != null">
  506. and d.name = #{name,jdbcType=VARCHAR}
  507. </if>
  508. <if test="keyword != null">
  509. and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  510. </if>
  511. <if test="username != null">
  512. and ui.username = #{username,jdbcType=VARCHAR}
  513. </if>
  514. <if test="infoSources != null">
  515. and d.info_sources = #{infoSources,jdbcType=INTEGER}
  516. </if>
  517. <if test="demandType != null">
  518. and d.demand_type = #{demandType,jdbcType=INTEGER}
  519. </if>
  520. <if test="status != null">
  521. and d.status = #{status,jdbcType=VARCHAR}
  522. </if>
  523. <if test="releaseStatus != null">
  524. and d.release_status = #{releaseStatus,jdbcType=INTEGER}
  525. </if>
  526. <if test="vStart != null">
  527. and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
  528. </if>
  529. <if test="vEnd != null">
  530. and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
  531. </if>
  532. <if test="rStart != null">
  533. and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
  534. </if>
  535. <if test="rEnd != null">
  536. and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  537. </if>
  538. order by d.serial_number desc
  539. <if test="page_sql!=null">
  540. ${page_sql}
  541. </if>
  542. </select>
  543. <select id ="findManageUserDemandCount" parameterType="String" resultType="java.lang.Integer">
  544. select
  545. count(1)
  546. from demand d
  547. LEFT JOIN user_identity ui on d.employer_id = ui.uid
  548. LEFT JOIN admin a on a.id = d.tech_broker_id
  549. <if test="mid != null">
  550. LEFT JOIN user u on d.employer_id = u.id
  551. </if>
  552. where d.deleted_sign = 0 and d.data_category = 0
  553. <if test="mid != null">
  554. and u.mid = #{mid,jdbcType=VARCHAR}
  555. </if>
  556. <if test="principal != null">
  557. and d.principal_id = #{principal,jdbcType=VARCHAR}
  558. </if>
  559. <if test="techBroker != null">
  560. and d.tech_broker_id = #{techBroker,jdbcType=VARCHAR}
  561. </if>
  562. <if test="serialNumber != null">
  563. and d.serial_number = #{serialNumber,jdbcType=INTEGER}
  564. </if>
  565. <if test="province != null">
  566. and ui.province = #{province,jdbcType=VARCHAR}
  567. </if>
  568. <if test="auditStatus != null">
  569. and d.audit_status = #{auditStatus,jdbcType=INTEGER}
  570. </if>
  571. <if test="name != null">
  572. and d.name = #{name,jdbcType=VARCHAR}
  573. </if>
  574. <if test="keyword != null">
  575. and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  576. </if>
  577. <if test="username != null">
  578. and ui.username = #{username,jdbcType=VARCHAR}
  579. </if>
  580. <if test="infoSources != null">
  581. and d.info_sources = #{infoSources,jdbcType=INTEGER}
  582. </if>
  583. <if test="demandType != null">
  584. and d.demand_type = #{demandType,jdbcType=INTEGER}
  585. </if>
  586. <if test="status != null">
  587. and d.status = #{status,jdbcType=INTEGER}
  588. </if>
  589. <if test="releaseStatus != null">
  590. and d.release_status = #{releaseStatus,jdbcType=INTEGER}
  591. </if>
  592. <if test="vStart != null">
  593. and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
  594. </if>
  595. <if test="vEnd != null">
  596. and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
  597. </if>
  598. <if test="rStart != null">
  599. and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
  600. </if>
  601. <if test="rEnd != null">
  602. and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  603. </if>
  604. </select>
  605. <select id="findManageOrgDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
  606. select
  607. d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
  608. d.name, d.keyword, d.info_sources as infoSources,
  609. oi.unit_name as username, d.demand_type as demandType, d.validity_period as validityPeriod,
  610. d.employer_name as employerName, oi.licence_province as province, d.status,
  611. d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,
  612. d.employer_id as employerId, d.audit_status as auditStatus,
  613. d.tech_broker_id as techBrokerId
  614. from demand d
  615. LEFT JOIN organization_identity oi on d.employer_id = oi.uid
  616. LEFT JOIN admin a on a.id = d.tech_broker_id
  617. <if test="mid != null">
  618. LEFT JOIN user u on d.employer_id = u.id
  619. </if>
  620. where d.deleted_sign = 0 and d.data_category = 1
  621. <if test="mid != null">
  622. and u.mid = #{mid,jdbcType=VARCHAR}
  623. </if>
  624. <if test="principal != null">
  625. and d.principal_id = #{principal,jdbcType=VARCHAR}
  626. </if>
  627. <if test="techBroker != null">
  628. and d.tech_broker_id = #{techBroker,jdbcType=VARCHAR}
  629. </if>
  630. <if test="province != null">
  631. and oi.licence_province = #{province,jdbcType=VARCHAR}
  632. </if>
  633. <if test="serialNumber != null">
  634. and d.serial_number = #{serialNumber,jdbcType=INTEGER}
  635. </if>
  636. <if test="auditStatus != null">
  637. and d.audit_status = #{auditStatus,jdbcType=INTEGER}
  638. </if>
  639. <if test="name != null">
  640. and d.name = #{name,jdbcType=VARCHAR}
  641. </if>
  642. <if test="keyword != null">
  643. and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  644. </if>
  645. <if test="username != null">
  646. and oi.unit_name = #{username,jdbcType=VARCHAR}
  647. </if>
  648. <if test="infoSources != null">
  649. and d.info_sources = #{infoSources,jdbcType=INTEGER}
  650. </if>
  651. <if test="demandType != null">
  652. and d.demand_type = #{demandType,jdbcType=INTEGER}
  653. </if>
  654. <if test="status != null">
  655. and d.status = #{status,jdbcType=INTEGER}
  656. </if>
  657. <if test="releaseStatus != null">
  658. and d.release_status = #{releaseStatus,jdbcType=VARCHAR}
  659. </if>
  660. <if test="vStart != null">
  661. and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
  662. </if>
  663. <if test="vEnd != null">
  664. and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
  665. </if>
  666. <if test="rStart != null">
  667. and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
  668. </if>
  669. <if test="rEnd != null">
  670. and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  671. </if>
  672. order by d.serial_number desc
  673. <if test="page_sql!=null">
  674. ${page_sql}
  675. </if>
  676. </select>
  677. <select id ="findManageOrgDemandCount" parameterType="String" resultType="java.lang.Integer">
  678. select
  679. count(1)
  680. from demand d
  681. LEFT JOIN organization_identity oi on d.employer_id = oi.uid
  682. LEFT JOIN admin a on a.id = d.tech_broker_id
  683. <if test="mid != null">
  684. LEFT JOIN user u on d.employer_id = u.id
  685. </if>
  686. where d.deleted_sign = 0 and d.data_category = 1
  687. <if test="mid != null">
  688. and u.mid = #{mid,jdbcType=VARCHAR}
  689. </if>
  690. <if test="principal != null">
  691. and d.principal_id = #{principal,jdbcType=VARCHAR}
  692. </if>
  693. <if test="techBroker != null">
  694. and d.tech_broker_id = #{techBroker,jdbcType=VARCHAR}
  695. </if>
  696. <if test="serialNumber != null">
  697. and d.serial_number = #{serialNumber,jdbcType=INTEGER}
  698. </if>
  699. <if test="auditStatus != null">
  700. and d.audit_status = #{auditStatus,jdbcType=INTEGER}
  701. </if>
  702. <if test="province != null">
  703. and oi.licence_province = #{province,jdbcType=VARCHAR}
  704. </if>
  705. <if test="name != null">
  706. and d.name = #{name,jdbcType=VARCHAR}
  707. </if>
  708. <if test="keyword != null">
  709. and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  710. </if>
  711. <if test="username != null">
  712. and oi.unit_name = #{username,jdbcType=VARCHAR}
  713. </if>
  714. <if test="infoSources != null">
  715. and d.info_sources = #{infoSources,jdbcType=INTEGER}
  716. </if>
  717. <if test="demandType != null">
  718. and d.demand_type = #{demandType,jdbcType=INTEGER}
  719. </if>
  720. <if test="status != null">
  721. and d.status = #{status,jdbcType=VARCHAR}
  722. </if>
  723. <if test="releaseStatus != null">
  724. and d.release_status = #{releaseStatus,jdbcType=VARCHAR}
  725. </if>
  726. <if test="vStart != null">
  727. and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
  728. </if>
  729. <if test="vEnd != null">
  730. and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
  731. </if>
  732. <if test="rStart != null">
  733. and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
  734. </if>
  735. <if test="rEnd != null">
  736. and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  737. </if>
  738. </select>
  739. <select id="selectUserDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.demand.bo.DemandManageDetailBo">
  740. select
  741. d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
  742. d.name, d.keyword, d.info_sources as infoSources,
  743. ui.username, d.demand_type as demandType, d.validity_period as validityPeriod,
  744. ui.province, d.status, d.release_status as releaseStatus,
  745. d.release_date as releaseDate, d.principal_id as principalId, d.industry_category_a as industryCategoryA,
  746. d.industry_category_b as industryCategoryB, d.problem_des as problemDes, d.technical_requirements as technicalRequirements,
  747. d.picture_url as pictureUrl, d.text_file_url as textFileUrl, d.video_url as videoUrl,
  748. d.budget_cost as budgetCost, d.fixed_cycle as fixedCycle, d.people_number as peopleNumber,
  749. d.fixed_scheme as fixedScheme, d.cost_escrow as costEscrow, d.employer_id as employerId,
  750. info.postal_address as address, u.email as mailbox, u.mobile as mobile, d.audit_status as auditStatus
  751. from demand d
  752. left join user_identity ui on ui.uid = d.employer_id
  753. left join user_info info on info.uid = d.employer_id
  754. left join user u on u.id = d.employer_id
  755. where d.data_category = 0 and d.id = #{id,jdbcType=VARCHAR}
  756. </select>
  757. <select id="selectOrgDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.demand.bo.DemandManageDetailBo">
  758. select
  759. d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
  760. d.name, d.keyword, d.info_sources as infoSources,
  761. oi.unit_name as username, d.demand_type as demandType, d.validity_period as validityPeriod,
  762. oi.licence_province as province, d.status, d.release_status as releaseStatus,
  763. d.release_date as releaseDate, d.principal_id as principalId, d.industry_category_a as industryCategoryA,
  764. d.industry_category_b as industryCategoryB, d.problem_des as problemDes, d.technical_requirements as technicalRequirements,
  765. d.picture_url as pictureUrl, d.text_file_url as textFileUrl, d.video_url as videoUrl,
  766. d.budget_cost as budgetCost, d.fixed_cycle as fixedCycle, d.people_number as peopleNumber,
  767. d.fixed_scheme as fixedScheme, d.cost_escrow as costEscrow, d.employer_id as employerId,
  768. oi.postal_address as address, u.email as mailbox, d.contacts, d.audit_status as auditStatus,
  769. d.tech_broker_id as techBrokerId
  770. from demand d
  771. left join organization_identity oi on oi.uid = d.employer_id
  772. left join user u on u.id = d.employer_id
  773. where d.data_category = 1 and d.id = #{id,jdbcType=VARCHAR}
  774. </select>
  775. <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
  776. update demand set deleted_sign = 1
  777. where id in
  778. <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
  779. #{item}
  780. </foreach>
  781. </update>
  782. <update id="updateReleaseDate" parameterType="java.lang.String">
  783. update demand set release_date = null
  784. where id = #{id,jdbcType=VARCHAR}
  785. </update>
  786. <select id="findDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandListBo">
  787. select
  788. d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
  789. d.name, d.keyword, d.demand_type as demandType,
  790. d.validity_period as validityPeriod, d.status, d.release_status as releaseStatus,
  791. d.release_date as releaseDate, d.employer_id as employerId
  792. from demand d
  793. where d.deleted_sign = 0
  794. and d.employer_id = #{employerId, jdbcType=VARCHAR}
  795. <if test="serialNumber != null">
  796. and d.serial_number = #{serialNumber,jdbcType=INTEGER}
  797. </if>
  798. <if test="name != null">
  799. and d.name = #{name,jdbcType=VARCHAR}
  800. </if>
  801. <if test="keyword != null">
  802. and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  803. </if>
  804. <if test="demandType != null">
  805. and d.demand_type = #{demandType,jdbcType=INTEGER}
  806. </if>
  807. <if test="status != null">
  808. and d.status = #{status,jdbcType=VARCHAR}
  809. </if>
  810. <if test="releaseStatus != null">
  811. and d.release_status = #{releaseStatus,jdbcType=VARCHAR}
  812. </if>
  813. <if test="vStart != null">
  814. and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
  815. </if>
  816. <if test="vEnd != null">
  817. and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
  818. </if>
  819. <if test="rStart != null">
  820. and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
  821. </if>
  822. <if test="rEnd != null">
  823. and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  824. </if>
  825. order by d.serial_number desc
  826. <if test="page_sql!=null">
  827. ${page_sql}
  828. </if>
  829. </select>
  830. <select id="findDemandCount" parameterType="String" resultType="java.lang.Integer">
  831. select count(1)
  832. from demand d
  833. where d.deleted_sign = 0 and d.data_category = 1
  834. <if test="serialNumber != null">
  835. and d.serial_number = #{serialNumber,jdbcType=INTEGER}
  836. </if>
  837. <if test="name != null">
  838. and d.name = #{name,jdbcType=VARCHAR}
  839. </if>
  840. <if test="keyword != null">
  841. and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  842. </if>
  843. <if test="demandType != null">
  844. and d.demand_type = #{demandType,jdbcType=INTEGER}
  845. </if>
  846. <if test="status != null">
  847. and d.status = #{status,jdbcType=VARCHAR}
  848. </if>
  849. <if test="releaseStatus != null">
  850. and d.release_status = #{releaseStatus,jdbcType=VARCHAR}
  851. </if>
  852. <if test="vStart != null">
  853. and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
  854. </if>
  855. <if test="vEnd != null">
  856. and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
  857. </if>
  858. <if test="rStart != null">
  859. and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
  860. </if>
  861. <if test="rEnd != null">
  862. and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  863. </if>
  864. </select>
  865. </mapper>