|
@ -24,6 +24,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.dao.IcHouseDao; |
|
|
import com.epmet.dao.IcHouseDao; |
|
|
import com.epmet.dto.result.HouseInfoDTO; |
|
|
import com.epmet.dto.result.HouseInfoDTO; |
|
|
import com.epmet.dto.result.ImportResultDTO; |
|
|
import com.epmet.dto.result.ImportResultDTO; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.stereotype.Component; |
|
@ -38,6 +39,7 @@ import java.util.Map; |
|
|
* @since v1.0.0 2021-10-27 |
|
|
* @since v1.0.0 2021-10-27 |
|
|
*/ |
|
|
*/ |
|
|
@Component |
|
|
@Component |
|
|
|
|
|
@Slf4j |
|
|
public class IcHouseRedis { |
|
|
public class IcHouseRedis { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private RedisUtils redisUtils; |
|
|
private RedisUtils redisUtils; |
|
@ -79,6 +81,10 @@ public class IcHouseRedis { |
|
|
return ConvertUtils.mapToEntity(map,HouseInfoDTO.class); |
|
|
return ConvertUtils.mapToEntity(map,HouseInfoDTO.class); |
|
|
} |
|
|
} |
|
|
HouseInfoDTO houseInfo = icHouseDao.queryHouseInfoByHouseId(houseId); |
|
|
HouseInfoDTO houseInfo = icHouseDao.queryHouseInfoByHouseId(houseId); |
|
|
|
|
|
if(null == houseInfo){ |
|
|
|
|
|
log.info("Database does not exist this house info, id = {}", houseId); |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
Map<String, Object> result = BeanUtil.beanToMap(houseInfo, false, true); |
|
|
Map<String, Object> result = BeanUtil.beanToMap(houseInfo, false, true); |
|
|
setHouseInfo(houseId,result,houseInfo.getCustomerId()); |
|
|
setHouseInfo(houseId,result,houseInfo.getCustomerId()); |
|
|
return houseInfo; |
|
|
return houseInfo; |
|
|