lin 4 лет назад
Родитель
Сommit
e03227b201

+ 1 - 1
smart-city-platform/src/main/java/com/bz/smart_city/commom/security/WebSecurityConfig.java

@@ -126,7 +126,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
                 .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
                 .and().authorizeRequests()
                 .antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
-                //.anyRequest().authenticated()
+                .anyRequest().authenticated()
                 .and()
                 .formLogin()
                 .successHandler(authenticationSuccessHandler)//登陆成功处理

+ 3 - 0
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/TokenServiceJWTImpl.java

@@ -51,6 +51,9 @@ public class TokenServiceJWTImpl implements TokenService {
     @Override
     public LoginUser getLoginUser(String token) {
         String loginToken = jwtTokenUtil.getLoginUserToken(token);
+        if (loginToken == null) {
+            return null;
+        }
         String key = "loginToken:" + loginToken;
         byte[] loginTokenByte = redisUtil.get(key.getBytes());
         if (loginTokenByte != null) {

+ 2 - 2
smart-city-platform/src/main/resources/application-prd.properties

@@ -169,7 +169,7 @@ udip.unit.url=http://47.112.15.78:8322
 invoice.print.url=http://nnfpbox.nuonuocs.cn/shop/buyer/allow/cxfKp/cxfServerKpOrderSync.action
 invoice.query.url=http://nnfpbox.nuonuocs.cn/shop/buyer/allow/ecOd/queryElectricKp.action
 #光电直读agent url
-gd.agent.url=http://47.112.16.203:9001
+gd.agent.url=http://114.135.61.187:20021
 #临河客户
 sync.customer.linhe.id=68
 sync.data.limit=100
@@ -178,5 +178,5 @@ sync.data.limit=100
 payfee.bank.customerId=47
 
 #mongodb url
-spring.data.mongodb.uri=mongodb://114.135.61.188:17017/meter-reading-database
+spring.data.mongodb.uri=mongodb://water:zcxk100@114.135.61.188:27071/meter-reading-database?authSource=meter-reading-database
 logging.level.org.springframework.data.mongodb.core=DEBUG

+ 1 - 0
smart-city-platform/src/main/resources/mapper/DeviceMapper.xml

@@ -439,6 +439,7 @@
     <select id="getList_COUNT" resultType="Long">
         select count(1)
         from sc_device sd
+        <if test="valveStatus != null"> left join sc_device_type sdt on (sdt.id = sd.device_type and sdt.status = 1)</if>
         <if test="province != null or city != null or region != null or community != null">left join sc_building sb on (sb.id = sd.building_id and sb.status = 1)</if>
         <if test="concentratorId != null or collectorId != null or channelNumberId != null or(concentratorNo != null and concentratorNo != '') or (collectorNo != null and collectorNo != '') or issueStatus != null">left join sc_water_related_device swrd on ( swrd.device_id = sd.id and swrd.status = 1)</if>
         <if test="concentratorNo != null and concentratorNo != ''">left join sc_concentrator scon on ( scon.id = swrd.concentrator_id and scon.status = 1)</if>