Browse Source

Merge remote-tracking branch 'origin/dev_pyscreen' into dev_pyscreen

dev_shibei_match
zxc 5 years ago
parent
commit
bf5b78003a
  1. 23
      epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java
  2. 2
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml
  3. 2
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml

23
epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java

@ -111,17 +111,24 @@ public class InternalAuthProcessor extends AuthProcessor {
builder.header(AppClientConstant.APP,baseTokenDto.getApp());
builder.header(AppClientConstant.CLIENT,baseTokenDto.getClient());
builder.header(AppClientConstant.USER_ID,baseTokenDto.getUserId());
if (StringUtils.isNotBlank(baseTokenDto.getCustomerId())) {
builder.header(AppClientConstant.CUSTOMER_ID,baseTokenDto.getCustomerId());
}
if (StringUtils.equalsAny(baseTokenDto.getApp(), AppClientConstant.APP_GOV, AppClientConstant.APP_RESI)) {//工作端/居民端
if(StringUtils.isNotBlank(customerId)){
exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId);
if(StringUtils.isNotBlank(customerId)){
if (StringUtils.equalsAny(baseTokenDto.getApp(), AppClientConstant.APP_GOV, AppClientConstant.APP_RESI, "public")) {//工作端/居民端
builder.header(AppClientConstant.CUSTOMER_ID, customerId);
}
} else if (StringUtils.equals(baseTokenDto.getApp(), "public")) {//公众号端
exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId);
}
//if (StringUtils.isNotBlank(baseTokenDto.getCustomerId())) {
// builder.header(AppClientConstant.CUSTOMER_ID,baseTokenDto.getCustomerId());
//}
//
//if (StringUtils.equalsAny(baseTokenDto.getApp(), AppClientConstant.APP_GOV, AppClientConstant.APP_RESI)) {//工作端/居民端
// if(StringUtils.isNotBlank(customerId)){
// exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId);
// }
//} else if (StringUtils.equals(baseTokenDto.getApp(), "public")) {//公众号端
// exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId);
//}
ServerHttpRequest build = exchange.getRequest().mutate().build();
return exchange.mutate().request(build).build();
}

2
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml

@ -5,7 +5,7 @@
<select id="selectAllChild" resultType="com.epmet.dto.AreaCodeChildDTO">
select * from area_code_child
select * from area_code_child m where m.DEL_FLAG = '0'
</select>
<select id="selectByCode" resultType="com.epmet.dto.AreaCodeChildDTO">

2
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml

@ -5,7 +5,7 @@
<select id="selectAllArea" resultType="com.epmet.dto.AreaCodeDTO">
select * from area_code
select * from area_code m where m.DEL_FLAG = '0'
</select>
<select id="selectByCountyCode" resultType="com.epmet.dto.AreaCodeDTO">

Loading…
Cancel
Save