作者 李宇航

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

Master server



查看合并请求 !828
@@ -95,6 +95,7 @@ class ProjectController extends BaseController @@ -95,6 +95,7 @@ class ProjectController extends BaseController
95 'gl_project_deploy_build.dept_id AS dept_id', 95 'gl_project_deploy_build.dept_id AS dept_id',
96 'gl_project_deploy_build.keyword_num AS key', 96 'gl_project_deploy_build.keyword_num AS key',
97 'gl_project_deploy_build.service_duration AS day', 97 'gl_project_deploy_build.service_duration AS day',
  98 + 'gl_project_deploy_build.is_comment AS is_comment',
98 'gl_project_deploy_build.leader_mid AS leader_mid', 99 'gl_project_deploy_build.leader_mid AS leader_mid',
99 'gl_project_deploy_build.manager_mid AS manager_mid', 100 'gl_project_deploy_build.manager_mid AS manager_mid',
100 'gl_project_deploy_build.designer_mid AS designer_mid', 101 'gl_project_deploy_build.designer_mid AS designer_mid',
@@ -246,7 +246,7 @@ class ComController extends BaseController @@ -246,7 +246,7 @@ class ComController extends BaseController
246 * @time :2024/9/14 13:32 246 * @time :2024/9/14 13:32
247 */ 247 */
248 public function getIsComment(){ 248 public function getIsComment(){
249 - return $this->user['is_subscribe'] ?? 0; 249 + return $this->user['is_common'] ?? 0;
250 } 250 }
251 251
252 /** 252 /**
@@ -132,6 +132,29 @@ class KeywordLogic extends BaseLogic @@ -132,6 +132,29 @@ class KeywordLogic extends BaseLogic
132 } 132 }
133 133
134 /** 134 /**
  135 + * @remark :获取字符串首字符
  136 + * @name :first_word
  137 + * @author :lyh
  138 + * @method :post
  139 + * @time :2024/10/28 10:47
  140 + */
  141 + public function first_word($title){
  142 + $first_title = mb_substr($title, 0, 1);
  143 + if (preg_match("/[\x{4e00}-\x{9fa5}]/u", $first_title)) {
  144 + $first_title = 'all'; // 如果是中文字符,则置为空
  145 + }
  146 + //返回对应的键
  147 + $keywordModel = new Keyword();
  148 + $firstNumWord = $keywordModel->firstNumWord;
  149 + foreach($firstNumWord as $k => $v){
  150 + if($v == $first_title){
  151 + return $k;
  152 + }
  153 + }
  154 + return null;
  155 + }
  156 +
  157 + /**
135 * @remark :批量添加关键词任务, 异步处理 158 * @remark :批量添加关键词任务, 异步处理
136 * @name :batchAdd 159 * @name :batchAdd
137 * @author :lyh 160 * @author :lyh
@@ -17,6 +17,38 @@ class Keyword extends Base @@ -17,6 +17,38 @@ class Keyword extends Base
17 protected $connection = 'custom_mysql'; 17 protected $connection = 'custom_mysql';
18 18
19 const STATUS_ACTIVE = 1; 19 const STATUS_ACTIVE = 1;
  20 + //获取字母对应数字
  21 + public $firstNumWord = [
  22 + 0=>"0",
  23 + 1=>"a",
  24 + 2=>"b",
  25 + 3=>"c",
  26 + 4=>"d",
  27 + 5=>"e",
  28 + 6=>"f",
  29 + 7=>"g",
  30 + 8=>"h",
  31 + 9=>"i",
  32 + 10=>"j",
  33 + 11=>"k",
  34 + 12=>"l",
  35 + 13=>"m",
  36 + 14=>"n",
  37 + 15=>"o",
  38 + 16=>"p",
  39 + 17=>"q",
  40 + 18=>"r",
  41 + 19=>"s",
  42 + 20=>"t",
  43 + 21=>"u",
  44 + 22=>"v",
  45 + 23=>"w",
  46 + 24=>"x",
  47 + 25=>"y",
  48 + 26=>"z",
  49 + 27=>"all",
  50 + ];
  51 +
20 /** 52 /**
21 * @remark :视频 53 * @remark :视频
22 * @name :getKeywordVideoAttribute 54 * @name :getKeywordVideoAttribute