Merge branch 'local' of ssh://git.fxft.net:2222/php/vd into local
This commit is contained in:
commit
1ae0f77fbe
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Domains\Virtual\Services;
|
||||
|
||||
use Log;
|
||||
use App\Dicts;
|
||||
use Carbon\Carbon;
|
||||
use App\Core\Service;
|
||||
@ -955,7 +956,7 @@ class OrderService extends Service
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
Log::error('操作失败 #:' . $e->getMessage());
|
||||
throw new HttpException('操作失败');
|
||||
throw new HttpException('操作失败' . $e->getMessage());
|
||||
}
|
||||
|
||||
DB::commit();
|
||||
@ -1009,7 +1010,9 @@ class OrderService extends Service
|
||||
|
||||
foreach (array_chunk($data, 1000) as $value) {
|
||||
if ($table === 'virtual_order_cards') {
|
||||
$exists = DB::table($table)->whereIn('sim', array_pluck($value, 'sim'))->whereNull('deleted_at')->get()->pluck('sim')->toArray();
|
||||
$exists = DB::table($table)->whereIn('sim', array_pluck($value, 'sim'))
|
||||
->whereNull('refunded_at')
|
||||
->whereNull('deleted_at')->get()->pluck('sim')->toArray();
|
||||
if (!empty($exists)) {
|
||||
throw new ExistedException('出现重复销售卡 #:' . implode(',', $exists));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user