|
@ -25,10 +25,6 @@ public class CustomerThirdplatApiServiceServiceImpl implements CustomerThirdplat |
|
|
@Autowired |
|
|
@Autowired |
|
|
private CustomerThirdplatApiserviceDao thirdplatApiserviceDao; |
|
|
private CustomerThirdplatApiserviceDao thirdplatApiserviceDao; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private RedisTemplate<String, ThirdplatApiserviceResultDTO> tpasRedisTemplate; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public ThirdplatApiserviceResultDTO getByCustomerId(String customerId) { |
|
|
public ThirdplatApiserviceResultDTO getByCustomerId(String customerId) { |
|
|
ThirdplatApiserviceResultDTO apiService = null; |
|
|
ThirdplatApiserviceResultDTO apiService = null; |
|
@ -46,16 +42,4 @@ public class CustomerThirdplatApiServiceServiceImpl implements CustomerThirdplat |
|
|
|
|
|
|
|
|
return apiService; |
|
|
return apiService; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public List<ThirdplatApiserviceResultDTO> listByCustomerId(String customerId) { |
|
|
|
|
|
List<ThirdplatApiserviceResultDTO> apiServices = tpasRedisTemplate.opsForList().range(RedisKeys.listCustomerApiServiceListKey(customerId), 0, -1); |
|
|
|
|
|
if (!CollectionUtils.isEmpty(apiServices)) { |
|
|
|
|
|
return apiServices; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
apiServices = thirdplatApiserviceDao.listByCustomerId(customerId); |
|
|
|
|
|
tpasRedisTemplate.opsForList().rightPushAll(RedisKeys.listCustomerApiServiceListKey(customerId), apiServices); |
|
|
|
|
|
return apiServices; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|