This commit is contained in:
mkm 2023-08-17 17:12:49 +08:00
parent 325abcb995
commit 852f1d9599

View File

@ -11,9 +11,14 @@ class RemoteController extends BaseApiController
public array $notNeedLogin = ['index'];
public function shang_date_total_price($company)
public function shang_date_total_price($company,$is_day=1)
{
//strtotime('-1 day', time())
if($is_day==1){
$yesterday = date('Y-m-d');
}else{
$yesterday = date('Y-m-d',strtotime('-1 day', time()));
}
$parmas = [
"start_date" => $yesterday,
"end_date" => $yesterday
@ -52,6 +57,7 @@ class RemoteController extends BaseApiController
$res = HttpClient::create()->request('GET', 'https://crmeb-test.shop.lihaink.cn/api/order/statistics', [
'query' => $parmas,
]);
$json = json_decode($res->getContent(), true);
$arr['total_price'] = 0;
$arr['status'] = 0;