|
|
|
@ -10,9 +10,12 @@ import com.alibaba.fastjson.JSONException;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.boot.web.client.RestTemplateBuilder;
|
|
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
|
import org.springframework.http.RequestEntity;
|
|
|
|
|
import org.springframework.http.converter.ByteArrayHttpMessageConverter;
|
|
|
|
|
import org.springframework.http.converter.StringHttpMessageConverter;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.web.client.RestClientException;
|
|
|
|
|
import org.springframework.web.client.RestClientResponseException;
|
|
|
|
@ -37,12 +40,15 @@ public class SettleTaskServiceImpl implements SettleTasksService {
|
|
|
|
|
|
|
|
|
|
public SettleTaskServiceImpl(SysSettlePlanMapper planMapper, StringRedisTemplate redisTemplate,
|
|
|
|
|
MerchantInfoProvider mchInfoProvider, @Value("${app.redis.prefix}") String prefix,
|
|
|
|
|
RestTemplate restTemplate, @Value("${platform.services.transaction:http://127.0.0.1:6012}") String transactionHost) {
|
|
|
|
|
@Value("${platform.services.transaction:http://127.0.0.1:6012}") String transactionHost) {
|
|
|
|
|
this.planMapper = planMapper;
|
|
|
|
|
this.redisTemplate = redisTemplate;
|
|
|
|
|
this.mchInfoProvider = mchInfoProvider;
|
|
|
|
|
this.prefix = prefix;
|
|
|
|
|
this.restTemplate = restTemplate;
|
|
|
|
|
this.restTemplate = new RestTemplateBuilder()
|
|
|
|
|
.messageConverters(new ByteArrayHttpMessageConverter(),
|
|
|
|
|
new StringHttpMessageConverter(StandardCharsets.UTF_8))
|
|
|
|
|
.build();
|
|
|
|
|
this.transactionHost = transactionHost;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|