处理下单校验的错误
This commit is contained in:
parent
91d3a0078d
commit
3be0a42dc4
@ -106,7 +106,7 @@ class StoreCartDao extends BaseDao
|
||||
->append(['bc_extension_one', 'bc_extension_two']);
|
||||
},
|
||||
'merchant' => function (Relation $query) use ($uid) {
|
||||
$query->field('mer_id,mer_name,mer_state,mer_avatar,delivery_way,commission_rate,category_id,wholesale')
|
||||
$query->field('mer_id,mer_name,mer_state,mer_avatar,delivery_way,commission_rate,category_id,wholesale,type_id')
|
||||
->with([
|
||||
'coupon' => function ($query) use ($uid) {
|
||||
$query->where('uid', $uid);
|
||||
|
@ -1454,6 +1454,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
*/
|
||||
protected function validateCartList($cartId,$address,$user)
|
||||
{
|
||||
/** @var storeCartRepository $storeCartRepository */
|
||||
$storeCartRepository = app()->make(storeCartRepository::class);
|
||||
$cartData = $storeCartRepository->cartIbByData($cartId, $user->uid, $address);
|
||||
$res = $storeCartRepository->checkCartList($cartData, 0, $user);
|
||||
|
@ -375,6 +375,7 @@ class Merchant extends BaseController
|
||||
if (empty($merchantInfo)) {
|
||||
return app('json')->fail('参数错误');
|
||||
}
|
||||
$merchantInfo['paid_margin'] = $merchantInfo['paid_margin'] > $merchantInfo['margin'] ? $merchantInfo['margin'] : $merchantInfo['paid_margin'];
|
||||
$merchantInfo['unpaid_margin'] = bcsub($merchantInfo['margin'], $merchantInfo['paid_margin'], 2);
|
||||
if ($merchantInfo['margin'] <= 0) {
|
||||
$merchantInfo['unpaid_margin'] = 0;
|
||||
|
@ -56,7 +56,7 @@ return [
|
||||
\crmeb\listens\SendSvipCouponListen::class,
|
||||
\crmeb\listens\SyncMerchantMarginStatusListen::class,
|
||||
\crmeb\listens\SyncQueueStatusListen::class,
|
||||
\crmeb\listens\ActivateCouponListen::class,
|
||||
// \crmeb\listens\ActivateCouponListen::class,
|
||||
\crmeb\listens\SetProductProfitRateListen::class,
|
||||
\crmeb\listens\SendSubsidyCouponListen::class,
|
||||
] : [],
|
||||
|
@ -27,6 +27,7 @@ class AutoSendPayOrderSmsListen extends TimerService implements ListenerInterfac
|
||||
public function handle($event): void
|
||||
{
|
||||
$this->tick(1000 * 60 * 5, function () {
|
||||
/** @var StoreGroupOrderRepository $storeGroupOrderRepository */
|
||||
$storeGroupOrderRepository = app()->make(StoreGroupOrderRepository::class);
|
||||
$time = date('Y-m-d H:i:s', strtotime("- 10 minutes"));
|
||||
$groupOrderIds = $storeGroupOrderRepository->getTimeOutIds($time, true);
|
||||
|
@ -25,13 +25,13 @@ class AutoUnlockMerchantMoneyListen extends TimerService implements ListenerInte
|
||||
public function handle($event): void
|
||||
{
|
||||
$this->tick(1000 * 60 * 60, function () {
|
||||
if (time() >= strtotime('today 18:00:00') && time() <= strtotime('today 20:00:00')) {
|
||||
if (time() >= strtotime('today 00:00:00') && time() <= strtotime('today 02:00:00')) {
|
||||
request()->clearCache();
|
||||
/** @var UserBillRepository $userBill */
|
||||
$userBill = app()->make(UserBillRepository::class);
|
||||
// $timer = ((int)systemConfig('mer_lock_time'));
|
||||
// $time = date('Y-m-d H:i:s', $timer ? strtotime("- $timer day") : time());
|
||||
$time = date('Y-m-d 00:00:00');
|
||||
$time = date('Y-m-d 00:00:00', strtotime('-1 day'));
|
||||
$bills = $userBill->getTimeoutMerchantMoneyBill($time);
|
||||
$merchant = app()->make(MerchantRepository::class);
|
||||
$count = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user