Selaa lähdekoodia

设备首绑更新发放医生;康复计划代码优化

zd_123 7 vuotta sitten
vanhempi
commit
3f9290904d

+ 7 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/template/DoctorTeamGuidanceService.java

@ -72,12 +72,12 @@ public class DoctorTeamGuidanceService extends BaseService {
    public String saveTeamGuidance(String doctor, String title, JSONArray teams, String content, String images,String labelCode) throws Exception {
        String templateCode = getCode();
        Date nowDate = new Date();
        String image = "";
        if (StringUtils.isNotEmpty(images)) {
//            只限本地路径上传到FastDFS
            image = CommonUtil.copyTempImage(images);
            System.out.println("images =====>" + image);
        }
//        String image = "";
//        if (StringUtils.isNotEmpty(images)) {
////            只限本地路径上传到FastDFS
//            image = CommonUtil.copyTempImage(images);
//            System.out.println("images =====>" + image);
//        }
        //指导标签
        DoctorGuidanceTempLabel doctorGuidanceTempLable =  doctorGuidanceTempLableDao.findByCode(labelCode);
        String labelName = "未分组";
@ -118,7 +118,7 @@ public class DoctorTeamGuidanceService extends BaseService {
        doctorTeamGuidanceDetail.setContent(content);
        doctorTeamGuidanceDetail.setCreateTime(nowDate);
        doctorTeamGuidanceDetail.setCzrq(nowDate);
        doctorTeamGuidanceDetail.setImagesUrl(image);
        doctorTeamGuidanceDetail.setImagesUrl(images);
        doctorTeamGuidanceDetailDao.save(doctorTeamGuidanceDetail);

+ 18 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SystemDataRedis.java

@ -2,6 +2,9 @@ package com.yihu.wlyy.util;
import com.yihu.wlyy.entity.security.Token;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
@ -15,6 +18,8 @@ import java.util.Set;
@Component
public class SystemDataRedis {
    private static Logger logger = LoggerFactory.getLogger(SystemDataRedis.class);
    @Autowired
    private StringRedisTemplate redisTemplate;
@ -98,9 +103,19 @@ public class SystemDataRedis {
     * @return
     */
    public Token getToken(String tokenTypeName,String uid) {
        String tokenJosn = redisTemplate.opsForValue().get("token:" + tokenTypeName + ":" + uid);
        Token token = (Token)JSONObject.toBean(JSONObject.fromObject(tokenJosn),Token.class);
        return token;
        try{
            //获取token
            String tokenJosn = redisTemplate.opsForValue().get("token:" + tokenTypeName + ":" + uid);
            if(StringUtils.isNotBlank(tokenJosn)){
                Token token = (Token)JSONObject.toBean(JSONObject.fromObject(tokenJosn),Token.class);
                return token;
            }
            return null;
        }catch (Exception e){
            logger.info("getToken:"+e.getMessage());
        }
        return null;
    }
    /**