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.

364 lines
9.9 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. $desc='新用户奖励',
  23. $comment='',
  24. $user_type=FinancialRecord::USER_TYPE_CS,
  25. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  26. $money_type=FinancialRecord::MONEY_TYPE_CS_PLAT_NEW_USER
  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. $desc='新用户首单奖励',
  45. $comment='',
  46. $user_type=FinancialRecord::USER_TYPE_CS,
  47. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  48. $money_type=FinancialRecord::MONEY_TYPE_CS_FIRST_ORDER
  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. $desc='用户订单分成',
  67. $comment='',
  68. $user_type=FinancialRecord::USER_TYPE_CS,
  69. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  70. $money_type=FinancialRecord::MONEY_TYPE_CS_OL_ORDER
  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. $desc='新用户下单奖励',
  100. $comment='',
  101. $user_type=FinancialRecord::USER_TYPE_STORE,
  102. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  103. $money_type=FinancialRecord::MONEY_TYPE_STORE_PLAT_NEW_USER
  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. $desc='用户店铺首单奖励',
  122. $comment='',
  123. $user_type=FinancialRecord::USER_TYPE_STORE,
  124. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  125. $money_type=FinancialRecord::MONEY_TYPE_STORE_FIRST_ORDER
  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. $desc='用户下单(线下)',
  144. $comment='',
  145. $user_type=FinancialRecord::USER_TYPE_USER,
  146. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  147. $money_type=FinancialRecord::MONEY_TYPE_USER_OFL_ORDER
  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. $desc='用户下单(线上)',
  166. $comment='',
  167. $user_type=FinancialRecord::USER_TYPE_USER,
  168. $source_type=FinancialRecord::SOURCE_TYPE_ORDER,
  169. $money_type=FinancialRecord::MONEY_TYPE_USER_OL_ORDER
  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. $desc='线上外卖订单收入',
  188. $comment='',
  189. $user_type = FinancialRecord::USER_TYPE_STORE,
  190. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  191. $money_type = FinancialRecord::MONEY_TYPE_STORE_OL_ORDER_COMP
  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. $desc='线下当面付订单收入',
  210. $comment='',
  211. $user_type = FinancialRecord::USER_TYPE_STORE,
  212. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  213. $money_type = FinancialRecord::MONEY_TYPE_STORE_OFL_ORDER_COMP
  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. $desc='线上订单退款',
  232. $comment='',
  233. $user_type = FinancialRecord::USER_TYPE_STORE,
  234. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  235. $money_type = FinancialRecord::MONEY_TYPE_STORE_OFL_ORDER_COMP
  236. );
  237. /**
  238. * 市场经理新用户
  239. * @param $user_id
  240. * @param $source_id
  241. * @param $money
  242. * @param int $user_type
  243. * @param int $source_type
  244. * @param int $money_type
  245. * @param string $desc
  246. * @param string $comment
  247. */
  248. public function mmAwardByPlatNewUser(
  249. $user_id,
  250. $source_id,
  251. $money,
  252. $desc = '市场经理发展新用户',
  253. $comment = '',
  254. $user_type = FinancialRecord::USER_TYPE_MM,
  255. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  256. $money_type = FinancialRecord::MONEY_TYPE_MM_PLAT_NEW_USER
  257. );
  258. /**
  259. * 市场经理新商户
  260. * @param $user_id
  261. * @param $source_id
  262. * @param $money
  263. * @param int $user_type
  264. * @param int $source_type
  265. * @param int $money_type
  266. * @param string $desc
  267. * @param string $comment
  268. * @return mixed
  269. */
  270. public function mmAwardByNewStore(
  271. $user_id,
  272. $source_id,
  273. $money,
  274. $desc = '市场经理发展新商户',
  275. $comment = '市场经理发展新商户奖励',
  276. $user_type = FinancialRecord::USER_TYPE_MM,
  277. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  278. $money_type = FinancialRecord::MONEY_TYPE_MM_PLAT_NEW_STORE
  279. );
  280. /**
  281. * 服务商新用户
  282. * @param $user_id
  283. * @param $source_id
  284. * @param $money
  285. * @param int $user_type
  286. * @param int $source_type
  287. * @param int $money_type
  288. * @param string $desc
  289. * @param string $comment
  290. * @return mixed
  291. */
  292. public function mpAwardByPlatNewUser(
  293. $user_id,
  294. $source_id,
  295. $money,
  296. $desc = '服务商发展新用户',
  297. $comment = '服务商发展新用户奖励',
  298. $user_type = FinancialRecord::USER_TYPE_MP,
  299. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  300. $money_type = FinancialRecord::MONEY_TYPE_MP_PLAT_NEW_USER
  301. );
  302. /**
  303. * 服务商新商户
  304. * @param $user_id
  305. * @param $source_id
  306. * @param $money
  307. * @param int $user_type
  308. * @param int $source_type
  309. * @param int $money_type
  310. * @param string $desc
  311. * @param string $comment
  312. * @return mixed
  313. */
  314. public function mpAwardByNewStore(
  315. $user_id,
  316. $source_id,
  317. $money,
  318. $desc = '服务商发展新商户',
  319. $comment = '服务商发展新商户奖励',
  320. $user_type = FinancialRecord::USER_TYPE_MP,
  321. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  322. $money_type = FinancialRecord::MONEY_TYPE_MP_PLAT_NEW_STORE
  323. );
  324. /**
  325. * 服务商线上订单分账
  326. * @param $user_id
  327. * @param $source_id
  328. * @param $money
  329. * @param int $user_type
  330. * @param int $source_type
  331. * @param int $money_type
  332. * @param string $desc
  333. * @param string $comment
  334. * @return mixed
  335. */
  336. public function mpSeparateAccountByOLOrderComp(
  337. $user_id,
  338. $source_id,
  339. $money,
  340. $desc = '服务商线上订单分账',
  341. $comment = '服务商用户线上订单完成后分账',
  342. $user_type = FinancialRecord::USER_TYPE_MP,
  343. $source_type = FinancialRecord::SOURCE_TYPE_ORDER,
  344. $money_type = FinancialRecord::MONEY_TYPE_MP_OL_ORDER
  345. );
  346. }