-- 新版提交
This commit is contained in:
@@ -4,7 +4,7 @@ public interface VerifyReceiptConstant {
|
||||
|
||||
/**
|
||||
* ios 端app bundle id
|
||||
* 也可以配置在nacos里面,动态获取
|
||||
|
||||
* URL_SANDBOX 沙盒测试
|
||||
* URL_VERIFY 正式
|
||||
*/
|
||||
@@ -15,7 +15,7 @@ public interface VerifyReceiptConstant {
|
||||
String URL_VERIFY = "https://sandbox.itunes.apple.com/verifyReceipt";
|
||||
|
||||
|
||||
// String URL_VERIFY = "https://buy.itunes.apple.com/verifyReceipt";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public class AppController {
|
||||
try {
|
||||
|
||||
|
||||
System.out.println("==============veri=================================" + dto);
|
||||
|
||||
// 1. 校验入参
|
||||
if (dto == null)
|
||||
return Result.error("入参不能为空");
|
||||
@@ -90,13 +90,15 @@ public class AppController {
|
||||
IapResponseDTO receipt = iapVerifyReceiptService.verifyIapReceipt(dto.getReceiptData(), dto.isSandBox());
|
||||
BuyOrderEntity order2 = this.buyOrderService.getOne(new QueryWrapper<BuyOrderEntity>().eq("order_sn", dto.getOrderId()).eq("del_flag", "0"));
|
||||
order2.setPaymentDate(new Date());
|
||||
System.out.println("============order2=================" + order2);
|
||||
|
||||
|
||||
|
||||
order2.setProductId(dto.getProductId());
|
||||
this.buyOrderService.updateById(order2);
|
||||
|
||||
IosPayOrderEntity order = new IosPayOrderEntity();
|
||||
|
||||
//todo 判断状态 订单状态 0-未付款 1-待发货 2-已发货 3-交易成功 4-交易失败
|
||||
System.out.println("============保存中=================" + order);
|
||||
String order01 = order.getOrderid();
|
||||
String order02 = order2.getOrderSn();
|
||||
if (order01 == order02) {
|
||||
@@ -142,7 +144,7 @@ public class AppController {
|
||||
String body = dto.getProductId();
|
||||
if ("point".equals(subject)) {
|
||||
// 插入花生币 变动记录
|
||||
System.out.printf("body====:" + body);
|
||||
|
||||
BookBuyConfigEntity bookBuyConfigEntity = this.bookBuyConfigService.getById(Integer.valueOf(body));
|
||||
String realMoney = bookBuyConfigEntity.getMoney();
|
||||
Integer money = Integer.valueOf(realMoney);
|
||||
@@ -153,7 +155,6 @@ public class AppController {
|
||||
transactionDetailsEntity.setOrderType("充值");
|
||||
transactionDetailsEntity.setRelationId(order.getId());
|
||||
transactionDetailsEntity.setRemark("充值");
|
||||
System.out.println("===============进入了point获取ID=========================" + order.getId());
|
||||
MyUserEntity user = userService.getById(Integer.valueOf(customerid));
|
||||
BigDecimal peanutCoin = user.getPeanutCoin();
|
||||
transactionDetailsEntity.setUserBalance(peanutCoin);
|
||||
@@ -176,12 +177,12 @@ public class AppController {
|
||||
order.setMoney(Integer.valueOf(bookBuyConfigEntity.getRealMoney()));
|
||||
order.setUsername(user.getName());
|
||||
orderService.saveOrUpdate(order);
|
||||
System.out.println("==========ok================================================================================================================================================");
|
||||
|
||||
|
||||
|
||||
}
|
||||
orderService.update();
|
||||
System.out.println("==========ok================================================================================================================================================");
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -200,7 +201,7 @@ public class AppController {
|
||||
lock.unlock();
|
||||
|
||||
}
|
||||
// return null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -210,24 +211,21 @@ public class AppController {
|
||||
*/
|
||||
|
||||
@RequestMapping(value = "/failure")
|
||||
// @RequestBody
|
||||
|
||||
public Result update(@Validated @RequestBody IapRequestDTO vo) {
|
||||
System.out.println("=========entity1111================"+vo);
|
||||
|
||||
IosPayOrderEntity order = new IosPayOrderEntity();
|
||||
|
||||
order.setOrderid(vo.getOrderId());
|
||||
order.setReceiptData(vo.getReceiptData());
|
||||
order.setProductID(vo.getProductId());
|
||||
order.setTransactionId(vo.getTransactionId());
|
||||
System.out.println("=========dto.getTransactionId()============" + vo.getTransactionId());
|
||||
|
||||
order.setCustomerOid(vo.getCustomerOid());
|
||||
order.setCloseOrder(0);
|
||||
order.setCreateTime(new Date());
|
||||
order.setFailureflag(vo.getFailureflag());
|
||||
System.out.println("============v0===================================================================================="+vo.getFailureflag());
|
||||
|
||||
orderService.saveOrUpdate(order);
|
||||
System.out.println("=======order================"+order);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.peanut.modules.pay.IOSPay.model.entities;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -88,6 +85,7 @@ public class IosPayOrderEntity implements Serializable {
|
||||
*删除标记 1 -未删除 0-已删除
|
||||
*/
|
||||
@TableField("del_flag")
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user