You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

251 lines
6.7 KiB

  1. <?php
  2. namespace App\Service;
  3. use App\Model\FinancialRecord;
  4. interface FinancialRecordServiceInterface
  5. {
  6. /**
  7. * 社区服务点新用户奖励
  8. * @param $user_id
  9. * @param $source_id
  10. * @param $money
  11. * @param int $user_type
  12. * @param int $source_type
  13. * @param int $money_type
  14. * @param string $comment
  15. * @param string $desc
  16. * @return mixed
  17. */
  18. public function communityAwardByPlatNewUser(
  19. $user_id,
  20. $source_id,
  21. $money,
  22. $user_type=FinancialRecord::USER_TYPE_CS,
  23. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  24. $money_type=FinancialRecord::MONEY_TYPE_CS_PLAT_NEW_USER,
  25. $desc='新用户奖励',
  26. $comment=''
  27. );
  28. /**
  29. * 社区服务点新用户线上首单奖励
  30. * @param $user_id
  31. * @param $source_id
  32. * @param $money
  33. * @param int $user_type
  34. * @param int $source_type
  35. * @param int $money_type
  36. * @param string $comment
  37. * @param string $desc
  38. * @return mixed
  39. */
  40. public function communityAwardByPlatNewUserFirstOLOrder(
  41. $user_id,
  42. $source_id,
  43. $money,
  44. $user_type=FinancialRecord::USER_TYPE_CS,
  45. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  46. $money_type=FinancialRecord::MONEY_TYPE_CS_FIRST_ORDER,
  47. $desc='新用户首单奖励',
  48. $comment=''
  49. );
  50. /**
  51. * 社区服务点用户订单完成分账
  52. * @param $user_id
  53. * @param $source_id
  54. * @param $money
  55. * @param int $user_type
  56. * @param int $source_type
  57. * @param int $money_type
  58. * @param string $comment
  59. * @param string $desc
  60. * @return mixed
  61. */
  62. public function communitySeparateAccountsByOrderComp(
  63. $user_id,
  64. $source_id,
  65. $money,
  66. $user_type=FinancialRecord::USER_TYPE_CS,
  67. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  68. $money_type=FinancialRecord::MONEY_TYPE_CS_OL_ORDER,
  69. $desc='用户订单分成',
  70. $comment=''
  71. );
  72. /**
  73. * 收支总账
  74. * @param $source_id
  75. * @param $money
  76. * @param $source_type
  77. * @param $money_type
  78. * @param $desc
  79. * @param string $comment
  80. * @return mixed
  81. */
  82. public function ledgerAccounts($source_id, $money, $source_type, $money_type, $desc, $comment='');
  83. /**
  84. * 商户线下用户支付新用户奖励
  85. * @param $user_id
  86. * @param $source_id
  87. * @param $money
  88. * @param int $user_type
  89. * @param int $source_type
  90. * @param int $money_type
  91. * @param string $desc
  92. * @param string $comment
  93. * @return mixed
  94. */
  95. public function storeAwardByPlatNewUserOFLOrder(
  96. $user_id,
  97. $source_id,
  98. $money,
  99. $user_type=FinancialRecord::USER_TYPE_STORE,
  100. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  101. $money_type=FinancialRecord::MONEY_TYPE_STORE_PLAT_NEW_USER,
  102. $desc='新用户下单奖励',
  103. $comment=''
  104. );
  105. /**
  106. * 商户线下用户支付用户当日首单奖励
  107. * @param $user_id
  108. * @param $source_id
  109. * @param $money
  110. * @param int $user_type
  111. * @param int $source_type
  112. * @param int $money_type
  113. * @param string $desc
  114. * @param string $comment
  115. * @return mixed
  116. */
  117. public function storeAwardByTodayFirstOFLOrder(
  118. $user_id,
  119. $source_id,
  120. $money,
  121. $user_type=FinancialRecord::USER_TYPE_STORE,
  122. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  123. $money_type=FinancialRecord::MONEY_TYPE_STORE_FIRST_ORDER,
  124. $desc='用户店铺首单奖励',
  125. $comment=''
  126. );
  127. /**
  128. * 用户线下订单支付流水
  129. * @param $user_id
  130. * @param $source_id
  131. * @param $money
  132. * @param int $user_type
  133. * @param int $source_type
  134. * @param int $money_type
  135. * @param string $desc
  136. * @param string $comment
  137. * @return mixed
  138. */
  139. public function userByOFLOrderPaid(
  140. $user_id,
  141. $source_id,
  142. $money,
  143. $user_type=FinancialRecord::USER_TYPE_USER,
  144. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  145. $money_type=FinancialRecord::MONEY_TYPE_USER_OFL_ORDER,
  146. $desc='用户下单(线下)',
  147. $comment=''
  148. );
  149. /**
  150. * 用户线上订单支付流水
  151. * @param $user_id
  152. * @param $source_id
  153. * @param $money
  154. * @param int $user_type
  155. * @param int $source_type
  156. * @param int $money_type
  157. * @param string $desc
  158. * @param string $comment
  159. * @return mixed
  160. */
  161. public function userByOLOrderPaid(
  162. $user_id,
  163. $source_id,
  164. $money,
  165. $user_type=FinancialRecord::USER_TYPE_USER,
  166. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  167. $money_type=FinancialRecord::MONEY_TYPE_USER_OL_ORDER,
  168. $desc='用户下单(线上)',
  169. $comment=''
  170. );
  171. /**
  172. * 商户线上订单完成收入流水
  173. * @param $user_id
  174. * @param $source_id
  175. * @param $money
  176. * @param int $user_type
  177. * @param int $source_type
  178. * @param int $money_type
  179. * @param string $desc
  180. * @param string $comment
  181. * @return mixed
  182. */
  183. public function storeByOLOrderComp(
  184. $user_id,
  185. $source_id,
  186. $money,
  187. $user_type = FinancialRecord::USER_TYPE_STORE,
  188. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  189. $money_type = FinancialRecord::MONEY_TYPE_STORE_OL_ORDER_COMP,
  190. $desc='线上外卖订单收入',
  191. $comment=''
  192. );
  193. /**
  194. * 商户线下订单完成收入流水
  195. * @param $user_id
  196. * @param $source_id
  197. * @param $money
  198. * @param int $user_type
  199. * @param int $source_type
  200. * @param int $money_type
  201. * @param string $desc
  202. * @param string $comment
  203. * @return mixed
  204. */
  205. public function storeByOFLOrderComp(
  206. $user_id,
  207. $source_id,
  208. $money,
  209. $user_type = FinancialRecord::USER_TYPE_STORE,
  210. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  211. $money_type = FinancialRecord::MONEY_TYPE_STORE_OFL_ORDER_COMP,
  212. $desc='线下当面付订单收入',
  213. $comment=''
  214. );
  215. /**
  216. * 线上订单退款流水
  217. * @param $user_id
  218. * @param $source_id
  219. * @param $money
  220. * @param int $user_type
  221. * @param int $source_type
  222. * @param int $money_type
  223. * @param string $desc
  224. * @param string $comment
  225. * @return mixed
  226. */
  227. public function userByOLOrderRefund(
  228. $user_id,
  229. $source_id,
  230. $money,
  231. $user_type = FinancialRecord::USER_TYPE_STORE,
  232. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  233. $money_type = FinancialRecord::MONEY_TYPE_STORE_OFL_ORDER_COMP,
  234. $desc='线上订单退款',
  235. $comment=''
  236. );
  237. }