Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

Trick 5 years ago
parent
commit
7f78e91a1f

+ 0 - 4
server/svr-authentication/pom.xml

@ -118,10 +118,6 @@
            <artifactId>mysql-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-util</artifactId>
        </dependency>
    </dependencies>

+ 2 - 0
server/svr-authentication/src/main/java/com/yihu/AuthServer.java

@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
@ -11,6 +12,7 @@ import org.springframework.web.client.RestTemplate;
/**
 * Created by progr1mmer on 2018/8/29.
 */
@EnableDiscoveryClient
@SpringBootApplication
public class AuthServer extends SpringBootServletInitializer {

+ 4 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java

@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.security.core.userdetails.SaltUser;
import com.yihu.jw.security.model.WlyyUserDetails;
import com.yihu.jw.security.model.WlyyUserSimple;
import com.yihu.jw.util.http.HttpClientKit;
import com.yihu.jw.security.utils.HttpClientUtil;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils;
import org.apache.http.NameValuePair;
@ -67,6 +67,8 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
    @Autowired
    private ClientDetailsService clientDetailsService;
    @Autowired
    private HttpClientUtil httpClientUtil;
    public WlyyUserDetailsService(DataSource dataSource) {
        this.setDataSource(dataSource);
@ -158,7 +160,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
                params.add(new BasicNameValuePair("openid", getOpenid()));
                String res = null;
                try{
                    res = HttpClientKit.post(iHealthUserInfoUrl, params, "UTF-8");
                    res = httpClientUtil.post(iHealthUserInfoUrl, params, "UTF-8");
                }catch (Exception e){
                    logger.error("远程请求i健康用户信息异常败:" + e.getMessage());
                    return users;

+ 38 - 15
server/svr-authentication/src/main/resources/bootstrap.yml

@ -6,37 +6,60 @@ spring:
      failFast: true
      username: jw
      password: jkzl
#发现服务
---
spring:
  profiles: jwdev
  cloud:
    config:
      discovery:
        enabled: true
        service-id: svr-configuration
##发现服务
eureka:
  client:
    healthcheck:
      enabled: false #监控检查
      enabled: true #监控检查
    serviceUrl:
      defaultZone: http://jw:jkzl@172.26.0.107:8761/eureka/
  instance:
    prefer-ip-address: false
    instance-id: ${spring.cloud.client.ipAddress}:${server.port}
---
spring:
  profiles: jwdev
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.26.0.107:1221}
      label: ${wlyy.spring.config.label:jwdev}
---
spring:
  profiles: jwtest
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.26.0.107:1221}
      label: ${wlyy.spring.config.label:jwtest}
      discovery:
        enabled: true
        service-id: svr-configuration
##发现服务
eureka:
  client:
    healthcheck:
      enabled: true #监控检查
    serviceUrl:
      defaultZone: http://jw:jkzl@172.26.0.107:8761/eureka/
  instance:
    prefer-ip-address: false
    instance-id: ${spring.cloud.client.ipAddress}:${server.port}
---
spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.26.0.107:1221}
      label: ${wlyy.spring.config.label:jwprod}
      discovery:
        enabled: true
        service-id: svr-configuration
##发现服务
eureka:
  client:
    healthcheck:
      enabled: true #监控检查
    serviceUrl:
      defaultZone: http://jw:jkzl@172.26.0.107:8761/eureka/
  instance:
    prefer-ip-address: false
    instance-id: ${spring.cloud.client.ipAddress}:${server.port}

+ 0 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/WlyyPatientExpressageAddrService.java

@ -83,7 +83,6 @@ public class WlyyPatientExpressageAddrService extends BaseJpaService<WlyyPatient
            addrDO.setIsDefault(1);
            this.save(defaultAddrDO);
            this.save(addrDO);
            error.append("当前居民已存在默认地址!");
            return ;
        }
    }