Commit 15ff8926 by guojuxing

pmd规范

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

* @Description: 

* @author guojuxing

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

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

* @Description: 

* @author guojuxing

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

*/
public class FunctionModuleVO implements Serializable{ public class FunctionModuleVO implements Serializable{
private static final long serialVersionUID = 6083023157590374256L; private static final long serialVersionUID = 6083023157590374256L;
...@@ -142,4 +148,9 @@ public class FunctionModuleVO implements Serializable{ ...@@ -142,4 +148,9 @@ public class FunctionModuleVO implements Serializable{
this.logo = logo; this.logo = logo;
return this; return this;
} }
@Override
public String toString() {
return super.toString();
}
} }
...@@ -392,4 +392,9 @@ public class IndexVO implements Serializable { ...@@ -392,4 +392,9 @@ public class IndexVO implements Serializable {
public void setRelTopLevelName(String relTopLevelName) { public void setRelTopLevelName(String relTopLevelName) {
this.relTopLevelName = relTopLevelName; this.relTopLevelName = relTopLevelName;
} }
@Override
public String toString() {
return super.toString();
}
} }
...@@ -28,4 +28,9 @@ public class ModuleVO implements Serializable { ...@@ -28,4 +28,9 @@ public class ModuleVO implements Serializable {
public void setModuleId(String moduleId) { public void setModuleId(String moduleId) {
this.moduleId = 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