Commit 75b5192a by 朱继来

调整用户排序

parent b286d7c1
Showing with 2 additions and 2 deletions
...@@ -96,9 +96,9 @@ Class AddOrderController extends Controller ...@@ -96,9 +96,9 @@ Class AddOrderController extends Controller
$UserMainModel = new UserMainModel; $UserMainModel = new UserMainModel;
if (preg_match('/@/', $mobile)) { if (preg_match('/@/', $mobile)) {
$user = $UserMainModel->where('email', $mobile)->select('user_id', 'email', 'is_test')->first(); $user = $UserMainModel->where('email', $mobile)->select('user_id', 'email', 'is_test')->orderBy('create_time', 'desc')->first();
} else { } else {
$user = $UserMainModel->where('mobile', $mobile)->select('user_id', 'mobile', 'is_test')->first(); $user = $UserMainModel->where('mobile', $mobile)->select('user_id', 'mobile', 'is_test')->orderBy('create_time', 'desc')->first();
} }
if (!empty($user)) { if (!empty($user)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment