소스 검색

健康集市增加,修改

gorden 1 년 전
부모
커밋
48c2bee1af

+ 18 - 32
app/admin/controller/life/FarmGoodsController.php

@@ -2,53 +2,39 @@
 
 namespace app\admin\controller\life;
 
-use app\controller\Curd;
-use app\model\FarmGoods;
-use app\admin\validate\life\FarmGoodsValidate;
+use app\admin\service\goods\GoodsService;
+use app\admin\validate\goods\GoodsValidate;
 use support\Request;
 use support\Response;
 
-class FarmGoodsController extends Curd
+class FarmGoodsController
 {
-    public function __construct()
-    {
-        $this->model = new FarmGoods();
-        $this->validate = true;
-        $this->validateClass = new FarmGoodsValidate();
-    }
-
     /**
-     * @Desc 列表
+     * @Desc 添加商品
      * @Author Gorden
-     * @Date 2024/2/28 10:21
+     * @Date 2024/3/11 10:21
      *
      * @param Request $request
      * @return Response
-     * @throws \support\exception\BusinessException
      */
-    public function select(Request $request): Response
+    public function insert(Request $request): Response
     {
-        [$where, $format, $limit, $field, $order] = $this->selectInput($request);
-        $where['goods_is_del'] = 0;
-        $query = $this->doSelect($where, $field, $order);
-        return $this->doFormat($query, $format, $limit);
+        $validate = new GoodsValidate();
+        if (!$validate->scene('add')->check($request->post())) {
+            return json_fail($validate->getError());
+        }
+
+        return GoodsService::insert($request->post());
     }
 
-    /**
-     * @Desc 删除
-     * @Author Gorden
-     * @Date 2024/2/28 10:21
-     *
-     * @param Request $request
-     * @return Response
-     * @throws \support\exception\BusinessException
-     */
-    public function delete(Request $request): Response
+    public function update(Request $request): Response
     {
-        $ids = $this->deleteInput($request);
-        $this->doSoftDelete($ids, ['goods_is_del' => 1]);
+        $validate = new GoodsValidate();
+        if (!$validate->scene('update')->check($request->post())) {
+            return json_fail($validate->getError());
+        }
 
-        return json_success('success');
+        return GoodsService::update($request->post());
     }
 
     /**

+ 2 - 1
app/admin/service/auth/AuthService.php

@@ -27,7 +27,8 @@ class AuthService
                     break;
                 case 'PENDING':
                     // 待激活用户登录后自动激活
-                    if (SysUser::where('user_id', $user->user_id)->update(['user_status' => 'ACTIVED'])) {
+                    $user->user_status = 'ACTIVED';
+                    if (!$user->save()) {
                         throw new \Exception('用户状态修改失败');
                     }
                     break;

+ 375 - 0
app/admin/service/goods/GoodsService.php

@@ -0,0 +1,375 @@
+<?php
+
+namespace app\admin\service\goods;
+
+use app\model\Goods;
+use app\model\GoodsDetail;
+use app\model\GoodsLabel;
+use app\model\GoodsRunning;
+use app\model\GoodsSku;
+use app\model\SysSerial;
+use support\Db;
+use support\exception\BusinessException;
+use support\Response;
+
+class GoodsService
+{
+    /**
+     * @Desc 添加商品
+     * @Author Gorden
+     * @Date 2024/3/11 10:20
+     *
+     * @param $params
+     * @return Response
+     */
+    public static function insert($params): Response
+    {
+        Db::beginTransaction();
+        try {
+            $params['goods_id'] = "GD" . sprintf('%016d', SysSerial::getSerial()) . random_string(8);
+            // 主表
+            self::mainInsert($params);
+            // 商品详情表
+            self::detailInsert($params);
+            // 商品标签表
+            self::labelInsert($params);
+            // 产品运行控制信息表
+            self::goodsRunningInsert($params);
+
+            Db::commit();
+        } catch (\PDOException $e) {
+            return json_fail('数据写入失败~');
+        } catch (BusinessException $e) {
+            Db::rollBack();
+            return json_fail($e->getMessage());
+        } catch (\Exception $e) {
+            Db::rollBack();
+            return json_fail('数据写入失败~');
+        }
+
+        return json_success('success');
+    }
+
+    public static function update($params)
+    {
+        Db::beginTransaction();
+        try {
+            // 主表
+            self::mainUpdate($params);
+            // 商品详情表
+            self::detailUpdate($params);
+            // 商品标签表
+            self::labelUpdate($params);
+            // 产品运行控制信息表
+            self::goodsRunningUpdate($params);
+
+            Db::commit();
+        } catch (BusinessException $e) {
+            Db::rollBack();
+            return json_fail($e->getMessage());
+        } catch (\Exception $e) {
+            Db::rollBack();
+            return json_fail('数据更新失败~');
+        }
+        return json_success('success');
+    }
+
+    /**
+     * @Desc 商品主表
+     * @Author Gorden
+     * @Date 2024/3/11 11:20
+     *
+     * @param $params
+     * @return mixed|string
+     * @throws BusinessException
+     */
+    public static function mainInsert($params)
+    {
+        try {
+            $model = new Goods();
+            $model->goods_id = $params['goods_id'];
+            $model->join_goods_category_id = $params['join_goods_category_id'];
+            $model->goods_classify = $params['goods_classify'];
+            $model->goods_status = $params['goods_status'];
+            $model->goods_category = $params['goods_category'];
+            $model->goods_prefix = $params['goods_prefix'];
+            $model->goods_name = $params['goods_name'];
+            $model->goods_market_price = $params['goods_market_price'];
+            $model->goods_sales_price = $params['goods_sales_price'];
+            $model->goods_sku_json = !empty($params['goods_sku_json']) ? $params['goods_sku_json'] : '{}';
+            $model->goods_attribute_json = !empty($params['goods_attribute_json']) ? $params['goods_attribute_json'] : '{}';
+            $model->goods_service_json = !empty($params['goods_service_json']) ? $params['goods_service_json'] : '{}';
+            $model->goods_title = $params['goods_title'];
+            $model->goods_cover = $params['goods_cover'];
+            $model->goods_on_addtimes = $params['goods_on_addtimes'] ? strtotime($params['goods_on_addtimes']) : null;
+            $model->goods_sort = $params['goods_sort'];
+            $model->goods_groupby = $params['goods_groupby'];
+            $model->goods_remark = $params['goods_remark'];
+            $model->goods_extend_json = $params['goods_extend_json'];
+            $model->goods_addtimes = time();
+            if ($model->save()) {
+                return $model->goods_id;
+            }
+            // 异常
+            throw new BusinessException("数据写入失败~");
+        } catch (\Exception $e) {
+            throw new BusinessException("数据写入失败~");
+        }
+    }
+
+    /**
+     * @Desc 详情表
+     * @Author Gorden
+     * @Date 2024/3/11 11:19
+     *
+     * @param $params
+     * @return void
+     * @throws BusinessException
+     */
+    public static function detailInsert($params)
+    {
+        try {
+            $model = new GoodsDetail();
+            $model->join_detail_goods_id = $params['goods_id'];
+            $model->goods_detail_code_json = $params['goods_detail_code_json'];
+            $model->goods_detail_slider_json = $params['goods_detail_slider_json'];
+            $model->goods_detail_specs_json = $params['goods_detail_specs_json'];
+            $model->goods_detail_content = $params['goods_detail_content'];
+            if (!$model->save()) {
+                // 异常
+                throw new BusinessException("数据写入失败~");
+            }
+        } catch (\Exception $e) {
+            throw new BusinessException("数据写入失败~");
+        }
+    }
+
+    /**
+     * @Desc 标签表
+     * @Author Gorden
+     * @Date 2024/3/11 11:32
+     *
+     * @param $params
+     * @return void
+     * @throws BusinessException
+     */
+    public static function labelInsert($params)
+    {
+        $model = new GoodsLabel();
+        $model->join_label_goods_id = $params['goods_id'];
+        $model->goods_label = $params['goods_label'];
+        $model->goods_label_extend_json = !empty($params['goods_label_extend_json']) ? $params['goods_label_extend_json'] : '{}';
+        if (!$model->save()) {
+            // 异常
+            throw new BusinessException('数据写入失败~');
+        }
+    }
+
+    /**
+     * @Desc 产品运行控制信息表
+     * @Author Gorden
+     * @Date 2024/3/11 11:38
+     *
+     * @param $params
+     * @return void
+     * @throws BusinessException
+     */
+    public static function goodsRunningInsert($params)
+    {
+        try {
+            $model = new GoodsRunning();
+            $model->join_running_goods_id = $params['goods_id'];
+            $model->goods_running_storage = $params['goods_running_storage'];
+            $model->goods_running_sale = $params['goods_running_sale'];
+            $model->goods_running_off_type = $params['goods_running_off_type'];
+            $model->goods_running_off_json = $params['goods_running_off_json'];
+            if (!$model->save()) {
+                throw new BusinessException('数据写入失败');
+            }
+        } catch (\Exception $e) {
+            throw new BusinessException('数据写入失败');
+        }
+    }
+
+    /**
+     * @Desc SKU
+     * @Author Gorden
+     * @Date 2024/3/11 12:01
+     *
+     * @param $params
+     * @return void
+     * @throws BusinessException
+     */
+    public static function skuInsert($params)
+    {
+        $model = new GoodsSku();
+        $model->join_sku_goods_id = $params['goods_id'];
+        $model->goods_sku_status = $params['goods_sku_status'];
+        $model->goods_sku_specs_json = $params['goods_sku_specs_json'];
+        $model->goods_sku_title = $params['goods_sku_title'];
+        $model->goods_sku_images_json = $params['goods_sku_images_json'];
+        $model->goods_sku_content = $params['goods_sku_content'];
+        $model->goods_sku_market_price = $params['goods_sku_market_price'];
+        $model->goods_sku_sales_price = $params['goods_sku_sales_price'];
+        $model->goods_sku_storage_json = $params['goods_sku_storage_json'];
+        $model->goods_sku_service_json = $params['goods_sku_service_json'];
+        $model->goods_sku_extend_json = $params['goods_sku_extend_json'];
+        if (!$model->save()) {
+            throw new BusinessException('数据写入失败~');
+        }
+    }
+
+    /**
+     * @Desc
+     * @Author Gorden
+     * @Date 2024/3/12 8:44
+     *
+     * @param $params
+     * @return void
+     * @throws BusinessException
+     */
+    public static function mainUpdate($params)
+    {
+        try {
+            $data = self::inputFilter($params, new Goods());
+            $data['goods_on_addtimes'] = strtotime($data['goods_on_addtimes']);
+
+            self::doUpdate($data['goods_id'], $data, new Goods());
+        } catch (BusinessException $e) {
+            throw new BusinessException($e->getMessage());
+        } catch (\Exception $e) {
+            throw new BusinessException('数据更新异常~');
+        }
+    }
+
+    /**
+     * @Desc
+     * @Author Gorden
+     * @Date 2024/3/12 9:57
+     *
+     * @param $params
+     * @return void
+     * @throws BusinessException
+     */
+    public static function detailUpdate($params)
+    {
+        try {
+            $data = self::inputFilter($params, new GoodsDetail());
+            // 根据goods_id 查详情ID
+            $detail = GoodsDetail::where('join_detail_goods_id', $params['goods_id'])->first();
+            self::doUpdate($detail->goods_detail_id, $data, new GoodsDetail());
+        } catch (BusinessException $e) {
+            throw new BusinessException($e->getMessage());
+        } catch (\Exception $e) {
+            throw new BusinessException('数据更新异常~');
+        }
+    }
+
+    /**
+     * @Desc
+     * @Author Gorden
+     * @Date 2024/3/12 9:58
+     *
+     * @param $params
+     * @return void
+     * @throws BusinessException
+     */
+    public static function labelUpdate($params)
+    {
+        try {
+            $data = self::inputFilter($params, new GoodsLabel());
+            // 根据goods_id 查详情ID
+            $detail = GoodsLabel::where('join_label_goods_id', $params['goods_id'])->first();
+            self::doUpdate($detail->goods_label_id, $data, new GoodsLabel());
+        } catch (BusinessException $e) {
+            throw new BusinessException($e->getMessage());
+        } catch (\Exception $e) {
+            throw new BusinessException('数据更新异常~');
+        }
+    }
+
+    /**
+     * @Desc
+     * @Author Gorden
+     * @Date 2024/3/12 9:59
+     *
+     * @param $params
+     * @return void
+     * @throws BusinessException
+     */
+    public static function goodsRunningUpdate($params)
+    {
+        try {
+            $data = self::inputFilter($params, new GoodsRunning());
+            // 根据goods_id 查详情ID
+            $detail = GoodsRunning::where('join_running_goods_id', $params['goods_id'])->first();
+            self::doUpdate($detail->goods_running_id, $data, new GoodsRunning());
+        } catch (BusinessException $e) {
+            throw new BusinessException($e->getMessage());
+        } catch (\Exception $e) {
+            throw new BusinessException('数据更新异常~');
+        }
+    }
+
+    /**
+     * @Desc
+     * @Author Gorden
+     * @Date 2024/3/12 8:45
+     *
+     * @param array $data
+     * @param $model
+     * @return array
+     * @throws BusinessException
+     */
+    private static function inputFilter(array $data, $model): array
+    {
+        $table = config('database.connections.mysql.prefix') . $model->getTable();
+        $allow_column = $model->getConnection()->select("desc `$table`");
+        if (!$allow_column) {
+            throw new BusinessException('表不存在', 2);
+        }
+        $columns = array_column($allow_column, 'Type', 'Field');
+        foreach ($data as $col => $item) {
+            if (!isset($columns[$col])) {
+                unset($data[$col]);
+                continue;
+            }
+            // 非字符串类型传空则为null
+            if ($item === '' && strpos(strtolower($columns[$col]), 'varchar') === false && strpos(strtolower($columns[$col]), 'text') === false) {
+                $data[$col] = null;
+            }
+            if (is_array($item)) {
+                $data[$col] = implode(',', $item);
+            }
+            if ($item != '' && (strpos(strtolower($columns[$col]), 'varchar') || strpos(strtolower($columns[$col]), 'text'))) {
+                $data[$col] = htmlspecialchars($item);
+            }
+        }
+        if (empty($data['created_at'])) {
+            unset($data['created_at']);
+        }
+        if (empty($data['updated_at'])) {
+            unset($data['updated_at']);
+        }
+        return $data;
+    }
+
+    /**
+     * @Desc 执行更新
+     * @Author Gorden
+     * @Date 2024/3/12 8:43
+     *
+     * @param $id
+     * @param $data
+     * @param $model
+     * @return void
+     */
+    private static function doUpdate($id, $data, $model)
+    {
+        $row = $model->find($id);
+        foreach ($data as $key => $val) {
+            $row->{$key} = $val;
+        }
+        $row->save();
+    }
+}

