Commit 15ff8926 by guojuxing

pmd规范

parent 25d955dc
......@@ -6,7 +6,7 @@ import com.gic.api.base.commons.ServiceResponse;
import com.gic.authcenter.security.core.util.UserUtils;
import com.gic.cloud.dto.DataExplainDTO;
import com.gic.cloud.dto.IndexLogDTO;
import com.gic.cloud.qo.DataExplainQO;
import com.gic.cloud.qo.DataExplainQo;
import com.gic.cloud.service.DataExplainApiService;
import com.gic.cloud.service.IndexLogApiService;
import com.gic.commons.webapi.reponse.RestResponse;
......@@ -65,7 +65,7 @@ public class DataExplainController {
}
@RequestMapping("/list-data-explain")
public RestResponse listDataExplain(DataExplainQO dataExplainQO) {
public RestResponse listDataExplain(DataExplainQo dataExplainQO) {
ServiceResponse<Page<DataExplainDTO>> serviceResponse = dataExplainApiService.listDataExplain(dataExplainQO);
return ResultControllerUtils.commonResult(serviceResponse);
}
......@@ -88,7 +88,9 @@ public class DataExplainController {
return RestResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), ErrorCode.PARAMETER_ERROR.getMsg());
}
List<Integer> dataExplainIdList;
if ("all".equals(dataExplainIds)) {
String allCode = "all";
if (allCode.equals(dataExplainIds)) {
List<DataExplainDTO> explainDTOList = this.dataExplainApiService.listAllDataExplain().getResult();
dataExplainIdList = explainDTOList.stream().map(DataExplainDTO::getDataExplainId).collect(Collectors.toList());
} else {
......
......@@ -12,7 +12,13 @@ import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 功能模块
* @ClassName: FunctionModuleController

* @Description: 

* @author guojuxing

* @date 2020/9/7 3:04 PM

*/
@RestController
@RequestMapping("function-module")
public class FunctionModuleController {
......
......@@ -10,7 +10,7 @@ import com.gic.cloud.dto.IndexDescDTO;
import com.gic.cloud.dto.IndexLogDTO;
import com.gic.cloud.operation.web.vo.IndexVO;
import com.gic.cloud.operation.web.vo.ModuleVO;
import com.gic.cloud.qo.IndexQO;
import com.gic.cloud.qo.IndexQo;
import com.gic.cloud.service.IndexApiService;
import com.gic.cloud.service.IndexDescApiService;
import com.gic.cloud.service.IndexLogApiService;
......@@ -46,7 +46,7 @@ public class IndexController {
@RequestMapping("/save-index")
public RestResponse saveIndex(IndexQO indexQO, String relModuleIds) {
public RestResponse saveIndex(IndexQo indexQO, String relModuleIds) {
IndexDTO indexDTO = EntityUtil.changeEntityByJSON(IndexDTO.class, indexQO);
if (indexDTO.getClassifyType() == null ||
StringUtils.isBlank(indexDTO.getCode()) ||
......@@ -90,13 +90,13 @@ public class IndexController {
}
@RequestMapping("/list-index")
public RestResponse listIndex(IndexQO indexQO) {
public RestResponse listIndex(IndexQo indexQO) {
ServiceResponse<Page<IndexDTO>> serviceResponse = indexApiService.listIndex(indexQO);
return ResultControllerUtils.commonResult(serviceResponse);
}
@RequestMapping("/list-all-index")
public RestResponse listAllIndex(IndexQO indexQO) {
public RestResponse listAllIndex(IndexQo indexQO) {
ServiceResponse<List<IndexDTO>> serviceResponse = indexApiService.listAllIndex(indexQO);
return ResultControllerUtils.commonResult(serviceResponse);
}
......@@ -121,8 +121,10 @@ public class IndexController {
Integer id = UserUtils.getUser().getId();
String realName = UserUtils.getUser().getRealName();
List<Integer> indexIdList;
if ("all".equals(indexIds)) {
List<IndexDTO> list = indexApiService.listAllIndex(new IndexQO()).getResult();
String allCode = "all";
if (allCode.equals(indexIds)) {
List<IndexDTO> list = indexApiService.listAllIndex(new IndexQo()).getResult();
indexIdList = list.stream().map(IndexDTO::getIndexId).collect(Collectors.toList());
} else {
indexIdList = Stream.of(indexIds.split(",")).map(Integer::valueOf).collect(Collectors.toList());
......
......@@ -23,7 +23,6 @@ import java.util.Set;
*
* @author hua
*/
//@ControllerAdvice
public class GlobalExceptionHandler {
private static Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
......
......@@ -2,7 +2,13 @@ package com.gic.cloud.operation.web.vo;
import java.io.Serializable;
import java.util.Date;
/**
* 功能模块
* @ClassName: FunctionModuleVO

* @Description: 

* @author guojuxing

* @date 2020/9/7 3:04 PM

*/
public class FunctionModuleVO implements Serializable{
private static final long serialVersionUID = 6083023157590374256L;
......@@ -142,4 +148,9 @@ public class FunctionModuleVO implements Serializable{
this.logo = logo;
return this;
}
@Override
public String toString() {
return super.toString();
}
}
......@@ -392,4 +392,9 @@ public class IndexVO implements Serializable {
public void setRelTopLevelName(String relTopLevelName) {
this.relTopLevelName = relTopLevelName;
}
@Override
public String toString() {
return super.toString();
}
}
......@@ -28,4 +28,9 @@ public class ModuleVO implements Serializable {
public void setModuleId(String moduleId) {
this.moduleId = moduleId;
}
@Override
public String toString() {
return super.toString();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment