作者 李宇航

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

Master server



查看合并请求 !828
... ... @@ -95,6 +95,7 @@ class ProjectController extends BaseController
'gl_project_deploy_build.dept_id AS dept_id',
'gl_project_deploy_build.keyword_num AS key',
'gl_project_deploy_build.service_duration AS day',
'gl_project_deploy_build.is_comment AS is_comment',
'gl_project_deploy_build.leader_mid AS leader_mid',
'gl_project_deploy_build.manager_mid AS manager_mid',
'gl_project_deploy_build.designer_mid AS designer_mid',
... ...
... ... @@ -246,7 +246,7 @@ class ComController extends BaseController
* @time :2024/9/14 13:32
*/
public function getIsComment(){
return $this->user['is_subscribe'] ?? 0;
return $this->user['is_common'] ?? 0;
}
/**
... ...
... ... @@ -132,6 +132,29 @@ class KeywordLogic extends BaseLogic
}
/**
* @remark :获取字符串首字符
* @name :first_word
* @author :lyh
* @method :post
* @time :2024/10/28 10:47
*/
public function first_word($title){
$first_title = mb_substr($title, 0, 1);
if (preg_match("/[\x{4e00}-\x{9fa5}]/u", $first_title)) {
$first_title = 'all'; // 如果是中文字符,则置为空
}
//返回对应的键
$keywordModel = new Keyword();
$firstNumWord = $keywordModel->firstNumWord;
foreach($firstNumWord as $k => $v){
if($v == $first_title){
return $k;
}
}
return null;
}
/**
* @remark :批量添加关键词任务, 异步处理
* @name :batchAdd
* @author :lyh
... ...
... ... @@ -17,6 +17,38 @@ class Keyword extends Base
protected $connection = 'custom_mysql';
const STATUS_ACTIVE = 1;
//获取字母对应数字
public $firstNumWord = [
0=>"0",
1=>"a",
2=>"b",
3=>"c",
4=>"d",
5=>"e",
6=>"f",
7=>"g",
8=>"h",
9=>"i",
10=>"j",
11=>"k",
12=>"l",
13=>"m",
14=>"n",
15=>"o",
16=>"p",
17=>"q",
18=>"r",
19=>"s",
20=>"t",
21=>"u",
22=>"v",
23=>"w",
24=>"x",
25=>"y",
26=>"z",
27=>"all",
];
/**
* @remark :视频
* @name :getKeywordVideoAttribute
... ...