+ 83 - 0
app/admin/validate/goods/GoodsValidate.php

@@ -0,0 +1,83 @@
+<?php
+
+namespace app\admin\validate\goods;
+
+use think\Validate;
+
+class GoodsValidate extends Validate
+{
+    protected $rule = [
+        'goods_id' => 'require|alphaDash',
+        'join_goods_category_id' => 'require|integer',
+        'join_goods_device_id' => 'max:32',
+        'goods_classify' => 'require|in:GOODS,DEVICE,SERVICE,SPECIAL,PACKAGE,OTHER',  // GOODS=实物商品|DEVICE=设备|SERIVCE=服务|SPECIAL=专题业务|PACKAGE=套包|OTHER=其他
+        'goods_status' => 'require|in:PENDING,ON,OFF,DISABLED',    // 产品状态 PENDING=待处理|ON=上架(已激活)|OFF=下架|DISABLED=已禁用
+        'goods_category' => 'require|max:32',
+        'goods_prefix' => 'max:64 ',
+        'goods_name' => 'require|max:32',
+        'goods_market_price' => 'float',
+        'goods_sales_price' => 'float',
+        'goods_sku_json' => 'isJson',
+        'goods_attribute_json' => 'isJson',
+        'goods_service_json' => 'isJson',
+        'goods_title' => 'max:128',
+        'goods_cover' => 'require|regex:/^[0-9a-zA-Z\.\/]+$/',
+        'goods_on_addtimes' => 'date',
+        'goods_sort' => 'integer',
+        'goods_groupby' => 'max:32;',
+        'goods_extend_json' => 'isJson',
+        'goods_slide' => 'regex:/^[0-9a-zA-Z\.\/\,]+$/',
+        'goods_specs_json' => 'isJson',
+//        'goods_content' => '',
+        'goods_label' => 'max:32',
+//        'goods_label_extend_json' => '',
+        'goods_storage' => 'float',
+        'goods_sale' => 'float',
+        'goods_running_off_type' => 'require|in:H,T',
+        'goods_running_off_json' => 'isJson',
+        'goods_sku_status' => 'in:PENDING,ON,OFF,DISABLED',   // 产品sku状态 PENDING=待启用|ON=上架|OFF=下架|DISABLED=已禁用
+        'goods_sku_specs_json' => 'isJson',
+        'goods_sku_title' => 'max:64',
+        'goods_sku_images_json' => 'isJson',
+//        'goods_sku_content' => '',
+        'goods_sku_market_price' => 'float',
+        'goods_sku_sales_price' => 'float',
+        'goods_sku_storage_json' => 'isJson',
+        'goods_sku_service_json' => 'isJson',
+        'goods_sku_extend_json' => 'isJson',
+    ];
+
+    protected $message = [];
+
+    protected $scene = [
+        'add' => ['join_goods_category_id', 'join_goods_device_id', 'goods_classify', 'goods_status', 'goods_category', 'goods_prefix',
+            'goods_name', 'goods_market_price', 'goods_sku_json', 'goods_attribute_json', 'goods_service_json', 'goods_title',
+            'goods_cover', 'goods_on_addtimes', 'goods_sort', 'goods_groupby', 'goods_extend_json', 'goods_slide', 'goods_specs_json',
+            'goods_label', 'goods_storage', 'goods_sale', 'goods_running_off_type', 'goods_running_off_json', 'goods_sku_status',
+            'goods_sku_specs_json', 'goods_sku_title', 'goods_sku_images_json', 'goods_sku_market_price', 'goods_sku_sales_price',
+            'goods_sku_storage_json', 'goods_sku_service_json', 'goods_sku_extend_json'],
+        'update' => ['goods_id', 'join_goods_category_id', 'join_goods_device_id', 'goods_classify', 'goods_status', 'goods_category', 'goods_prefix',
+            'goods_name', 'goods_market_price', 'goods_sku_json', 'goods_attribute_json', 'goods_service_json', 'goods_title',
+            'goods_cover', 'goods_on_addtimes', 'goods_sort', 'goods_groupby', 'goods_extend_json', 'goods_slide', 'goods_specs_json',
+            'goods_label', 'goods_storage', 'goods_sale', 'goods_running_off_type', 'goods_running_off_json', 'goods_sku_status',
+            'goods_sku_specs_json', 'goods_sku_title', 'goods_sku_images_json', 'goods_sku_market_price', 'goods_sku_sales_price',
+            'goods_sku_storage_json', 'goods_sku_service_json', 'goods_sku_extend_json'],
+    ];
+
+    /**
+     * @Desc Json数据验证
+     * @Author Gorden
+     * @Date 2024/3/11 14:55
+     *
+     * @param $value
+     * @return string|true
+     */
+    public function isJson($value)
+    {
+        if (is_json($value)) {
+            return true;
+        }
+
+        return "数据格式错误";
+    }
+}

