修复任务
This commit is contained in:
parent
a3032f03f4
commit
004f4bace4
@ -82,7 +82,8 @@ class TaskLogic extends BaseLogic
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$v['day_count']=$v['day_count']+1;
|
$v_day_count=$v['day_count'];
|
||||||
|
$v_day_count=$v_day_count+1;
|
||||||
$time = strtotime(date('Y-m-d'));
|
$time = strtotime(date('Y-m-d'));
|
||||||
$TaskSchedulingPlan_data = [
|
$TaskSchedulingPlan_data = [
|
||||||
'create_user_id' => 0,
|
'create_user_id' => 0,
|
||||||
@ -158,10 +159,10 @@ class TaskLogic extends BaseLogic
|
|||||||
//基础金额*(每日基户数*天数)//且户数小于公司总户数
|
//基础金额*(每日基户数*天数)//且户数小于公司总户数
|
||||||
$user_count = UserInformationg::where('company_id', $v['company_id'])->count();
|
$user_count = UserInformationg::where('company_id', $v['company_id'])->count();
|
||||||
//
|
//
|
||||||
if ($v['day_count'] == 0) {
|
if ($v_day_count == 0) {
|
||||||
$user_count_two = 5 * 1;
|
$user_count_two = 5 * 1;
|
||||||
} else {
|
} else {
|
||||||
$user_count_two = 5 * $v['day_count'];
|
$user_count_two = 5 * $v_day_count;
|
||||||
}
|
}
|
||||||
if ($user_count_two > $user_count) {
|
if ($user_count_two > $user_count) {
|
||||||
$user_count_money = 58 * $user_count;
|
$user_count_money = 58 * $user_count;
|
||||||
@ -185,27 +186,29 @@ class TaskLogic extends BaseLogic
|
|||||||
//任务金额
|
//任务金额
|
||||||
private static function task_money($v, $datas)
|
private static function task_money($v, $datas)
|
||||||
{
|
{
|
||||||
|
$v_day_count=$v['day_count'];
|
||||||
|
$v_day_count=$v_day_count+1;
|
||||||
if ($v['types'] == 1 || $v['types'] == 3) {
|
if ($v['types'] == 1 || $v['types'] == 3) {
|
||||||
if ($v['day_count'] <= $v['stage_day_one']) {
|
if ($v_day_count <= $v['stage_day_one']) {
|
||||||
return $v['money'];
|
return $v['money'];
|
||||||
} else {
|
} else {
|
||||||
return $v['money_two'];
|
return $v['money_two'];
|
||||||
}
|
}
|
||||||
} elseif ($v['types'] == 2) {
|
} elseif ($v['types'] == 2) {
|
||||||
if ($v['day_count'] <= $v['stage_day_one']) {
|
if ($v_day_count<= $v['stage_day_one']) {
|
||||||
return $v['money'];
|
return $v['money'];
|
||||||
} elseif ($v['day_count'] <= $v['stage_day_two']) {
|
} elseif ($v_day_count <= $v['stage_day_two']) {
|
||||||
return $v['money_two'];
|
return $v['money_two'];
|
||||||
} else {
|
} else {
|
||||||
return $v['money_three'];
|
return $v['money_three'];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($v['day_count'] <= $v['stage_day_one']) {
|
if ($v_day_count <= $v['stage_day_one']) {
|
||||||
$a = $v['money'];
|
$a = $v['money'];
|
||||||
} else {
|
} else {
|
||||||
$a = $v['money_two'];
|
$a = $v['money_two'];
|
||||||
}
|
}
|
||||||
if ($v['day_count'] >= $v['stage_day_two']) {
|
if ($v_day_count >= $v['stage_day_two']) {
|
||||||
TaskTemplate::where('id', $v['id'])->update(['status' => 0]);
|
TaskTemplate::where('id', $v['id'])->update(['status' => 0]);
|
||||||
}
|
}
|
||||||
return $a;
|
return $a;
|
||||||
|
@ -51,7 +51,7 @@ class TaskInformationJob
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$transaction_pool=$data['template_info']['transaction_pool'];//交易金额剩余池
|
$transaction_pool=$data['template_info']['transaction_pool'];//交易金额剩余池
|
||||||
$count_money=bcadd($shang_date_total_price['arr']['total_price'],$transaction_pool,2);
|
$count_money=bcadd($shang_date_total_price['arr']['total_price'],$transaction_pool,2);//交易金额加资金池金额
|
||||||
if($count_money>$shang_date_total_price['arr']['day_money']){
|
if($count_money>$shang_date_total_price['arr']['day_money']){
|
||||||
$day_money=bcsub($count_money,$shang_date_total_price['arr']['day_money'],2);//当计算剩余池before_transaction_pool
|
$day_money=bcsub($count_money,$shang_date_total_price['arr']['day_money'],2);//当计算剩余池before_transaction_pool
|
||||||
$shang_date_total_price['arr']['before_transaction_pool']=$transaction_pool;//变化前
|
$shang_date_total_price['arr']['before_transaction_pool']=$transaction_pool;//变化前
|
||||||
@ -62,7 +62,7 @@ class TaskInformationJob
|
|||||||
$shang_date_total_price['arr']['status']=1;
|
$shang_date_total_price['arr']['status']=1;
|
||||||
}else{
|
}else{
|
||||||
Log::info('交易金额任务,交易金额小于今日金额:' . json_encode($data));
|
Log::info('交易金额任务,交易金额小于今日金额:' . json_encode($data));
|
||||||
Task::where('id', $data['task_id'])->update(['status' => 5]);
|
Task::where('id', $data['task_id'])->update(['status' => 5,'transaction_pool'=>$count_money]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$name = $shang_date_total_price['name'];
|
$name = $shang_date_total_price['name'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user