|
@@ -16,6 +16,7 @@ import cn.com.ty.lift.business.project.service.ProjectUserService;
|
|
|
import cn.com.ty.lift.common.base.ExportRequest;
|
|
|
import cn.com.ty.lift.common.constants.ApiConstants;
|
|
|
import cn.com.xwy.boot.web.dto.RestResponse;
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -54,7 +55,7 @@ public class ProjectController {
|
|
|
@PostMapping("list")
|
|
|
public RestResponse list(@Valid @RequestBody ProjectRequest request) {
|
|
|
IPage<ProjectResponse> page = projectService.list(request);
|
|
|
- if (ObjectUtil.isEmpty(page.getRecords())) {
|
|
|
+ if (CollUtil.isEmpty(page.getRecords())) {
|
|
|
return RestResponse.success();
|
|
|
}
|
|
|
return RestResponse.success(page, ApiConstants.RESULT_SUCCESS, MessageUtils.get("msg.query.success"));
|
|
@@ -69,7 +70,7 @@ public class ProjectController {
|
|
|
@PostMapping("companyList")
|
|
|
public RestResponse companyList(@Valid @RequestBody ProjectCompanyRequest request) {
|
|
|
IPage<ProjectResponse> page = projectService.companyList(request);
|
|
|
- if (ObjectUtil.isEmpty(page.getRecords())) {
|
|
|
+ if (CollUtil.isEmpty(page.getRecords())) {
|
|
|
return RestResponse.success();
|
|
|
}
|
|
|
return RestResponse.success(page, MessageUtils.get("msg.query.success"));
|
|
@@ -84,7 +85,7 @@ public class ProjectController {
|
|
|
@PostMapping("history/list")
|
|
|
public RestResponse historyList(@RequestBody ProjectRequest request) {
|
|
|
IPage<ProjectHistory> page = projectService.historyList(request);
|
|
|
- if (ObjectUtil.isEmpty(page.getRecords())) {
|
|
|
+ if (CollUtil.isEmpty(page.getRecords())) {
|
|
|
return RestResponse.success();
|
|
|
}
|
|
|
return RestResponse.success(page, MessageUtils.get("msg.query.success"));
|
|
@@ -99,7 +100,7 @@ public class ProjectController {
|
|
|
@PostMapping("userList")
|
|
|
public RestResponse userList(@Valid @RequestBody ProjectDetailRequest request) {
|
|
|
List<ProjectUser> userList = projectUserService.userList(request);
|
|
|
- if (ObjectUtil.isEmpty(userList)) {
|
|
|
+ if (CollUtil.isEmpty(userList)) {
|
|
|
return RestResponse.success();
|
|
|
}
|
|
|
return RestResponse.success(userList, MessageUtils.get("msg.query.success"));
|
|
@@ -114,7 +115,7 @@ public class ProjectController {
|
|
|
@PostMapping("projectIDList")
|
|
|
public RestResponse projectIDList(@RequestBody ProjectRegionRequest request) {
|
|
|
List<ProjectIDResponse> projectIDList = projectService.projectIDList(request);
|
|
|
- if (ObjectUtil.isEmpty(projectIDList)) {
|
|
|
+ if (CollUtil.isEmpty(projectIDList)) {
|
|
|
return RestResponse.success();
|
|
|
}
|
|
|
return RestResponse.success(projectIDList, MessageUtils.get("msg.query.success"));
|
|
@@ -209,7 +210,7 @@ public class ProjectController {
|
|
|
@PostMapping("relevance/list")
|
|
|
public RestResponse relevanceList(@RequestBody ProjectLiftRelevanceRequest request) {
|
|
|
IPage<ProjectRelevanceResponse> page = projectLiftRelevanceService.relevanceList(request);
|
|
|
- if (ObjectUtil.isEmpty(page.getRecords())) {
|
|
|
+ if (CollUtil.isEmpty(page.getRecords())) {
|
|
|
return RestResponse.success();
|
|
|
}
|
|
|
return RestResponse.success(page, ApiConstants.RESULT_SUCCESS, MessageUtils.get("msg.query.success"));
|