作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

... ... @@ -155,6 +155,7 @@ class FetchTicketProjects extends Command
'wechat_group_id' => $item['wx_id'],
'team' => $team_ids ? json_encode($team_ids) : null,
'flg_show'=>$item['flg_show'] ?? 1,
'split'=>$item['split'] ?? 0,
];
if (!$project) {
$new = new TicketProject();
... ...
... ... @@ -52,9 +52,8 @@ class Ticket5UploadDataController extends BaseController
if($projectInfo === false){
$this->response('当前项目不存在或数据未同步',Code::SYSTEM_ERROR);
}
//todo::目前写死
if($projectInfo['website'] != 'https://www.lstchocolatemachine.com/'){
$this->response('当前项目不允许操作',Code::SYSTEM_ERROR);
if(isset($projectInfo['split']) && $projectInfo['split'] == 1){
$projectInfo['website'] = $projectInfo['test_website'] ?? '';
}
$action = $project5CateModel->getCateTypeAction($this->param['type']);
if(empty($action)){
... ... @@ -105,11 +104,10 @@ class Ticket5UploadDataController extends BaseController
if($projectInfo === false){
$this->response('当前项目不存在或数据未同步',Code::SYSTEM_ERROR);
}
$project5CateModel = new Project5Cate();
//todo::目前写死,上线放开
if($projectInfo['website'] != 'https://www.lstchocolatemachine.com/'){
$this->response('当前项目不允许操作',Code::SYSTEM_ERROR);
if(isset($projectInfo['split']) && $projectInfo['split'] == 1){
$projectInfo['website'] = $projectInfo['test_website'] ?? '';
}
$project5CateModel = new Project5Cate();
$action = $project5CateModel->saveCateTypeAction($this->param['type']);
$url = $projectInfo['website'].'wp-admin/admin-ajax.php?action='.$action;
if(empty($action)){
... ... @@ -169,7 +167,7 @@ class Ticket5UploadDataController extends BaseController
}
//验证当前数据是否已提交
$this->param['text'] = json_encode($this->param['text'], true);
// $this->pushTicketByBots($this->param['post_id'],$this->param['project_type']);
$this->pushTicketByBots($this->param['post_id'],$this->param['project_type']);
if(isset($this->param['id']) && !empty($this->param['id'])){
//执行编辑
$info = $this->model->read(['id'=>$this->param['id']]);
... ...
... ... @@ -183,8 +183,8 @@ class TicketUploadDataLogic extends BaseLogic
if($projectInfo === false){
$this->fail('当前项目不存在或数据未同步');
}
if($projectInfo['website'] != 'https://www.lstchocolatemachine.com/'){
$this->fail('当前项目不允许操作');
if(isset($projectInfo['split']) && $projectInfo['split'] == 1){
$projectInfo['website'] = $projectInfo['test_website'] ?? '';
}
$action = $this->model->saveAction($info['type']);
$url = $projectInfo['website'].'wp-admin/admin-ajax.php?action='.$action;
... ...
... ... @@ -237,6 +237,9 @@ class KeywordLogic extends BaseLogic
$productModel = new Product();
foreach ($this->param['title'] as $v){
$info = $this->model->read(['title'=>$v]);
if($info === false){
$info = $this->model->read(['route'=>$v]);
}
if($info){
$this->delRoute($info['id']);
$this->model->del(['id'=>$info['id']]);
... ...