This commit is contained in:
mkm 2023-08-24 11:52:56 +08:00
parent 049c3adada
commit 1792656101
4 changed files with 23 additions and 9 deletions

View File

@ -120,6 +120,9 @@ class IndexController extends BaseApiController
return json(['success' => true, 'msg' => '成功']);
}
/**
* 资产回调
*/
public function notifyProperty()
{
$parmas = Request()->post();

View File

@ -102,13 +102,22 @@ class RemoteController extends BaseApiController
public function shang_date_list($company,$is_day,$querys){
if($is_day==1){
$yesterday = date('Y-m-d');
$start_time = date('Y-m-d');
$time=strtotime($start_time)+86399;
$end_time=date('Y-m-d H:i:s',$time);
}else{
$yesterday = date('Y-m-d',strtotime('-1 day', time()));
$start_time = date('Y-m-d',strtotime('-1 day', time()));
$time=strtotime($start_time)+86399;
$end_time=date('Y-m-d H:i:s',$time);
}
if(isset($arr['start_time']) && $arr['end_time']){
$start_time = $arr['start_time'];
$end_time = $arr['end_time'];
}
$parmas = [
"start_date" => $yesterday,
"end_date" => $yesterday
"start_date" => $start_time,
"end_date" => $end_time
];
switch ($company['company_type']) {
case 18:

View File

@ -67,13 +67,14 @@ class TaskController extends BaseApiController
public function order_detail()
{
$parmas = $this->request->param();
$company_id=Task::where('id',$parmas['id'])->value('company_id');
if(!$company_id){
$task=Task::where('id',$parmas['id'])->field('company_id,start_time,end_time')->find();
if(!$task){
return $this->fail('任务不存在');
}
$company = Company::where('id', $company_id)->field('id,deposit,company_money,user_id,day_count,company_type,province,city,area,street,village,brigade')->find(); // 可能要判断预存金是否满足
$company = Company::where('id', $task['company_id'])->field('id,deposit,company_money,user_id,day_count,company_type,province,city,area,street,village,brigade')->find(); // 可能要判断预存金是否满足
$find = App(RemoteController::class)->shang_date_total_price($company);
$parmas['start_time']=$company['start_time'];
$parmas['end_time']=$company['end_time'];
$list = App(RemoteController::class)->shang_date_list($company, 1, $parmas);
if ($find != false) {
$find['list'] = $list;

View File

@ -44,7 +44,8 @@ class TaskInformationJob
Log::info('任务结算失败,交易金额未达到要求:' . json_encode($data));
Task::where('id', $data['task_id'])->update(['status' => 5,'extend'=>json_encode($shang_date_total_price)]);
return false;
}else{
}
if($shang_date_total_price['arr']['total_price']>$shang_date_total_price['arr']['day_money']){
Task::where('id', $data['task_id'])->update(['status' => 3,'extend'=>json_encode($shang_date_total_price)]);
}
$name = $shang_date_total_price['name'];