zhangnaisong
2024-01-23 b5bb69ff301470233bf193959f1a1c4553aaf86b
ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java
@@ -29,6 +29,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -43,7 +44,7 @@
/**
 * 三一车辆Controller
 *
 *
 * @author ard
 * @date 2023-06-26
 */
@@ -75,6 +76,9 @@
    private ArdSyCarController ardSyCarController;
    @Value("${syCar.enabled}")
    private Boolean syCarEnabled;
    @PostConstruct
    public void init(){
        ardSyCarController = this;
@@ -84,7 +88,8 @@
        config.setConfigKey("syCarPT");
        List<SysConfig> sysConfigResult = sysConfigService.selectConfigList(config);
        String syURL = "";
        if(sysConfigResult.size() == 0){
        //if(sysConfigResult.size() == 0){
        if(!syCarEnabled){//三一车辆加入开关
            return;
        }else{
            syURL = sysConfigResult.get(0).getConfigValue();
@@ -455,7 +460,7 @@
    @GetMapping("getThreeOne")
    @ApiOperation("获取三一视频地址")
    public AjaxResult getThreeOne() {
        return AjaxResult.success("获取地址成功!",sysConfigService.selectConfigByKey("threeOneVideo"));
        return AjaxResult.success("获取地址成功!",sysConfigService.getSYVideo());
    }
    @PreAuthorize("@ss.hasPermi('sy:syCar:getAlarmHPfmCountDetail')")