Commit 66652be9 authored by 赵啸非's avatar 赵啸非

修改根据业务查询部门逻辑

parent 7d7587b7
......@@ -368,8 +368,16 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
private List<SiteTreeSelect> getSiteTreeSelects(String userId) {
String siteTreeSelectStr = cacheService.hget(USER_SITE_TREE, userId, String.class);
log.info("userId:{},siteTreeSelectStr:{}",userId,siteTreeSelectStr);
//反序列化树对象
if(ObjectUtils.isEmpty(siteTreeSelectStr)){
return new ArrayList<>();
}
JSONArray jsonArray = JSON.parseArray(siteTreeSelectStr);
if(ObjectUtils.isEmpty(jsonArray)){
return new ArrayList<>();
}
List<SiteTreeSelect> collect = jsonArray.stream().map(item -> {
SiteTreeSelect siteTreeSelect = JSON.parseObject(item.toString(), SiteTreeSelect.class);
return siteTreeSelect;
......
......@@ -91,7 +91,10 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
if (ObjectUtils.isEmpty(windowId)) {
throw new AppException("请选择对应窗口");
}
List<Long> businessIdList = Arrays.asList(businessIds.split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
List<Long> businessIdList =new ArrayList<>();
if(!ObjectUtils.isEmpty(businessIds)){
businessIdList = Arrays.asList(businessIds.split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
}
WindowBusinessQuery windowBusinessQuery = new WindowBusinessQuery();
//windowBusinessQuery.setSiteBusinessIdList(businessIdList);
......@@ -104,7 +107,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
}
WindowEntity windowEntity = this.get(windowId, context);
List<WindowBusinessEntity> windowBusinessEntities = businessIdList.stream().map(id -> {
WindowBusinessEntity windowBusinessEntity = new WindowBusinessEntity();
windowBusinessEntity.initAttrValue();
......@@ -122,7 +124,7 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
return null;
}
return windowBusinessEntity;
}).collect(Collectors.toList());
}).filter(f->f!=null).collect(Collectors.toList());
windowBusinessService.save(windowBusinessEntities, context);
}
......
......@@ -4,7 +4,7 @@ POST {{baseUrl}}/site/business/list
Content-Type: application/json
{
"idNotList": [11,12,17,18,19,20,21],
"idNotList": [11,12,17,18,19,20],
"siteId": 1,
"page":1,
"size":5
......
......@@ -116,7 +116,7 @@
<profiles.log.level>INFO</profiles.log.level>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<package.environment>yibin</package.environment>
<skipUi>false</skipUi>
<skipUi>true</skipUi>
</properties>
</profile>
......
......@@ -249,7 +249,7 @@ public class AccessLogFilter implements GlobalFilter, Ordered {
String originalResponseContentType = exchange.getAttribute(ServerWebExchangeUtils.ORIGINAL_RESPONSE_CONTENT_TYPE_ATTR);
if (ObjectUtil.equal(this.getStatusCode(), HttpStatus.OK)
&& StringUtils.isNotBlank(originalResponseContentType)) {
accessLogPdu.setRequestData(JSON.toJSONString(Rest.ok()));
accessLogPdu.setResponseData(JSON.toJSONString(Rest.ok()));
/* Flux<? extends DataBuffer> fluxBody = Flux.from(body);
return super.writeWith(fluxBody.buffer().map(dataBuffers -> {
// 合并多个流集合,解决返回体分段传输
......@@ -265,7 +265,7 @@ public class AccessLogFilter implements GlobalFilter, Ordered {
return bufferFactory.wrap(content);
}));*/
}else {
accessLogPdu.setRequestData(JSON.toJSONString(Rest.fail()));
accessLogPdu.setResponseData(JSON.toJSONString(Rest.fail()));
}
}
// if body is not a flux. never got there.
......
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