浏览代码

代码修改

yeshijie 8 年之前
父节点
当前提交
9a600b3dd7

+ 8 - 2
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/redis/RedisThread.java

@ -15,19 +15,25 @@ import redis.clients.jedis.Jedis;
@Component
public class RedisThread implements Runnable {
    @Value("${spring.redis.host}")
    @Value("${channel.redis.host}")
    private String url;
    @Value("${spring.redis.port}")
    @Value("${channel.redis.port}")
    private Integer port;
    @Value("${channel.redis.password}")
    private String password;
    @Autowired
    private StringRedisTemplate redisTemplate;
    @Autowired
    private PrescriptionService prescriptionService;
    @Override
    public void run() {
        String key = SystemConf.getInstance().getSystemProperties().getProperty("redis_prescription_title");
        Jedis jedis = new Jedis(url,port);
        if(StringUtils.isNotBlank(password)){
            jedis.auth(password);
        }
        while (true){
            String message = jedis.rpop(key);
            if(StringUtils.isEmpty(message)){

+ 1 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionService.java

@ -111,7 +111,7 @@ public class PrescriptionService extends BaseService {
                try {
//                    String dispensaryCode = prescriptionDispensaryCodeDao.getCodeByPrescriptionCodeAndType(code,1);
                    StringBuffer url = new StringBuffer();
                    url.append("/prescription/html/code-detail.html?prescriptionCode=").append(code);
                    url.append("prescription/html/code-detail.html?prescriptionCode=").append(code);
                    url.append("&openid=").append(patient.getOpenid());
                    url.append("&toUser=").append(patient.getCode());
                    url.append("&toName=").append(patient.getName());

+ 28 - 4
patient-co/patient-co-wlyy-job/src/main/resources/application.yml

@ -95,6 +95,12 @@ spring:
    port: 6379 # Redis server port.
#    password: jkzl_ehr
channel:
  redis:
    host: 172.19.103.88 # Redis server host.
    port: 6379 # Redis server port.
    password:
server:
  server_url: http://ehr.yihu.com/wlyy/
@ -194,6 +200,12 @@ spring:
    port: 6380 # Redis server port.
    password: jkzl_ehr
channel:
  redis:
    host: 10.95.22.142 # Redis server host.
    port: 6380 # Redis server port.
    password: jkzlehr
server:
  server_url: http://www.xmtyw.cn/wlyy/
@ -292,6 +304,12 @@ spring:
    port: 6379 # Redis server port.
#    password: jkzl_ehr
channel:
  redis:
    host: 172.19.103.88 # Redis server host.
    port: 6379 # Redis server port.
    password:
server:
  server_url: http://weixin.xmtyw.cn/wlyy-dev/
@ -390,12 +408,18 @@ spring:
  redis:
    host: 172.19.103.88 # Redis server host.
    port: 6379 # Redis server port.
#    password: jkzl_ehr
    password:
  pool:
    max-active: 8 # Max number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.
    max-idle: 8 # Max number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
    max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
    min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
channel:
    redis:
      host: 172.19.103.88 # Redis server host.
      port: 6379 # Redis server port.
  redis:
    host: 172.19.103.88 # Redis server host.
    port: 6379 # Redis server port.
    password: jkzl_ehr
server:
  server_url: http://ehr.yihu.com/wlyy/