فهرست منبع

Merge branch 'srdev' of http://192.168.1.220:10080/Amoy/patient-co-management into srdev

trick9191 7 سال پیش
والد
کامیت
3aa5feb349

+ 9 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/QrcodeService.java

@ -10,6 +10,8 @@ import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.HttpUtil;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -41,6 +43,8 @@ public class QrcodeService extends BaseService {
    @Value("${server.server_url}")
    private String server_url;
    private Logger logger= LoggerFactory.getLogger(QrcodeService.class);
    /**
     * 所有医生二维码生成
     *
@ -65,11 +69,15 @@ public class QrcodeService extends BaseService {
            // 二维码内容
            String content = "qr_" + doctor.getCode() + "_" + doctor.getName();
            // 二维码图片文件名
            String fileName = doctor.getMobile();
            String fileName = doctor.getMobile()+"-"+doctor.getName();
            if (StringUtils.isEmpty(fileName)) {
                continue;
            }
            // 通过微信接口生成医生二维码
            logger.info("content:"+content);
            logger.info("fileName:"+fileName.replaceAll("\r\n", ""));
            logger.info("path:"+path);
            logger.info("token:"+token);
            makeQrcodeFromWeiXin(content, fileName.replaceAll("\r\n", ""), path, token);
            doctor.setQrcode(fileName + ".png");
        }

+ 6 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/WeixinBaseController.java

@ -15,6 +15,8 @@ import java.util.Random;
import com.yihu.wlyy.util.*;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.yihu.wlyy.entity.security.AccessToken;
@ -47,6 +49,8 @@ public class WeixinBaseController extends BaseController {
	@Value("${images.path}")
	private String imagesPath;
	private Logger logger= LoggerFactory.getLogger(WeixinBaseController.class);
	/**
	 * 通过code获取判断openid
	 * 
@ -143,6 +147,7 @@ public class WeixinBaseController extends BaseController {
			String params = "grant_type=client_credential&appid=" + appId + "&secret=" + appSecret;
			String result = HttpUtil.sendGet(token_url, params);
			JSONObject json = new JSONObject(result);
			logger.info("result:"+result);
			if (json.has("access_token")) {
				String token = json.get("access_token").toString();
				String expires_in = json.get("expires_in").toString();
@ -156,7 +161,7 @@ public class WeixinBaseController extends BaseController {
				return null;
			}
		} catch (Exception e) {
			error(e);
			e.printStackTrace();
			return null;
		}
	}

+ 16 - 16
patient-co/patient-co-wlyy/src/main/resources/application-prod.yml

@ -3,22 +3,22 @@ spring:
  profiles: prod
  datasource:
    wlyy:
      url: jdbc:mysql://59.61.92.90:9069/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
      username: wlyy
      password: jkzlehr@123
      url: jdbc:mysql://11.1.2.5:3306/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
      username: wlyy_sr
      password: 123456
    health:
      url: jdbc:mysql://59.61.92.90:9069/device?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
      username: wlyy
      password: jkzlehr@123
      url: jdbc:mysql://11.1.2.5:3306/device?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
      username: wlyy_sr
      password: 123456
    jkedu:
      url: jdbc:mysql://59.61.92.90:9069/jkedudb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
      username: wlyy
      password: jkzlehr@123
      url: jdbc:mysql://11.1.2.5:3306/jkedudb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
      username: wlyy_sr
      password: 123456
  redis:
     host: 27.155.101.77 # Redis server host.
     port: 6380 # Redis server port.
     password: jkzl_ehr
     host: 11.1.2.22 # Redis server host.
     port: 6390 # Redis server port.
     password: Kb6wKDQP1W4
server:
  server_url: http://www.xmtyw.cn/wlyy/
@ -98,20 +98,20 @@ es:
    FollowUpContent: wlyy_followup_content
    QuestionnaireWinning: wlyy_questionnaire_winning
    patientDevice: wlyy_patient_device
  host:  http://59.61.92.90:9065,http://59.61.92.90:9067
  tHost: 59.61.92.90:9066,59.61.92.90:9068
  host:  http://11.1.2.28:9200,http://11.1.2.29:9200
  tHost: 11.1.2.28:9300,11.1.2.29:9300
  clusterName: jkzl
#集美宣教居民端健康文章
jkEdu:
  web:
    articleBaseUrl: http://www.xmtyw.cn/
    articleBaseUrl: 11.1.2.25:9088
#消息队列
activemq:
  username: jkzl
  password: jkzlehr
  url: tcp://59.61.92.90:9103
  url: tcp://11.1.2.8:61616
  queue:
    healtHarticleQueue: healthArticleChannel  #健康文章推送

+ 1 - 1
patient-co/patient-co-wlyy/src/main/resources/application-test.yml

@ -1,5 +1,5 @@
spring:
  profiles: dev
  profiles: test
  datasource:
    wlyy:

+ 2 - 6
patient-co/patient-co-wlyy/src/main/resources/config/fdfs_client.conf

@ -9,14 +9,10 @@ http.secret_key = FastDFS1234567890
#tracker_server = 172.19.103.54:22122
#-------------测试环境---------------#
tracker_server = 172.19.103.54:22122
#tracker_server = 172.19.103.54:22122
#-------------正式环境---------------#
#外网项目地址
#tracker_server = 192.168.120.172:22122
#网闸
#tracker_server = 59.61.92.90:9055
#内网项目地址
#tracker_server = 10.95.22.139:22122
tracker_server = 11.1.2.9:22122