From 5e0afb3ce6c27c3def4b4df2e4c9ed45503172a9 Mon Sep 17 00:00:00 2001 From: "kuang.yifei@iwhalecloud.com" Date: Sun, 10 Jul 2022 18:49:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B8=88=E5=82=85=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ghy/web/controller/worker/WorkerController.java | 12 ++++++++++++ .../src/main/resources/templates/worker/worker.html | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerController.java b/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerController.java index 93ed5170..ff8d9ba7 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerController.java @@ -202,6 +202,18 @@ public class WorkerController extends BaseController { } } + @PostMapping("/changeStatus") + @ResponseBody + public AjaxResult changeStatus(Worker worker){ + try { + workerService.updateWorker(worker); + return AjaxResult.success("修改成功"); + }catch (Exception e){ + logger.error(ExceptionUtil.getExceptionMessage(e)); + return AjaxResult.error(e.getMessage()); + } + } + @PostMapping("/settled") @ResponseBody @Transactional(rollbackFor = Exception.class) diff --git a/ghy-admin/src/main/resources/templates/worker/worker.html b/ghy-admin/src/main/resources/templates/worker/worker.html index 84a80071..bb63c507 100644 --- a/ghy-admin/src/main/resources/templates/worker/worker.html +++ b/ghy-admin/src/main/resources/templates/worker/worker.html @@ -175,9 +175,9 @@ /* 用户状态显示 */ function statusTools(row) { if (row.status == 0) { - return ' '; - } else { return ' '; + } else { + return ' '; } }