Merge branch 'feature/purchase_record' into dev

This commit is contained in:
luofei 2023-07-15 16:11:00 +08:00
commit ba05a93ad6
2 changed files with 3 additions and 3 deletions

View File

@ -1791,8 +1791,8 @@ class ProductRepository extends BaseRepository
/** @var CommunityRepository $communityRepository */
$communityRepository = app()->make(CommunityRepository::class);
$communityRepository->saleOrCancel($cart['source_id'], 0);
$productAttrValueRepository->descSales($cart['productAttr']['product_id'], $cart['productAttr']['unique'], $cart['cart_num']);
$this->dao->descSales($cart['product']['product_id'], $cart['cart_num']);
$productAttrValueRepository->descSales($cart['product_id'], $cart['cart_info']['productAttr']['unique'], $productNum);
$this->dao->descSales($cart['product_id'], $productNum);
} else {
$productAttrValueRepository->incStock($cart['product_id'], $cart['cart_info']['productAttr']['unique'], $productNum);
$this->dao->incStock($cart['product_id'], $productNum);

View File

@ -350,7 +350,7 @@ class Merchant extends BaseController
if ($this->userInfo['uid'] != $merchant->uid) {
return '你不是管理员无法进行提现操作';
}
$unSettleCount = StoreOrderInterest::where('mer_id', $merchant->mer_id)->where('status', StoreOrderInterest::STATUS_UNSETTLED)->count();
$unSettleCount = StoreOrderInterest::where('mer_id', $merchant->mer_id)->where('status', StoreOrderInterest::STATUS_UNSETTLED)->whereTime('start_time', '<=', time())->count();
if ($unSettleCount > 0) {
return '有未结清的订单,请结清订单后再进行提现';
}