更新商品详情

This commit is contained in:
yaooo 2023-08-18 16:22:55 +08:00
parent af10861443
commit 6dcfc634ef
3 changed files with 11 additions and 5 deletions

View File

@ -99,13 +99,13 @@ class StoreOrderDao extends BaseDao
// 12表示信用购
switch ($where['status']) {
case 0 :
$query->where('paid', 1)->whereIn('StoreOrder.status', [0, 9]);
$query->where('StoreOrder.paid', 1)->whereIn('StoreOrder.status', [0, 9]);
break;
case 1 :
$query->where('paid', 1)->where('StoreOrder.status', 1);
break;
case 2 :
$query->where('paid', 1)->where('StoreOrder.status', 2)->where('pay_type', '<>', StoreGroupOrder::PAY_TYPE_CREDIT_BUY);
$query->where('StoreOrder.paid', 1)->where('StoreOrder.status', 2)->where('pay_type', '<>', StoreGroupOrder::PAY_TYPE_CREDIT_BUY);
break;
case 3 :
$query->where('paid', 1)->where('StoreOrder.status', 1);
@ -122,7 +122,7 @@ class StoreOrderDao extends BaseDao
$query->where('paid', 1)->whereIn('StoreOrder.status', [2, 3]);
break;
default:
// $query->where('paid', 1)->where('StoreOrder.status', $where['status']);
$query->where('paid', 1)->where('StoreOrder.status', $where['status']);
break;
}
})

View File

@ -876,7 +876,7 @@ class StoreOrderRepository extends BaseRepository
case 1:
break; // 未支付
case 2:
$param['paid'] = 1;
$param['StoreOrder.paid'] = 1;
$param['StoreOrder.status'] = 0;
break; // 待发货
case 3:
@ -1601,7 +1601,6 @@ class StoreOrderRepository extends BaseRepository
]);
$count = $query->count();
$list = $query->page($page, $limit)->select()->append(['refund_extension_one', 'refund_extension_two']);
return compact('count', 'list');
}

View File

@ -594,6 +594,13 @@ class Community extends BaseController
if ($resaleList) $resaleList = $resaleList->toArray();
foreach($resaleList as $k=>$v) {
$resaleList[$k]['detail'] = json_decode($v['detail'], true);
if (empty($v['image'])) {
$prodImage = Db::name('store_product')->where('product_id', $v['product_id'])->value('image');
$prodImageList = explode(',', $prodImage);
if (count($prodImageList) > 0) {
$resaleList[$k]['image'] = $prodImageList[0];
}
}
}
$communityInfo['resale'] = $resaleList;
return app('json')->success($communityInfo);