作者 李宇航

合并分支 'lyh-server' 到 'master'

Lyh server



查看合并请求 !2124
... ... @@ -1238,12 +1238,17 @@ class ProjectController extends BaseController
* @time :2025/6/10 10:51
*/
public function generateCountCharts(){
$this->request->validate([
'project_id'=>'required',
],[
'project_id.required' => '项目id不能为空',
]);
$noticeModel = new NoticeLog();
$info = $noticeModel->read(['type'=>NoticeLog::TYPE_GENERATE_COUNT_CHARTS,'status'=>0,'data'=>['like','%"'.$this->param['project_id'].'"%']]);
if($info !== false){
$this->fail('当前数据在生成中');
}
NoticeLog::createLog(NoticeLog::TYPE_GENERATE_COUNT_CHARTS, ['project_id' => $this->user['project_id']]);
NoticeLog::createLog(NoticeLog::TYPE_GENERATE_COUNT_CHARTS, ['project_id' => $this->param['project_id']]);
$this->response('success');
}
}
... ...
... ... @@ -80,7 +80,7 @@ class News extends Base
$arr = json_decode($info['values']);
foreach ($arr as $k1=>$v1){
$v1 = (array)$v1;
$v1['url'] = getImageUrl($v1['url'],$this->user['storage_type'],$this->user['project_location']);
$v1['url'] = getImageUrl($v1['url']);
$arr[$k1] = $v1;
}
$v['values'] = $arr;
... ... @@ -89,9 +89,9 @@ class News extends Base
foreach ($arr1 as $k1=>$v1){
$v1 = (array)$v1;
if(isset($v1['url'])){
$v1['url'] = getFileUrl($v1['url'],$this->user['storage_type'],$this->user['project_location'],$this->user['file_cdn'] ?? 0);
$v1['url'] = getFileUrl($v1['url']);
}else{
$v1 = getFileUrl($v1,$this->user['storage_type'],$this->user['project_location'],$this->user['file_cdn'] ?? 0);
$v1 = getFileUrl($v1);
}
$arr1[$k1] = $v1;
}
... ...