|
@@ -61,7 +61,7 @@ public class UserAllocationController {
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/getAccountList")
|
|
|
- public Result<List<UserAllocation>> queryPageList(String userId, Long projectId) {
|
|
|
+ public Result<List<UserAllocation>> getAccountList(String userId, Long projectId) {
|
|
|
Result<List<UserAllocation>> result = new Result<>();
|
|
|
try {
|
|
|
|
|
@@ -86,6 +86,31 @@ public class UserAllocationController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @GetMapping(value = "/getAccountListByProjectId")
|
|
|
+ public Result<List<UserAllocation>> getAccountListByProjectId(Long projectId) {
|
|
|
+ Result<List<UserAllocation>> result = new Result<>();
|
|
|
+ try {
|
|
|
+
|
|
|
+ QueryWrapper<UserAllocation> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("project_id", projectId);
|
|
|
+ Project project = projectService.getById(projectId);
|
|
|
+ if (!Check.isNull(project)) {
|
|
|
+ queryWrapper.eq("media_id", project.getMediaId());
|
|
|
+ }
|
|
|
+
|
|
|
+ List<UserAllocation> userAllocations = userAllocationMapper.selectList(queryWrapper);
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(userAllocations);
|
|
|
+ } catch (Exception e) {
|
|
|
+ result.setSuccess(false);
|
|
|
+ result.success("查询失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|