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.
365 lines
9.9 KiB
365 lines
9.9 KiB
<?php
|
|
|
|
namespace App\Service;
|
|
|
|
use App\Model\FinancialRecord;
|
|
|
|
interface FinancialRecordServiceInterface
|
|
{
|
|
|
|
/**
|
|
* 社区服务点新用户奖励
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $comment
|
|
* @param string $desc
|
|
* @return mixed
|
|
*/
|
|
public function communityAwardByPlatNewUser(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc='新用户奖励',
|
|
$comment='',
|
|
$user_type=FinancialRecord::USER_TYPE_CS,
|
|
$source_type=FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type=FinancialRecord::MONEY_TYPE_CS_PLAT_NEW_USER
|
|
);
|
|
|
|
/**
|
|
* 社区服务点新用户线上首单奖励
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $comment
|
|
* @param string $desc
|
|
* @return mixed
|
|
*/
|
|
public function communityAwardByPlatNewUserFirstOLOrder(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc='新用户首单奖励',
|
|
$comment='',
|
|
$user_type=FinancialRecord::USER_TYPE_CS,
|
|
$source_type=FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type=FinancialRecord::MONEY_TYPE_CS_FIRST_ORDER
|
|
);
|
|
|
|
/**
|
|
* 社区服务点用户订单完成分账
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $comment
|
|
* @param string $desc
|
|
* @return mixed
|
|
*/
|
|
public function communitySeparateAccountsByOrderComp(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc='用户订单分成',
|
|
$comment='',
|
|
$user_type=FinancialRecord::USER_TYPE_CS,
|
|
$source_type=FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type=FinancialRecord::MONEY_TYPE_CS_OL_ORDER
|
|
);
|
|
|
|
/**
|
|
* 收支总账
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param $source_type
|
|
* @param $money_type
|
|
* @param $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function ledgerAccounts($source_id, $money, $source_type, $money_type, $desc, $comment='');
|
|
|
|
/**
|
|
* 商户线下用户支付新用户奖励
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function storeAwardByPlatNewUserOFLOrder(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc='新用户下单奖励',
|
|
$comment='',
|
|
$user_type=FinancialRecord::USER_TYPE_STORE,
|
|
$source_type=FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type=FinancialRecord::MONEY_TYPE_STORE_PLAT_NEW_USER
|
|
);
|
|
|
|
/**
|
|
* 商户线下用户支付用户当日首单奖励
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function storeAwardByTodayFirstOFLOrder(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc='用户店铺首单奖励',
|
|
$comment='',
|
|
$user_type=FinancialRecord::USER_TYPE_STORE,
|
|
$source_type=FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type=FinancialRecord::MONEY_TYPE_STORE_FIRST_ORDER
|
|
);
|
|
|
|
/**
|
|
* 用户线下订单支付流水
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function userByOFLOrderPaid(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc='用户下单(线下)',
|
|
$comment='',
|
|
$user_type=FinancialRecord::USER_TYPE_USER,
|
|
$source_type=FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type=FinancialRecord::MONEY_TYPE_USER_OFL_ORDER
|
|
);
|
|
|
|
/**
|
|
* 用户线上订单支付流水
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function userByOLOrderPaid(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc='用户下单(线上)',
|
|
$comment='',
|
|
$user_type=FinancialRecord::USER_TYPE_USER,
|
|
$source_type=FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type=FinancialRecord::MONEY_TYPE_USER_OL_ORDER
|
|
);
|
|
|
|
/**
|
|
* 商户线上订单完成收入流水
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function storeByOLOrderComp(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc='线上外卖订单收入',
|
|
$comment='',
|
|
$user_type = FinancialRecord::USER_TYPE_STORE,
|
|
$source_type = FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type = FinancialRecord::MONEY_TYPE_STORE_OL_ORDER_COMP
|
|
);
|
|
|
|
/**
|
|
* 商户线下订单完成收入流水
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function storeByOFLOrderComp(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc='线下当面付订单收入',
|
|
$comment='',
|
|
$user_type = FinancialRecord::USER_TYPE_STORE,
|
|
$source_type = FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type = FinancialRecord::MONEY_TYPE_STORE_OFL_ORDER_COMP
|
|
);
|
|
|
|
/**
|
|
* 线上订单退款流水
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function userByOLOrderRefund(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc='线上订单退款',
|
|
$comment='',
|
|
$user_type = FinancialRecord::USER_TYPE_STORE,
|
|
$source_type = FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type = FinancialRecord::MONEY_TYPE_STORE_OFL_ORDER_COMP
|
|
);
|
|
|
|
/**
|
|
* 市场经理新用户
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
*/
|
|
public function mmAwardByPlatNewUser(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc = '市场经理发展新用户',
|
|
$comment = '',
|
|
$user_type = FinancialRecord::USER_TYPE_MM,
|
|
$source_type = FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type = FinancialRecord::MONEY_TYPE_MM_PLAT_NEW_USER
|
|
);
|
|
|
|
/**
|
|
* 市场经理新商户
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function mmAwardByNewStore(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc = '市场经理发展新商户',
|
|
$comment = '市场经理发展新商户奖励',
|
|
$user_type = FinancialRecord::USER_TYPE_MM,
|
|
$source_type = FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type = FinancialRecord::MONEY_TYPE_MM_PLAT_NEW_STORE
|
|
);
|
|
|
|
/**
|
|
* 服务商新用户
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function mpAwardByPlatNewUser(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc = '服务商发展新用户',
|
|
$comment = '服务商发展新用户奖励',
|
|
$user_type = FinancialRecord::USER_TYPE_MP,
|
|
$source_type = FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type = FinancialRecord::MONEY_TYPE_MP_PLAT_NEW_USER
|
|
);
|
|
|
|
/**
|
|
* 服务商新商户
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function mpAwardByNewStore(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc = '服务商发展新商户',
|
|
$comment = '服务商发展新商户奖励',
|
|
$user_type = FinancialRecord::USER_TYPE_MP,
|
|
$source_type = FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type = FinancialRecord::MONEY_TYPE_MP_PLAT_NEW_STORE
|
|
);
|
|
|
|
/**
|
|
* 服务商线上订单分账
|
|
* @param $user_id
|
|
* @param $source_id
|
|
* @param $money
|
|
* @param int $user_type
|
|
* @param int $source_type
|
|
* @param int $money_type
|
|
* @param string $desc
|
|
* @param string $comment
|
|
* @return mixed
|
|
*/
|
|
public function mpSeparateAccountByOLOrderComp(
|
|
$user_id,
|
|
$source_id,
|
|
$money,
|
|
$desc = '服务商线上订单分账',
|
|
$comment = '服务商用户线上订单完成后分账',
|
|
$user_type = FinancialRecord::USER_TYPE_MP,
|
|
$source_type = FinancialRecord::SOURCE_TYPE_ORDER,
|
|
$money_type = FinancialRecord::MONEY_TYPE_MP_OL_ORDER
|
|
);
|
|
}
|