diff --git a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/PriorityListManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/PriorityListManagerImpl.java index ac1af20d2..665f0a7eb 100644 --- a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/PriorityListManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/PriorityListManagerImpl.java @@ -24,7 +24,6 @@ import java.util.stream.Collectors; @Service public class PriorityListManagerImpl implements PriorityListManager { private static final String PRIORITY_ID = "id1_priority"; - private static final String COLLECTION_NAME = "settle_priority_modify"; public static final String KEY_WHITELIST_CLIENTS = "whitelist_clients"; private final Logger logger = LoggerFactory.getLogger(getClass()); private final MerchantInfoProvider mchInfoProvider; diff --git a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/SettleTaskServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/SettleTaskServiceImpl.java index 7cd333bc2..f04e2e38e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/SettleTaskServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/SettleTaskServiceImpl.java @@ -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; }