修复错误

This commit is contained in:
mkm 2023-05-11 10:30:36 +08:00
parent cf14089562
commit c55268cd5c

View File

@ -22,6 +22,7 @@ use think\App;
use crmeb\basic\BaseController;
use app\common\repositories\store\product\ProductRepository as repository;
use think\facade\Cache;
use think\facade\Db;
class StoreProduct extends BaseController
{
@ -172,6 +173,8 @@ class StoreProduct extends BaseController
$data = Cache::get($param['key']);
Cache::delete($param['key']);
}elseif($param['id']){
$a=Db::name('store_product')->where('product_id',$param['id'])->value('product_type');
$param['product_type']=$a;
$data = $this->repository->getPreview($param);
}
if(!$data) return app('json')->fail('数据不存在');