更新信息更新错误和时间问题
This commit is contained in:
parent
4bd5427158
commit
8297752d06
@ -42,7 +42,7 @@ class CeshiController extends BaseApiController
|
|||||||
|
|
||||||
// TaskTemplate::where('id',109)->update(['transaction_pool'=>bcadd($transaction_pool,$day_money,2)]);
|
// TaskTemplate::where('id',109)->update(['transaction_pool'=>bcadd($transaction_pool,$day_money,2)]);
|
||||||
// }
|
// }
|
||||||
$all=TaskSchedulingPlan::where('id',928)->with(['template_info','scheduling'])->select()->toArray();
|
$all=TaskSchedulingPlan::where('id',943)->with(['template_info','scheduling'])->select()->toArray();
|
||||||
foreach($all as $k=>$v){
|
foreach($all as $k=>$v){
|
||||||
queue(TaskInformationJob::class,$v);
|
queue(TaskInformationJob::class,$v);
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ return true;
|
|||||||
$plan_all = TaskScheduling::where('id',119)->with('company_info')->select()->toArray();
|
$plan_all = TaskScheduling::where('id',119)->with('company_info')->select()->toArray();
|
||||||
$plan_ids = [];
|
$plan_ids = [];
|
||||||
foreach ($plan_all as $k => $v) {
|
foreach ($plan_all as $k => $v) {
|
||||||
$all = TaskTemplate::where('id', 118)->where('task_scheduling', $v['id'])->limit(30)->select()->toArray();
|
$all = TaskTemplate::where('id', 116)->where('task_scheduling', $v['id'])->limit(30)->select()->toArray();
|
||||||
$plan_ids[] = $v['id'];
|
$plan_ids[] = $v['id'];
|
||||||
if ($all) {
|
if ($all) {
|
||||||
$plan_all[$k]['template'] = $all;
|
$plan_all[$k]['template'] = $all;
|
||||||
|
@ -74,6 +74,8 @@ class TaskLogic extends BaseLogic
|
|||||||
public static function CronAdd(array $v, $datas): bool
|
public static function CronAdd(array $v, $datas): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
TaskTemplate::where('id', $v['id'])->inc('information_day_count', 5)->update();
|
||||||
|
return true;
|
||||||
if ($v['types'] == 3) {
|
if ($v['types'] == 3) {
|
||||||
return true;
|
return true;
|
||||||
// $task = Task::where('template_id', $v['id'])->find();
|
// $task = Task::where('template_id', $v['id'])->find();
|
||||||
|
@ -33,6 +33,7 @@ class TaskInformationJob
|
|||||||
if ($data['template_info']['information_count'] < $data['template_info']['information_day_count']) {
|
if ($data['template_info']['information_count'] < $data['template_info']['information_day_count']) {
|
||||||
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]);
|
||||||
|
TaskTemplate::where('id',$data['template_id'])->update(['information_count'=>$data['template_info']['information_day_count']]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$name = '小组队长';
|
$name = '小组队长';
|
||||||
@ -83,7 +84,7 @@ class TaskInformationJob
|
|||||||
}elseif
|
}elseif
|
||||||
//入股任务
|
//入股任务
|
||||||
($data['template_info']['type'] == 35){
|
($data['template_info']['type'] == 35){
|
||||||
$task_35 = Task::where('id', $data['task_id'])->field('director_uid,status,money')->with('director_info')->find();
|
$task_35 = Task::where('id', $data['task_id'])->field('director_uid,status,money,start_time,end_time')->with('director_info')->find();
|
||||||
if($task_35){
|
if($task_35){
|
||||||
$day= $data['template_info']['stage_day_one'] + $data['template_info']['stage_day_two'];
|
$day= $data['template_info']['stage_day_one'] + $data['template_info']['stage_day_two'];
|
||||||
if($task_35['status']==3 && $data['template_info']['day_count']<=$day){
|
if($task_35['status']==3 && $data['template_info']['day_count']<=$day){
|
||||||
@ -93,8 +94,7 @@ class TaskInformationJob
|
|||||||
$arr['company_account_type'] = 2;
|
$arr['company_account_type'] = 2;
|
||||||
}else{
|
}else{
|
||||||
if($data['template_info']['day_count']<=$day){
|
if($data['template_info']['day_count']<=$day){
|
||||||
$time = strtotime(date('Y-m-d'));
|
Task::where('id', $data['task_id'])->update(['create_time' => $task_35['start_time']+86400,'update_time' =>time(),'start_time'=>$task_35['start_time']+86400,'end_time'=> strtotime($task_35['end_time']) + 86400]);
|
||||||
Task::where('id', $data['task_id'])->update(['create_time' => $time,'end_time' => $time + 86399,'start_time'=>$time,'end_time'=> $time + 86399]);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($data['template_info']['day_count']>$day){
|
if($data['template_info']['day_count']>$day){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user