feat: 修改商品列表接口,移除无用代码并优化响应数据

This commit is contained in:
mkm 2024-06-26 13:40:31 +08:00
parent 2d0979333e
commit 27b199994a
6 changed files with 124 additions and 165 deletions

View File

@ -61,8 +61,8 @@ class StoreBranchProductLists extends BaseAdminDataLists implements ListsSearchI
//2或者1 //2或者1
$where[]=['cate_id','=',$class_all]; $where[]=['cate_id','=',$class_all];
} }
$this->searchWhere[]=$where;
return StoreBranchProduct::where($this->searchWhere)->where($where) return StoreBranchProduct::where($this->searchWhere)
->field(['id','store_id','product_id', 'image', 'store_name', 'cate_id', 'price', 'sales', 'stock', 'unit', 'cost','purchase', 'status','batch','vip_price','manufacturer_information']) ->field(['id','store_id','product_id', 'image', 'store_name', 'cate_id', 'price', 'sales', 'stock', 'unit', 'cost','purchase', 'status','batch','vip_price','manufacturer_information'])
->when(!empty($this->adminInfo['store_id']), function ($query) { ->when(!empty($this->adminInfo['store_id']), function ($query) {
$query->where('store_id', $this->adminInfo['store_id']); $query->where('store_id', $this->adminInfo['store_id']);
@ -99,17 +99,7 @@ class StoreBranchProductLists extends BaseAdminDataLists implements ListsSearchI
*/ */
public function count(): int public function count(): int
{ {
$status = $this->params['status'] ?? ''; return StoreBranchProduct::where($this->searchWhere)
$class_all=$this->request->get('class_all');
$where=[];
if($class_all){
$arr=Cate::where('pid',$class_all)->column('id');
if($arr){
$arr2=Cate::where('pid','in',$arr)->column('id');
$where[]=['cate_id','in',array_merge($arr,$arr2)];
}
}
return StoreBranchProduct::where($this->searchWhere)->where($where)
->when(!empty($this->adminInfo['store_id']), function ($query) { ->when(!empty($this->adminInfo['store_id']), function ($query) {
$query->where('store_id', $this->adminInfo['store_id']); $query->where('store_id', $this->adminInfo['store_id']);
}) })

View File

@ -81,57 +81,57 @@ class StoreFinanceFlowLists extends BaseAdminDataLists implements ListsSearchInt
$item['pay_type_name'] = PayEnum::getPaySceneDesc($item['pay_type']); $item['pay_type_name'] = PayEnum::getPaySceneDesc($item['pay_type']);
})->toArray(); })->toArray();
foreach ($data as $key => $item) { // foreach ($data as $key => $item) {
$list1 = StoreFinanceFlow::where('order_id', $item['order_id'])->where('financial_type', '>', 1)->field($field)->select()->each(function ($item) { // $list1 = StoreFinanceFlow::where('order_id', $item['order_id'])->where('financial_type', '>', 1)->field($field)->select()->each(function ($item) {
if ($item['user_id'] <= 0) { // if ($item['user_id'] <= 0) {
$item['nickname'] = '游客'; // $item['nickname'] = '游客';
} else { // } else {
$id = $item['user_id']; // $id = $item['user_id'];
$item['nickname'] = User::where('id', $item['user_id'])->value('nickname') . "|$id"; // $item['nickname'] = User::where('id', $item['user_id'])->value('nickname') . "|$id";
} // }
if (!empty($this->request->adminInfo['store_id'])) { // if (!empty($this->request->adminInfo['store_id'])) {
$item['financial_pm'] = $item['financial_pm'] == 0 ? 1 : 0; // $item['financial_pm'] = $item['financial_pm'] == 0 ? 1 : 0;
} // }
if ($item['financial_pm'] == 0) { // if ($item['financial_pm'] == 0) {
$item['number'] = '-' . $item['number']; // $item['number'] = '-' . $item['number'];
$item['financial_type_name'] = '订单支出:' . OrderEnum::getFinancialType($item['financial_type']); // $item['financial_type_name'] = '订单支出:' . OrderEnum::getFinancialType($item['financial_type']);
} else { // } else {
$item['financial_type_name'] = OrderEnum::getFinancialType($item['financial_type']) . '获得'; // $item['financial_type_name'] = OrderEnum::getFinancialType($item['financial_type']) . '获得';
$item['number'] = '+' . $item['number']; // $item['number'] = '+' . $item['number'];
} // }
$item['staff_name'] = SystemStoreStaff::where('id', $item['staff_id'])->value('staff_name'); // $item['staff_name'] = SystemStoreStaff::where('id', $item['staff_id'])->value('staff_name');
$item['store_name'] = $item['store_id'] > 0 ? SystemStore::where('id', $item['store_id'])->value('name') : ''; // $item['store_name'] = $item['store_id'] > 0 ? SystemStore::where('id', $item['store_id'])->value('name') : '';
$item['pay_type_name'] = PayEnum::getPaySceneDesc($item['pay_type']); // $item['pay_type_name'] = PayEnum::getPaySceneDesc($item['pay_type']);
}); // });
$list2 = UserSign::where('order_id', $item['order_sn'])->whereIn('user_ship', [0, 2, 3])->select(); // $list2 = UserSign::where('order_id', $item['order_sn'])->whereIn('user_ship', [0, 2, 3])->select();
foreach ($list2 as $k => $v) { // foreach ($list2 as $k => $v) {
$list2[$k]['id'] = 'JF' . $v['id']; // $list2[$k]['id'] = 'JF' . $v['id'];
$list2[$k]['order_sn'] = $item['order_sn']; // $list2[$k]['order_sn'] = $item['order_sn'];
$list2[$k]['store_name'] = $item['store_name']; // $list2[$k]['store_name'] = $item['store_name'];
if($v['user_ship']==0){ // if($v['user_ship']==0){
$list2[$k]['financial_pm'] = 1; // $list2[$k]['financial_pm'] = 1;
$list2[$k]['number'] = '+' . $v['number']; // $list2[$k]['number'] = '+' . $v['number'];
}else{ // }else{
if($v['financial_pm']==1){ // if($v['financial_pm']==1){
$list2[$k]['financial_pm'] = 1; // $list2[$k]['financial_pm'] = 1;
$list2[$k]['number'] = '+' . $v['number']; // $list2[$k]['number'] = '+' . $v['number'];
}else{ // }else{
$list2[$k]['financial_pm'] = 0; // $list2[$k]['financial_pm'] = 0;
$list2[$k]['number'] = '-' . $v['number']; // $list2[$k]['number'] = '-' . $v['number'];
} // }
} // }
$list2[$k]['nickname'] = $v['uid'] > 0 ? User::where('id', $v['uid'])->value('nickname') . '|' . $v['uid'] : '游客'; // $list2[$k]['nickname'] = $v['uid'] > 0 ? User::where('id', $v['uid'])->value('nickname') . '|' . $v['uid'] : '游客';
$list2[$k]['financial_type_name'] = $v['title']; // $list2[$k]['financial_type_name'] = $v['title'];
$list2[$k]['pay_type_name'] = PayEnum::getPaySceneDesc($item['pay_type']); // $list2[$k]['pay_type_name'] = PayEnum::getPaySceneDesc($item['pay_type']);
} // }
$list3 = array_merge($list1->toArray(), $list2->toArray()); // $list3 = array_merge($list1->toArray(), $list2->toArray());
// 提取 financial_pm 字段到单独的数组 // // 提取 financial_pm 字段到单独的数组
$financial_pm = array_column($list3, 'financial_pm'); // $financial_pm = array_column($list3, 'financial_pm');
// 对 financial_pm 数组进行排序,这将影响原始数组 // // 对 financial_pm 数组进行排序,这将影响原始数组
array_multisort($financial_pm, SORT_ASC, $list3); // array_multisort($financial_pm, SORT_ASC, $list3);
$data[$key]['list']=$list3; // $data[$key]['list']=$list3;
} // }
return $data; return $data;
} }

