puzhibing
2026-04-17 547a4a0b1d130c6d2fb854b31a15e2bf7e75c811
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpSystemSettingServiceImpl.java
@@ -9,9 +9,7 @@
import com.xiaopeng.api.model.operation.XpSystemSetting;
import com.xiaopeng.operation.service.XpSystemSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.cache.RedisCache;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Objects;
@@ -63,6 +61,30 @@
        return 15;
    }
    @Override
    public XpSystemSetting getSystemSettingOne(){
        LambdaQueryWrapper<XpSystemSetting> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(XpSystemSetting::getDeleted, false);
        XpSystemSetting obj = super.getOne(queryWrapper, false);
        if(obj.getXczCaCount() == null){
            obj.setXczCaCount(2);
        }
        if(obj.getXczSyDistance() == null){
            obj.setXczSyDistance(800);
        }
        if(obj.getXczSyTime() == null){
            obj.setXczSyTime(5);
        }
        if(obj.getXczHmSpeedPerHour() == null){
            obj.setXczSyDistance(3);
        }
        if(obj.getXczHmDuration() == null){
            obj.setXczHmDuration(3);
        }
        return obj;
    }
    @Override
    public void saveSystemSetting(XpSystemSetting xpSystemSetting) {