作者 lyh

gx

... ... @@ -37,7 +37,8 @@ class ProductController extends BaseController
$this->map['category_id'] = ['like','%'.$this->map['category_id'].'%'];
}
$this->map['project_id'] = $this->user['project_id'];
$filed = ['id', 'project_id', 'title', 'sort' ,'thumb', 'product_type' , 'route' ,'category_id', 'keyword_id', 'status', 'created_uid', 'created_at', 'updated_at'];
$filed = ['id', 'project_id', 'title', 'sort' ,'thumb', 'product_type' , 'route' ,
'category_id', 'keyword_id', 'status', 'created_uid', 'created_at', 'updated_at'];
$lists = $product->lists($this->map,$this->page,$this->row,$this->order,$filed);
if(!empty($lists['list'])){
foreach ($lists['list'] as $k=>$v){
... ...
... ... @@ -174,8 +174,8 @@ class BTemplateLogic extends BaseLogic
*/
public function templateSave(){
//查询当前模版是否已保存
DB::beginTransaction();
try {
// DB::beginTransaction();
// try {
$info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']);
//字符串截取
$this->param = $this->stringProcessing($this->param);
... ... @@ -186,11 +186,11 @@ class BTemplateLogic extends BaseLogic
$this->model->edit($this->param,['id'=>$info['id']]);
}
$this->setTemplateLog($this->param);
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('error');
}
// DB::commit();
// }catch (\Exception $e){
// DB::rollBack();
// $this->fail('error');
// }
//通知更新
$this->homeOrProduct($this->param['source'],$this->param['source_id']);
return $this->success();
... ...