OrganizationIdentityMapper.xml 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175
  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.OrganizationIdentityMapper">
  4. <resultMap id="BaseResultMap"
  5. type="com.goafanti.common.model.OrganizationIdentity">
  6. <id column="id" property="id" jdbcType="VARCHAR" />
  7. <result column="uid" property="uid" jdbcType="VARCHAR" />
  8. <result column="contacts" property="contacts" jdbcType="VARCHAR" />
  9. <result column="contact_mobile" property="contactMobile"
  10. jdbcType="VARCHAR" />
  11. <result column="fixed_tel" property="fixedTel" jdbcType="VARCHAR" />
  12. <result column="qq" property="qq" jdbcType="VARCHAR" />
  13. <result column="postal_address" property="postalAddress"
  14. jdbcType="VARCHAR" />
  15. <result column="postcode" property="postcode" jdbcType="VARCHAR" />
  16. <result column="aft_username" property="aftUsername" jdbcType="VARCHAR" />
  17. <result column="unit_name" property="unitName" jdbcType="VARCHAR" />
  18. <result column="registered_capital" property="registeredCapital"
  19. jdbcType="DECIMAL" />
  20. <result column="licence_number" property="licenceNumber"
  21. jdbcType="VARCHAR" />
  22. <result column="licence_province" property="licenceProvince"
  23. jdbcType="INTEGER" />
  24. <result column="licence_city" property="licenceCity" jdbcType="INTEGER" />
  25. <result column="licence_area" property="licenceArea" jdbcType="INTEGER" />
  26. <result column="licence_scanning_url" property="licenceScanningUrl"
  27. jdbcType="VARCHAR" />
  28. <result column="org_code" property="orgCode" jdbcType="VARCHAR" />
  29. <result column="org_code_url" property="orgCodeUrl" jdbcType="VARCHAR" />
  30. <result column="bank_account" property="bankAccount" jdbcType="VARCHAR" />
  31. <result column="banks" property="banks" jdbcType="VARCHAR" />
  32. <result column="bank_branch" property="bankBranch" jdbcType="VARCHAR" />
  33. <result column="bank_card_number" property="bankCardNumber"
  34. jdbcType="VARCHAR" />
  35. <result column="validation_amount" property="validationAmount"
  36. jdbcType="DECIMAL" />
  37. <result column="identity_type" property="identityType"
  38. jdbcType="INTEGER" />
  39. <result column="location_province" property="locationProvince"
  40. jdbcType="INTEGER" />
  41. <result column="location_city" property="locationCity"
  42. jdbcType="INTEGER" />
  43. <result column="location_area" property="locationArea"
  44. jdbcType="INTEGER" />
  45. <result column="legal_person" property="legalPerson" jdbcType="VARCHAR" />
  46. <result column="legal_person_id_card" property="legalPersonIdCard"
  47. jdbcType="VARCHAR" />
  48. <result column="last_year_tax_report_url" property="lastYearTaxReportUrl"
  49. jdbcType="VARCHAR" />
  50. <result column="audit_status" property="auditStatus" jdbcType="INTEGER" />
  51. <result column="process" property="process" jdbcType="INTEGER" />
  52. <result column="wrong_count" property="wrongCount" jdbcType="INTEGER" />
  53. <result column="payment_date" property="paymentDate" jdbcType="TIMESTAMP" />
  54. <result column="first_contacts" property="firstContacts"
  55. jdbcType="VARCHAR" />
  56. <result column="first_mobile" property="firstMobile" jdbcType="VARCHAR" />
  57. <result column="second_contacts" property="secondContacts"
  58. jdbcType="VARCHAR" />
  59. <result column="second_mobile" property="secondMobile"
  60. jdbcType="VARCHAR" />
  61. <result column="third_contacts" property="thirdContacts"
  62. jdbcType="VARCHAR" />
  63. <result column="third_mobile" property="thirdMobile" jdbcType="VARCHAR" />
  64. <result column="listed" property="listed" jdbcType="INTEGER" />
  65. <result column="listed_date" property="listedDate" jdbcType="TIMESTAMP" />
  66. <result column="listed_type" property="listedType" jdbcType="INTEGER" />
  67. <result column="stock_code" property="stockCode" jdbcType="VARCHAR" />
  68. <result column="certificate_number" property="certificateNumber"
  69. jdbcType="VARCHAR" />
  70. <result column="issuing_date" property="issuingDate" jdbcType="TIMESTAMP" />
  71. <result column="cog_contacts" property="cogContacts" jdbcType="INTEGER" />
  72. <result column="tech_principal" property="techPrincipal"
  73. jdbcType="VARCHAR" />
  74. <result column="contacts_fixed_tel" property="contactsFixedTel"
  75. jdbcType="VARCHAR" />
  76. <result column="contacts_fax" property="contactsFax" jdbcType="VARCHAR" />
  77. <result column="legal_person_tel" property="legalPersonTel"
  78. jdbcType="VARCHAR" />
  79. <result column="legal_person_fax" property="legalPersonFax"
  80. jdbcType="VARCHAR" />
  81. <result column="legal_person_email" property="legalPersonEmail"
  82. jdbcType="VARCHAR" />
  83. <result column="registration_time" property="registrationTime"
  84. jdbcType="TIMESTAMP" />
  85. <result column="ratepay_code" property="ratepayCode" jdbcType="VARCHAR" />
  86. <result column="industry" property="industry" jdbcType="INTEGER" />
  87. <result column="enterprise_scale" property="enterpriseScale"
  88. jdbcType="INTEGER" />
  89. <result column="register_type" property="registerType"
  90. jdbcType="VARCHAR" />
  91. <result column="foreign_investment" property="foreignInvestment"
  92. jdbcType="VARCHAR" />
  93. <result column="field" property="field" jdbcType="VARCHAR" />
  94. <result column="tax_authority" property="taxAuthority"
  95. jdbcType="INTEGER" />
  96. <result column="ratepay_method" property="ratepayMethod"
  97. jdbcType="INTEGER" />
  98. <result column="high_tech_zone" property="highTechZone"
  99. jdbcType="INTEGER" />
  100. <result column="risk_investment" property="riskInvestment"
  101. jdbcType="INTEGER" />
  102. <result column="business_scope" property="businessScope"
  103. jdbcType="VARCHAR" />
  104. <result column="high_tech_name" property="highTechName"
  105. jdbcType="VARCHAR" />
  106. <result column="patent_prory_statement_url" property="patentProryStatementUrl"
  107. jdbcType="VARCHAR" />
  108. </resultMap>
  109. <sql id="Base_Column_List">
  110. id, uid, contacts, contact_mobile, fixed_tel, qq,
  111. postal_address,
  112. postcode, aft_username,
  113. unit_name, registered_capital,
  114. licence_number, licence_province, licence_city,
  115. licence_area,
  116. licence_scanning_url, org_code, org_code_url, bank_account, banks,
  117. bank_branch,
  118. bank_card_number,
  119. validation_amount, identity_type,
  120. location_province, location_city, location_area,
  121. legal_person,
  122. legal_person_id_card, last_year_tax_report_url,
  123. audit_status, process,
  124. wrong_count, payment_date, first_contacts, first_mobile,
  125. second_contacts,
  126. second_mobile,
  127. third_contacts, third_mobile, listed,
  128. listed_date, listed_type, stock_code,
  129. certificate_number,
  130. issuing_date,
  131. cog_contacts, tech_principal, contacts_fixed_tel, contacts_fax,
  132. legal_person_tel,
  133. legal_person_fax, legal_person_email,
  134. registration_time, ratepay_code, industry,
  135. enterprise_scale,
  136. register_type, foreign_investment, field,
  137. tax_authority,
  138. ratepay_method,
  139. high_tech_zone, risk_investment, business_scope,
  140. high_tech_name, patent_prory_statement_url
  141. </sql>
  142. <select id="selectByPrimaryKey" resultMap="BaseResultMap"
  143. parameterType="java.lang.String">
  144. select
  145. <include refid="Base_Column_List" />
  146. from organization_identity
  147. where id = #{id,jdbcType=VARCHAR}
  148. </select>
  149. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  150. delete from
  151. organization_identity
  152. where id = #{id,jdbcType=VARCHAR}
  153. </delete>
  154. <insert id="insert" parameterType="com.goafanti.common.model.OrganizationIdentity">
  155. insert into
  156. organization_identity (id, uid, contacts,
  157. contact_mobile, fixed_tel,
  158. qq,
  159. postal_address, postcode, aft_username,
  160. unit_name,
  161. registered_capital, licence_number,
  162. licence_province, licence_city,
  163. licence_area,
  164. licence_scanning_url, org_code, org_code_url,
  165. bank_account, banks, bank_branch,
  166. bank_card_number, validation_amount,
  167. identity_type,
  168. location_province, location_city, location_area,
  169. legal_person, legal_person_id_card, last_year_tax_report_url,
  170. audit_status, process, wrong_count,
  171. payment_date, first_contacts,
  172. first_mobile,
  173. second_contacts, second_mobile, third_contacts,
  174. third_mobile, listed, listed_date,
  175. listed_type, stock_code,
  176. certificate_number,
  177. issuing_date, cog_contacts, tech_principal,
  178. contacts_fixed_tel, contacts_fax, legal_person_tel,
  179. legal_person_fax,
  180. legal_person_email, registration_time,
  181. ratepay_code, industry,
  182. enterprise_scale,
  183. register_type, foreign_investment, field,
  184. tax_authority, ratepay_method, high_tech_zone,
  185. risk_investment,
  186. business_scope, high_tech_name, patent_prory_statement_url
  187. )
  188. values (#{id,jdbcType=VARCHAR},
  189. #{uid,jdbcType=VARCHAR},
  190. #{contacts,jdbcType=VARCHAR},
  191. #{contactMobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR},
  192. #{qq,jdbcType=VARCHAR},
  193. #{postalAddress,jdbcType=VARCHAR},
  194. #{postcode,jdbcType=VARCHAR},
  195. #{aftUsername,jdbcType=VARCHAR},
  196. #{unitName,jdbcType=VARCHAR}, #{registeredCapital,jdbcType=DECIMAL},
  197. #{licenceNumber,jdbcType=VARCHAR},
  198. #{licenceProvince,jdbcType=INTEGER}, #{licenceCity,jdbcType=INTEGER},
  199. #{licenceArea,jdbcType=INTEGER},
  200. #{licenceScanningUrl,jdbcType=VARCHAR}, #{orgCode,jdbcType=VARCHAR},
  201. #{orgCodeUrl,jdbcType=VARCHAR},
  202. #{bankAccount,jdbcType=VARCHAR},
  203. #{banks,jdbcType=VARCHAR}, #{bankBranch,jdbcType=VARCHAR},
  204. #{bankCardNumber,jdbcType=VARCHAR},
  205. #{validationAmount,jdbcType=DECIMAL},
  206. #{identityType,jdbcType=INTEGER},
  207. #{locationProvince,jdbcType=INTEGER},
  208. #{locationCity,jdbcType=INTEGER}, #{locationArea,jdbcType=INTEGER},
  209. #{legalPerson,jdbcType=VARCHAR},
  210. #{legalPersonIdCard,jdbcType=VARCHAR},
  211. #{lastYearTaxReportUrl,jdbcType=VARCHAR},
  212. #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER},
  213. #{wrongCount,jdbcType=INTEGER},
  214. #{paymentDate,jdbcType=TIMESTAMP},
  215. #{firstContacts,jdbcType=VARCHAR}, #{firstMobile,jdbcType=VARCHAR},
  216. #{secondContacts,jdbcType=VARCHAR}, #{secondMobile,jdbcType=VARCHAR},
  217. #{thirdContacts,jdbcType=VARCHAR},
  218. #{thirdMobile,jdbcType=VARCHAR},
  219. #{listed,jdbcType=INTEGER}, #{listedDate,jdbcType=TIMESTAMP},
  220. #{listedType,jdbcType=INTEGER}, #{stockCode,jdbcType=VARCHAR},
  221. #{certificateNumber,jdbcType=VARCHAR},
  222. #{issuingDate,jdbcType=TIMESTAMP}, #{cogContacts,jdbcType=INTEGER},
  223. #{techPrincipal,jdbcType=VARCHAR},
  224. #{contactsFixedTel,jdbcType=VARCHAR}, #{contactsFax,jdbcType=VARCHAR},
  225. #{legalPersonTel,jdbcType=VARCHAR},
  226. #{legalPersonFax,jdbcType=VARCHAR},
  227. #{legalPersonEmail,jdbcType=VARCHAR},
  228. #{registrationTime,jdbcType=TIMESTAMP},
  229. #{ratepayCode,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER},
  230. #{enterpriseScale,jdbcType=INTEGER},
  231. #{registerType,jdbcType=VARCHAR},
  232. #{foreignInvestment,jdbcType=VARCHAR}, #{field,jdbcType=VARCHAR},
  233. #{taxAuthority,jdbcType=INTEGER}, #{ratepayMethod,jdbcType=INTEGER},
  234. #{highTechZone,jdbcType=INTEGER},
  235. #{riskInvestment,jdbcType=INTEGER},
  236. #{businessScope,jdbcType=VARCHAR}, #{highTechName,jdbcType=VARCHAR},
  237. #{patentProryStatementUrl,jdbcType=VARCHAR}
  238. )
  239. </insert>
  240. <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
  241. insert into organization_identity
  242. <trim prefix="(" suffix=")" suffixOverrides=",">
  243. <if test="id != null">
  244. id,
  245. </if>
  246. <if test="uid != null">
  247. uid,
  248. </if>
  249. <if test="contacts != null">
  250. contacts,
  251. </if>
  252. <if test="contactMobile != null">
  253. contact_mobile,
  254. </if>
  255. <if test="fixedTel != null">
  256. fixed_tel,
  257. </if>
  258. <if test="qq != null">
  259. qq,
  260. </if>
  261. <if test="postalAddress != null">
  262. postal_address,
  263. </if>
  264. <if test="postcode != null">
  265. postcode,
  266. </if>
  267. <if test="aftUsername != null">
  268. aft_username,
  269. </if>
  270. <if test="unitName != null">
  271. unit_name,
  272. </if>
  273. <if test="registeredCapital != null">
  274. registered_capital,
  275. </if>
  276. <if test="licenceNumber != null">
  277. licence_number,
  278. </if>
  279. <if test="licenceProvince != null">
  280. licence_province,
  281. </if>
  282. <if test="licenceCity != null">
  283. licence_city,
  284. </if>
  285. <if test="licenceArea != null">
  286. licence_area,
  287. </if>
  288. <if test="licenceScanningUrl != null">
  289. licence_scanning_url,
  290. </if>
  291. <if test="orgCode != null">
  292. org_code,
  293. </if>
  294. <if test="orgCodeUrl != null">
  295. org_code_url,
  296. </if>
  297. <if test="bankAccount != null">
  298. bank_account,
  299. </if>
  300. <if test="banks != null">
  301. banks,
  302. </if>
  303. <if test="bankBranch != null">
  304. bank_branch,
  305. </if>
  306. <if test="bankCardNumber != null">
  307. bank_card_number,
  308. </if>
  309. <if test="validationAmount != null">
  310. validation_amount,
  311. </if>
  312. <if test="identityType != null">
  313. identity_type,
  314. </if>
  315. <if test="locationProvince != null">
  316. location_province,
  317. </if>
  318. <if test="locationCity != null">
  319. location_city,
  320. </if>
  321. <if test="locationArea != null">
  322. location_area,
  323. </if>
  324. <if test="legalPerson != null">
  325. legal_person,
  326. </if>
  327. <if test="legalPersonIdCard != null">
  328. legal_person_id_card,
  329. </if>
  330. <if test="lastYearTaxReportUrl != null">
  331. last_year_tax_report_url,
  332. </if>
  333. <if test="auditStatus != null">
  334. audit_status,
  335. </if>
  336. <if test="process != null">
  337. process,
  338. </if>
  339. <if test="wrongCount != null">
  340. wrong_count,
  341. </if>
  342. <if test="paymentDate != null">
  343. payment_date,
  344. </if>
  345. <if test="firstContacts != null">
  346. first_contacts,
  347. </if>
  348. <if test="firstMobile != null">
  349. first_mobile,
  350. </if>
  351. <if test="secondContacts != null">
  352. second_contacts,
  353. </if>
  354. <if test="secondMobile != null">
  355. second_mobile,
  356. </if>
  357. <if test="thirdContacts != null">
  358. third_contacts,
  359. </if>
  360. <if test="thirdMobile != null">
  361. third_mobile,
  362. </if>
  363. <if test="listed != null">
  364. listed,
  365. </if>
  366. <if test="listedDate != null">
  367. listed_date,
  368. </if>
  369. <if test="listedType != null">
  370. listed_type,
  371. </if>
  372. <if test="stockCode != null">
  373. stock_code,
  374. </if>
  375. <if test="certificateNumber != null">
  376. certificate_number,
  377. </if>
  378. <if test="issuingDate != null">
  379. issuing_date,
  380. </if>
  381. <if test="cogContacts != null">
  382. cog_contacts,
  383. </if>
  384. <if test="techPrincipal != null">
  385. tech_principal,
  386. </if>
  387. <if test="contactsFixedTel != null">
  388. contacts_fixed_tel,
  389. </if>
  390. <if test="contactsFax != null">
  391. contacts_fax,
  392. </if>
  393. <if test="legalPersonTel != null">
  394. legal_person_tel,
  395. </if>
  396. <if test="legalPersonFax != null">
  397. legal_person_fax,
  398. </if>
  399. <if test="legalPersonEmail != null">
  400. legal_person_email,
  401. </if>
  402. <if test="registrationTime != null">
  403. registration_time,
  404. </if>
  405. <if test="ratepayCode != null">
  406. ratepay_code,
  407. </if>
  408. <if test="industry != null">
  409. industry,
  410. </if>
  411. <if test="enterpriseScale != null">
  412. enterprise_scale,
  413. </if>
  414. <if test="registerType != null">
  415. register_type,
  416. </if>
  417. <if test="foreignInvestment != null">
  418. foreign_investment,
  419. </if>
  420. <if test="field != null">
  421. field,
  422. </if>
  423. <if test="taxAuthority != null">
  424. tax_authority,
  425. </if>
  426. <if test="ratepayMethod != null">
  427. ratepay_method,
  428. </if>
  429. <if test="highTechZone != null">
  430. high_tech_zone,
  431. </if>
  432. <if test="riskInvestment != null">
  433. risk_investment,
  434. </if>
  435. <if test="businessScope != null">
  436. business_scope,
  437. </if>
  438. <if test="highTechName != null">
  439. high_tech_name,
  440. </if>
  441. <if test="patentProryStatementUrl != null">
  442. patent_prory_statement_url,
  443. </if>
  444. </trim>
  445. <trim prefix="values (" suffix=")" suffixOverrides=",">
  446. <if test="id != null">
  447. #{id,jdbcType=VARCHAR},
  448. </if>
  449. <if test="uid != null">
  450. #{uid,jdbcType=VARCHAR},
  451. </if>
  452. <if test="contacts != null">
  453. #{contacts,jdbcType=VARCHAR},
  454. </if>
  455. <if test="contactMobile != null">
  456. #{contactMobile,jdbcType=VARCHAR},
  457. </if>
  458. <if test="fixedTel != null">
  459. #{fixedTel,jdbcType=VARCHAR},
  460. </if>
  461. <if test="qq != null">
  462. #{qq,jdbcType=VARCHAR},
  463. </if>
  464. <if test="postalAddress != null">
  465. #{postalAddress,jdbcType=VARCHAR},
  466. </if>
  467. <if test="postcode != null">
  468. #{postcode,jdbcType=VARCHAR},
  469. </if>
  470. <if test="aftUsername != null">
  471. #{aftUsername,jdbcType=VARCHAR},
  472. </if>
  473. <if test="unitName != null">
  474. #{unitName,jdbcType=VARCHAR},
  475. </if>
  476. <if test="registeredCapital != null">
  477. #{registeredCapital,jdbcType=DECIMAL},
  478. </if>
  479. <if test="licenceNumber != null">
  480. #{licenceNumber,jdbcType=VARCHAR},
  481. </if>
  482. <if test="licenceProvince != null">
  483. #{licenceProvince,jdbcType=INTEGER},
  484. </if>
  485. <if test="licenceCity != null">
  486. #{licenceCity,jdbcType=INTEGER},
  487. </if>
  488. <if test="licenceArea != null">
  489. #{licenceArea,jdbcType=INTEGER},
  490. </if>
  491. <if test="licenceScanningUrl != null">
  492. #{licenceScanningUrl,jdbcType=VARCHAR},
  493. </if>
  494. <if test="orgCode != null">
  495. #{orgCode,jdbcType=VARCHAR},
  496. </if>
  497. <if test="orgCodeUrl != null">
  498. #{orgCodeUrl,jdbcType=VARCHAR},
  499. </if>
  500. <if test="bankAccount != null">
  501. #{bankAccount,jdbcType=VARCHAR},
  502. </if>
  503. <if test="banks != null">
  504. #{banks,jdbcType=VARCHAR},
  505. </if>
  506. <if test="bankBranch != null">
  507. #{bankBranch,jdbcType=VARCHAR},
  508. </if>
  509. <if test="bankCardNumber != null">
  510. #{bankCardNumber,jdbcType=VARCHAR},
  511. </if>
  512. <if test="validationAmount != null">
  513. #{validationAmount,jdbcType=DECIMAL},
  514. </if>
  515. <if test="identityType != null">
  516. #{identityType,jdbcType=INTEGER},
  517. </if>
  518. <if test="locationProvince != null">
  519. #{locationProvince,jdbcType=INTEGER},
  520. </if>
  521. <if test="locationCity != null">
  522. #{locationCity,jdbcType=INTEGER},
  523. </if>
  524. <if test="locationArea != null">
  525. #{locationArea,jdbcType=INTEGER},
  526. </if>
  527. <if test="legalPerson != null">
  528. #{legalPerson,jdbcType=VARCHAR},
  529. </if>
  530. <if test="legalPersonIdCard != null">
  531. #{legalPersonIdCard,jdbcType=VARCHAR},
  532. </if>
  533. <if test="lastYearTaxReportUrl != null">
  534. #{lastYearTaxReportUrl,jdbcType=VARCHAR},
  535. </if>
  536. <if test="auditStatus != null">
  537. #{auditStatus,jdbcType=INTEGER},
  538. </if>
  539. <if test="process != null">
  540. #{process,jdbcType=INTEGER},
  541. </if>
  542. <if test="wrongCount != null">
  543. #{wrongCount,jdbcType=INTEGER},
  544. </if>
  545. <if test="paymentDate != null">
  546. #{paymentDate,jdbcType=TIMESTAMP},
  547. </if>
  548. <if test="firstContacts != null">
  549. #{firstContacts,jdbcType=VARCHAR},
  550. </if>
  551. <if test="firstMobile != null">
  552. #{firstMobile,jdbcType=VARCHAR},
  553. </if>
  554. <if test="secondContacts != null">
  555. #{secondContacts,jdbcType=VARCHAR},
  556. </if>
  557. <if test="secondMobile != null">
  558. #{secondMobile,jdbcType=VARCHAR},
  559. </if>
  560. <if test="thirdContacts != null">
  561. #{thirdContacts,jdbcType=VARCHAR},
  562. </if>
  563. <if test="thirdMobile != null">
  564. #{thirdMobile,jdbcType=VARCHAR},
  565. </if>
  566. <if test="listed != null">
  567. #{listed,jdbcType=INTEGER},
  568. </if>
  569. <if test="listedDate != null">
  570. #{listedDate,jdbcType=TIMESTAMP},
  571. </if>
  572. <if test="listedType != null">
  573. #{listedType,jdbcType=INTEGER},
  574. </if>
  575. <if test="stockCode != null">
  576. #{stockCode,jdbcType=VARCHAR},
  577. </if>
  578. <if test="certificateNumber != null">
  579. #{certificateNumber,jdbcType=VARCHAR},
  580. </if>
  581. <if test="issuingDate != null">
  582. #{issuingDate,jdbcType=TIMESTAMP},
  583. </if>
  584. <if test="cogContacts != null">
  585. #{cogContacts,jdbcType=INTEGER},
  586. </if>
  587. <if test="techPrincipal != null">
  588. #{techPrincipal,jdbcType=VARCHAR},
  589. </if>
  590. <if test="contactsFixedTel != null">
  591. #{contactsFixedTel,jdbcType=VARCHAR},
  592. </if>
  593. <if test="contactsFax != null">
  594. #{contactsFax,jdbcType=VARCHAR},
  595. </if>
  596. <if test="legalPersonTel != null">
  597. #{legalPersonTel,jdbcType=VARCHAR},
  598. </if>
  599. <if test="legalPersonFax != null">
  600. #{legalPersonFax,jdbcType=VARCHAR},
  601. </if>
  602. <if test="legalPersonEmail != null">
  603. #{legalPersonEmail,jdbcType=VARCHAR},
  604. </if>
  605. <if test="registrationTime != null">
  606. #{registrationTime,jdbcType=TIMESTAMP},
  607. </if>
  608. <if test="ratepayCode != null">
  609. #{ratepayCode,jdbcType=VARCHAR},
  610. </if>
  611. <if test="industry != null">
  612. #{industry,jdbcType=INTEGER},
  613. </if>
  614. <if test="enterpriseScale != null">
  615. #{enterpriseScale,jdbcType=INTEGER},
  616. </if>
  617. <if test="registerType != null">
  618. #{registerType,jdbcType=VARCHAR},
  619. </if>
  620. <if test="foreignInvestment != null">
  621. #{foreignInvestment,jdbcType=VARCHAR},
  622. </if>
  623. <if test="field != null">
  624. #{field,jdbcType=VARCHAR},
  625. </if>
  626. <if test="taxAuthority != null">
  627. #{taxAuthority,jdbcType=INTEGER},
  628. </if>
  629. <if test="ratepayMethod != null">
  630. #{ratepayMethod,jdbcType=INTEGER},
  631. </if>
  632. <if test="highTechZone != null">
  633. #{highTechZone,jdbcType=INTEGER},
  634. </if>
  635. <if test="riskInvestment != null">
  636. #{riskInvestment,jdbcType=INTEGER},
  637. </if>
  638. <if test="businessScope != null">
  639. #{businessScope,jdbcType=VARCHAR},
  640. </if>
  641. <if test="highTechName != null">
  642. #{highTechName,jdbcType=VARCHAR},
  643. </if>
  644. <if test="patentProryStatementUrl != null">
  645. #{patentProryStatementUrl,jdbcType=VARCHAR},
  646. </if>
  647. </trim>
  648. </insert>
  649. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
  650. update organization_identity
  651. <set>
  652. <if test="uid != null">
  653. uid = #{uid,jdbcType=VARCHAR},
  654. </if>
  655. <if test="contacts != null">
  656. contacts = #{contacts,jdbcType=VARCHAR},
  657. </if>
  658. <if test="contactMobile != null">
  659. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  660. </if>
  661. <if test="fixedTel != null">
  662. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  663. </if>
  664. <if test="qq != null">
  665. qq = #{qq,jdbcType=VARCHAR},
  666. </if>
  667. <if test="postalAddress != null">
  668. postal_address = #{postalAddress,jdbcType=VARCHAR},
  669. </if>
  670. <if test="postcode != null">
  671. postcode = #{postcode,jdbcType=VARCHAR},
  672. </if>
  673. <if test="aftUsername != null">
  674. aft_username = #{aftUsername,jdbcType=VARCHAR},
  675. </if>
  676. <if test="unitName != null">
  677. unit_name = #{unitName,jdbcType=VARCHAR},
  678. </if>
  679. <if test="registeredCapital != null">
  680. registered_capital =
  681. #{registeredCapital,jdbcType=DECIMAL},
  682. </if>
  683. <if test="licenceNumber != null">
  684. licence_number = #{licenceNumber,jdbcType=VARCHAR},
  685. </if>
  686. <if test="licenceProvince != null">
  687. licence_province = #{licenceProvince,jdbcType=INTEGER},
  688. </if>
  689. <if test="licenceCity != null">
  690. licence_city = #{licenceCity,jdbcType=INTEGER},
  691. </if>
  692. <if test="licenceArea != null">
  693. licence_area = #{licenceArea,jdbcType=INTEGER},
  694. </if>
  695. <if test="licenceScanningUrl != null">
  696. licence_scanning_url =
  697. #{licenceScanningUrl,jdbcType=VARCHAR},
  698. </if>
  699. <if test="orgCode != null">
  700. org_code = #{orgCode,jdbcType=VARCHAR},
  701. </if>
  702. <if test="orgCodeUrl != null">
  703. org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
  704. </if>
  705. <if test="bankAccount != null">
  706. bank_account = #{bankAccount,jdbcType=VARCHAR},
  707. </if>
  708. <if test="banks != null">
  709. banks = #{banks,jdbcType=VARCHAR},
  710. </if>
  711. <if test="bankBranch != null">
  712. bank_branch = #{bankBranch,jdbcType=VARCHAR},
  713. </if>
  714. <if test="bankCardNumber != null">
  715. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  716. </if>
  717. <if test="validationAmount != null">
  718. validation_amount = #{validationAmount,jdbcType=DECIMAL},
  719. </if>
  720. <if test="identityType != null">
  721. identity_type = #{identityType,jdbcType=INTEGER},
  722. </if>
  723. <if test="locationProvince != null">
  724. location_province = #{locationProvince,jdbcType=INTEGER},
  725. </if>
  726. <if test="locationCity != null">
  727. location_city = #{locationCity,jdbcType=INTEGER},
  728. </if>
  729. <if test="locationArea != null">
  730. location_area = #{locationArea,jdbcType=INTEGER},
  731. </if>
  732. <if test="legalPerson != null">
  733. legal_person = #{legalPerson,jdbcType=VARCHAR},
  734. </if>
  735. <if test="legalPersonIdCard != null">
  736. legal_person_id_card =
  737. #{legalPersonIdCard,jdbcType=VARCHAR},
  738. </if>
  739. <if test="lastYearTaxReportUrl != null">
  740. last_year_tax_report_url =
  741. #{lastYearTaxReportUrl,jdbcType=VARCHAR},
  742. </if>
  743. <if test="auditStatus != null">
  744. audit_status = #{auditStatus,jdbcType=INTEGER},
  745. </if>
  746. <if test="process != null">
  747. process = #{process,jdbcType=INTEGER},
  748. </if>
  749. <if test="wrongCount != null">
  750. wrong_count = #{wrongCount,jdbcType=INTEGER},
  751. </if>
  752. <if test="paymentDate != null">
  753. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  754. </if>
  755. <if test="firstContacts != null">
  756. first_contacts = #{firstContacts,jdbcType=VARCHAR},
  757. </if>
  758. <if test="firstMobile != null">
  759. first_mobile = #{firstMobile,jdbcType=VARCHAR},
  760. </if>
  761. <if test="secondContacts != null">
  762. second_contacts = #{secondContacts,jdbcType=VARCHAR},
  763. </if>
  764. <if test="secondMobile != null">
  765. second_mobile = #{secondMobile,jdbcType=VARCHAR},
  766. </if>
  767. <if test="thirdContacts != null">
  768. third_contacts = #{thirdContacts,jdbcType=VARCHAR},
  769. </if>
  770. <if test="thirdMobile != null">
  771. third_mobile = #{thirdMobile,jdbcType=VARCHAR},
  772. </if>
  773. <if test="listed != null">
  774. listed = #{listed,jdbcType=INTEGER},
  775. </if>
  776. <if test="listedDate != null">
  777. listed_date = #{listedDate,jdbcType=TIMESTAMP},
  778. </if>
  779. <if test="listedType != null">
  780. listed_type = #{listedType,jdbcType=INTEGER},
  781. </if>
  782. <if test="stockCode != null">
  783. stock_code = #{stockCode,jdbcType=VARCHAR},
  784. </if>
  785. <if test="certificateNumber != null">
  786. certificate_number =
  787. #{certificateNumber,jdbcType=VARCHAR},
  788. </if>
  789. <if test="issuingDate != null">
  790. issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
  791. </if>
  792. <if test="cogContacts != null">
  793. cog_contacts = #{cogContacts,jdbcType=INTEGER},
  794. </if>
  795. <if test="techPrincipal != null">
  796. tech_principal = #{techPrincipal,jdbcType=VARCHAR},
  797. </if>
  798. <if test="contactsFixedTel != null">
  799. contacts_fixed_tel =
  800. #{contactsFixedTel,jdbcType=VARCHAR},
  801. </if>
  802. <if test="contactsFax != null">
  803. contacts_fax = #{contactsFax,jdbcType=VARCHAR},
  804. </if>
  805. <if test="legalPersonTel != null">
  806. legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR},
  807. </if>
  808. <if test="legalPersonFax != null">
  809. legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
  810. </if>
  811. <if test="legalPersonEmail != null">
  812. legal_person_email =
  813. #{legalPersonEmail,jdbcType=VARCHAR},
  814. </if>
  815. <if test="registrationTime != null">
  816. registration_time =
  817. #{registrationTime,jdbcType=TIMESTAMP},
  818. </if>
  819. <if test="ratepayCode != null">
  820. ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
  821. </if>
  822. <if test="industry != null">
  823. industry = #{industry,jdbcType=INTEGER},
  824. </if>
  825. <if test="enterpriseScale != null">
  826. enterprise_scale = #{enterpriseScale,jdbcType=INTEGER},
  827. </if>
  828. <if test="registerType != null">
  829. register_type = #{registerType,jdbcType=VARCHAR},
  830. </if>
  831. <if test="foreignInvestment != null">
  832. foreign_investment =
  833. #{foreignInvestment,jdbcType=VARCHAR},
  834. </if>
  835. <if test="field != null">
  836. field = #{field,jdbcType=VARCHAR},
  837. </if>
  838. <if test="taxAuthority != null">
  839. tax_authority = #{taxAuthority,jdbcType=INTEGER},
  840. </if>
  841. <if test="ratepayMethod != null">
  842. ratepay_method = #{ratepayMethod,jdbcType=INTEGER},
  843. </if>
  844. <if test="highTechZone != null">
  845. high_tech_zone = #{highTechZone,jdbcType=INTEGER},
  846. </if>
  847. <if test="riskInvestment != null">
  848. risk_investment = #{riskInvestment,jdbcType=INTEGER},
  849. </if>
  850. <if test="businessScope != null">
  851. business_scope = #{businessScope,jdbcType=VARCHAR},
  852. </if>
  853. <if test="highTechName != null">
  854. high_tech_name = #{highTechName,jdbcType=VARCHAR},
  855. </if>
  856. <if test="patentProryStatementUrl != null">
  857. patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
  858. </if>
  859. </set>
  860. where id = #{id,jdbcType=VARCHAR}
  861. </update>
  862. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationIdentity">
  863. update
  864. organization_identity
  865. set uid = #{uid,jdbcType=VARCHAR},
  866. contacts = #{contacts,jdbcType=VARCHAR},
  867. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  868. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  869. qq = #{qq,jdbcType=VARCHAR},
  870. postal_address = #{postalAddress,jdbcType=VARCHAR},
  871. postcode = #{postcode,jdbcType=VARCHAR},
  872. aft_username = #{aftUsername,jdbcType=VARCHAR},
  873. unit_name = #{unitName,jdbcType=VARCHAR},
  874. registered_capital = #{registeredCapital,jdbcType=DECIMAL},
  875. licence_number = #{licenceNumber,jdbcType=VARCHAR},
  876. licence_province = #{licenceProvince,jdbcType=INTEGER},
  877. licence_city = #{licenceCity,jdbcType=INTEGER},
  878. licence_area = #{licenceArea,jdbcType=INTEGER},
  879. licence_scanning_url = #{licenceScanningUrl,jdbcType=VARCHAR},
  880. org_code = #{orgCode,jdbcType=VARCHAR},
  881. org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
  882. bank_account = #{bankAccount,jdbcType=VARCHAR},
  883. banks = #{banks,jdbcType=VARCHAR},
  884. bank_branch = #{bankBranch,jdbcType=VARCHAR},
  885. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  886. validation_amount = #{validationAmount,jdbcType=DECIMAL},
  887. identity_type = #{identityType,jdbcType=INTEGER},
  888. location_province = #{locationProvince,jdbcType=INTEGER},
  889. location_city = #{locationCity,jdbcType=INTEGER},
  890. location_area = #{locationArea,jdbcType=INTEGER},
  891. legal_person = #{legalPerson,jdbcType=VARCHAR},
  892. legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
  893. last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
  894. audit_status = #{auditStatus,jdbcType=INTEGER},
  895. process = #{process,jdbcType=INTEGER},
  896. wrong_count = #{wrongCount,jdbcType=INTEGER},
  897. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  898. first_contacts = #{firstContacts,jdbcType=VARCHAR},
  899. first_mobile = #{firstMobile,jdbcType=VARCHAR},
  900. second_contacts = #{secondContacts,jdbcType=VARCHAR},
  901. second_mobile = #{secondMobile,jdbcType=VARCHAR},
  902. third_contacts = #{thirdContacts,jdbcType=VARCHAR},
  903. third_mobile = #{thirdMobile,jdbcType=VARCHAR},
  904. listed = #{listed,jdbcType=INTEGER},
  905. listed_date = #{listedDate,jdbcType=TIMESTAMP},
  906. listed_type = #{listedType,jdbcType=INTEGER},
  907. stock_code = #{stockCode,jdbcType=VARCHAR},
  908. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  909. issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
  910. cog_contacts = #{cogContacts,jdbcType=INTEGER},
  911. tech_principal = #{techPrincipal,jdbcType=VARCHAR},
  912. contacts_fixed_tel = #{contactsFixedTel,jdbcType=VARCHAR},
  913. contacts_fax = #{contactsFax,jdbcType=VARCHAR},
  914. legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR},
  915. legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
  916. legal_person_email = #{legalPersonEmail,jdbcType=VARCHAR},
  917. registration_time = #{registrationTime,jdbcType=TIMESTAMP},
  918. ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
  919. industry = #{industry,jdbcType=INTEGER},
  920. enterprise_scale = #{enterpriseScale,jdbcType=INTEGER},
  921. register_type = #{registerType,jdbcType=VARCHAR},
  922. foreign_investment = #{foreignInvestment,jdbcType=VARCHAR},
  923. field = #{field,jdbcType=VARCHAR},
  924. tax_authority = #{taxAuthority,jdbcType=INTEGER},
  925. ratepay_method = #{ratepayMethod,jdbcType=INTEGER},
  926. high_tech_zone = #{highTechZone,jdbcType=INTEGER},
  927. risk_investment = #{riskInvestment,jdbcType=INTEGER},
  928. business_scope = #{businessScope,jdbcType=VARCHAR},
  929. high_tech_name = #{highTechName,jdbcType=VARCHAR},
  930. patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR}
  931. where id = #{id,jdbcType=VARCHAR}
  932. </update>
  933. <select id="selectOrgIdentityByUserId" parameterType="java.lang.String"
  934. resultMap="BaseResultMap">
  935. select
  936. <include refid="Base_Column_List" />
  937. from organization_identity
  938. where uid = #{uid,jdbcType=VARCHAR}
  939. </select>
  940. <select id="selectOrgIdentityBoByUserId" parameterType="java.lang.String"
  941. resultType="com.goafanti.user.bo.OrgIdentityBo">
  942. select t.id,t.uid,t.contacts,t.fixed_tel as fixedTel
  943. ,t.qq,t.postal_address
  944. as postalAddress ,t.postcode,
  945. t.first_contacts as
  946. firstContacts, t.first_mobile as firstMobile,
  947. t.second_contacts as
  948. secondContacts, t.second_mobile as secondMobile,
  949. t.third_contacts as
  950. thirdContacts, t.third_mobile as thirdMobile,
  951. u.email ,t.legal_person
  952. as legalPerson
  953. from user u LEFT JOIN organization_identity t
  954. on t.uid =
  955. u.id
  956. where t.uid=#{uid,jdbcType=VARCHAR}
  957. </select>
  958. <select id="selectAllOrgIndentity" resultType="com.goafanti.user.bo.OrgUnitNames"
  959. parameterType="java.lang.String">
  960. select u.id as uid, i.unit_name as unitName
  961. from user u INNER JOIN
  962. organization_identity i on u.id = i.uid
  963. where
  964. i.audit_status = 5
  965. and u.lvl = 1
  966. <if test="_parameter != null">
  967. and u.aid = #{aid,jdbcType=VARCHAR}
  968. </if>
  969. </select>
  970. <select id="selectBasicInfo" resultType="com.goafanti.user.bo.OrgBasicInfoBo">
  971. select oi.id,
  972. oi.uid as
  973. uid, oi.unit_name as unitName, oi.licence_province as licenceProvince,
  974. oi.licence_city as licenceCity, oi.licence_area as licenceArea, oi.postal_address as
  975. postalAddress,
  976. oi.postcode, oi.first_contacts as firstContacts,
  977. oi.first_mobile as firstMobile,
  978. oi.contacts_fixed_tel as
  979. contactsFixedTel, oi.contacts_fax as
  980. contactsFax,oi.legal_person_tel as
  981. legalPersonTel,
  982. oi.legal_person_fax as legalPersonFax,
  983. oi.legal_person_email as legalPersonEmail,
  984. oi.registered_capital as
  985. registeredCapital,
  986. oi.registration_time as registrationTime,
  987. oi.legal_person as legalPerson,
  988. oi.legal_person_id_card as
  989. legalPersonIdCard, oi.org_code as orgCode,
  990. oi.ratepay_code as
  991. ratepayCode, oi.industry, oi.enterprise_scale as
  992. enterpriseScale,
  993. oi.register_type as registerType,
  994. oi.foreign_investment as
  995. foreignInvestment, oi.field, oi.tax_authority
  996. as taxAuthority,
  997. oi.listed_date as listedDate,
  998. oi.ratepay_method as ratepayMethod,
  999. oi.listed, oi.high_tech_zone as highTechZone,
  1000. oi.risk_investment as
  1001. riskInvestment, oi.stock_code as stockCode,
  1002. oi.business_scope as
  1003. businessScope, oi.high_tech_name as highTechName,
  1004. oi.listed_type as
  1005. listedType,
  1006. ohr.id as hid, ohr.firm_total as firmTotal, ohr.tech_total
  1007. as techTotal
  1008. from organization_identity oi
  1009. LEFT JOIN org_human_resource
  1010. ohr
  1011. on oi.uid = ohr.uid and ohr.year = #{1}
  1012. where oi.uid = #{0}
  1013. </select>
  1014. <select id="selectOrgIdentityDetailByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgIdentityDetailBo">
  1015. select
  1016. id, uid, aft_username as aftUsername, unit_name as unitName, identity_type as identityType,
  1017. first_contacts as firstContacts, first_mobile as firstMobile, second_contacts as secondContacts,
  1018. second_mobile as secondMobile, third_contacts as thirdContacts, third_mobile as thirdMobile,
  1019. legal_person as legalPerson, legal_person_id_card as legalPersonIdCard, registration_time as registrationTime,
  1020. licence_number as licenceNumber, licence_province as licenceProvince, licence_city as licenceCity,
  1021. licence_area as licenceArea, licence_scanning_url as licenceScanningUrl, org_code as orgCode,
  1022. org_code_url as orgCodeUrl, banks, bank_branch as bankBranch, bank_card_number as bankCardNumber,
  1023. location_province as locationProvince, location_city as locationCity, location_area as locationArea,
  1024. validation_amount as validationAmount, payment_date as paymentDate, audit_status as auditStatus,
  1025. last_year_tax_report_url as lastYearTaxReportUrl
  1026. from organization_identity
  1027. where uid = #{uid,jdbcType=VARCHAR}
  1028. </select>
  1029. <select id="selectAuditorOrgIdentityDetailByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorOrgIdentityDetailBo">
  1030. select
  1031. u.aid, u.mid,
  1032. oi.id, oi.uid, oi.aft_username as aftUsername, oi.unit_name as unitName, oi.identity_type as identityType,
  1033. oi.first_contacts as firstContacts, oi.first_mobile as firstMobile, oi.second_contacts as secondContacts,
  1034. oi.second_mobile as secondMobile, oi.third_contacts as thirdContacts, oi.third_mobile as thirdMobile,
  1035. oi.legal_person as legalPerson, oi.legal_person_id_card as legalPersonIdCard, oi.registration_time as registrationTime,
  1036. oi.licence_number as licenceNumber, oi.licence_province as licenceProvince, oi.licence_city as licenceCity,
  1037. oi.licence_area as licenceArea, oi.licence_scanning_url as licenceScanningUrl, oi.org_code as orgCode,
  1038. oi.org_code_url as orgCodeUrl, oi.banks, bank_branch as bankBranch, oi.bank_card_number as bankCardNumber,
  1039. oi.location_province as locationProvince, oi.location_city as locationCity, oi.location_area as locationArea,
  1040. oi.validation_amount as validationAmount, oi.payment_date as paymentDate, oi.audit_status as auditStatus,
  1041. oi.last_year_tax_report_url as lastYearTaxReportUrl, oi.field, oi.registered_capital as registeredCapital
  1042. from user u
  1043. LEFT JOIN organization_identity oi on oi.uid = u.id
  1044. where uid = #{uid,jdbcType=VARCHAR}
  1045. </select>
  1046. <select id="selectManagerUnitNames" resultType="com.goafanti.user.bo.OrgUnitNames"
  1047. parameterType="java.lang.String">
  1048. select u.id as uid, i.unit_name as unitName
  1049. from user u INNER JOIN
  1050. organization_identity i on u.id = i.uid
  1051. where
  1052. i.audit_status = 5 and u.lvl = 1
  1053. <if test="_parameter != null">
  1054. and u.mid = #{aid,jdbcType=VARCHAR}
  1055. </if>
  1056. </select>
  1057. <select id="selectManagerAchievementOrgOwner" resultType="com.goafanti.user.bo.OrgUnitNames"
  1058. >
  1059. select u.id as uid, i.unit_name as unitName
  1060. from user u INNER JOIN
  1061. organization_identity i on u.id = i.uid
  1062. where
  1063. i.audit_status = 5 and u.lvl = 1 and i.unit_name like
  1064. "%"#{name,jdbcType=VARCHAR}"%"
  1065. <if test="aid != null">
  1066. and u.mid = #{aid,jdbcType=VARCHAR}
  1067. </if>
  1068. </select>
  1069. <select id="selectAchievementOrgOwner" resultType="com.goafanti.user.bo.OrgUnitNames"
  1070. >
  1071. select u.id as uid, i.unit_name as unitName
  1072. from user u INNER JOIN
  1073. organization_identity i on u.id = i.uid
  1074. where
  1075. i.audit_status = 5 and u.lvl = 1 and i.unit_name like
  1076. "%"#{name,jdbcType=VARCHAR}"%"
  1077. <if test="aid != null">
  1078. and u.aid = #{aid,jdbcType=VARCHAR}
  1079. </if>
  1080. </select>
  1081. <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.OrgSubscriberListBo">
  1082. SELECT
  1083. u.id as uid,
  1084. oi.unit_name as unitName,
  1085. u.number,
  1086. oi.id as identityId,
  1087. info.logo_url as logoUrl,
  1088. oi.licence_province as province,
  1089. adc.achievement_count as achievementNum,
  1090. adc.demand_count as demandNum
  1091. FROM
  1092. <![CDATA[ user ]]> u
  1093. LEFT JOIN organization_identity oi ON oi.uid = u.id
  1094. LEFT JOIN organization_info info on info.uid = u.id
  1095. LEFT JOIN organization_tech ot on ot.uid = u.id
  1096. LEFT JOIN achievement_demand_count adc on adc.uid = u.id
  1097. WHERE
  1098. u.type = 1
  1099. <if test="null != level and level==1 ">
  1100. AND u.lvl <![CDATA[ >= ]]> 1
  1101. </if>
  1102. <if test="null !=level and level==0" >
  1103. AND u.lvl = 0
  1104. </if>
  1105. <if test="province != null">
  1106. AND oi.licence_province = #{province,jdbcType=INTEGER}
  1107. </if>
  1108. <if test="city != null">
  1109. AND oi.licence_city = #{city,jdbcType=INTEGER}
  1110. </if>
  1111. <if test="area != null">
  1112. AND oi.licence_area = #{area,jdbcType=INTEGER}
  1113. </if>
  1114. <if test="field != null">
  1115. AND ot.search_area_category like CONCAT(#{field,jdbcType=VARCHAR},'%')
  1116. </if>
  1117. <if test="name != null">
  1118. AND oi.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1119. </if>
  1120. ORDER BY u.number
  1121. <if test="page_sql!=null">
  1122. ${page_sql}
  1123. </if>
  1124. </select>
  1125. <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
  1126. SELECT
  1127. count(1)
  1128. FROM
  1129. <![CDATA[ user ]]> u
  1130. LEFT JOIN organization_identity oi ON oi.uid = u.id
  1131. LEFT JOIN organization_info info on info.uid = u.id
  1132. WHERE
  1133. u.type = 1
  1134. <if test="null != level and level==1 ">
  1135. AND u.lvl <![CDATA[ >= ]]> 1
  1136. </if>
  1137. <if test="null !=level and level==0" >
  1138. AND u.lvl = 0
  1139. </if>
  1140. <if test="province != null">
  1141. AND oi.licence_province = #{province,jdbcType=INTEGER}
  1142. </if>
  1143. <if test="city != null">
  1144. AND oi.licence_city = #{city,jdbcType=INTEGER}
  1145. </if>
  1146. <if test="area != null">
  1147. AND oi.licence_area = #{area,jdbcType=INTEGER}
  1148. </if>
  1149. <if test="field != null">
  1150. AND oi.field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
  1151. </if>
  1152. <if test="name != null">
  1153. AND oi.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1154. </if>
  1155. </select>
  1156. </mapper>