Commit 452a7824 authored by suhuiguang's avatar suhuiguang

1.增加过期时间

parent d7e4aadf
...@@ -1545,7 +1545,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS ...@@ -1545,7 +1545,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
carForUE4VO.setCarType(equipment.getEquipmentCategory().getName()); carForUE4VO.setCarType(equipment.getEquipmentCategory().getName());
// 数据库字段(is_import 0->国产, 1->进口) // 数据库字段(is_import 0->国产, 1->进口)
carForUE4VO.setIsImport(Boolean.TRUE == car.getIsImport() ? TrueOrFalseEnum.real.desc : TrueOrFalseEnum.fake.desc); carForUE4VO.setIsImport(Boolean.TRUE.equals(car.getIsImport()) ? TrueOrFalseEnum.real.desc : TrueOrFalseEnum.fake.desc);
carForUE4VO.setBrand(car.getBrand()); carForUE4VO.setBrand(car.getBrand());
QueryWrapper<SystemDic> countryQueryWrapper = new QueryWrapper<>(); QueryWrapper<SystemDic> countryQueryWrapper = new QueryWrapper<>();
countryQueryWrapper.eq("id", car.getCountry()); countryQueryWrapper.eq("id", car.getCountry());
...@@ -1554,7 +1554,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS ...@@ -1554,7 +1554,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
carForUE4VO.setStandard(car.getStandard()); carForUE4VO.setStandard(car.getStandard());
ManufacturerInfo manufacturerInfo = iManufacturerInfoService.getById(car.getManufacturerId()); ManufacturerInfo manufacturerInfo = iManufacturerInfoService.getById(car.getManufacturerId());
carForUE4VO.setManufacturerName(manufacturerInfo.getName()); carForUE4VO.setManufacturerName(manufacturerInfo.getName());
carForUE4VO.setCccAuth(Boolean.TRUE == car.getCccAuth() ? TrueOrFalseEnum.real.flag : TrueOrFalseEnum.fake.flag); carForUE4VO.setCccAuth(Boolean.TRUE.equals(car.getCccAuth()) ? TrueOrFalseEnum.real.flag : TrueOrFalseEnum.fake.flag);
QueryWrapper<SystemDic> chassisCountryQueryWrapper = new QueryWrapper<>(); QueryWrapper<SystemDic> chassisCountryQueryWrapper = new QueryWrapper<>();
chassisCountryQueryWrapper.eq("id", car.getChassisCountry()); chassisCountryQueryWrapper.eq("id", car.getChassisCountry());
SystemDic dic = iSystemDicService.getBaseMapper().selectOne(chassisCountryQueryWrapper); SystemDic dic = iSystemDicService.getBaseMapper().selectOne(chassisCountryQueryWrapper);
...@@ -1620,7 +1620,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS ...@@ -1620,7 +1620,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
@Override @Override
public void refreshStaData() { public void refreshStaData() {
List<Map<String, Object>> result = this.baseMapper.queryCompanyCarStaData(); List<Map<String, Object>> result = this.baseMapper.queryCompanyCarStaData();
result.forEach(m -> redisUtils.set((buildKey(m)), m.get("total"))); result.forEach(m -> redisUtils.set((buildKey(m)), m.get("total"),86400));
} }
private String buildKey(Map<String, Object> row) { private String buildKey(Map<String, Object> row) {
......
...@@ -1589,7 +1589,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1589,7 +1589,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Override @Override
public void refreshStaData() { public void refreshStaData() {
List<Map<String, Object>> result = this.baseMapper.queryCompanyStaData(); List<Map<String, Object>> result = this.baseMapper.queryCompanyStaData();
result.forEach(m -> redisUtils.set((buildKey(m)), m.get("total"))); result.forEach(m -> redisUtils.set((buildKey(m)), m.get("total"),86400));
} }
private String buildKey(Map<String, Object> row) { private String buildKey(Map<String, Object> row) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment