mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-13 21:33:41 +08:00
Merge remote-tracking branch 'origin/release' into release
This commit is contained in:
@@ -29,64 +29,42 @@ public enum CouponBgColor {
|
||||
/**
|
||||
* Color 010 coupon bg color.
|
||||
*/
|
||||
COLOR010("#63B359"),
|
||||
Color010,
|
||||
/**
|
||||
* Color 020 coupon bg color.
|
||||
*/
|
||||
COLOR020("#2C9F67"),
|
||||
Color020,
|
||||
/**
|
||||
* Color 030 coupon bg color.
|
||||
*/
|
||||
COLOR030("#509FC9"),
|
||||
Color030,
|
||||
/**
|
||||
* Color 040 coupon bg color.
|
||||
*/
|
||||
COLOR040("#5885CF"),
|
||||
Color040,
|
||||
/**
|
||||
* Color 050 coupon bg color.
|
||||
*/
|
||||
COLOR050("#9062C0"),
|
||||
Color050,
|
||||
/**
|
||||
* Color 060 coupon bg color.
|
||||
*/
|
||||
COLOR060("#D09A45"),
|
||||
Color060,
|
||||
/**
|
||||
* Color 070 coupon bg color.
|
||||
*/
|
||||
COLOR070("#E4B138"),
|
||||
Color070,
|
||||
/**
|
||||
* Color 080 coupon bg color.
|
||||
*/
|
||||
COLOR080("#EE903C"),
|
||||
Color080,
|
||||
/**
|
||||
* Color 090 coupon bg color.
|
||||
*/
|
||||
COLOR090("#DD6549"),
|
||||
Color090,
|
||||
/**
|
||||
* Color 100 coupon bg color.
|
||||
*/
|
||||
COLOR100("#CC463D");
|
||||
Color100
|
||||
|
||||
/**
|
||||
* The Color.
|
||||
*/
|
||||
private final String color;
|
||||
|
||||
/**
|
||||
* Instantiates a new Coupon bg color.
|
||||
*
|
||||
* @param color the color
|
||||
*/
|
||||
CouponBgColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
/**
|
||||
* Color string.
|
||||
*
|
||||
* @return the string
|
||||
*/
|
||||
public String color() {
|
||||
return this.color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ import cn.felord.payment.wechat.v3.model.FundFlowBillParams;
|
||||
import cn.felord.payment.wechat.v3.model.TradeBillParams;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@@ -88,10 +88,12 @@ public abstract class AbstractApi {
|
||||
* @param mapper the mapper
|
||||
*/
|
||||
private void applyObjectMapper(ObjectMapper mapper) {
|
||||
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
|
||||
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
SimpleModule module = new JavaTimeModule();
|
||||
mapper.registerModule(module);
|
||||
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
|
||||
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false)
|
||||
// empty string error
|
||||
.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true)
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_NULL)
|
||||
.registerModule(new JavaTimeModule());
|
||||
}
|
||||
|
||||
|
||||
@@ -185,10 +187,11 @@ public abstract class AbstractApi {
|
||||
return RequestEntity.get(uri).header("Pay-TenantId", tenantId)
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建Get请求对象.
|
||||
*
|
||||
* @param uri the uri
|
||||
* @param uri the uri
|
||||
* @param httpHeaders the http headers
|
||||
* @return the request entity
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,6 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -72,11 +71,11 @@ public class WechatPayCallback {
|
||||
private final String tenantId;
|
||||
|
||||
static {
|
||||
MAPPER.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
|
||||
MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
|
||||
SimpleModule module = new JavaTimeModule();
|
||||
MAPPER.registerModule(module);
|
||||
MAPPER.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_NULL)
|
||||
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false)
|
||||
.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT,true)
|
||||
.registerModule(new JavaTimeModule());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user