Commit 3796f390 by zhiwj

发布更新加上原因

parent f0edbc0a
...@@ -52,6 +52,16 @@ public interface DataExplainApiService { ...@@ -52,6 +52,16 @@ public interface DataExplainApiService {
* @throws * @throws
*/ */
ServiceResponse<Page<DataExplainDTO>> listDataExplain(DataExplainQO dataExplainQO); ServiceResponse<Page<DataExplainDTO>> listDataExplain(DataExplainQO dataExplainQO);
/**
* @Title: listDataExplain
* @Description:
* @author zhiwj
* @param
* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.cloud.dto.DataExplainDTO>>
* @throws
*/
ServiceResponse<List<DataExplainDTO>> listAllDataExplain();
/** /**
* @Title: delete * @Title: delete
......
...@@ -52,6 +52,15 @@ public interface IndexApiService { ...@@ -52,6 +52,15 @@ public interface IndexApiService {
* @throws * @throws
*/ */
ServiceResponse<Page<IndexDTO>> listIndex(IndexQO indexQO); ServiceResponse<Page<IndexDTO>> listIndex(IndexQO indexQO);
/**
* @Title: listAllIndex
* @Description:
* @author zhiwj
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.cloud.dto.IndexDTO>>
* @throws
*/
ServiceResponse<List<IndexDTO>> listAllIndex();
/** /**
* @Title: delete * @Title: delete
......
...@@ -85,7 +85,13 @@ public class DataExplainController { ...@@ -85,7 +85,13 @@ public class DataExplainController {
if (StringUtils.isBlank(dataExplainIds)) { if (StringUtils.isBlank(dataExplainIds)) {
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 = Stream.of(dataExplainIds.split(",")).map(Integer::valueOf).collect(Collectors.toList()); List<Integer> dataExplainIdList;
if ("all".equals(dataExplainIds)) {
List<DataExplainDTO> explainDTOList = this.dataExplainApiService.listAllDataExplain().getResult();
dataExplainIdList = explainDTOList.stream().map(DataExplainDTO::getDataExplainId).collect(Collectors.toList());
} else {
dataExplainIdList = Stream.of(dataExplainIds.split(",")).map(Integer::valueOf).collect(Collectors.toList());
}
ServiceResponse<Void> serviceResponse = dataExplainApiService.publish(dataExplainIdList, updateType, reason, UserUtils.getUser().getId(), UserUtils.getUser().getRealName()); ServiceResponse<Void> serviceResponse = dataExplainApiService.publish(dataExplainIdList, updateType, reason, UserUtils.getUser().getId(), UserUtils.getUser().getRealName());
return ResultControllerUtils.commonResult(serviceResponse); return ResultControllerUtils.commonResult(serviceResponse);
} }
......
...@@ -102,7 +102,13 @@ public class IndexController { ...@@ -102,7 +102,13 @@ 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 = Stream.of(indexIds.split(",")).map(Integer::valueOf).collect(Collectors.toList()); List<Integer> indexIdList;
if ("all".equals(indexIds)) {
List<IndexDTO> list = indexApiService.listAllIndex().getResult();
indexIdList = list.stream().map(IndexDTO::getIndexId).collect(Collectors.toList());
} else {
indexIdList = Stream.of(indexIds.split(",")).map(Integer::valueOf).collect(Collectors.toList());
}
ServiceResponse<Void> serviceResponse = indexApiService.publish(indexIdList, updateType, reason, id, realName); ServiceResponse<Void> serviceResponse = indexApiService.publish(indexIdList, updateType, reason, id, realName);
return ResultControllerUtils.commonResult(serviceResponse); return ResultControllerUtils.commonResult(serviceResponse);
} }
......
...@@ -85,6 +85,12 @@ public class DataExplainApiServiceImpl implements DataExplainApiService { ...@@ -85,6 +85,12 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
} }
@Override @Override
public ServiceResponse<List<DataExplainDTO>> listAllDataExplain() {
List<TabDataExplain> explainList = this.dataExplainService.listAllDataExplain(new DataExplainQO());
return EnterpriseServiceResponse.success(EntityUtil.changeEntityListByJSON(DataExplainDTO.class, explainList));
}
@Override
public ServiceResponse<Void> delete(Integer dataExplainId) { public ServiceResponse<Void> delete(Integer dataExplainId) {
TabDataExplain dataExplain = this.dataExplainService.getByDataExplainId(dataExplainId); TabDataExplain dataExplain = this.dataExplainService.getByDataExplainId(dataExplainId);
if (dataExplain == null) { if (dataExplain == null) {
...@@ -100,6 +106,7 @@ public class DataExplainApiServiceImpl implements DataExplainApiService { ...@@ -100,6 +106,7 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
@Override @Override
public ServiceResponse<Void> publish(List<Integer> dataExplainIdList, Integer updateType, String reason, Integer optUserId, String optUserName) { public ServiceResponse<Void> publish(List<Integer> dataExplainIdList, Integer updateType, String reason, Integer optUserId, String optUserName) {
for (Integer dataExplainId : dataExplainIdList) { for (Integer dataExplainId : dataExplainIdList) {
this.updateTipService.publish(dataExplainId, LogAndUpdateTipsTypeEnum.DATA_EXPLAIN.getCode()); this.updateTipService.publish(dataExplainId, LogAndUpdateTipsTypeEnum.DATA_EXPLAIN.getCode());
DataExplainDTO dataExplainDTO = new DataExplainDTO(); DataExplainDTO dataExplainDTO = new DataExplainDTO();
dataExplainDTO.setDataExplainId(dataExplainId); dataExplainDTO.setDataExplainId(dataExplainId);
......
...@@ -110,6 +110,13 @@ public class IndexApiServiceImpl implements IndexApiService { ...@@ -110,6 +110,13 @@ public class IndexApiServiceImpl implements IndexApiService {
} }
@Override @Override
public ServiceResponse<List<IndexDTO>> listAllIndex() {
List<TabIndex> tabIndices = indexService.listAllIndex(new IndexQO());
List<IndexDTO> dtoList = EntityUtil.changeEntityListByJSON(IndexDTO.class, tabIndices);
return EnterpriseServiceResponse.success(dtoList);
}
@Override
public ServiceResponse<Void> delete(Integer indexId) { public ServiceResponse<Void> delete(Integer indexId) {
TabIndex index = this.indexService.getByIndexId(indexId); TabIndex index = this.indexService.getByIndexId(indexId);
if (index == null) { if (index == null) {
......
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