This commit is contained in:
shengchanzhe 2024-01-14 16:01:42 +08:00
parent b7ad755ca7
commit 86dacbac4c
2 changed files with 4 additions and 5 deletions

View File

@ -58,7 +58,7 @@ class ProjectFollowUpLogic extends BaseLogic
'follow_stage' => $params['follow_stage'], 'follow_stage' => $params['follow_stage'],
'notes' => $params['notes'] ?? '', 'notes' => $params['notes'] ?? '',
'next_follow_up_date' => !empty($params['next_follow_up_date']) ? strtotime($params['next_follow_up_date']) : 0, 'next_follow_up_date' => !empty($params['next_follow_up_date']) ? strtotime($params['next_follow_up_date']) : 0,
'file' => !empty($params['file']) ? $params['file'] : null, 'file' => $params['file']?json_encode($params['file']) :'',
]); ]);
Project::where('id', $params['project_id'])->update([ Project::where('id', $params['project_id'])->update([
'status' => 1, 'status' => 1,
@ -101,7 +101,7 @@ class ProjectFollowUpLogic extends BaseLogic
'follow_stage' => $params['follow_stage'], 'follow_stage' => $params['follow_stage'],
'notes' => $params['notes'] ?? '', 'notes' => $params['notes'] ?? '',
'next_follow_up_date' => !empty($params['next_follow_up_date']) ? strtotime($params['next_follow_up_date']) : 0, 'next_follow_up_date' => !empty($params['next_follow_up_date']) ? strtotime($params['next_follow_up_date']) : 0,
'file' => !empty($params['file']) ? $params['file'] : null, 'file' => $params['file']?json_encode($params['file']) :'',
'update_time' => time(), 'update_time' => time(),
]); ]);
Db::commit(); Db::commit();

View File

@ -157,9 +157,8 @@ class ProjectFollowUpValidate extends BaseValidate
public function checkFile($value): bool|string public function checkFile($value): bool|string
{ {
if(!empty($value) && $value != ''){ if($value){
$annex = json_decode($value,true); if(!is_array($value)){
if(empty($annex) || !is_array($annex)){
return '附件格式错误'; return '附件格式错误';
} }
} }