Pu Zhibing
2024-10-29 801e650124598ad5ae1629149cfd70a2598d7bf1
合并代码
2个文件已修改
17 ■■■■ 已修改文件
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/barrierGate/model/SwitchwayGate.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/barrierGate/server/SwitchwayGateService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/barrierGate/model/SwitchwayGate.java
@@ -4,6 +4,7 @@
import lombok.Data;
import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j;
import org.apache.tomcat.util.security.MD5Encoder;
/**
 * @author zhibing.pu
@@ -39,7 +40,7 @@
        String str = String.format("action=%s&appkey=%s&channel=%s&timestamp=%s&key=%s", this.getAction(), this.getAppkey(), this.getChannel(), this.getTimestamp(), secretkey);
        log.info("待签名串:{}", str);
        //MD5加密
        String encoder = MD5Util.getMD5(str);
        String encoder = MD5Util.encoder(str);
        //将签名结果转大写
        encoder = encoder.toUpperCase();
        log.info("签名结果:{}", encoder);
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/barrierGate/server/SwitchwayGateService.java
@@ -40,18 +40,4 @@
        }
        return success;
    }
//    public static void main(String[] args) {
//        SwitchwayGateService switchwayGateService = new SwitchwayGateService();
//        SwitchwayGateReq req = new SwitchwayGateReq();
//        req.setAction("close");
//        req.setChannel("001");
//        Boolean success = switchwayGateService.gateService(req);
//        if(success){
//            log.info("调用成功");
//        }else{
//            log.info("调用失败");
//        }
//    }
}