update 任务3结算

This commit is contained in:
chenbo 2023-11-08 13:58:06 +08:00
parent ee78dc4a7d
commit 64768d3302
2 changed files with 5 additions and 5 deletions

View File

@ -201,12 +201,12 @@ class ShopRequestLogic extends BaseLogic
}
/**
* 查询镇农科公司负责片区内的种养殖商户和供应链商户交易额
* 查询镇农科公司负责片区内的种养殖商户和供应链商户交易额 todo 商城还需确认种养殖商户是何种类型
*/
public static function getTownTradeAmount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/supply_chain_breeding_street_product_count', [
'query' => $param
]);
return json_decode($requestResponse->getContent(), true);
@ -222,7 +222,7 @@ class ShopRequestLogic extends BaseLogic
public static function getUserTradeAmount($param)
{
try {
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '', [
$requestResponse = HttpClient::create()->request('GET', env('url.shop_prefix'). '/api/statistics/store_order_user_trade_amount', [
'query' => $param
]);
return json_decode($requestResponse->getContent(), true);

View File

@ -885,7 +885,7 @@ class TaskLogic extends BaseLogic
'phone' => implode(',', $phoneList)
];
$result = ShopRequestLogic::getUserTradeAmount($param); // todo 对接接口
$tradeAmount = $result['data']['trade_amount'];
$tradeAmount = $result['data']['procure_amount'];
$totalAmount = bcadd($tradeAmount, $townTransactionPool, 2); // 总的交易金额 = 当日交易额 + 累计交易池
@ -928,7 +928,7 @@ class TaskLogic extends BaseLogic
'type' => 'street',
];
$result = ShopRequestLogic::getTownTradeAmount($param); // todo 对接接口
$tradeAmount = $result['data']['trade_amount'];
$tradeAmount = $result['data']['procure_amount'];
// 总交易额 交易池金额+商城交易额
$totalAmount = bcadd($townTransactionPool, $tradeAmount, 2);