quanwei
2025-12-05 feda780069d64479c0c20493603717e100655da9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
 
namespace app\supplier\controller\operate;
 
use app\supplier\controller\Controller;
use app\supplier\model\plus\product\Reduce as ReduceModel;
use app\common\model\product\Category as CategoryModel;
 
/**
 * 满减
 */
class Fullreduce extends Controller
{
 
    /**
     *商品推荐
     */
    public function product()
    {
        $model = new ReduceModel;
        $list = $model->getList($this->postData());
        // 商品分类
        $category = CategoryModel::getCacheTree();
        return $this->renderSuccess('', compact('list', 'category'));
    }
 
    /**
     *商品推荐
     */
    public function editProduct($product_id)
    {
        $model = new ReduceModel;
        // 更新记录
        if ($model->edit($this->postData(), $this->getSupplierId())) {
            return $this->renderSuccess('修改成功');
        }
        return $this->renderError($model->getError()?:'修改失败');
    }
}