Commit c910778d by 陶光胜

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-data-cloud into developer
parents 15e30bbe 007522ca
......@@ -62,7 +62,7 @@ public class IndexController {
}
@RequestMapping("/update-index")
public RestResponse updateIndex(IndexDTO indexDTO, Integer updateType, String reason) {
public RestResponse updateIndex(IndexDTO indexDTO, String relModuleIds, Integer updateType, String reason) {
if (indexDTO.getIndexId() == null || updateType == null) {
return RestResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), ErrorCode.PARAMETER_ERROR.getMsg());
}
......@@ -70,6 +70,9 @@ public class IndexController {
String realName = UserUtils.getUser().getRealName();
indexDTO.setOptUserId(id);
indexDTO.setOptUserName(realName);
if (StringUtils.isNotBlank(relModuleIds)) {
indexDTO.setRelModuleIdList(Lists.newArrayList(relModuleIds.split(",")));
}
ServiceResponse<Void> serviceResponse = indexApiService.updateIndex(indexDTO, updateType, reason);
return ResultControllerUtils.commonResult(serviceResponse);
}
......
......@@ -10,6 +10,7 @@ import com.gic.cloud.service.IndexService;
import com.gic.commons.util.EntityUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -103,6 +104,9 @@ public class IndexServiceImpl implements IndexService {
IndexQO indexQO = new IndexQO();
PageHelper.startPage(1, 1);
List<Integer> indexIdList = indexModuleRelService.listBusinessIdByModuleIds(Collections.singletonList(moduleId));
if (CollectionUtils.isEmpty(indexIdList)) {
return null;
}
indexQO.setIndexIdList(indexIdList);
return tabIndexMapper.listIndex(indexQO).get(0);
}
......
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