From d2a95d48d9a85b497b655a5b5afc070d46b6ee51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=88=90?= <2847920761@qq.com> Date: Tue, 11 Mar 2025 11:48:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/BgtProjectRecruitApplyServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/bgt/service/impl/BgtProjectRecruitApplyServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/bgt/service/impl/BgtProjectRecruitApplyServiceImpl.java index 9696be8..29a6969 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/bgt/service/impl/BgtProjectRecruitApplyServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/bgt/service/impl/BgtProjectRecruitApplyServiceImpl.java @@ -288,11 +288,6 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl(). - eq(BgtProjectRecruitApply::getUserId, appUserId). - in(BgtProjectRecruitApply::getStatus, "3", "5") - ); WgzUser byId = wgzUserService.findByUserId(appUserId); if (byId == null) { throw new RuntimeException("查询不到用户信息!"); @@ -301,6 +296,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl(). + eq(BgtProjectRecruitApply::getUserId, appUserId). + in(BgtProjectRecruitApply::getStatus, "3", "5") + ); if (i > 0) { throw new RuntimeException("已有工地!不可再次申请!"); } @@ -309,6 +309,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl(). eq(BgtProjectRecruitApply::getUserId, appUserId). eq(BgtProjectRecruitApply::getRecruitId, id). + orderByDesc(BgtProjectRecruitApply::getId). last("limit 1") ); if (oneApply!=null && !(oneApply.getStatus().equals("6") || oneApply.getStatus().equals("7"))) {