更新查询状态

This commit is contained in:
yaooo 2023-08-21 13:28:00 +08:00
parent 8dc64d5832
commit 212a3fc452

View File

@ -585,7 +585,7 @@ class StoreOrderRepository extends BaseRepository
if ($product_type == 98) {
$isUser = 0;
}
$noPay = $this->dao->search(['uid' => $uid, 'is_user' => $isUser])->where($this->getOrderType(1))->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
$noPay = $this->dao->search(['uid' => $uid, 'is_user' => $isUser])->where($this->getOrderType(1))->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->whereRaw("StoreOrder.paid=0 or (StoreOrder.paid=1 and StoreOrder.pay_type=8 and StoreOrder.status=2)")->fetchSql(true)->count();
$noPostage = $this->dao->search(['uid' => $uid, 'is_user' => $isUser])->where($this->getOrderType(2))->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
$noDeliver = $this->dao->search(['uid' => $uid, 'is_user' => $isUser])->where($this->getOrderType(3))->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
$noComment = $this->dao->search(['uid' => $uid, 'is_user' => $isUser])->where($this->getOrderType(4))->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
@ -892,7 +892,8 @@ class StoreOrderRepository extends BaseRepository
$param['StoreOrder.is_del'] = 0;
switch ($status) {
case 1:
$param['StoreOrder.paid'] = 0;
// 特殊处理兼容先货后款
// $param['StoreOrder.paid'] = 0;
break; // 未支付
case 2:
$param['StoreOrder.paid'] = 1;