RightsOperationController.java
1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com.topdraw.business.process.rest;
import com.topdraw.business.module.rights.history.domain.RightsHistory;
import com.topdraw.business.module.rights.history.service.RightsHistoryService;
import com.topdraw.business.module.rights.history.service.dto.RightsHistoryQueryCriteria;
import com.topdraw.business.module.rights.history.service.dto.RightsHistoryQueryType;
import com.topdraw.business.process.service.RightsOperationService;
import com.topdraw.common.ResultInfo;
import com.topdraw.util.TimestampUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import java.util.Arrays;
import java.util.List;
/**
* @author XiangHan
* @date 2021-10-22
*/
@Api(tags = "Rights管理")
@RestController
@RequestMapping("/ucEngine/api/rightsOperation")
public class RightsOperationController {
@Autowired
private RightsOperationService rightsOperationService;
@Autowired
private RightsHistoryService rightsHistoryService;
/**
*
* @param id
* @return
*/
@GetMapping(value = "/findRightsHistoryById/{id}")
@ApiOperation("查询RightsHistory")
public ResultInfo findRightsHistoryById(@PathVariable Long id) {
return ResultInfo.success(rightsHistoryService.findById(id));
}
/**
*
* @param rightsHistory
* @return
*/
@PostMapping(value = "/grantRightsByManual")
@ApiOperation("查询RightsHistory")
public ResultInfo grantRightsByManual(@Validated @RequestBody RightsHistory rightsHistory) {
List<RightsHistory> rightsHistories = Arrays.asList(rightsHistory);
this.rightsOperationService.grantRightsByManual(rightsHistories);
return ResultInfo.success();
}
}