From 7f97d853b9a1978ba9c7e3379708caa75789d341 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Wed, 31 Aug 2022 16:00:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=8D=A2=E6=88=90=E5=8D=8E=E4=B8=BA=E4=BA=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iasf/controller/SysColumnController.java | 18 +----------------- src/main/resources/application-dev.yml | 4 ++-- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/huoran/iasf/controller/SysColumnController.java b/src/main/java/com/huoran/iasf/controller/SysColumnController.java index eff8814..fcd11ff 100644 --- a/src/main/java/com/huoran/iasf/controller/SysColumnController.java +++ b/src/main/java/com/huoran/iasf/controller/SysColumnController.java @@ -90,23 +90,7 @@ public class SysColumnController { @ApiOperation(value = "栏目排序(依据id更改)", response = SysColumn.class) public R sortByColumn(@RequestBody List sortColumnRespVOList) { - for (SortColumnRespVO sort : sortColumnRespVOList) { - SysColumn sysColumn = new SysColumn(); - BeanUtils.copyProperties(sort, sysColumn); - service.updateById(sysColumn); - //依据当前循环获取的栏目id,查询到引用当前栏目的文章对其进行修改栏目id - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("column_id", sysColumn.getId()); - List contentList = contentService.list(queryWrapper); - if (contentList.size() > 0) { - for (SysContent content : contentList) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.set("column_id", sysColumn.getId()); - contentService.update(content, updateWrapper); - } - } - - } + return R.success(); } } diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index b7539ed..73a8add 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -6,9 +6,9 @@ spring: datasource: master: username: root - password: 123456 + password: HuoRan@2021 driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 + url: jdbc:mysql://139.9.47.170:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 cache: type: redis redis: