| | |
| | | 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; |
| | | |
| | |
| | | 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) { |