Cang.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <?php
  2. /**
  3. * @api {post} cang/create 投资一个标的
  4. * @apiVersion 1.0.0
  5. * @apiName create
  6. * @apiDescription 投资一个标的
  7. * @apiGroup Cang
  8. *
  9. * @apiParam {String} moneySubject 投资金额(相对标的金额,非本金,非支付金额)
  10. * @apiParam {Array} [hongbaoIDS] 红包ID列表
  11. * @apiParam {Number} subjectID 标的ID
  12. * @apiParamExample {json} 发送报文:
  13. {
  14. "app": {
  15. "moneySubject": "1000.00",
  16. "hongbaoIDS": [12,13],
  17. "subjectID": 19
  18. },
  19. "sign": "4297f44b13955235245b2497399d7a93"
  20. }
  21. *
  22. * @apiSuccess {Number} cangID 新生成的持仓ID
  23. * @apiSuccessExample {json} 返回json数据(举例):
  24. {
  25. "code": 1,
  26. "msg": "操作成功",
  27. "content": {
  28. "cangID": "6"
  29. },
  30. "sign": "4297f44b13955235245b2497399d7a93"
  31. }
  32. * @apiUse CreateUserError
  33. */
  34. /**
  35. * @api {post} cang/getCangList 得到我的投资列表
  36. * @apiVersion 1.0.0
  37. * @apiName getCangList
  38. * @apiDescription 得到我的投资列表
  39. * @apiGroup Cang
  40. *
  41. * @apiParam {Number=[1,2]} status 1为持有中,2为已回款
  42. * @apiParamExample {json} 发送报文:
  43. {
  44. "status": 1
  45. }
  46. *
  47. * @apiSuccess {Object[]} cangList 我的投资列表
  48. * @apiSuccess {Number} cangList.cangID ID
  49. * @apiSuccess {Number} cangList.moneySubject 投资份额(非本金,非实际支付金额)
  50. * @apiSuccess {Number} cangList.status 状态,1-已持有,4-已计息,5-已回款
  51. * @apiSuccess {String} cangList.statusText 状态描述,参考状态
  52. * @apiSuccess {String} cangList.payTime 交易时间
  53. * @apiSuccess {String} cangList.interestBeginTime 起息日期
  54. * @apiSuccess {String} cangList.interestEndTime 停止计息日
  55. * @apiSuccess {String} cangList.repayTimeText 回款时间描述
  56. * @apiSuccess {String} cangList.year 年化
  57. * @apiSuccess {String} cangList.yearExt 追加年化
  58. * @apiSuccess {String} cangList.yearSystem 系统年化(废弃)
  59. * @apiSuccess {String} cangList.ben 实际投入本金
  60. * @apiSuccess {String} cangList.interest 利息
  61. * @apiSuccess {Number} cangList.investDay 投资天数
  62. * @apiSuccess {Object} cangList.subject 相关标的
  63. * @apiSuccess {String} cangList.subject.title 标的标题
  64. * @apiSuccess {Number} cangList.subject.subjectTypeID 标的类型
  65. * @apiSuccess {Number} cangList.subject.interestTypeID 计息类型
  66. * @apiSuccess {Number} cangList.subject.interestTimeTypeID 计息时间类型
  67. * @apiSuccess {String} cangList.subject.reachTime 标的标题
  68. * @apiSuccess {String} cangList.subject.title 标的标题
  69. * @apiSuccess {Object[]} cangList.cangRepay 预回款清单
  70. * @apiSuccess {String} cangList.cangRepay.money 回款金额
  71. * @apiSuccess {String} cangList.cangRepay.repayTime 回款类型
  72. * @apiSuccess {String} cangList.cangRepay.resultTime 实际到款时间
  73. * @apiSuccess {String} cangList.cangRepay.reachTime 到款时间
  74. * @apiSuccess {Number} cangList.cangRepay.status 清单状态,1-未回款,2-已回款,3-已到账(该状态可隐藏)
  75. * @apiSuccess {Number} cangList.cangRepay.repayTypeID 清单类型,1-本金,2-利息
  76. * @apiSuccessExample {json} 返回json数据(举例):
  77. {
  78. "code": 1,
  79. "msg": "操作成功",
  80. "content": {
  81. "cangList": [
  82. {
  83. "cangID": 33,
  84. "moneySubject": "2000.00",
  85. "status": 4,
  86. "payTime": "2017-12-12 20:53:50",
  87. "interestBeginTime": "2017-12-12",
  88. "interestEndTime": "2017-12-23",
  89. "year": "12.80",
  90. "yearExt": "2.00",
  91. "yearSystem": "2.00",
  92. "ben": "2000.00",
  93. "interest": "7.01",
  94. "investDay": 10,
  95. "subject": {
  96. "subjectTypeID": 2,
  97. "interestTypeID": 1,
  98. "interestTimeTypeID": 1,
  99. "title": "普通标11111"
  100. },
  101. "cangRepay": [
  102. {
  103. "money": "2000.00",
  104. "repayTime": "2017-12-22",
  105. "reachTime": "2017-12-23",
  106. "resultTime": "2017-12-12",
  107. "status": 1,
  108. "repayTypeID": 1
  109. },
  110. {
  111. "money": "7.01",
  112. "repayTime": "2017-12-22",
  113. "reachTime": "2017-12-23",
  114. "resultTime": "2017-12-12",
  115. "status": 1,
  116. "repayTypeID": 2
  117. }
  118. ],
  119. "statusText": "计息中"
  120. },
  121. {
  122. "cangID": 30,
  123. "moneySubject": "98000.00",
  124. "status": 4,
  125. "payTime": "2017-12-12 18:28:27",
  126. "interestBeginTime": "2017-12-12",
  127. "year": "12.80",
  128. "ben": "98000.00",
  129. "interest": "343.67",
  130. "investDay": 10,
  131. "subject": {
  132. "subjectTypeID": 2,
  133. "interestTypeID": 1,
  134. "interestTimeTypeID": 1,
  135. "title": "普通标11111"
  136. },
  137. "cangRepay": [
  138. {
  139. "money": "98000.00",
  140. "repayTime": "2017-12-22",
  141. "reachTime": "2017-12-23",
  142. "resultTime": "2017-12-12",
  143. "status": 1,
  144. "repayTypeID": 1
  145. },
  146. {
  147. "money": "343.67",
  148. "repayTime": "2017-12-22",
  149. "reachTime": "2017-12-23",
  150. "resultTime": "2017-12-12",
  151. "status": 1,
  152. "repayTypeID": 2
  153. }
  154. ],
  155. "statusText": "计息中"
  156. }
  157. ]
  158. },
  159. "sign": "4297f44b13955235245b2497399d7a93"
  160. }
  161. * @apiUse CreateUserError
  162. */