From a11894728805082c8af16cecad2e2cb7d459fc11 Mon Sep 17 00:00:00 2001 From: philip <244793088@qq.com> Date: Mon, 5 Jul 2021 14:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=BA=8F=E5=BC=B9=E5=87=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../meapi/controller/OperationController.java | 17 +++++++++++++++++ .../mesnac/meapi/mapper/OperationMapper.java | 3 +++ .../mesnac/meapi/service/OperationService.java | 2 ++ .../service/impl/OperationServiceImpl.java | 5 +++++ .../main/resources/mapper/OperationMapper.xml | 12 ++++++++++++ 5 files changed, 39 insertions(+) diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/OperationController.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/OperationController.java index a8fa9919..cfb28765 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/OperationController.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/OperationController.java @@ -74,4 +74,21 @@ public class OperationController { return R.ok(result); } + + @ResponseBody + @GetMapping("/getOperationStep") + public R getOperationStep(FrontPage frontPage, Operation operation){ + IPage result; + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + operation.setSite(CommonMethods.getSite()); + operation.setOperation(frontPage.getGlobalQuery()); + queryWrapper.setEntity(operation); + result = operationService.selectOperationStep(frontPage.getPagePlus(), queryWrapper); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + + return R.ok(result); + } } \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/OperationMapper.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/OperationMapper.java index 612d7b3e..a6c8a600 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/OperationMapper.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/OperationMapper.java @@ -25,4 +25,7 @@ public interface OperationMapper extends BaseMapper { Operation getCurrentRevisionRef(@Param("site") String site, @Param("operation") String operation); + IPage selectOperationStep( IPage page, @Param("locale") String locale,@Param("ew") Wrapper wrapper); + + } \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/OperationService.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/OperationService.java index 35342dfe..8279ebd7 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/OperationService.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/OperationService.java @@ -25,6 +25,8 @@ public interface OperationService extends IService { */ IPage selectPage(Page page, QueryWrapper operation); + IPage selectOperationStep(Page page, QueryWrapper queryWrapper); + List selectList(Operation operation); Operation getCurrentRevisionRef(String site, String operation); diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/OperationServiceImpl.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/OperationServiceImpl.java index 71b6d230..797f114e 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/OperationServiceImpl.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/OperationServiceImpl.java @@ -40,6 +40,11 @@ public class OperationServiceImpl extends ServiceImpl selectOperationStep(Page page, QueryWrapper queryWrapper) { + Locale locale = LocaleContextHolder.getLocale(); + return operationMapper.selectOperationStep(page,locale.getLanguage(),queryWrapper); + } @Override public List selectList(Operation operation) { QueryWrapper queryWrapper = new QueryWrapper<>(); diff --git a/meapi/src/main/resources/mapper/OperationMapper.xml b/meapi/src/main/resources/mapper/OperationMapper.xml index 83ba455f..25212d3a 100644 --- a/meapi/src/main/resources/mapper/OperationMapper.xml +++ b/meapi/src/main/resources/mapper/OperationMapper.xml @@ -615,4 +615,16 @@ AND OPERATION = #{operation} AND CURRENT_REVISION = 'true' +