+ 13 - 2
app/admin/validate/life/FarmGoodsValidate.php

@@ -8,16 +8,27 @@ class FarmGoodsValidate extends Validate
 {
     protected $rule = [
         'goods_id' => 'require|integer',
+        'join_goods_category_id' => 'require|integer',
+        'goods_classify' => '',
+        'goods_status' => 'integer',    // 产品状态 PENDING=待处理|ON=上架(已激活)|OFF=下架|DISABLED=已禁用
+        'goods_category' => '',
+        'goods_prefix' => '',
         'goods_name' => 'require|chsDash',
+        'goods_market_price' => '',
+        'goods_sales_price' => '',
+        'goods_sku_json' => '',
+        'goods_attribute_json' => '',
+        'goods_service_json' => '',
+        'goods_title' => '',
+        'goods_cover' => '',
+        'goods_on_addtimes' => '',
         'goods_img' => 'require|regex:/^[0-9a-zA-Z\.\/]+$/',
         'food_slide' => 'regex:/^[0-9a-zA-Z\.\/\,]+$/',
-        'goods_category_id' => 'require|integer',
         'goods_shop_id' => 'require|integer',
         'goods_is_new' => 'integer',
         'goods_price' => 'require|float',
         'goods_sell_num' => 'require|integer',
         'goods_postage_id' => 'require|integer',
-        'goods_status' => 'integer',
         'goods_weight' => 'float',
         'goods_storage' => 'chsDash',
         'goods_packaging' => 'chsDash',

+ 21 - 0
app/model/Goods.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace app\model;
+
+use support\Model;
+
+class Goods extends Model
+{
+    protected $table = 'goods';
+
+    protected $primaryKey = 'goods_id';
+
+    protected $keyType = 'string';
+    public $incrementing = false;
+
+    protected $dateFormat = 'U';
+
+    const CREATED_AT = 'goods_addtimes';
+
+    const UPDATED_AT = null;
+}

+ 16 - 0
app/model/GoodsDetail.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\model;
+
+use support\Model;
+
+class GoodsDetail extends Model
+{
+    protected $table = 'goods_detail';
+
+    protected $primaryKey = 'goods_detail_id';
+
+    const CREATED_AT = null;
+
+    const UPDATED_AT = null;
+}

+ 16 - 0
app/model/GoodsLabel.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\model;
+
+use support\Model;
+
+class GoodsLabel extends Model
+{
+    protected $table = 'goods_label';
+
+    protected $primaryKey = 'goods_label_id';
+
+    const CREATED_AT = null;
+
+    const UPDATED_AT = null;
+}

+ 16 - 0
app/model/GoodsRunning.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\model;
+
+use support\Model;
+
+class GoodsRunning extends Model
+{
+    protected $table = 'goods_running';
+
+    protected $primaryKey = 'goods_running_id';
+
+    const CREATED_AT = null;
+
+    const UPDATED_AT = null;
+}

+ 16 - 0
app/model/GoodsSku.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\model;
+
+use support\Model;
+
+class GoodsSku extends Model
+{
+    protected $table = 'goods_sku';
+
+    protected $primaryKey = 'goods_sku_id';
+
+    const CREATED_AT = null;
+
+    const UPDATED_AT = null;
+}

+ 35 - 0
app/model/SysSerial.php

@@ -0,0 +1,35 @@
+<?php
+
+namespace app\model;
+
+use support\exception\BusinessException;
+use support\Model;
+
+class SysSerial extends Model
+{
+    protected $table = 'sys_serial';
+
+    protected $primaryKey = 'serial';
+
+    const CREATED_AT = null;
+
+    const UPDATED_AT = null;
+
+    /**
+     * @Desc 自增序列号
+     * @Author Gorden
+     * @Date 2024/3/11 10:45
+     *
+     * @return mixed
+     * @throws BusinessException
+     */
+    public static function getSerial()
+    {
+        $model = new self();
+        if ($model->save()) {
+            return $model->serial;
+        }
+
+        throw new BusinessException("序列号生成失败~");
+    }
+}

+ 14 - 0
app/model/SysUser.php

@@ -19,4 +19,18 @@ class SysUser extends Model
     {
         return self::where('user_login_name', $name)->first();
     }
+
+    /**
+     * @Desc 修改用户状态
+     * @Author Gorden
+     * @Date 2024/3/12 13:20
+     *
+     * @param $id
+     * @param $data
+     * @return int
+     */
+    public static function updateStatus($id, $data)
+    {
+        return self::where('user_id', $id)->update($data);
+    }
 }

+ 3 - 3
route/admin.php

@@ -167,11 +167,11 @@ Route::group('/admin', function () {
         ]);
         /* 农场商品管理 */
         Route::group('/farmGoods', function () {
-            Route::get('/list', [\app\admin\controller\life\FarmGoodsController::class, 'select']);
+//            Route::get('/list', [\app\admin\controller\life\FarmGoodsController::class, 'select']);
             Route::post('/add', [\app\admin\controller\life\FarmGoodsController::class, 'insert']);
             Route::post('/update', [\app\admin\controller\life\FarmGoodsController::class, 'update']);
-            Route::post('/updateStatus', [\app\admin\controller\life\FarmGoodsController::class, 'updateStatus']);
-            Route::delete('/delete', [\app\admin\controller\life\FarmGoodsController::class, 'delete']);
+//            Route::post('/updateStatus', [\app\admin\controller\life\FarmGoodsController::class, 'updateStatus']);
+//            Route::delete('/delete', [\app\admin\controller\life\FarmGoodsController::class, 'delete']);
         })->middleware([
             \app\middleware\AdminAuthCheck::class
         ]);