Browse Source

BeanUtil转换

dev_shibei_match
jianjun 4 years ago
parent
commit
64721406c9
  1. 4
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java

4
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java

@ -3,9 +3,9 @@ package com.epmet.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.CustomerThirdplatApiserviceDao; import com.epmet.dao.CustomerThirdplatApiserviceDao;
import com.epmet.dto.result.ThirdplatApiserviceResultDTO; import com.epmet.dto.result.ThirdplatApiserviceResultDTO;
import com.epmet.entity.CustomerThirdplatApiserviceEntity;
import com.epmet.service.CustomerThirdplatApiServiceService; import com.epmet.service.CustomerThirdplatApiServiceService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -29,7 +29,7 @@ public class CustomerThirdplatApiServiceServiceImpl implements CustomerThirdplat
// 查redis,存redis // 查redis,存redis
Map<String, Object> apiServiceMap = redisUtils.hGetAll(RedisKeys.getCustomerApiServiceKey(customerId)); Map<String, Object> apiServiceMap = redisUtils.hGetAll(RedisKeys.getCustomerApiServiceKey(customerId));
if (!CollectionUtils.isEmpty(apiServiceMap)) { if (!CollectionUtils.isEmpty(apiServiceMap)) {
apiService = BeanUtil.mapToBean(apiServiceMap, ThirdplatApiserviceResultDTO.class, true); apiService = ConvertUtils.mapToEntity(apiServiceMap, ThirdplatApiserviceResultDTO.class);
} }
if (apiService == null) { if (apiService == null) {

Loading…
Cancel
Save