陈昶聿
3 天以前 cf8712a9c0816559f50644f15672e7359028c4c4
ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceOutPathServiceImpl.java
@@ -2,6 +2,7 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.RSAPublicKeyExample;
import com.ruoyi.common.utils.ShortCode;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -94,8 +95,8 @@
        sop.setDeptName(serviceTask.getDeptname());
        sop.setWardName(serviceTask.getLeavehospitaldistrictname());
        serviceOutPathMapper.insertServiceOutPath(sop);
        //转成16进制并回写radix和updateTime
        serviceOutPath.setRadix(String.format("%03X", sop.getId()));
        // 生成 6 位 base62 短码(带密钥双射,不可枚举)并回写 radix 和 updateTime
        serviceOutPath.setRadix(ShortCode.encode(sop.getId()));
        serviceOutPath.setUrl(StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/wt?p=" + sop.getRadix() : localIP + "/wt?p=" + sop.getRadix());
        serviceOutPathMapper.updateServiceOutPath(serviceOutPath);
        return serviceOutPath.getUrl();