Commit 403e8582 authored by renjie's avatar renjie

支付宝支付

parent 4809e0dd
......@@ -266,13 +266,13 @@ public class AccountController {
return paymentService.wechatPayCallback(tradno);
}
@RequestMapping(path = "/0xwxcheckorderstatus/{tradno}", method = RequestMethod.GET)
public UserPaymentDto wechatCheckOrderStatus(Principal principal, @PathVariable String tradno, @RequestParam("chargeType") int chargeType) {
@RequestMapping(path = "/0xwxcheckorderstatus/{tradno}/{chargeType}", method = RequestMethod.GET)
public UserPaymentDto wechatCheckOrderStatus(Principal principal, @PathVariable String tradno, @PathVariable int chargeType) {
return paymentService.wxCheckOrderStatus(tradno, chargeType);
}
@RequestMapping(path = "/wxpay/checkstatus/{tradno}", method = RequestMethod.GET)
public UserPaymentDto wechatPayCheckStatus(@PathVariable String tradno, @RequestParam("chargeType") int chargeType) {
@RequestMapping(path = "/wxpay/checkstatus/{tradno}/{chargeType}", method = RequestMethod.GET)
public UserPaymentDto wechatPayCheckStatus(@PathVariable String tradno, @PathVariable int chargeType) {
return paymentService.wxCheckOrderStatus(tradno, chargeType);
}
......@@ -281,8 +281,8 @@ public class AccountController {
paymentService.alipaCallback(tradno);
}
@RequestMapping(path = "/0xalicheckorderstatus/{tradno}", method = RequestMethod.GET)
public UserPaymentDto alipayCheckOrderStatus(Principal principal, @PathVariable(required = false) String tradno, @RequestParam("chargeType") int chargeType) {
@RequestMapping(path = "/0xalicheckorderstatus/{tradno}/{chargeType}", method = RequestMethod.GET)
public UserPaymentDto alipayCheckOrderStatus(Principal principal, @PathVariable(required = false) String tradno, @PathVariable int chargeType) {
return paymentService.aliCheckOrderStatus(tradno, chargeType);
}
......
......@@ -11,9 +11,13 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
public class Promotion {
private String code;
private int invitedUsers;
//好友当月消费
private int commission;
//好友以前消费
private int commissionLeft;
private boolean isSale;
private double gift;
private double giftLeft;
public int getCommission() {
return commission;
......@@ -54,4 +58,20 @@ public class Promotion {
public void setGift(double gift) {
this.gift = gift;
}
public double getGiftLeft() {
return giftLeft;
}
public void setCommissionLeft(int commissionLeft) {
this.commissionLeft = commissionLeft;
}
public int getCommissionLeft() {
return commissionLeft;
}
public void setGiftLeft(double giftLeft) {
this.giftLeft = giftLeft;
}
}
......@@ -264,7 +264,6 @@ public class IpResourceServiceImpl implements IpResourceService {
totalprice.updateAndGet(v -> new Double( v + Double.valueOf(vendorprice.substring(vendorprice.lastIndexOf("-") + 1))));
} });
double newprice = ipResourceRequestDto.getUnit().equals("week") ? (int) (totalprice.get()/3) : totalprice.get().intValue();
IpChargeResultDto ipChargeResultDto = accountService.preChargeByMoney(username, newprice);
if (!ipChargeResultDto.isSuccess()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment