OrganizationIdentityMapper.xml 42 KB

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