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' +