Browse Source

no message

master
weigang 5 years ago
parent
commit
e5f953e054
  1. 6
      app/Constants/v3/ErrorCode.php
  2. 2
      app/Service/v3/Implementations/OrderOnlineService.php

6
app/Constants/v3/ErrorCode.php

@ -95,6 +95,12 @@ class ErrorCode extends AbstractConstants
*/
const ORDER_OFFLINE_FAIL = 612;
/**
* 下单失败
* @Message("无法自己购买自己店铺的商品")
*/
const ORDER_ONLINE_LIMIT_STORE_BUY_SELF = 613;
/************************************/
/* 支付相关 651-700 */
/************************************/

2
app/Service/v3/Implementations/OrderOnlineService.php

@ -211,7 +211,7 @@ class OrderOnlineService implements OrderOnlineServiceInterface
// 禁止店铺自己下自己的单
if (in_array($userId, [$store->user_id, $store->admin_id])) {
throw new ErrorCodeException(ErrorCode::ORDER_ONLINE_FAIL, '无法购买自己店铺商品', ['store' => json_encode($store), 'user_id' => $userId, 'store_item' => $storeItem]);
throw new ErrorCodeException(ErrorCode::ORDER_ONLINE_LIMIT_STORE_BUY_SELF, '', ['store' => json_encode($store), 'user_id' => $userId, 'store_item' => $storeItem]);
}
$storeType = $store->category_id;

Loading…
Cancel
Save