Browse Source

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 7 years ago
parent
commit
d2a5a8eb2c

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java

@ -37,9 +37,9 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
        // 多个拦截器组成一个拦截器链
        // addPathPatterns 用于添加拦截规则
        // excludePathPatterns 用户排除拦截
        registry.addInterceptor(doctorInterceptor).addPathPatterns("/doctor/**", "/statistics/province/**", "/statistics/**");
        registry.addInterceptor(patientInterceptor).addPathPatterns("/patient/**");
        registry.addInterceptor(userInterceptor).addPathPatterns("/user/**");
//        registry.addInterceptor(doctorInterceptor).addPathPatterns("/doctor/**", "/statistics/province/**", "/statistics/**");
//        registry.addInterceptor(patientInterceptor).addPathPatterns("/patient/**");
//        registry.addInterceptor(userInterceptor).addPathPatterns("/user/**");
        super.addInterceptors(registry);
        logger.info("init doctorInterceptor,patientInterceptor");

+ 11 - 8
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/redis/RedisMsgPubSubListener.java

@ -54,16 +54,19 @@ public class RedisMsgPubSubListener extends JedisPubSub {
    @Override
    public void onMessage(String channel, String message) {
        logger.info("redis_onMessage...");
        logger.info("redis_onMessage...:"+message);
        //this.unsubscribe();
        JSONObject json = new JSONObject(message);
        String title =  json.getString("title");
        if("redisAddPrescription".equals(title)){
            logger.info(json.toString());
            //审核消息发送
            prescriptionInfoService.onMesSquareState(message);
        try{
            JSONObject json = new JSONObject(message);
            String title =  json.getString("title");
            if("redisAddPrescription".equals(title)){
                logger.info(json.toString());
                //审核消息发送
                prescriptionInfoService.onMesSquareState(message);
            }
        }catch (Exception e){
            logger.error("redis_error...",e);
        }
    }
    @Override