Browse Source

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

dev_shibei_match
yinzuomei 5 years ago
parent
commit
112f301b1a
  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.APP,baseTokenDto.getApp());
builder.header(AppClientConstant.CLIENT,baseTokenDto.getClient()); builder.header(AppClientConstant.CLIENT,baseTokenDto.getClient());
builder.header(AppClientConstant.USER_ID,baseTokenDto.getUserId()); 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)){
if(StringUtils.isNotBlank(customerId)){ if (StringUtils.equalsAny(baseTokenDto.getApp(), AppClientConstant.APP_GOV, AppClientConstant.APP_RESI, "public")) {//工作端/居民端
exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId); 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(); ServerHttpRequest build = exchange.getRequest().mutate().build();
return exchange.mutate().request(build).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 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>
<select id="selectByCode" resultType="com.epmet.dto.AreaCodeChildDTO"> <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 id="selectAllArea" resultType="com.epmet.dto.AreaCodeDTO">
select * from area_code select * from area_code m where m.DEL_FLAG = '0'
</select> </select>
<select id="selectByCountyCode" resultType="com.epmet.dto.AreaCodeDTO"> <select id="selectByCountyCode" resultType="com.epmet.dto.AreaCodeDTO">

Loading…
Cancel
Save