View File

@ -75,7 +75,7 @@ class OrderLogic extends BaseLogic
self::$store_price = 0; //门店零售价 self::$store_price = 0; //门店零售价
/** 计算价格 */ /** 计算价格 */
$off_activity=Config::where('name','off_activity')->value('value'); $off_activity=Config::where('name','off_activity')->value('value');
if($off_activity==1){ if($off_activity!=1){
$field='id branch_product_id,store_name,image,unit,price,vip_price,cost,purchase,product_id'; $field='id branch_product_id,store_name,image,unit,price,vip_price,cost,purchase,product_id';
}else{ }else{
$field='id branch_product_id,store_name,image,unit,cost price,vip_price,cost,purchase,product_id'; $field='id branch_product_id,store_name,image,unit,cost price,vip_price,cost,purchase,product_id';

View File

@ -19,6 +19,7 @@ use app\common\service\SmsService;
use Exception; use Exception;
use support\Cache; use support\Cache;
use think\facade\Db; use think\facade\Db;
use app\common\model\system_store\SystemStore;
class StoreOrderLogic extends BaseLogic class StoreOrderLogic extends BaseLogic
{ {
@ -32,6 +33,11 @@ class StoreOrderLogic extends BaseLogic
* @notes 获取购物车商品信息 * @notes 获取购物车商品信息
* @param $params * @param $params
* @return array|bool * @return array|bool
*/
/**
* @notes 获取购物车商品信息
* @param $params
* @return array|bool
*/ */
static public function cartIdByOrderInfo($cartId, $addressId, $user = null, $params = []) static public function cartIdByOrderInfo($cartId, $addressId, $user = null, $params = [])
{ {
@ -45,14 +51,19 @@ class StoreOrderLogic extends BaseLogic
try { try {
self::$total_price = 0; self::$total_price = 0;
self::$pay_price = 0; self::$pay_price = 0;
self::$cost = 0; //成本 self::$cost = 0; //成本由采购价替代原成本为门店零售价
self::$profit = 0; //利润 self::$profit = 0; //利润
self::$activity_price = 0; //活动减少 self::$activity_price = 0; //活动减少
self::$store_price = 0; //门店零售价 self::$store_price = 0; //门店零售价
/** 计算价格 */ /** 计算价格 */
$pay_type = isset($params['pay_type'])?$params['pay_type']:0; // $off_activity=Config::where('name','off_activity')->value('value');
// if($off_activity==1){
// $field='id branch_product_id,store_name,image,unit,price,vip_price,cost,purchase,product_id';
// }else{
$field='id branch_product_id,store_name,image,unit,cost price,vip_price,cost,purchase,product_id';
// }
foreach ($cart_select as $k => $v) { foreach ($cart_select as $k => $v) {
$find = StoreBranchProduct::where(['product_id' => $v['product_id'],'store_id'=>$params['store_id']])->field('id branch_product_id,store_name,image,unit,price,vip_price,cost,purchase,product_id,swap')->withTrashed()->find(); $find = StoreBranchProduct::where(['product_id' => $v['product_id'], 'store_id' => $params['store_id']])->field($field)->withTrashed()->find();
if (!$find) { if (!$find) {
continue; continue;
} }
@ -63,47 +74,39 @@ class StoreOrderLogic extends BaseLogic
$cart_select[$k]['total_price'] = bcmul($v['cart_num'], $find['price'], 2); //订单总价 $cart_select[$k]['total_price'] = bcmul($v['cart_num'], $find['price'], 2); //订单总价
$cart_select[$k]['deduction_price'] =self::$activity_price;//抵扣金额 $cart_select[$k]['deduction_price'] =self::$activity_price;//抵扣金额
$cart_select[$k]['vip'] = 0; $cart_select[$k]['vip'] = 0;
if ($user && $user['user_ship'] == 1) { // if($off_activity!=1){
//更新 会员为1的时候原价减去会员价 // if ($user && $user['user_ship'] == 1) {
$deduction_price_count=bcmul(bcsub($find['price'], $find['vip_price'], 2),$v['cart_num'],2); // //更新 会员为1的时候原价减去会员价
$cart_select[$k]['deduction_price'] =$deduction_price_count; // $deduction_price_count=bcmul(bcsub($find['price'], $find['vip_price'], 2),$v['cart_num'],2);
self::$activity_price = bcadd(self::$activity_price, $deduction_price_count, 2); // $cart_select[$k]['deduction_price'] =$deduction_price_count;
$cart_select[$k]['vip'] =1; // self::$activity_price = bcadd(self::$activity_price, $deduction_price_count, 2);
} // $cart_select[$k]['vip'] =1;
// }
// if ($user && $user['user_ship'] == 4) {
// //更新 为4商户的时候减去商户价格
// $deduction_price_count=bcmul(bcsub($find['price'], $find['cost'], 2),$v['cart_num'],2);
// $cart_select[$k]['deduction_price'] =$deduction_price_count;
// self::$activity_price = bcadd(self::$activity_price, $deduction_price_count, 2);
// }
// }
if ($user && $user['user_ship'] == 4) {
//更新 为4商户的时候减去商户价格
$deduction_price_count=bcmul(bcsub($find['price'], $find['cost'], 2),$v['cart_num'],2);
$cart_select[$k]['deduction_price'] =$deduction_price_count;
self::$activity_price = bcadd(self::$activity_price, $deduction_price_count, 2);
}
if($pay_type ==19){
if ($find['swap'] < $cart_select[$k]['cart_num']) {
throw new \Exception('兑换数量不足');
}
}
//利润 //利润
// $cart_select[$k]['profit'] = bcmul($cart_select[$k]['total_price'],0.05,2); //利润 // $cart_select[$k]['profit'] = bcmul($v['cart_num'], $onePrice, 2); //利润
$cart_select[$k]['purchase'] = bcmul($v['cart_num'], $find['purchase'], 2) ?? 0; //成本 $cart_select[$k]['purchase'] = bcmul($v['cart_num'], $find['purchase'], 2) ?? 0; //成本
$cart_select[$k]['pay_price'] = bcmul($v['cart_num'], $find['price'], 2); //订单支付金额 $cart_select[$k]['pay_price'] = bcmul($v['cart_num'], $find['price'], 2); //订单支付金额
$cart_select[$k]['store_price'] = bcmul($v['cart_num'], $find['cost'], 2)??0; //门店零售价 $cart_select[$k]['store_price'] = bcmul($v['cart_num'], $find['cost'], 2)??0; //门店零售价
$cart_select[$k]['vip_price'] = bcmul($v['cart_num'], $find['vip_price'], 2)??0; //vip售价 $cart_select[$k]['vip_price'] = bcmul($v['cart_num'], $find['vip_price'], 2)??0; //vip售价
$cart_select[$k]['product_id'] = $find['product_id']; $cart_select[$k]['product_id'] = $find['product_id'];
$cart_select[$k]['old_cart_id'] = $v['id']; $cart_select[$k]['old_cart_id'] = $v['id'];
$cart_select[$k]['cart_num'] = $v['cart_num']; $cart_select[$k]['cart_num'] = $v['cart_num'];
$cart_select[$k]['verify_code'] = $params['verify_code'] ?? ''; $cart_select[$k]['verify_code'] = $params['verify_code'] ?? '';
//vip1待返回金额 //vip1待返回金额
$cart_select[$k]['vip_frozen_price'] = bcsub($cart_select[$k]['pay_price'],$cart_select[$k]['vip_price'],2); $cart_select[$k]['vip_frozen_price'] = bcsub($cart_select[$k]['pay_price'],$cart_select[$k]['vip_price'],2);
// d($cart_select[$k]['pay_price'],$cart_select[$k]['store_price'],$cart_select[$k]['vip_price'] );
$cartInfo = $cart_select[$k]; $cartInfo = $cart_select[$k];
$cartInfo['name'] = $find['store_name']; $cartInfo['name'] = $find['store_name'];
$cartInfo['image'] = $find['image']; $cartInfo['image'] = $find['image'];
//计算好vip价格
// $vipPrice = self::dealVip($find['price']);
// if ($vipPrice) {
// $cartInfo['price'] = $vipPrice;
// }
//$cart_select[$k]['total'] - $vipPrice ?? 0;
$cart_select[$k]['cart_info'] = json_encode($cartInfo); $cart_select[$k]['cart_info'] = json_encode($cartInfo);
$cart_select[$k]['branch_product_id'] = $find['branch_product_id']; $cart_select[$k]['branch_product_id'] = $find['branch_product_id'];
//理论上每笔都是拆分了 //理论上每笔都是拆分了
@ -113,53 +116,52 @@ class StoreOrderLogic extends BaseLogic
$cart_select[$k]['unit_name'] = StoreProductUnit::where(['id' => $find['unit']])->value('name'); $cart_select[$k]['unit_name'] = StoreProductUnit::where(['id' => $find['unit']])->value('name');
self::$total_price = bcadd(self::$total_price, $cart_select[$k]['total_price'], 2); self::$total_price = bcadd(self::$total_price, $cart_select[$k]['total_price'], 2);
self::$pay_price = bcadd(self::$pay_price, $cart_select[$k]['pay_price'], 2); self::$pay_price = bcadd(self::$pay_price, $cart_select[$k]['pay_price'], 2);
self::$cost = bcadd(self::$cost, $cart_select[$k]['cost'], 2); self::$cost = bcadd(self::$cost, $cart_select[$k]['purchase'], 2);
self::$store_price = bcadd(self::$store_price, $cart_select[$k]['store_price'], 2);//门店零售价格 self::$store_price = bcadd(self::$store_price, $cart_select[$k]['store_price'], 2);//门店零售价格
// self::$profit = bcadd(self::$profit, $cart_select[$k]['profit'], 2); // self::$profit = bcadd(self::$profit, $cart_select[$k]['profit'], 2);
} }
if ($user && $user['user_ship'] == 1 && $pay_type !=17) { //加支付方式限制
$pay_price = self::$pay_price; // $pay_type = isset($params['pay_type'])?$params['pay_type']:0;
$activity_string = ''; // if ($user && $user['user_ship'] == 1 && $pay_type !=17) {
}else{ // $pay_price = self::$pay_price;
$pay_price =bcsub(self::$pay_price, self::$activity_price, 2); //减去活动优惠金额 // }else{
$activity_string = '减免'; // $pay_price =bcsub(self::$pay_price, self::$activity_price, 2); //减去活动优惠金额
} // }
if($pay_type == 19){ $pay_price = self::$pay_price;
$pay_price = self::$pay_price;
$activity_string = '';
}
// if($pay_price < 500){ // if($pay_price < 500){
// throw new \think\Exception('金额低于500'); // throw new Exception('金额低于500');
// } // }
$vipPrice = 0;
//成本价 收益 //成本价 收益
$order = [ $order = [
'create_time' => time(), 'create_time' => time(),
'order_id' =>$params['order_id'] ?? getNewOrderId('PF'), 'order_id' => $params['order_id'] ?? getNewOrderId('PF'),
'total_price' => self::$total_price, //总价 'total_price' => self::$total_price, //总价
'cost' => self::$cost,//成本价 'cost' => self::$cost, //成本价1-
'profit' => 0,//利润 'pay_price' => $pay_price, //后期可能有降价抵扣
'pay_price' => $pay_price,//后期可能有降价抵扣 'vip_price' => 0,
'vip_price' => $vipPrice, 'total_num' => count($cart_select), //总数
'total_num' => count($cart_select),//总数
'pay_type' => $params['pay_type'] ?? 0, 'pay_type' => $params['pay_type'] ?? 0,
'reservation_time' => $params['reservation_time'] ?? null, 'reservation_time' => $params['reservation_time'] ?? null,
'cart_id' => implode(',', $cartId), 'cart_id' => implode(',', $cartId),
'store_id' => $params['store_id'] ?? 0, 'store_id' => $params['store_id'] ?? 0,
'shipping_type' =>3,//配送方式 1=快递 2=门店自提 'shipping_type' => $params['shipping_type'] ?? 2, //配送方式 1=快递 2=门店自提
'activity' =>$activity_string, 'activity' => '减免',
'activity_price' =>self::$activity_price,//活动优惠价 'activity_price' => self::$activity_price,
'activities' => self::$activity_price>0?1:0, 'activities' => self::$activity_price>0?1:0,
'default_delivery'=>1, 'deduction_price' => self::$activity_price,
'original_price'=>self::$total_price, 'is_vip' => 0,
'deduction_price' => self::$activity_price,//抵扣金额 'is_storage' => $params['is_storage']??0,
]; ];
if($user && $user['user_ship']!=4){ $order['default_delivery'] = 0;
$order['is_vip']=1; if ($params['store_id']) {
$order['default_delivery'] = SystemStore::where('id', $params['store_id'])->value('is_send');
} }
if($user && $user['user_ship']>=1 &&$user['user_ship']<=3){
$order['is_vip'] = 1;
}
} catch (\Exception $e) { } catch (\Exception $e) {
self::setError($e->getMessage()); self::setError($e->getMessage());
return false; return false;

View File

@ -85,7 +85,6 @@ class StoreOrderController extends BaseAdminController
$params = $this->request->post(); $params = $this->request->post();
$params['store_id'] = $this->adminInfo['store_id']; $params['store_id'] = $this->adminInfo['store_id'];
$user = User::where('id', $params['uid'])->find(); $user = User::where('id', $params['uid'])->find();
$params['shipping_type'] =3;
$res = StoreOrderLogic::cartIdByOrderInfo($cartId, null, $user, $params); $res = StoreOrderLogic::cartIdByOrderInfo($cartId, null, $user, $params);
if ($res == false) { if ($res == false) {
$msg = StoreOrderLogic::getError(); $msg = StoreOrderLogic::getError();
@ -347,34 +346,25 @@ class StoreOrderController extends BaseAdminController
*/ */
public function rechange_amount() public function rechange_amount()
{ {
// $order = UserRecharge::where('order_id','CZ1719052252643357')->find();
// $order['pay_price'] = $order['price'];
// d(1);
// PayNotifyLogic::handle('recharge', $order['order_id'], $order);
// d(1);
$pay_type = $this->request->post('pay_type'); $pay_type = $this->request->post('pay_type');
$auth_code = $this->request->post('auth_code'); //微信支付条码 $auth_code = $this->request->post('auth_code'); //微信支付条码
if ($auth_code == '' && $pay_type != PayEnum::CASH_PAY) { if ($auth_code == '' && $pay_type != PayEnum::CASH_PAY) {
return $this->fail('支付条码不能为空'); return $this->fail('支付条码不能为空');
} }
$params = $this->request->post(); $params = $this->request->post();
switch ($pay_type) {
case PayEnum::CASH_PAY:
$recharge_type = 'CASH_PAY';
break;
case PayEnum::WECHAT_PAY_BARCODE:
$recharge_type = 'INDUSTRYMEMBERS';
break;
case PayEnum::ALIPAY_BARCODE:
$recharge_type = 'ALI_INDUSTRYMEMBERS';
break;
default:
$recharge_type = '';
break;
}
$data = [ $data = [
'store_id' => $this->adminInfo['store_id'], 'store_id' => $this->adminInfo['store_id'],
'uid' => $params['uid'], 'uid' => $params['uid'],
'staff_id' => $this->adminId, 'staff_id' => $this->adminId,
'order_id' => getNewOrderId('CZ'), 'order_id' => getNewOrderId('CZ'),
'price' => $params['price'], 'price' => $params['price'],
'recharge_type' =>$recharge_type, 'recharge_type' => 'INDUSTRYMEMBERS',
'type' => 1,
]; ];
$order = UserRecharge::create($data); $order = UserRecharge::create($data);
$order['pay_price'] = $order['price']; $order['pay_price'] = $order['price'];

View File

@ -19,31 +19,9 @@ use app\store\validate\store_product\StoreProductValidate;
// #[ApiDoc\title('商品列表')] // #[ApiDoc\title('商品列表')]
class StoreProductController extends BaseAdminController class StoreProductController extends BaseAdminController
{ {
/**
// #[ * 商品列表
// ApiDoc\Title('商品列表'), */
// ApiDoc\url('/store/store_product/storeProduct/lists'),
// ApiDoc\Method('GET'),
// ApiDoc\NotHeaders(),
// ApiDoc\Query(name: 'cate_id', type: 'int', require: false, desc: '分类id'),
// ApiDoc\Query(name: 'store_name', type: 'string', require: false, desc: '商品名称'),
// ApiDoc\Query(name: 'status', type: 'int', require: false, desc: '状态1上架2下架3售罄4库存告警'),
// ApiDoc\Header(ref: [Definitions::class, "token"]),
// ApiDoc\Query(ref: [Definitions::class, "page"]),
// ApiDoc\ResponseSuccess("data", type: "array", children: [
// ['name' => 'id', 'desc' => 'ID', 'type' => 'int'],
// ['name' => 'product_id', 'desc' => '商品ID', 'type' => 'int'],
// ['name' => 'image', 'desc' => '图片', 'type' => 'string'],
// ['name' => 'store_name', 'desc' => '商品名称', 'type' => 'string'],
// ['name' => 'price', 'desc' => '零售价', 'type' => 'float'],
// ['name' => 'cost', 'desc' => '成本价', 'type' => 'float'],
// ['name' => 'sales', 'desc' => '销量', 'type' => 'int'],
// ['name' => 'stock', 'desc' => '库存', 'type' => 'int'],
// ['name' => 'unit_name', 'desc' => '单位', 'type' => 'string'],
// ['name' => 'cate_name', 'desc' => '分类', 'type' => 'string'],
// ['name' => 'status', 'desc' => '状态1上架0下架', 'type' => 'string'],
// ]),
// ]
public function lists() public function lists()
{ {
return $this->dataLists(new StoreBranchProductLists()); return $this->dataLists(new StoreBranchProductLists());
@ -194,5 +172,4 @@ class StoreProductController extends BaseAdminController
StoreBranchProductLogic::stock($params); StoreBranchProductLogic::stock($params);
return $this->success('操作成功', [], 1, 1); return $this->success('操作成功', [], 1, 1);
} }
} }