阶段更新

This commit is contained in:
2023-01-16 11:47:12 +08:00
parent 7ad0f6d03d
commit a680e8ff5e
13 changed files with 249 additions and 32 deletions

View File

@@ -463,12 +463,12 @@ class WeChatController extends Controller
}
if ($delivery_code) {
if (! $user->info->delivery_code) {
$areaCode = AreaCode::query()->where('code', $delivery_code)->first();
if ($areaCode->user_id) {
return $this->failed('当前提货码已被别人使用');
}
$areaCode = AreaCode::query()->where('code', $delivery_code)->first();
if ($areaCode->user_id) {
return $this->failed('当前提货码已被别人使用');
}
if (! $user->info->delivery_code) {
$user->info->update([
'delivery_code' => $delivery_code
]);