fixed 应用软件推广

This commit is contained in:
chenbo 2023-11-18 18:25:17 +08:00
parent 2c26571b2e
commit 75d34b1a84
2 changed files with 3 additions and 3 deletions

View File

@ -674,7 +674,7 @@ class TaskController extends BaseApiController
$task = Task::where(['id'=>$param['id']])->find();
$taskTemplate = TaskTemplate::where(['id'=>$task['template_id']])->find();
$extend = $taskTemplate['extend'];
$extend['purchase_sales_info'][] = $param['purchase_sales_info'];
$extend['purchase_sales_info'] = $param['purchase_sales_info'];
$taskTemplate->save(['extend'=>json_encode($extend)]);
return $this->success('成功', []);
}

View File

@ -142,7 +142,7 @@ class TaskTemplateLogic extends BaseLogic
} else {
$taskScheduleAmount = 200;
}
$find=TaskTemplate::where('task_scheduling', $params['task_scheduling'])->where('company_id',$params['company_id'])->where('type',$params['type'])->field('id,types,type,money,money_two,money_three')->find();
$find=TaskTemplate::where('task_scheduling', $params['task_scheduling'])->where('company_id',$params['company_id'])->where('type',$params['type'])->field('id,types,type,money,money_two,money_three,extend')->find();
if($find && $find['id']!=$params['id']&&$params['type']==$find['type']){
self::setError('已经有同一种任务类型了');
return false;
@ -193,7 +193,7 @@ class TaskTemplateLogic extends BaseLogic
'types' => $params['types'],
'status' => $params['status'],
'content' => $params['content'],
'extend'=>json_encode($params['extend']),
'extend'=>json_encode(array_merge($find['extend'],$params['extend'])),
'stage_day_one' => $params['stage_day_one']??0,
'proportion_one' => $params['proportion_one']??0,
'stage_day_two' => $params['stage_day_two']??0,