作者 李宇航

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

Lyh server



查看合并请求 !2964
... ... @@ -17,6 +17,7 @@ use App\Models\News\News;
use App\Models\News\NewsCategory;
use App\Models\Product\Category;
use App\Models\Product\CategoryRelated;
use App\Models\Product\Detail;
use App\Models\Product\Keyword;
use App\Models\Product\KeywordRelated;
use App\Models\Product\Product;
... ... @@ -209,6 +210,11 @@ class TicketUploadDataLogic extends BaseLogic
CategoryRelated::saveRelated($id, $info['text']['category_id'] ?? []);//分类关联
KeywordRelated::saveRelated($id,$info['text']['keyword_id'] ?? []);//关键字关联
$route = RouteMap::setRoute($data['title'],RouteMap::SOURCE_PRODUCT,$id,$info['project_id']);
//保存一条描述
if(!empty($info['text']['remark'])){
$detailModel = new Detail();
$detailModel->addReturnId(['content'=>json_encode(['content'=>$info['text']['remark']],true),'product_id'=>$id,'title'=>$info['text']['title'],'project_id'=>$info['project_id'],'column_id'=>1,'text_type'=>1]);
}
$productModel->edit(['route'=>$route],['id'=>$id]);
}catch (\Exception $e){
$this->fail('保存失败,请联系管理员');
... ...
... ... @@ -207,7 +207,7 @@ class UserLogic extends BaseLogic
$roleInfo = $roleModel->where('project_id',$this->param['project_id'])->orderBy('id','asc')->first();
$info = $this->model->read(['role_id'=>0,'project_id'=>$this->param['project_id']]);
if(empty($info) || empty($roleInfo)){
$this->fail('请先添加角色');
$this->fail('请先添加角色,联系管理员');
}
try {
$this->model->edit(['role_id'=>$roleInfo['id']],['id'=>$info['id']]);
... ...