CustomerRecMapper.xml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  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.jkcredit.invoice.mapper.customer.CustomerRecMapper" >
  4. <resultMap id="BaseResultMap" type="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="customerName" property="customerName" jdbcType="VARCHAR" />
  7. <result column="company_leader" property="companyLeader" jdbcType="VARCHAR" />
  8. <result column="company_leader_Phone" property="companyLeaderPhone" jdbcType="VARCHAR" />
  9. <result column="company_name" property="companyName" jdbcType="VARCHAR" />
  10. <result column="company_referenceNum" property="companyReferencenum" jdbcType="VARCHAR" />
  11. <result column="company_openbank" property="companyOpenbank" jdbcType="VARCHAR" />
  12. <result column="company_openbank_acc" property="companyOpenbankAcc" jdbcType="VARCHAR" />
  13. <result column="company_adress" property="companyAdress" jdbcType="VARCHAR" />
  14. <result column="company_phone" property="companyPhone" jdbcType="VARCHAR" />
  15. <result column="createTime" property="createtime" jdbcType="VARCHAR" />
  16. <result column="company_belong_name" property="companyBelongName" jdbcType="VARCHAR" />
  17. <result column="rec_status" property="recStatus" jdbcType="INTEGER" />
  18. <result column="inter_type" property="interType" jdbcType="INTEGER" />
  19. <result column="bussiness_type" property="bussinessType" jdbcType="INTEGER" />
  20. <result column="company_type" property="companyType" jdbcType="INTEGER" />
  21. <result column="operating_rangeType" property="operatingRangeType" jdbcType="INTEGER" />
  22. <result column="company_num" property="companyNum" jdbcType="VARCHAR" />
  23. <result column="service_startTime" property="serviceStartTime" jdbcType="VARCHAR" />
  24. <result column="service_endTime" property="serviceEndTime" jdbcType="VARCHAR" />
  25. <result column="service_type" property="serviceType" jdbcType="INTEGER" />
  26. <result column="contractFileName" property="contractFileName" jdbcType="VARCHAR" />
  27. <result column="contractSuc" property="contractSuc" jdbcType="INTEGER" />
  28. <result column="base64Str" property="base64Str" jdbcType="VARCHAR" />
  29. <result column="contrantNum" property="contrantNum" jdbcType="VARCHAR" />
  30. <result column="lowerFileName" property="lowerFileName" jdbcType="VARCHAR" />
  31. <result column="lowerBase64Str" property="lowerBase64Str" jdbcType="VARCHAR" />
  32. </resultMap>
  33. <resultMap id="BaseResultMapNoBase64Str" type="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  34. <id column="id" property="id" jdbcType="INTEGER" />
  35. <result column="customerName" property="customerName" jdbcType="VARCHAR" />
  36. <result column="company_leader" property="companyLeader" jdbcType="VARCHAR" />
  37. <result column="company_leader_Phone" property="companyLeaderPhone" jdbcType="VARCHAR" />
  38. <result column="company_name" property="companyName" jdbcType="VARCHAR" />
  39. <result column="company_referenceNum" property="companyReferencenum" jdbcType="VARCHAR" />
  40. <result column="company_openbank" property="companyOpenbank" jdbcType="VARCHAR" />
  41. <result column="company_openbank_acc" property="companyOpenbankAcc" jdbcType="VARCHAR" />
  42. <result column="company_adress" property="companyAdress" jdbcType="VARCHAR" />
  43. <result column="company_phone" property="companyPhone" jdbcType="VARCHAR" />
  44. <result column="createTime" property="createtime" jdbcType="VARCHAR" />
  45. <result column="company_belong_name" property="companyBelongName" jdbcType="VARCHAR" />
  46. <result column="rec_status" property="recStatus" jdbcType="INTEGER" />
  47. <result column="inter_type" property="interType" jdbcType="INTEGER" />
  48. <result column="bussiness_type" property="bussinessType" jdbcType="INTEGER" />
  49. <result column="company_type" property="companyType" jdbcType="INTEGER" />
  50. <result column="operating_rangeType" property="operatingRangeType" jdbcType="INTEGER" />
  51. <result column="company_num" property="companyNum" jdbcType="VARCHAR" />
  52. <result column="service_startTime" property="serviceStartTime" jdbcType="VARCHAR" />
  53. <result column="service_endTime" property="serviceEndTime" jdbcType="VARCHAR" />
  54. <result column="service_type" property="serviceType" jdbcType="INTEGER" />
  55. <result column="contractFileName" property="contractFileName" jdbcType="VARCHAR" />
  56. <result column="contractSuc" property="contractSuc" jdbcType="INTEGER" />
  57. <result column="contrantNum" property="contrantNum" jdbcType="VARCHAR" />
  58. <result column="lowerFileName" property="lowerFileName" jdbcType="VARCHAR" />
  59. <result column="lowerBase64Str" property="lowerBase64Str" jdbcType="VARCHAR" />
  60. </resultMap>
  61. <resultMap id="BaseResultMapNoLocalBase64Str" type="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  62. <id column="id" property="id" jdbcType="INTEGER" />
  63. <result column="customerName" property="customerName" jdbcType="VARCHAR" />
  64. <result column="company_leader" property="companyLeader" jdbcType="VARCHAR" />
  65. <result column="company_leader_Phone" property="companyLeaderPhone" jdbcType="VARCHAR" />
  66. <result column="company_name" property="companyName" jdbcType="VARCHAR" />
  67. <result column="company_referenceNum" property="companyReferencenum" jdbcType="VARCHAR" />
  68. <result column="company_openbank" property="companyOpenbank" jdbcType="VARCHAR" />
  69. <result column="company_openbank_acc" property="companyOpenbankAcc" jdbcType="VARCHAR" />
  70. <result column="company_adress" property="companyAdress" jdbcType="VARCHAR" />
  71. <result column="company_phone" property="companyPhone" jdbcType="VARCHAR" />
  72. <result column="createTime" property="createtime" jdbcType="VARCHAR" />
  73. <result column="company_belong_name" property="companyBelongName" jdbcType="VARCHAR" />
  74. <result column="rec_status" property="recStatus" jdbcType="INTEGER" />
  75. <result column="inter_type" property="interType" jdbcType="INTEGER" />
  76. <result column="bussiness_type" property="bussinessType" jdbcType="INTEGER" />
  77. <result column="company_type" property="companyType" jdbcType="INTEGER" />
  78. <result column="operating_rangeType" property="operatingRangeType" jdbcType="INTEGER" />
  79. <result column="company_num" property="companyNum" jdbcType="VARCHAR" />
  80. <result column="service_startTime" property="serviceStartTime" jdbcType="VARCHAR" />
  81. <result column="service_endTime" property="serviceEndTime" jdbcType="VARCHAR" />
  82. <result column="service_type" property="serviceType" jdbcType="INTEGER" />
  83. <result column="contractFileName" property="contractFileName" jdbcType="VARCHAR" />
  84. <result column="contractSuc" property="contractSuc" jdbcType="INTEGER" />
  85. <result column="contrantNum" property="contrantNum" jdbcType="VARCHAR" />
  86. <result column="lowerFileName" property="lowerFileName" jdbcType="VARCHAR" />
  87. </resultMap>
  88. <sql id="Base_Column_List" >
  89. id, customerName,company_leader, company_leader_Phone, company_name, company_referenceNum, company_openbank,
  90. company_openbank_acc, company_adress, company_phone, createTime, company_belong_name,
  91. rec_status, inter_type,bussiness_type,company_type,operating_rangeType,company_num,service_startTime
  92. ,service_endTime,service_type,contractFileName,contractSuc,contrantNum,lowerFileName,fileMessage
  93. </sql>
  94. <select id="selectAllByPage" resultMap="BaseResultMap">
  95. select
  96. <include refid="Base_Column_List" />
  97. from t_customer_rec
  98. <where>
  99. <if test="customerRec.customerName != null and customerRec.customerName != ''">
  100. AND customerName = BINARY #{customerRec.customerName}
  101. </if>
  102. <if test="customerRec.companyLeaderPhone != null and customerRec.companyLeaderPhone != ''">
  103. and company_leader_Phone = BINARY #{customerRec.companyLeaderPhone}
  104. </if>
  105. <if test="customerRec.companyReferencenum != null and customerRec.companyReferencenum != ''">
  106. and company_referenceNum = BINARY #{customerRec.companyReferencenum}
  107. </if>
  108. <if test="customerRec.companyName != null and customerRec.companyName != ''">
  109. and company_name LIKE BINARY CONCAT('%',#{customerRec.companyName},'%')
  110. </if>
  111. <if test="customerRec.companyBelongName != null and customerRec.companyBelongName != ''">
  112. and company_belong_name LIKE CONCAT('%',#{customerRec.companyBelongName},'%')
  113. </if>
  114. <if test="customerRec.serviceEndTimeStart != null and customerRec.serviceEndTimeStart != ''">
  115. and service_endTime BETWEEN #{customerRec.serviceEndTimeStart} and #{customerRec.serviceEndTimeEnd}
  116. </if>
  117. </where>
  118. order by id DESC
  119. </select>
  120. <select id="selectAllNoCarComapany" resultMap="BaseResultMap">
  121. select
  122. DISTINCT company_name
  123. from t_customer_rec
  124. where bussiness_type = 2 and rec_status = 1
  125. </select>
  126. <select id="selectAllByPageWarning" resultMap="BaseResultMap">
  127. select
  128. <include refid="Base_Column_List" />
  129. from t_customer_rec
  130. <where>
  131. <if test="customerRec.customerName != null and customerRec.customerName != ''">
  132. AND customerName = BINARY #{customerRec.customerName}
  133. </if>
  134. <if test="customerRec.companyLeaderPhone != null and customerRec.companyLeaderPhone != ''">
  135. and company_leader_Phone = BINARY #{customerRec.companyLeaderPhone}
  136. </if>
  137. <if test="customerRec.companyReferencenum != null and customerRec.companyReferencenum != ''">
  138. and company_referenceNum = BINARY #{customerRec.companyReferencenum}
  139. </if>
  140. <if test="customerRec.companyName != null and customerRec.companyName != ''">
  141. and company_name LIKE BINARY CONCAT('%',#{customerRec.companyName},'%')
  142. </if>
  143. <if test="customerRec.companyBelongName != null and customerRec.companyBelongName != ''">
  144. and company_belong_name LIKE CONCAT('%',#{customerRec.companyBelongName},'%')
  145. </if>
  146. <if test="customerRec.serviceEndTimeStart != null and customerRec.serviceEndTimeStart != ''">
  147. and service_endTime BETWEEN #{customerRec.serviceEndTimeStart} and #{customerRec.serviceEndTimeEnd}
  148. </if>
  149. and rec_status = 1
  150. and service_endTime is not null
  151. </where>
  152. order by id DESC
  153. </select>
  154. <select id="selectAllByPageExport" resultMap="BaseResultMap">
  155. select
  156. <include refid="Base_Column_List" />
  157. from t_customer_rec
  158. <where>
  159. <if test="customerRec.customerName != null and customerRec.customerName != ''">
  160. AND customerName = BINARY #{customerRec.customerName}
  161. </if>
  162. <if test="customerRec.companyName != null and customerRec.companyName != ''">
  163. and company_name LIKE BINARY CONCAT('%',#{customerRec.companyName},'%')
  164. </if>
  165. <if test="customerRec.companyBelongName != null and customerRec.companyBelongName != ''">
  166. and company_belong_name LIKE BINARY CONCAT('%',#{customerRec.companyBelongName},'%')
  167. </if>
  168. </where>
  169. ORDER by customerName
  170. </select>
  171. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  172. select
  173. <include refid="Base_Column_List" />
  174. from t_customer_rec
  175. where company_num = #{id,jdbcType=INTEGER}
  176. </select>
  177. <select id="selectByPrimaryKeyHasBase64" resultMap="BaseResultMapNoBase64Str" parameterType="java.lang.Integer" >
  178. select
  179. <include refid="Base_Column_List" />,lowerBase64Str
  180. from t_customer_rec
  181. where id = #{id,jdbcType=INTEGER}
  182. </select>
  183. <select id="selectByPrimaryKeyHasNoLocalBase64" resultMap="BaseResultMapNoLocalBase64Str" parameterType="java.lang.Integer" >
  184. select
  185. <include refid="Base_Column_List" />
  186. from t_customer_rec
  187. where id = #{id,jdbcType=INTEGER}
  188. </select>
  189. <select id="selectByCustomerName" resultMap="BaseResultMap" parameterType="java.lang.String" >
  190. select
  191. <include refid="Base_Column_List" />
  192. from t_customer_rec
  193. where customerName = BINARY #{customerName,jdbcType=VARCHAR} and rec_status =1
  194. </select>
  195. <select id="selectByCustomerNameAll" resultMap="BaseResultMap" parameterType="java.lang.String" >
  196. select
  197. <include refid="Base_Column_List" />
  198. from t_customer_rec
  199. where customerName = BINARY #{customerName,jdbcType=VARCHAR}
  200. </select>
  201. <select id="selectByCustomerNameCpAll" resultMap="BaseResultMap" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  202. select
  203. <include refid="Base_Column_List" />
  204. from t_customer_rec
  205. where customerName = BINARY #{customerRec.customerName,jdbcType=VARCHAR}
  206. <if test="customerRec.companyName != null and customerRec.companyName != ''">
  207. and company_name LIKE BINARY CONCAT('%',#{customerRec.companyName},'%')
  208. </if>
  209. </select>
  210. <select id="selectByCustomerNameAndCompany" resultMap="BaseResultMap" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  211. select
  212. <include refid="Base_Column_List" />
  213. from t_customer_rec
  214. where customerName = BINARY #{customerName,jdbcType=VARCHAR} AND company_name = BINARY #{companyName,jdbcType=VARCHAR}
  215. </select>
  216. <select id="selectByCustomerNameAndCompanyReference" resultMap="BaseResultMap" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  217. select
  218. <include refid="Base_Column_List" />
  219. from t_customer_rec
  220. where customerName = BINARY #{customerName,jdbcType=VARCHAR} AND company_referenceNum = BINARY #{companyReferencenum,jdbcType=VARCHAR} and rec_status =1
  221. </select>
  222. <select id="selectByCustomerNameAndCompanyReferenceAll" resultMap="BaseResultMap" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  223. select
  224. <include refid="Base_Column_List" />
  225. from t_customer_rec
  226. where customerName = BINARY #{customerName,jdbcType=VARCHAR} AND company_referenceNum = BINARY #{companyReferencenum,jdbcType=VARCHAR}
  227. </select>
  228. <select id="selectByCompanyReference" resultMap="BaseResultMap" parameterType="java.lang.String" >
  229. select
  230. <include refid="Base_Column_List" />
  231. from t_customer_rec
  232. where company_referenceNum = BINARY #{companyReferencenum,jdbcType=VARCHAR} and rec_status =1
  233. </select>
  234. <select id="selectByCustomerNameAndCompanyConcat" resultMap="BaseResultMap" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  235. select
  236. <include refid="Base_Column_List" />,base64Str
  237. from t_customer_rec
  238. where customerName = BINARY #{customerName,jdbcType=VARCHAR} AND BINARY company_name = #{companyName,jdbcType=VARCHAR}
  239. </select>
  240. <select id="selectByCustomerNameAndCompanyNum" resultMap="BaseResultMap" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  241. select
  242. <include refid="Base_Column_List" />
  243. from t_customer_rec
  244. where customerName = BINARY #{customerName,jdbcType=VARCHAR} AND company_num = #{companyNum,jdbcType=VARCHAR}
  245. </select>
  246. <select id="selectByCompanyNum" resultMap="BaseResultMap" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  247. select
  248. <include refid="Base_Column_List" />
  249. from t_customer_rec
  250. where company_num = #{companyNum,jdbcType=VARCHAR} and rec_status =1
  251. </select>
  252. <select id="selectByCompanyName" resultMap="BaseResultMap" parameterType="java.lang.String" >
  253. select
  254. <include refid="Base_Column_List" />
  255. from t_customer_rec
  256. where company_name = #{companyName,jdbcType=VARCHAR} and rec_status =1
  257. </select>
  258. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  259. delete from t_customer_rec
  260. where id = #{id,jdbcType=INTEGER}
  261. </delete>
  262. <insert id="insert" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  263. insert into t_customer_rec (customerName,company_leader, company_leader_Phone,
  264. company_name, company_referenceNum, company_openbank,
  265. company_openbank_acc, company_adress, company_phone,
  266. createTime, company_belong_name, rec_status,
  267. inter_type,bussiness_type,company_type,operating_rangeType,company_num,
  268. service_startTime,service_endTime,service_type,contractFileName,base64Str,contractSuc,lowerFileName,lowerBase64Str
  269. )
  270. values (#{customerName,jdbcType=VARCHAR}, #{companyLeader,jdbcType=VARCHAR}, #{companyLeaderPhone,jdbcType=VARCHAR},
  271. #{companyName,jdbcType=VARCHAR}, #{companyReferencenum,jdbcType=VARCHAR}, #{companyOpenbank,jdbcType=VARCHAR},
  272. #{companyOpenbankAcc,jdbcType=VARCHAR}, #{companyAdress,jdbcType=VARCHAR}, #{companyPhone,jdbcType=VARCHAR},
  273. #{createtime,jdbcType=TIMESTAMP}, #{companyBelongName,jdbcType=VARCHAR}, #{recStatus,jdbcType=INTEGER},
  274. #{interType,jdbcType=INTEGER}, #{bussinessType,jdbcType=INTEGER},#{companyType,jdbcType=INTEGER},#{operatingRangeType,jdbcType=INTEGER},#{companyNum,jdbcType=VARCHAR},
  275. #{serviceStartTime,jdbcType=VARCHAR},#{serviceEndTime,jdbcType=VARCHAR},#{serviceType,jdbcType=INTEGER},#{contractFileName,jdbcType=VARCHAR},#{base64Str,jdbcType=VARCHAR},#{contractSuc,jdbcType=INTEGER},#{lowerFileName,jdbcType=VARCHAR},#{lowerBase64Str,jdbcType=VARCHAR}
  276. )
  277. </insert>
  278. <insert id="insertSelective" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  279. insert into t_customer_rec
  280. <trim prefix="(" suffix=")" suffixOverrides="," >
  281. <if test="id != null" >
  282. id,
  283. </if>
  284. <if test="companyLeader != null" >
  285. company_leader,
  286. </if>
  287. <if test="companyLeaderPhone != null" >
  288. company_leader_Phone,
  289. </if>
  290. <if test="companyName != null" >
  291. company_name,
  292. </if>
  293. <if test="companyReferencenum != null" >
  294. company_referenceNum,
  295. </if>
  296. <if test="companyOpenbank != null" >
  297. company_openbank,
  298. </if>
  299. <if test="companyOpenbankAcc != null" >
  300. company_openbank_acc,
  301. </if>
  302. <if test="companyAdress != null" >
  303. company_adress,
  304. </if>
  305. <if test="companyPhone != null" >
  306. company_phone,
  307. </if>
  308. <if test="createtime != null" >
  309. createTime,
  310. </if>
  311. <if test="companyBelongName != null" >
  312. company_belong_name,
  313. </if>
  314. <if test="recStatus != null" >
  315. rec_status,
  316. </if>
  317. <if test="interType != null" >
  318. inter_type,
  319. </if>
  320. </trim>
  321. <trim prefix="values (" suffix=")" suffixOverrides="," >
  322. <if test="id != null" >
  323. #{id,jdbcType=INTEGER},
  324. </if>
  325. <if test="companyLeader != null" >
  326. #{companyLeader,jdbcType=VARCHAR},
  327. </if>
  328. <if test="companyLeaderPhone != null" >
  329. #{companyLeaderPhone,jdbcType=VARCHAR},
  330. </if>
  331. <if test="companyName != null" >
  332. #{companyName,jdbcType=VARCHAR},
  333. </if>
  334. <if test="companyReferencenum != null" >
  335. #{companyReferencenum,jdbcType=VARCHAR},
  336. </if>
  337. <if test="companyOpenbank != null" >
  338. #{companyOpenbank,jdbcType=VARCHAR},
  339. </if>
  340. <if test="companyOpenbankAcc != null" >
  341. #{companyOpenbankAcc,jdbcType=VARCHAR},
  342. </if>
  343. <if test="companyAdress != null" >
  344. #{companyAdress,jdbcType=VARCHAR},
  345. </if>
  346. <if test="companyPhone != null" >
  347. #{companyPhone,jdbcType=VARCHAR},
  348. </if>
  349. <if test="createtime != null" >
  350. #{createtime,jdbcType=TIMESTAMP},
  351. </if>
  352. <if test="companyBelongName != null" >
  353. #{companyBelongName,jdbcType=VARCHAR},
  354. </if>
  355. <if test="recStatus != null" >
  356. #{recStatus,jdbcType=INTEGER},
  357. </if>
  358. <if test="interType != null" >
  359. #{interType,jdbcType=INTEGER},
  360. </if>
  361. </trim>
  362. </insert>
  363. <update id="updateByPrimaryKeySelective" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  364. update t_customer_rec
  365. <set >
  366. <if test="companyLeader != null" >
  367. company_leader = #{companyLeader,jdbcType=VARCHAR},
  368. </if>
  369. <if test="companyLeaderPhone != null" >
  370. company_leader_Phone = #{companyLeaderPhone,jdbcType=VARCHAR},
  371. </if>
  372. <if test="companyName != null" >
  373. company_name = #{companyName,jdbcType=VARCHAR},
  374. </if>
  375. <if test="companyReferencenum != null" >
  376. company_referenceNum = #{companyReferencenum,jdbcType=VARCHAR},
  377. </if>
  378. <if test="companyOpenbank != null" >
  379. company_openbank = #{companyOpenbank,jdbcType=VARCHAR},
  380. </if>
  381. <if test="companyOpenbankAcc != null" >
  382. company_openbank_acc = #{companyOpenbankAcc,jdbcType=VARCHAR},
  383. </if>
  384. <if test="companyAdress != null" >
  385. company_adress = #{companyAdress,jdbcType=VARCHAR},
  386. </if>
  387. <if test="companyPhone != null" >
  388. company_phone = #{companyPhone,jdbcType=VARCHAR},
  389. </if>
  390. <if test="createtime != null" >
  391. createTime = #{createtime,jdbcType=TIMESTAMP},
  392. </if>
  393. <if test="companyBelongName != null" >
  394. company_belong_name = #{companyBelongName,jdbcType=VARCHAR},
  395. </if>
  396. <if test="recStatus != null" >
  397. rec_status = #{recStatus,jdbcType=INTEGER},
  398. </if>
  399. <if test="interType != null" >
  400. inter_type = #{interType,jdbcType=INTEGER},
  401. </if>
  402. <if test="bussinessType != null" >
  403. bussiness_type = #{bussinessType,jdbcType=INTEGER},
  404. </if>
  405. <if test="companyType != null" >
  406. company_type = #{companyType,jdbcType=INTEGER},
  407. </if>
  408. <if test="operatingRangeType != null" >
  409. operating_rangeType = #{operatingRangeType,jdbcType=INTEGER},
  410. </if>
  411. <if test="companyNum != null" >
  412. company_num = #{companyNum,jdbcType=VARCHAR},
  413. </if>
  414. <if test="serviceStartTime != null" >
  415. service_startTime = #{serviceStartTime,jdbcType=VARCHAR},
  416. </if>
  417. <if test="serviceEndTime != null" >
  418. service_endTime = #{serviceEndTime,jdbcType=VARCHAR},
  419. </if>
  420. <if test="serviceType != null" >
  421. service_type = #{serviceType,jdbcType=INTEGER},
  422. </if>
  423. <if test="contractFileName != null" >
  424. contractFileName = #{contractFileName,jdbcType=VARCHAR},
  425. </if>
  426. <if test="base64Str != null" >
  427. base64Str = #{base64Str,jdbcType=VARCHAR},
  428. </if>
  429. <if test="contractSuc != null" >
  430. contractSuc = #{contractSuc,jdbcType=INTEGER},
  431. </if>
  432. <if test="contrantNum != null" >
  433. contrantNum = #{contrantNum,jdbcType=VARCHAR},
  434. </if>
  435. <if test="lowerFileName != null" >
  436. lowerFileName = #{lowerFileName,jdbcType=VARCHAR},
  437. </if>
  438. <if test="lowerBase64Str != null" >
  439. lowerBase64Str = #{lowerBase64Str,jdbcType=VARCHAR},
  440. </if>
  441. <if test="fileMessage != null" >
  442. fileMessage = #{fileMessage,jdbcType=VARCHAR},
  443. </if>
  444. </set>
  445. where company_name = BINARY #{companyName,jdbcType=VARCHAR} and bussiness_type = #{bussinessType,jdbcType=INTEGER} and company_referenceNum = #{companyReferencenum,jdbcType=VARCHAR}
  446. </update>
  447. <update id="updateByPrimaryKeySelectiveUpload" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  448. update t_customer_rec
  449. <set >
  450. <if test="companyLeader != null" >
  451. company_leader = #{companyLeader,jdbcType=VARCHAR},
  452. </if>
  453. <if test="companyLeaderPhone != null" >
  454. company_leader_Phone = #{companyLeaderPhone,jdbcType=VARCHAR},
  455. </if>
  456. <if test="companyName != null" >
  457. company_name = #{companyName,jdbcType=VARCHAR},
  458. </if>
  459. <if test="companyReferencenum != null" >
  460. company_referenceNum = #{companyReferencenum,jdbcType=VARCHAR},
  461. </if>
  462. <if test="companyOpenbank != null" >
  463. company_openbank = #{companyOpenbank,jdbcType=VARCHAR},
  464. </if>
  465. <if test="companyOpenbankAcc != null" >
  466. company_openbank_acc = #{companyOpenbankAcc,jdbcType=VARCHAR},
  467. </if>
  468. <if test="companyAdress != null" >
  469. company_adress = #{companyAdress,jdbcType=VARCHAR},
  470. </if>
  471. <if test="companyPhone != null" >
  472. company_phone = #{companyPhone,jdbcType=VARCHAR},
  473. </if>
  474. <if test="createtime != null" >
  475. createTime = #{createtime,jdbcType=TIMESTAMP},
  476. </if>
  477. <if test="companyBelongName != null" >
  478. company_belong_name = #{companyBelongName,jdbcType=VARCHAR},
  479. </if>
  480. <if test="recStatus != null" >
  481. rec_status = #{recStatus,jdbcType=INTEGER},
  482. </if>
  483. <if test="interType != null" >
  484. inter_type = #{interType,jdbcType=INTEGER},
  485. </if>
  486. <if test="bussinessType != null" >
  487. bussiness_type = #{bussinessType,jdbcType=INTEGER},
  488. </if>
  489. <if test="companyType != null" >
  490. company_type = #{companyType,jdbcType=INTEGER},
  491. </if>
  492. <if test="operatingRangeType != null" >
  493. operating_rangeType = #{operatingRangeType,jdbcType=INTEGER},
  494. </if>
  495. <if test="companyNum != null" >
  496. company_num = #{companyNum,jdbcType=VARCHAR},
  497. </if>
  498. <if test="serviceStartTime != null" >
  499. service_startTime = #{serviceStartTime,jdbcType=VARCHAR},
  500. </if>
  501. <if test="serviceEndTime != null" >
  502. service_endTime = #{serviceEndTime,jdbcType=VARCHAR},
  503. </if>
  504. <if test="serviceType != null" >
  505. service_type = #{serviceType,jdbcType=INTEGER},
  506. </if>
  507. <if test="contractFileName != null" >
  508. contractFileName = #{contractFileName,jdbcType=VARCHAR},
  509. </if>
  510. <if test="base64Str != null" >
  511. base64Str = #{base64Str,jdbcType=VARCHAR},
  512. </if>
  513. <if test="contractSuc != null" >
  514. contractSuc = #{contractSuc,jdbcType=INTEGER},
  515. </if>
  516. <if test="contrantNum != null" >
  517. contrantNum = #{contrantNum,jdbcType=VARCHAR},
  518. </if>
  519. <if test="lowerFileName != null" >
  520. lowerFileName = #{lowerFileName,jdbcType=VARCHAR},
  521. </if>
  522. <if test="lowerBase64Str != null" >
  523. lowerBase64Str = #{lowerBase64Str,jdbcType=VARCHAR},
  524. </if>
  525. <if test="fileMessage != null" >
  526. fileMessage = #{fileMessage,jdbcType=VARCHAR},
  527. </if>
  528. </set>
  529. where id = BINARY #{id,jdbcType=BIGINT}
  530. </update>
  531. <update id="updateByPrimaryKey" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  532. update t_customer_rec
  533. set company_leader = #{companyLeader,jdbcType=VARCHAR},
  534. company_leader_Phone = #{companyLeaderPhone,jdbcType=VARCHAR},
  535. company_name = #{companyName,jdbcType=VARCHAR},
  536. company_referenceNum = #{companyReferencenum,jdbcType=VARCHAR},
  537. company_openbank = #{companyOpenbank,jdbcType=VARCHAR},
  538. company_openbank_acc = #{companyOpenbankAcc,jdbcType=VARCHAR},
  539. company_adress = #{companyAdress,jdbcType=VARCHAR},
  540. company_phone = #{companyPhone,jdbcType=VARCHAR},
  541. createTime = #{createtime,jdbcType=TIMESTAMP},
  542. company_belong_name = #{companyBelongName,jdbcType=VARCHAR},
  543. rec_status = #{recStatus,jdbcType=INTEGER},
  544. inter_type = #{interType,jdbcType=INTEGER},
  545. bussiness_type = #{bussinessType,jdbcType=INTEGER},
  546. company_type = #{companyType,jdbcType=INTEGER},
  547. operating_rangeType = #{operatingRangeType,jdbcType=INTEGER},
  548. company_num = #{companyNum,jdbcType=VARCHAR},
  549. service_startTime = #{serviceStartTime,jdbcType=VARCHAR},
  550. service_endTime = #{serviceEndTime,jdbcType=VARCHAR},
  551. service_type = #{serviceType,jdbcType=INTEGER},
  552. contractFileName = #{contractFileName,jdbcType=VARCHAR},
  553. base64Str = #{base64Str,jdbcType=VARCHAR},
  554. contractSuc = #{contractSuc,jdbcType=INTEGER},
  555. contrantNum = #{contrantNum,jdbcType=VARCHAR}
  556. where id = #{id,jdbcType=INTEGER}
  557. </update>
  558. <update id="updateByCompany" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
  559. update t_customer_rec
  560. set company_leader = #{companyLeader,jdbcType=VARCHAR},
  561. company_leader_Phone = #{companyLeaderPhone,jdbcType=VARCHAR},
  562. company_name = #{companyName,jdbcType=VARCHAR},
  563. company_referenceNum = #{companyReferencenum,jdbcType=VARCHAR},
  564. company_openbank = #{companyOpenbank,jdbcType=VARCHAR},
  565. company_openbank_acc = #{companyOpenbankAcc,jdbcType=VARCHAR},
  566. company_adress = #{companyAdress,jdbcType=VARCHAR},
  567. company_phone = #{companyPhone,jdbcType=VARCHAR},
  568. createTime = #{createtime,jdbcType=TIMESTAMP},
  569. company_belong_name = #{companyBelongName,jdbcType=VARCHAR},
  570. rec_status = #{recStatus,jdbcType=INTEGER},
  571. inter_type = #{interType,jdbcType=INTEGER},
  572. bussiness_type = #{bussinessType,jdbcType=INTEGER},
  573. company_type = #{companyType,jdbcType=INTEGER},
  574. operating_rangeType = #{operatingRangeType,jdbcType=INTEGER},
  575. company_num = #{companyNum,jdbcType=VARCHAR},
  576. service_startTime = #{serviceStartTime,jdbcType=VARCHAR},
  577. service_endTime = #{serviceEndTime,jdbcType=VARCHAR},
  578. service_type = #{serviceType,jdbcType=INTEGER},
  579. contractFileName = #{contractFileName,jdbcType=VARCHAR},
  580. base64Str = #{base64Str,jdbcType=VARCHAR},
  581. contractSuc = #{contractSuc,jdbcType=INTEGER},
  582. contrantNum = #{contrantNum,jdbcType=VARCHAR}
  583. where company_name = BINARY #{companyName,jdbcType=VARCHAR} and bussiness_type = #{bussinessType,jdbcType=INTEGER} and company_referenceNum = #{companyReferencenum,jdbcType=VARCHAR}
  584. </update>
  585. </mapper>