puzhibing
2026-03-11 4273c30be978ce667e2b9119a798fa64366a85a9
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpSystemSettingServiceImpl.java
@@ -3,9 +3,13 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaopeng.api.vo.HotFixInfoVo;
import com.xiaopeng.common.redis.service.RedisService;
import com.xiaopeng.operation.mapper.XpSystemSettingMapper;
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;
@@ -21,7 +25,8 @@
 */
@Service
public class XpSystemSettingServiceImpl extends ServiceImpl<XpSystemSettingMapper, XpSystemSetting> implements XpSystemSettingService {
    @Autowired
    private RedisService redisService;
    @Override
    public String getCustomerServicePhone() {
        XpSystemSetting xpSystemSetting = this.getOne(null);
@@ -57,5 +62,10 @@
        } else {
            save(xpSystemSetting);
        }
        //保存热修复信息到redis
        HotFixInfoVo hotFixInfoVo = new HotFixInfoVo();
        hotFixInfoVo.setHotfixStatus(xpSystemSetting.getHotfixStatus() == null ? 0 : xpSystemSetting.getHotfixStatus());
        hotFixInfoVo.setHotfixStartTime(xpSystemSetting.getHotfixStartTime());
        redisService.setCacheObject("HOT_FIX_INFO", hotFixInfoVo);
    }
}