diff --git a/pom.xml b/pom.xml index d351e2a..bd99d36 100644 --- a/pom.xml +++ b/pom.xml @@ -113,4 +113,17 @@ + + + + tansilu-release + TanSiLu-release + http://192.168.10.211:8081/repository/maven-releases/ + + + tansilu-snapshots + TanSiLu-snapshots + http://192.168.10.211:8081/repository/maven-snapshots/ + + \ No newline at end of file diff --git a/src/main/java/com/tsl3060/open/extend/core/notify/CarbonOrderNotify.java b/src/main/java/com/tsl3060/open/extend/core/notify/CarbonOrderNotify.java index 9b71b53..bdce7fa 100644 --- a/src/main/java/com/tsl3060/open/extend/core/notify/CarbonOrderNotify.java +++ b/src/main/java/com/tsl3060/open/extend/core/notify/CarbonOrderNotify.java @@ -22,13 +22,13 @@ public class CarbonOrderNotify { * 用户低碳积分 */ @JSONField(name = "carbon") - private String carbon; + private int carbon; /** * 本次订单新增积分 */ @JSONField(name = "amount") - private String amount; + private int amount; /** * 订单时间 */ @@ -69,19 +69,19 @@ public class CarbonOrderNotify { } - public String getCarbon() { + public int getCarbon() { return carbon; } - public void setCarbon(String carbon) { + public void setCarbon(int carbon) { this.carbon = carbon; } - public String getAmount() { + public int getAmount() { return amount; } - public void setAmount(String amount) { + public void setAmount(int amount) { this.amount = amount; } diff --git a/src/main/java/com/tsl3060/open/extend/core/payload/CarbonOrderPayload.java b/src/main/java/com/tsl3060/open/extend/core/payload/CarbonOrderPayload.java index c65f489..e963cfa 100644 --- a/src/main/java/com/tsl3060/open/extend/core/payload/CarbonOrderPayload.java +++ b/src/main/java/com/tsl3060/open/extend/core/payload/CarbonOrderPayload.java @@ -92,11 +92,22 @@ public class CarbonOrderPayload extends RequestPayload implements IApiRequest { return mileage; } - public void setMileage(String mileage) { + + public void setMileage(double mileage) { + double v = mileage * 1000; + this.setMileage(String.valueOf((int) v)); + } + + private void setMileage(String mileage) { this.mileage = mileage; } - public void setMileage(double mileage) { + /** + * 里程 (单位:m) + * + * @param mileage + */ + public void setMileage(int mileage) { this.setMileage(String.valueOf(mileage)); } @@ -104,14 +115,21 @@ public class CarbonOrderPayload extends RequestPayload implements IApiRequest { return orderPay; } - public void setOrderPay(String orderPay) { + public void setOrderPay(double orderPay) { + double v = orderPay * 100; + this.setOrderPay(String.valueOf((int) v)); + } + + private void setOrderPay(String orderPay) { this.orderPay = orderPay; } /** + * 订单金额 (单位:分) + * * @param orderPay */ - public void setOrderPay(double orderPay) { + public void setOrderPay(int orderPay) { this.setOrderPay(String.valueOf(orderPay)); } diff --git a/src/main/java/com/tsl3060/open/extend/core/response/CarbonOrderResponse.java b/src/main/java/com/tsl3060/open/extend/core/response/CarbonOrderResponse.java index 86ecc18..bd96db7 100644 --- a/src/main/java/com/tsl3060/open/extend/core/response/CarbonOrderResponse.java +++ b/src/main/java/com/tsl3060/open/extend/core/response/CarbonOrderResponse.java @@ -4,8 +4,8 @@ import com.alibaba.fastjson2.annotation.JSONField; public class CarbonOrderResponse { private String openid; - private String carbon; - private double total; + private int carbon; + private int total; private String record; @JSONField(name = "record_time") private String recordTime; @@ -18,19 +18,19 @@ public class CarbonOrderResponse { this.openid = openid; } - public String getCarbon() { + public int getCarbon() { return carbon; } - public void setCarbon(String carbon) { + public void setCarbon(int carbon) { this.carbon = carbon; } - public double getTotal() { + public int getTotal() { return total; } - public void setTotal(double total) { + public void setTotal(int total) { this.total = total; }