From ad9b4b1846848174c3961f4b1f4558f2b9f98bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 14 Oct 2024 16:38:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B010.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HitCompetitionStudentInfoController.java | 10 ++++++++++ .../IHitCompetitionStudentInfoService.java | 7 +++++++ .../HitCompetitionStudentInfoServiceImpl.java | 19 +++++++++++++++++++ ruoyi-ui/src/api/hit/stuInfo.js | 9 +++++++++ ruoyi-ui/src/views/hit/stuInfo/index.vue | 4 ++-- 5 files changed, 47 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/cms/controller/HitCompetitionStudentInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/cms/controller/HitCompetitionStudentInfoController.java index 95739d9..62fa4f5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/cms/controller/HitCompetitionStudentInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/cms/controller/HitCompetitionStudentInfoController.java @@ -108,6 +108,16 @@ public class HitCompetitionStudentInfoController extends BaseController { { return toAjax(hitCompetitionStudentInfoService.updateHitCompetitionStudentInfo(hitCompetitionStudentInfo)); } + /** + * 修改大赛学生编辑 + */ + + @Log(title = "大赛学生", businessType = BusinessType.UPDATE) + @PutMapping("editInfo") + public AjaxResult editInfo(@RequestBody HitCompetitionStudentInfo hitCompetitionStudentInfo) + { + return toAjax(hitCompetitionStudentInfoService.updateHitCompetitionStudentInfoUpdate(hitCompetitionStudentInfo)); + } /** * 删除大赛学生 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/cms/service/IHitCompetitionStudentInfoService.java b/ruoyi-admin/src/main/java/com/ruoyi/cms/service/IHitCompetitionStudentInfoService.java index c882a34..c500897 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/cms/service/IHitCompetitionStudentInfoService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/cms/service/IHitCompetitionStudentInfoService.java @@ -55,6 +55,13 @@ public interface IHitCompetitionStudentInfoService extends IService queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(HitCompetitionStudentInfo::getSchoolName, hitCompetitionStudentInfo.getSchoolName()); + queryWrapper.eq(HitCompetitionStudentInfo::getIsPreliminary,true); + DateTime now = DateUtil.date(); + DateTime dateTime = DateUtil.beginOfYear(now); + DateTime dateTime1 = DateUtil.endOfYear(now); + queryWrapper.between(HitCompetitionStudentInfo::getCreateTime, dateTime, dateTime1); + hitCompetitionStudentInfo.setUpdateTime(DateUtils.getNowDate()); + return hitCompetitionStudentInfoMapper.updateHitCompetitionStudentInfo(hitCompetitionStudentInfo); + } + /** * 批量删除大赛学生 * diff --git a/ruoyi-ui/src/api/hit/stuInfo.js b/ruoyi-ui/src/api/hit/stuInfo.js index 6b3ca56..ac18dfd 100644 --- a/ruoyi-ui/src/api/hit/stuInfo.js +++ b/ruoyi-ui/src/api/hit/stuInfo.js @@ -41,6 +41,15 @@ export function updateInfo(data) { }) } +// 修改大赛学生 +export function editInfo(data) { + return request({ + url: '/system/hit_stu_info/editInfo', + method: 'put', + data: data + }) +} + // 删除大赛学生 export function delInfo(id) { return request({ diff --git a/ruoyi-ui/src/views/hit/stuInfo/index.vue b/ruoyi-ui/src/views/hit/stuInfo/index.vue index eb05b8b..d2d19e1 100644 --- a/ruoyi-ui/src/views/hit/stuInfo/index.vue +++ b/ruoyi-ui/src/views/hit/stuInfo/index.vue @@ -193,7 +193,7 @@