|
@@ -70,15 +70,6 @@ public class UserAllocationController {
|
|
|
private IProjectMemberService projectMemberService;
|
|
|
|
|
|
|
|
|
- @PostMapping(value = "/transferAccount")
|
|
|
- public Result transferAccount(Long accountId, Long projectId) {
|
|
|
-
|
|
|
-
|
|
|
- return null;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
@GetMapping(value = "/accountTurnProject")
|
|
|
public Result getAccountList(Long accountId, Long projectId) {
|
|
|
Result result = new Result<>();
|
|
@@ -246,8 +237,11 @@ public class UserAllocationController {
|
|
|
Result<IPage<UserAllocation>> result = new Result<IPage<UserAllocation>>();
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
QueryWrapper<UserAllocation> queryWrapper = QueryGenerator.initQueryWrapper(userAllocation, req.getParameterMap());
|
|
|
- queryWrapper.eq("user_id", user.getId());
|
|
|
- queryWrapper.orderByDesc("id");
|
|
|
+ String roleCode = materialReportMapper.getRoleCodeByUserId(user.getId());
|
|
|
+ if (!"admin".equals(roleCode)) {
|
|
|
+ queryWrapper.eq("user_id", user.getId());
|
|
|
+ queryWrapper.orderByDesc("id");
|
|
|
+ }
|
|
|
Page<UserAllocation> page = new Page<UserAllocation>(pageNo, pageSize);
|
|
|
IPage<UserAllocation> pageList = userAllocationService.page(page, queryWrapper);
|
|
|
result.setSuccess(true);
|