Преглед на файлове

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

chenweida преди 7 години
родител
ревизия
2ea4b3147c

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

@ -4,6 +4,7 @@ import com.yihu.wlyy.interceptors.DoctorInterceptor;
import com.yihu.wlyy.interceptors.GateWayInterceptor;
import com.yihu.wlyy.interceptors.PatientInterceptor;
import com.yihu.wlyy.interceptors.UserAgentFilter;
import com.yihu.wlyy.util.SystemConf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -12,6 +13,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
@ -77,4 +79,12 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
//        mappingJackson2HttpMessageConverter.setObjectMapper(objectMapper);
//        converters.add(mappingJackson2HttpMessageConverter);
//    }
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        String tempPath = SystemConf.getInstance().getTempPath() ;
        registry.addResourceHandler(tempPath+"/**").addResourceLocations("file:F:"+tempPath);
        super.addResourceHandlers(registry);
    }
}

+ 0 - 41
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/UploadImagConfig.java

@ -1,41 +0,0 @@
package com.yihu.wlyy.config;
import com.yihu.wlyy.util.SystemConf;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.jms.connection.CachingConnectionFactory;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import java.io.File;
/**
 * Created by chenweida on 2017/9/9.
 * 生产者配置
 */
@EnableJms
@Configuration
@Profile({"dev", "devtest", "prod", "test"})
public class UploadImagConfig extends WebMvcConfigurerAdapter {
//    @Value("${activemq.username}")
//    private String username;
//    @Value("${activemq.password}")
//    private String password;
//    @Value("${activemq.url}")
//    private String url;
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        String tempPath = SystemConf.getInstance().getTempPath() + File.separator;
        registry.addResourceHandler(tempPath+"**").addResourceLocations("F:/"+tempPath);
        super.addResourceHandlers(registry);
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEdu/DoctorJMJkEduArticleController.java

@ -105,7 +105,7 @@ public class DoctorJMJkEduArticleController extends BaseController {
            if(StringUtils.isEmpty(currentRoleLevel)){
                currentRoleLevel = getCurrentRoleLevel();
            }
            List<HealthEduArticlePatientModel> eduArticlePatients = jmJkEduArticleService.pushArticleList(page, pagesize, "xh1D2017031502222",firstLevelCategoryId,secondLevelCategoryId,myArticle,sendType,currentRoleCode,currentRoleLevel,articleTitle,sendTimeStart,sendTimeEnd);
            List<HealthEduArticlePatientModel> eduArticlePatients = jmJkEduArticleService.pushArticleList(page, pagesize, getUID(),firstLevelCategoryId,secondLevelCategoryId,myArticle,sendType,currentRoleCode,currentRoleLevel,articleTitle,sendTimeStart,sendTimeEnd);
//            Long count = jmJkEduArticleService.pushArticleListCount(getUID(),2);
            return new ResultPageListModel(
                    page,