Browse Source

Merge branches 'dev' and 'develop' of http://git.elinkit.com.cn:7070/r/epmet-cloud into develop

master
sunyuchao 4 years ago
parent
commit
2ff9b13c91
  1. 7
      epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java
  2. 4
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java

7
epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java

@ -13,6 +13,7 @@ import com.epmet.constant.TokenHeaderKeyConstant;
import com.epmet.openapi.constant.AuthTypes;
import com.epmet.openapi.constant.RequestParamKeys;
import com.epmet.utils.ServerHttpRequestUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -67,9 +68,11 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory<CpA
}
//添加流水号
exchange.getRequest().mutate().header(AppClientConstant.TRANSACTION_SERIAL_KEY, new String[]{getTransactionSerial()});
ServerHttpRequest request = exchange.getRequest();
List<String> tranSerials = request.getHeaders().get(AppClientConstant.TRANSACTION_SERIAL_KEY);
if (CollectionUtils.isEmpty(tranSerials) || StringUtils.isBlank(tranSerials.get(0))) {
request.mutate().header(AppClientConstant.TRANSACTION_SERIAL_KEY, new String[]{getTransactionSerial()});
}
String authType = getAuthType(request);
String requestUri = request.getPath().pathWithinApplication().value();

4
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java

@ -166,13 +166,13 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl<NoticeReadRecor
} else {
//4.根据是否过期判断已存在记录且是已读状态不在修改
if (bl) {
if ("un_read".equals(entity.getReadFlag()) && null != entity) {
if (null != entity && "un_read".equals(entity.getReadFlag())) {
entity.setReadFlag(ReadFlagConstant.READ);
entity.setViewDetail(ReadFlagConstant.READ);
baseDao.updateById(entity);
}
} else {
if ("un_read".equals(entity.getViewDetail()) && null != entity) {
if (null != entity && "un_read".equals(entity.getViewDetail())) {
entity.setViewDetail(ReadFlagConstant.READ);
baseDao.updateById(entity);
}

Loading…
Cancel
Save