Subject.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. <?php
  2. /**
  3. * @api {post} subject/getSubjectList 得到产品列表
  4. * @apiVersion 1.0.0
  5. * @apiName getSubjectList
  6. * @apiDescription 得到产品列表
  7. * @apiGroup Subject
  8. *
  9. * @apiParam {Number=[0,1,2]} [orderTerm] 期限次序,1由高到低,2由低到高,0无效
  10. * @apiParam {Number=[0,1,2} [orderYear] 年化次序,1由高到低,2由低到高,0无效
  11. * @apiParam {Number} [term] 期数,比如15,代表15天标
  12. * @apiParam {Number} [status] 状态,0全部,1热卖中,2已售罄,3还款中
  13. * @apiParam {Number=[1,2,3]} [subjectTypeID] 1-新手标,2-享车贷,3-优车贷
  14. * @apiParam {Number} [pageIndex] 页码
  15. * @apiParam {Number} [pageItemCount] 每页条数
  16. * @apiParamExample {json} 发送报文:
  17. {
  18. "orderTerm": 0,
  19. "orderYear": 0,
  20. "term":15,
  21. "status":15,
  22. "subjectTypeID":1,
  23. "pageIndex":1,
  24. "pageItemCount":0
  25. }
  26. *
  27. * @apiSuccess {Object[]} subjectList 产品列表
  28. * @apiSuccess {Number} subjectList.subjectID 产品ID
  29. * @apiSuccess {Number} subjectList.term 期限
  30. * @apiSuccess {Number} subjectList.unit 期限单位,“天”,“月”,“年”
  31. * @apiSuccess {String} subjectList.title 标题
  32. * @apiSuccess {String} subjectList.price 总额
  33. * @apiSuccess {String} subjectList.year 年化
  34. * @apiSuccess {String} subjectList.yearSystem 追加年化
  35. * @apiSuccess {String} subjectList.basePrice 起投金额
  36. * @apiSuccess {String} subjectList.baseMaxPrice 最大投资金额
  37. * @apiSuccess {String} subjectList.addTime 添加时间
  38. * @apiSuccess {String} subjectList.repayTime 还款时间
  39. * @apiSuccess {Number} subjectList.status 状态值,3-抢购中,4-已售罄
  40. * @apiSuccess {String} subjectList.statusText 状态描述
  41. * @apiSuccess {String} subjectList.alias 编号
  42. * @apiSuccess {Number} subjectList.loanID 借款ID
  43. * @apiSuccess {Number} subjectList.hongbao 可以使用红包个数
  44. * @apiSuccess {String} subjectList.interestBeginTime 起息时间
  45. * @apiSuccess {String} subjectList.overTime 到期时间
  46. * @apiSuccess {String} subjectList.reachTime 到账时间
  47. * @apiSuccess {Number} subjectList.investDay 剩余投资天数
  48. * @apiSuccess {Object} subjectList.subjectType 产品类型
  49. * @apiSuccess {String} subjectList.subjectType.name 描述
  50. * @apiSuccess {String} subjectList.subjectType.icon 分类图标
  51. * @apiSuccess {String} subjectList.subjectType.subjectTypeID 类型ID,1-新手标,2-精品标,3-长久标
  52. * @apiSuccess {Object} subjectList.interestType 计息类型
  53. * @apiSuccess {String} subjectList.interestType.name 描述
  54. * @apiSuccess {Number} subjectList.interestType.interestTypeID 类型ID
  55. * @apiSuccess {Object} subjectList.interestTimeType 计息时间类型
  56. * @apiSuccess {String} subjectList.interestTimeType.name 描述
  57. * @apiSuccess {String} subjectList.interestTimeType.text 年化描述
  58. * @apiSuccess {Number} subjectList.interestTimeType.interestTimeTypeID 类型ID
  59. * @apiSuccess {Object} subjectList.subjectStat 统计
  60. * @apiSuccess {String} subjectList.subjectStat.moneyTotalInvest 已投资
  61. * @apiSuccess {Number} subjectList.subjectStat.timesInvest 已投次数
  62. * @apiSuccess {Number} subjectList.contentUrl1 产品说明
  63. * @apiSuccess {Number} subjectList.contentUrl2 项目详情
  64. * @apiSuccess {Number} subjectList.contentUrl3 投标记录
  65. * @apiSuccessExample {json} 返回json数据(举例):
  66. {
  67. "code": 1,
  68. "msg": "操作成功",
  69. "content": {
  70. "subjectList": [
  71. {
  72. "subjectID": 1,
  73. "term": 1,
  74. "unit":"天",
  75. "title": "新手理财818",
  76. "price": "100000.00",
  77. "year": "12.80",
  78. "yearSystem": "12.80",
  79. "basePrice": "100.00",
  80. "baseMaxPrice": "100000.00",
  81. "addTime": "2017-12-04 11:12:47",
  82. "interestBeginTime":"购买日",
  83. "reachTime": "2017-12-04",
  84. "status": 3,
  85. "alias": "20171204111247GuSFSa",
  86. "loanID": 0,
  87. "hongbao": 0,
  88. "overTime": "2017-12-05 00:00:00",
  89. "subjectType": {
  90. "icon": "http://www.baidu.com/bj.jpg",
  91. "name": "新手理财",
  92. "subjectTypeID": 2
  93. },
  94. "interestType": {
  95. "name": "一次性还本付息",
  96. "interestTypeID": 2
  97. },
  98. "interestTimeType": {
  99. "text": "预期年化",
  100. "name": "T成交日 + 0",
  101. "interestTimeTypeID": 2
  102. },
  103. "subjectStat": {
  104. "moneyTotalInvest": "0.00",
  105. "timesInvest": 0
  106. },
  107. "statusText": "已发布",
  108. "investDay": 1,
  109. "repayTime": "2017-12-05 00:00:00",
  110. "contentUrl1": "http://www.baidu.com",
  111. "contentUrl2": "http://www.baidu.com",
  112. "contentUrl3": "http://www.baidu.com"
  113. }
  114. ]
  115. }
  116. }
  117. * @apiUse CreateUserError
  118. */
  119. /**
  120. * @api {post} subject/getSubjectDetail 得到产品详细
  121. * @apiVersion 1.0.0
  122. * @apiName getSubjectDetail
  123. * @apiDescription 得到产品详细
  124. * @apiGroup Subject
  125. *
  126. * @apiParam {Number} subjectID 产品ID
  127. * @apiParamExample {json} 发送报文:
  128. {
  129. "subjectID": 12
  130. }
  131. *
  132. * @apiSuccess {Object} subjectDetail 产品详细
  133. * @apiSuccess {Number} subjectDetail.subjectID 产品ID
  134. * @apiSuccess {Number} subjectDetail.term 期限
  135. * @apiSuccess {Number} subjectDetail.unit 期限单位,“天”,“月”,“年”
  136. * @apiSuccess {String} subjectDetail.title 标题
  137. * @apiSuccess {String} subjectDetail.price 总额
  138. * @apiSuccess {String} subjectDetail.year 年化
  139. * @apiSuccess {String} subjectDetail.yearSystem 追加年化
  140. * @apiSuccess {String} subjectDetail.basePrice 起投金额
  141. * @apiSuccess {String} subjectDetail.baseMaxPrice 最大投资金额
  142. * @apiSuccess {String} subjectDetail.addTime 添加时间
  143. * @apiSuccess {String} subjectDetail.repayTime 还款时间
  144. * @apiSuccess {Number} subjectDetail.status 状态值,3-抢购中,4-已售罄
  145. * @apiSuccess {String} subjectDetail.statusText 状态描述
  146. * @apiSuccess {String} subjectDetail.alias 编号
  147. * @apiSuccess {Number} subjectDetail.loanID 借款ID
  148. * @apiSuccess {Number} subjectDetail.hongbao 可以使用红包个数
  149. * @apiSuccess {String} subjectDetail.overTime 到期时间
  150. * @apiSuccess {String} subjectDetail.interestBeginTime 起息日
  151. * @apiSuccess {String} subjectDetail.reachTime 到账时间
  152. * @apiSuccess {Number} subjectDetail.investDay 剩余投资天数
  153. * @apiSuccess {Object} subjectDetail.subjectType 产品类型
  154. * @apiSuccess {String} subjectDetail.subjectType.icon 分类图标
  155. * @apiSuccess {String} subjectDetail.subjectType.name 描述
  156. * @apiSuccess {String} subjectDetail.subjectType.subjectTypeID 类型ID,1-新手标,2-精品标,3-长久标
  157. * @apiSuccess {Object} subjectDetail.interestType 计息类型
  158. * @apiSuccess {String} subjectDetail.interestType.name 描述
  159. * @apiSuccess {Number} subjectDetail.interestType.interestTypeID 类型ID
  160. * @apiSuccess {Object} subjectDetail.interestTimeType 计息时间类型
  161. * @apiSuccess {String} subjectDetail.interestTimeType.name 描述
  162. * @apiSuccess {String} subjectDetail.interestTimeType.text 年化描述
  163. * @apiSuccess {Number} subjectDetail.interestTimeType.interestTimeTypeID 类型ID
  164. * @apiSuccess {Object} subjectDetail.subjectStat 统计
  165. * @apiSuccess {String} subjectDetail.subjectStat.moneyTotalInvest 已投资
  166. * @apiSuccess {Number} subjectDetail.subjectStat.timesInvest 已投次数
  167. * @apiSuccess {String} subjectDetail.contentUrl1 产品说明
  168. * @apiSuccess {String} subjectDetail.contentUrl2 项目详情
  169. * @apiSuccess {String} subjectDetail.contentUrl3 投标记录
  170. * @apiSuccessExample {json} 返回json数据(举例):
  171. {
  172. "code": 1,
  173. "msg": "操作成功",
  174. "content": {
  175. "subjectDetail":{
  176. "subjectID": 1,
  177. "term": 1,
  178. "unit":"天",
  179. "title": "新手理财818",
  180. "price": "100000.00",
  181. "year": "12.80",
  182. "yearSystem": "12.80",
  183. "basePrice": "100.00",
  184. "baseMaxPrice": "100000.00",
  185. "addTime": "2017-12-04 11:12:47",
  186. "interestBeginTime":"购买日",
  187. "reachTime": "2017-12-04",
  188. "status": 3,
  189. "alias": "20171204111247GuSFSa",
  190. "loanID": 0,
  191. "hongbao": 0,
  192. "overTime": "2017-12-05 00:00:00",
  193. "subjectType": {
  194. "icon": "http://www.baidu.com/bj.jpg",
  195. "name": "新手理财",
  196. "subjectTypeID": 2
  197. },
  198. "interestType": {
  199. "name": "一次性还本付息",
  200. "interestTypeID": 2
  201. },
  202. "interestTimeType": {
  203. "text": "预期年化",
  204. "name": "T成交日 + 0",
  205. "interestTimeTypeID": 2
  206. },
  207. "subjectStat": {
  208. "moneyTotalInvest": "0.00",
  209. "timesInvest": 0
  210. },
  211. "statusText": "已发布",
  212. "investDay": 1,
  213. "repayTime": "2017-12-05 00:00:00"
  214. },
  215. "contentUrl1":"http://www.baidu.com",
  216. "contentUrl2":"http://www.baidu.com",
  217. "contentUrl3":"http://www.baidu.com"
  218. }
  219. }
  220. * @apiUse CreateUserError
  221. */
  222. /**
  223. * @api {post} subject/getSubjectContent 得到产品合同及投资记录
  224. * @apiVersion 1.0.0
  225. * @apiName getSubjectContent
  226. * @apiDescription 得到产品合同及投资记录
  227. * @apiGroup Subject
  228. *
  229. * @apiParam {Number} subjectID 产品ID
  230. * @apiParamExample {json} 发送报文:
  231. {
  232. "subjectID": 12
  233. }
  234. * @apiSuccessExample {json} 返回json数据(举例):
  235. {
  236. "code": 1,
  237. "msg": "操作成功",
  238. "content": {
  239. "cangList": [{
  240. "cangID": 1887,
  241. "subjectID": 766,
  242. "userID": 17679,
  243. "alias": "CP2018021014023800001887",
  244. "moneySubject": "1000.00",
  245. "status": 4,
  246. "addTime": "2018-02-10 14:02:38",
  247. "payTime": "2018-02-10 15:20:05",
  248. "updateTime": "2018-02-10 14:02:43",
  249. "interestBeginTime": "2018-02-10",
  250. "interestEndTime": "1970-01-02",
  251. "repayTime": 0,
  252. "year": "0.00",
  253. "ben": "1000.00",
  254. "yearSystem": "0.00",
  255. "interest": "0.00",
  256. "investDay": 0,
  257. "interestTimeTypeID": 0,
  258. "isForged": 1,
  259. "yearExt": "0.00",
  260. "hongbao": "",
  261. "outerNumber": "",
  262. "osType": 0,
  263. "ip": "",
  264. "money": "0.00",
  265. "BACKUPID": 0,
  266. "masterID": "",
  267. "isFutou": 0,
  268. "user": {
  269. "userID": 17679,
  270. "uuid": "",
  271. "trueName": "李平平",
  272. "mobile": "17355246589",
  273. "password": "asdfasdfasasdfasdfasdfasdfasdfsd",
  274. "channelID": 0,
  275. "passport": "",
  276. "addTime": "1970-01-01 08:00:00",
  277. "updateTime": "1970-01-01 08:00:00",
  278. "status": 0,
  279. "token": "",
  280. "tokenOverTime": 0,
  281. "isAuthTrueName": 0,
  282. "isAuthBank": 0,
  283. "isFuyougold": 0,
  284. "avatar": "http:\/\/slb.dahengdian.com\/jiaqiancaifu\/2018\/01\/03\/V5KL8LKbLE.png",
  285. "gender": 0,
  286. "areaID": 0,
  287. "deviceID": "",
  288. "osV": "",
  289. "osType": 0,
  290. "ip": "",
  291. "isForged": 1,
  292. "isNewInvest": 0,
  293. "tokenWap": "",
  294. "tokenPc": "",
  295. "tokenOverTimeWap": 0,
  296. "tokenOverTimePc": 0,
  297. "loginTime": "",
  298. "loginOsType": 0,
  299. "vip": 0,
  300. "email": "",
  301. "BACKUPID": 0,
  302. "apiV": "",
  303. "appV": ""
  304. }
  305. }, {
  306. "cangID": 1880,
  307. "subjectID": 766,
  308. "userID": 19994,
  309. "alias": "CP2018021011443200001880",
  310. "moneySubject": "4600.00",
  311. "status": 3,
  312. "addTime": "2018-02-10 11:44:32",
  313. "payTime": "2018-02-10 11:44:32",
  314. "updateTime": "2018-02-10 11:44:32",
  315. "interestBeginTime": "2018-02-10",
  316. "interestEndTime": "2018-02-25",
  317. "repayTime": 0,
  318. "year": "18.00",
  319. "ben": "4600.00",
  320. "yearSystem": "0.00",
  321. "interest": "36.30",
  322. "investDay": 15,
  323. "interestTimeTypeID": 3,
  324. "isForged": 0,
  325. "yearExt": "1.20",
  326. "hongbao": "423820",
  327. "outerNumber": "fuyou151823427212578",
  328. "osType": 1,
  329. "ip": "218.57.182.73",
  330. "money": "4600.00",
  331. "BACKUPID": 0,
  332. "masterID": "",
  333. "isFutou": 0,
  334. "user": {
  335. "userID": 19994,
  336. "uuid": "5Ceh4akjW3EB0tMikG3LG8xCeeS0ONUS",
  337. "trueName": "王敏",
  338. "mobile": "13792629520",
  339. "password": "d161a617d5e174e450600ad6bd91cdee",
  340. "channelID": 68,
  341. "passport": "370724198812061861",
  342. "addTime": "2018-02-10 11:40:04",
  343. "updateTime": "2018-02-10 12:12:17",
  344. "status": 0,
  345. "token": "",
  346. "tokenOverTime": 0,
  347. "isAuthTrueName": 1,
  348. "isAuthBank": 1,
  349. "isFuyougold": 0,
  350. "avatar": "http:\/\/slb.dahengdian.com\/jiaqiancaifu\/2018\/01\/03\/V5KL8LKbLE.png",
  351. "gender": 0,
  352. "areaID": 0,
  353. "deviceID": "A812975A-901A-45DB-AFEE-1902D04F4FF4",
  354. "osV": "10.3.3",
  355. "osType": 1,
  356. "ip": "218.57.182.73",
  357. "isForged": 0,
  358. "isNewInvest": 0,
  359. "tokenWap": "",
  360. "tokenPc": "",
  361. "tokenOverTimeWap": 0,
  362. "tokenOverTimePc": 0,
  363. "loginTime": 0,
  364. "loginOsType": 1,
  365. "vip": 0,
  366. "email": "",
  367. "BACKUPID": 0,
  368. "apiV": "",
  369. "appV": "1.0"
  370. }
  371. }, {
  372. "cangID": 1876,
  373. "subjectID": 766,
  374. "userID": 19993,
  375. "alias": "CP2018021011152700001876",
  376. "moneySubject": "1000.00",
  377. "status": 3,
  378. "addTime": "2018-02-10 11:15:27",
  379. "payTime": "2018-02-10 11:15:27",
  380. "updateTime": "2018-02-10 11:15:32",
  381. "interestBeginTime": "2018-02-10",
  382. "interestEndTime": "2018-02-25",
  383. "repayTime": 0,
  384. "year": "18.00",
  385. "ben": "1000.00",
  386. "yearSystem": "0.00",
  387. "interest": "7.89",
  388. "investDay": 15,
  389. "interestTimeTypeID": 3,
  390. "isForged": 0,
  391. "yearExt": "1.20",
  392. "hongbao": "423789",
  393. "outerNumber": "fuyou151823252788142",
  394. "osType": 2,
  395. "ip": "192.168.2.200",
  396. "money": "1000.00",
  397. "BACKUPID": 0,
  398. "masterID": "",
  399. "isFutou": 0,
  400. "user": {
  401. "userID": 19993,
  402. "uuid": "MKQunLSM7X9WG5UaEn6rzhAeH5OTwbkk",
  403. "trueName": "周海",
  404. "mobile": "18124214379",
  405. "password": "396af95650121f7dc1e997f77f0513fb",
  406. "channelID": 55,
  407. "passport": "441781199301106811",
  408. "addTime": "2018-02-10 11:09:49",
  409. "updateTime": "2018-02-10 11:15:27",
  410. "status": 0,
  411. "token": "5cf10e3d81a53d82ab6e9c5b30bc6006",
  412. "tokenOverTime": 1518836989,
  413. "isAuthTrueName": 1,
  414. "isAuthBank": 1,
  415. "isFuyougold": 0,
  416. "avatar": "http:\/\/slb.dahengdian.com\/jiaqiancaifu\/2018\/01\/03\/V5KL8LKbLE.png",
  417. "gender": 0,
  418. "areaID": 0,
  419. "deviceID": "8E4ECC0DD4AA90AACEB64703BA7EEE42",
  420. "osV": "7.1.1",
  421. "osType": 2,
  422. "ip": "192.168.2.200",
  423. "isForged": 0,
  424. "isNewInvest": 0,
  425. "tokenWap": "",
  426. "tokenPc": "",
  427. "tokenOverTimeWap": 0,
  428. "tokenOverTimePc": 0,
  429. "loginTime": 0,
  430. "loginOsType": 2,
  431. "vip": 0,
  432. "email": "",
  433. "BACKUPID": 0,
  434. "apiV": "1.0.0",
  435. "appV": "2.0.0"
  436. }
  437. }, {
  438. "cangID": 1875,
  439. "subjectID": 766,
  440. "userID": 17653,
  441. "alias": "CP2018021010150200001875",
  442. "moneySubject": "1000.00",
  443. "status": 4,
  444. "addTime": "2018-02-10 10:15:02",
  445. "payTime": "2018-02-10 15:20:05",
  446. "updateTime": "2018-02-10 10:15:07",
  447. "interestBeginTime": "2018-02-10",
  448. "interestEndTime": "1970-01-02",
  449. "repayTime": 0,
  450. "year": "0.00",
  451. "ben": "1000.00",
  452. "yearSystem": "0.00",
  453. "interest": "0.00",
  454. "investDay": 0,
  455. "interestTimeTypeID": 0,
  456. "isForged": 1,
  457. "yearExt": "0.00",
  458. "hongbao": "",
  459. "outerNumber": "",
  460. "osType": 0,
  461. "ip": "",
  462. "money": "0.00",
  463. "BACKUPID": 0,
  464. "masterID": "",
  465. "isFutou": 0,
  466. "user": {
  467. "userID": 17653,
  468. "uuid": "",
  469. "trueName": "冯伞",
  470. "mobile": "13715988654",
  471. "password": "12365478966555555512222222222222",
  472. "channelID": 0,
  473. "passport": "",
  474. "addTime": "1970-01-01 08:00:00",
  475. "updateTime": "1970-01-01 08:00:00",
  476. "status": 0,
  477. "token": "",
  478. "tokenOverTime": 0,
  479. "isAuthTrueName": 0,
  480. "isAuthBank": 0,
  481. "isFuyougold": 0,
  482. "avatar": "http:\/\/slb.dahengdian.com\/jiaqiancaifu\/2018\/01\/03\/V5KL8LKbLE.png",
  483. "gender": 0,
  484. "areaID": 0,
  485. "deviceID": "",
  486. "osV": "",
  487. "osType": 0,
  488. "ip": "",
  489. "isForged": 1,
  490. "isNewInvest": 0,
  491. "tokenWap": "",
  492. "tokenPc": "",
  493. "tokenOverTimeWap": 0,
  494. "tokenOverTimePc": 0,
  495. "loginTime": "",
  496. "loginOsType": 0,
  497. "vip": 0,
  498. "email": "",
  499. "BACKUPID": 0,
  500. "apiV": "",
  501. "appV": ""
  502. }
  503. }],
  504. "loan": {
  505. "loanID": 388,
  506. "mobile": "18989706775",
  507. "name": "金碎妹",
  508. "money": "190000.00",
  509. "year": "18.00",
  510. "certType": 1,
  511. "certContent": "330302195810051220",
  512. "pledge": "",
  513. "financingEntity": "",
  514. "usage": "资金周转",
  515. "addTime": "2018-02-08 11:46:22",
  516. "updateTime": "2018-02-08 11:46:22",
  517. "status": 1,
  518. "alias": "",
  519. "imageUrl": "http:\/\/slb.dahengdian.com\/jiaqiancaifu\/2018\/02\/08\/PEy3iz3KJv.jpg",
  520. "info": "本项目为个人资金周转借款,借款人以名下车辆(梅赛德斯-奔驰汽车)为抵质押物,还款来源有保障。借款人户籍所在地位于江西省。交易过程中佳乾财富平台绝不触碰投资人资金,资金由富友支付第三方支付平台全程托管,并在富友支付及银行的全程托管下直接在投资人及借款人账户流动。",
  521. "pledgeType": 1,
  522. "contractImageUrl": "http:\/\/slb.dahengdian.com\/jiaqiancaifu\/2018\/02\/08\/fcFMRLKvSv.jpg",
  523. "beginTime": 0,
  524. "endTime": 0
  525. }
  526. }
  527. }
  528. * @apiUse CreateUserError
  529. */