From 67a5f2c9689d38b5b1533888829b7f9bbf0c3ba8 Mon Sep 17 00:00:00 2001 From: cjl <909710561@qq.com> Date: Thu, 18 Apr 2024 14:01:43 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/cjl' into dev --- screen-api/src/main/java/com/moral/api/controller/AppAllocationController.java | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/screen-api/src/main/java/com/moral/api/controller/AppAllocationController.java b/screen-api/src/main/java/com/moral/api/controller/AppAllocationController.java index 02165ba..ddec6d4 100644 --- a/screen-api/src/main/java/com/moral/api/controller/AppAllocationController.java +++ b/screen-api/src/main/java/com/moral/api/controller/AppAllocationController.java @@ -1,6 +1,13 @@ package com.moral.api.controller; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.moral.api.pojo.ext.allocation.AllocationPageExt; +import com.moral.api.pojo.query.app.AppAllocationFileCond; +import com.moral.api.pojo.query.app.AppAllocationPageCond; +import com.moral.api.pojo.vo.app.AppAllocationFindVo; +import com.moral.api.pojo.vo.app.AppAuthority; +import com.moral.constant.PageResult; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -13,6 +20,8 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import java.util.Arrays; +import java.util.Collections; import java.util.List; import javax.validation.Valid; @@ -44,6 +53,26 @@ return ResultMessage.ok(ObjectUtils.isEmpty(allocationFindVos)? "0":allocationFindVos); } + @PostMapping("/page") + @ApiOperation("���������������������") + public ResultMessage<PageResult<AppAllocationFindVo>> page(@Valid @RequestBody AppAllocationPageCond allocationPageCond){ + Page<AllocationPageExt> allocationFindVos = allocationService.pageApp(allocationPageCond); + PageResult<AppAllocationFindVo> result = new PageResult<>(allocationFindVos); + result.setList(AppAllocationFindVo.convert(allocationFindVos.getRecords())); + return ResultMessage.ok(result); + } + + public static void main(String[] args) { + List<String> list = Arrays.asList("aaa", "bbb","aaa"); + System.out.println("num;" + Collections.frequency(list, "aaa")); + } + + @PostMapping("appFile") + @ApiOperation("������������������or������") + public ResultMessage appFile(@Valid @RequestBody AppAllocationFileCond appAllocationFileCond){ + allocationService.saveFile(appAllocationFileCond); + return ResultMessage.ok(); + } @PostMapping("changeRoutine") @ApiOperation("���������������") @@ -60,4 +89,13 @@ return ResultMessage.ok(); } + + @GetMapping("authority") + @ApiOperation(value = "������������") + public ResultMessage authority(@RequestParam @ApiParam(value = "allocationNum",name = "������") String allocationNum, + @RequestParam @ApiParam(value = "userId",name = "������Id") Integer userId){ + AppAuthority authority = allocationService.authority(allocationNum, userId); + return ResultMessage.ok(authority); + } + } -- Gitblit v1.8.0