Przeglądaj źródła

feat : 客服支付新增表

bilingfeng 2 lat temu
rodzic
commit
fe1b883486
17 zmienionych plików z 253 dodań i 76 usunięć
  1. 6 6
      game-module/game-common/src/main/java/com/zanxiang/common/enums/GameCategoryEnum.java
  2. 6 1
      game-module/game-common/src/main/java/com/zanxiang/common/enums/PayDeviceEnum.java
  3. 13 21
      game-module/game-manage/src/main/java/com/zanxiang/manage/domain/dto/GameCategoryDTO.java
  4. 6 1
      game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/GameCategoryServiceImpl.java
  5. 8 2
      game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/GamePictureServiceImpl.java
  6. 8 26
      game-module/game-mybatis/src/main/java/com/zanxiang/mybatis/entity/GameCategory.java
  7. 66 0
      game-module/game-mybatis/src/main/java/com/zanxiang/mybatis/entity/OrderPayParam.java
  8. 13 0
      game-module/game-mybatis/src/main/java/com/zanxiang/mybatis/mapper/OrderPayParamMapper.java
  9. 3 3
      game-module/game-sdk/src/main/java/com/zanxiang/sdk/controller/PayController.java
  10. 6 0
      game-module/game-sdk/src/main/java/com/zanxiang/sdk/domain/bo/ProductPayParamBO.java
  11. 2 2
      game-module/game-sdk/src/main/java/com/zanxiang/sdk/domain/params/ProductPayParam.java
  12. 5 0
      game-module/game-sdk/src/main/java/com/zanxiang/sdk/domain/vo/PayParamVO.java
  13. 18 0
      game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/Impl/OrderPayParamServiceImpl.java
  14. 52 6
      game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/Impl/OrderPayServiceImpl.java
  15. 12 0
      game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/OrderPayParamService.java
  16. 9 1
      game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/OrderPayService.java
  17. 20 7
      game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/pay/WxPayService.java

+ 6 - 6
game-module/game-common/src/main/java/com/zanxiang/common/enums/GameCategoryEnum.java

@@ -15,27 +15,27 @@ public enum GameCategoryEnum {
     /**
      * 微信小游戏
      */
-    CATEGORY_TYPE_WX(1L, "微信小游戏"),
+    CATEGORY_WX_APPLET("wx_applet", "微信小游戏"),
 
     /**
      * 抖音小游戏
      */
-    CATEGORY_TYPE_DY(2L, "抖音小游戏"),
+    CATEGORY_DY_APPLET("byte_applet", "抖音小游戏"),
 
     /**
      * h5游戏
      */
-    CATEGORY_TYPE_H5(3L, "h5游戏"),
+    CATEGORY_H5("h5", "h5游戏"),
 
     /**
      * app游戏
      */
-    CATEGORY_TYPE_APP(4L, "app游戏");
+    CATEGORY_APP("app", "app游戏");
 
     /**
-     * 设备类型
+     * 游戏分类key
      */
-    private Long categoryType;
+    private String key;
 
     /**
      * 描述

+ 6 - 1
game-module/game-common/src/main/java/com/zanxiang/common/enums/PayDeviceEnum.java

@@ -40,7 +40,12 @@ public enum PayDeviceEnum {
     /**
      * 米大师支付
      */
-    MI_PAY(5, "miPay", "微信米大师支付");
+    MI_PAY(5, "miPay", "微信米大师支付"),
+
+    /**
+     * 客服支付
+     */
+    CUSTOM_PAY(6, "customPay", "客服支付");
 
     private Integer code;
 

+ 13 - 21
game-module/game-manage/src/main/java/com/zanxiang/manage/domain/dto/GameCategoryDTO.java

@@ -2,6 +2,8 @@ package com.zanxiang.manage.domain.dto;
 
 import lombok.Data;
 
+import java.time.LocalDateTime;
+
 /**
  * @author : lingfeng
  * @time : 2022-11-04
@@ -11,42 +13,32 @@ import lombok.Data;
 public class GameCategoryDTO {
 
     /**
-     * 主键id
+     * 游戏分类ID
      */
     private Long id;
 
     /**
-     * 标签名称
-     */
-    private String name;
-
-    /**
-     * 备注
+     * 游戏分类key
      */
-    private String remark;
+    private String key;
 
     /**
-     * 是否父应用类型
-     */
-    private Boolean isParent;
-
-    /**
-     * 父应用类型id
+     * 标签名称
      */
-    private Long parentId;
+    private String name;
 
     /**
-     * 操作者id
+     * 1 删除  0 正常
      */
-    private Long operatorId;
+    private Integer isDelete;
 
     /**
-     * 操作者名字
+     * 创建时间
      */
-    private String operatorName;
+    private LocalDateTime createTime;
 
     /**
-     * 1 删除  0 正常
+     * 更新时间
      */
-    private Integer isDelete;
+    private LocalDateTime updateTime;
 }

+ 6 - 1
game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/GameCategoryServiceImpl.java

@@ -3,6 +3,7 @@ package com.zanxiang.manage.service.Impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.common.exception.BaseException;
 import com.zanxiang.common.utils.bean.BeanUtils;
 import com.zanxiang.manage.domain.dto.GameCategoryDTO;
 import com.zanxiang.manage.domain.vo.GameCategoryChoiceVO;
@@ -35,7 +36,11 @@ public class GameCategoryServiceImpl extends ServiceImpl<GameCategoryMapper, Gam
      */
     @Override
     public GameCategoryDTO getById(Long id) {
-        return BeanUtils.copy(super.getById(id), GameCategoryDTO.class);
+        GameCategory gameCategory = super.getById(id);
+        if (gameCategory == null) {
+            throw new BaseException("参数错误, 游戏应用类型不存在");
+        }
+        return BeanUtils.copy(gameCategory, GameCategoryDTO.class);
     }
 
     /**

+ 8 - 2
game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/GamePictureServiceImpl.java

@@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zanxiang.common.enums.GameCategoryEnum;
 import com.zanxiang.common.utils.bean.BeanUtils;
+import com.zanxiang.manage.domain.dto.GameCategoryDTO;
 import com.zanxiang.manage.domain.dto.GameDTO;
 import com.zanxiang.manage.domain.params.GamePictureParam;
 import com.zanxiang.manage.domain.vo.GamePictureVO;
+import com.zanxiang.manage.service.GameCategoryService;
 import com.zanxiang.manage.service.GamePictureService;
 import com.zanxiang.manage.service.GameService;
 import com.zanxiang.mybatis.entity.Game;
@@ -33,6 +35,9 @@ public class GamePictureServiceImpl extends ServiceImpl<GamePictureMapper, GameP
     @Autowired
     private GameService gameService;
 
+    @Autowired
+    private GameCategoryService gameCategoryService;
+
     /**
      * 根据游戏id查询
      *
@@ -61,12 +66,13 @@ public class GamePictureServiceImpl extends ServiceImpl<GamePictureMapper, GameP
     @Override
     public Boolean addOrUpdate(GamePictureParam param) {
         GameDTO gameDTO = gameService.getById(param.getGameId());
+        GameCategoryDTO gameCategoryDTO = gameCategoryService.getById(gameDTO.getCategory());
         //微信小游戏更新
-        if (Objects.equals(gameDTO.getCategory(), GameCategoryEnum.CATEGORY_TYPE_WX.getCategoryType())) {
+        if (Objects.equals(gameCategoryDTO.getKey(), GameCategoryEnum.CATEGORY_WX_APPLET.getKey())) {
             return this.appletGameAddOrUpdate(param);
         }
         //h5游戏更新
-        if (Objects.equals(gameDTO.getCategory(), GameCategoryEnum.CATEGORY_TYPE_H5.getCategoryType())) {
+        if (Objects.equals(gameCategoryDTO.getKey(), GameCategoryEnum.CATEGORY_DY_APPLET.getKey())) {
             return this.h5GameAddOrUpdate(param);
         }
         return Boolean.FALSE;

+ 8 - 26
game-module/game-mybatis/src/main/java/com/zanxiang/mybatis/entity/GameCategory.java

@@ -1,6 +1,9 @@
 package com.zanxiang.mybatis.entity;
 
-import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.*;
 
 import java.time.LocalDateTime;
@@ -25,35 +28,14 @@ public class GameCategory {
     private Long id;
 
     /**
-     * 标签名称
-     */
-    private String name;
-
-    /**
-     * 备注
-     */
-    @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private String remark;
-
-    /**
-     * 是否父应用类型
+     * 游戏分类key
      */
-    private Boolean isParent;
+    private String key;
 
     /**
-     * 父应用类型id
-     */
-    private Long parentId;
-
-    /**
-     * 操作者id
-     */
-    private Long operatorId;
-
-    /**
-     * 操作者名字
+     * 标签名称
      */
-    private String operatorName;
+    private String name;
 
     /**
      * 1 删除  0 正常

+ 66 - 0
game-module/game-mybatis/src/main/java/com/zanxiang/mybatis/entity/OrderPayParam.java

@@ -0,0 +1,66 @@
+package com.zanxiang.mybatis.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.*;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-01-06
+ * @description : 订单支付参数
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@ToString
+@Builder
+@TableName("t_order_pay_param")
+public class OrderPayParam {
+
+    /**
+     * 主键id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 订单唯一id
+     */
+    private String orderId;
+
+    /**
+     * 订单金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 应用id
+     */
+    private String appId;
+
+    /**
+     * 支付参数
+     */
+    private String payParam;
+
+    /**
+     * 1:删除,0: 正常
+     */
+    @TableLogic
+    private Integer isDelete;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateTime;
+}

+ 13 - 0
game-module/game-mybatis/src/main/java/com/zanxiang/mybatis/mapper/OrderPayParamMapper.java

@@ -0,0 +1,13 @@
+package com.zanxiang.mybatis.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zanxiang.mybatis.entity.OrderPayParam;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-01-06
+ * @description : ${description}
+ */
+public interface OrderPayParamMapper extends BaseMapper<OrderPayParam> {
+
+}

+ 3 - 3
game-module/game-sdk/src/main/java/com/zanxiang/sdk/controller/PayController.java

@@ -37,10 +37,10 @@ public class PayController {
     private OrderPayService orderPayService;
 
     @UnSignCheck
-    @ApiOperation(value = "获取小游戏H5支付参数")
+    @ApiOperation(value = "获取小程序/客服支付参数")
     @GetMapping(value = "/param/applet")
-    public ResultVO<PayParamVO> getPayParam(@RequestParam Long orderId) {
-        return ResultVO.ok(orderPayService.getPayParam(orderId));
+    public ResultVO<PayParamVO> getPayParam(@RequestParam String code, @RequestParam Long orderId, HttpServletRequest request) {
+        return ResultVO.ok(orderPayService.getPayParam(code, orderId, request));
     }
 
     @ApiOperation(value = "获取小游戏支付方式")

+ 6 - 0
game-module/game-sdk/src/main/java/com/zanxiang/sdk/domain/bo/ProductPayParamBO.java

@@ -1,6 +1,9 @@
 package com.zanxiang.sdk.domain.bo;
 
+import lombok.AllArgsConstructor;
+import lombok.Builder;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 
 /**
  * 支付调起生成相关参数
@@ -9,6 +12,9 @@ import lombok.Data;
  * @date 2022/6/8 15:21
  */
 @Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
 public class ProductPayParamBO {
 
     /**

+ 2 - 2
game-module/game-sdk/src/main/java/com/zanxiang/sdk/domain/params/ProductPayParam.java

@@ -28,9 +28,9 @@ public class ProductPayParam {
     private Integer payWay;
 
     /**
-     * 支付类型, 1:PC, 2: h5支付, 3: App支付, 4: 小程序支付, 5: 米大师支付
+     * 支付类型, 1:PC, 2: h5支付, 3: App支付, 4: 小程序支付, 5: 米大师支付, 6:客服支付
      */
-    @ApiModelProperty(notes = "支付类型, 1:PC, 2: h5支付, 3: App支付, 4: 小程序支付, 5: 米大师支付")
+    @ApiModelProperty(notes = "支付类型, 1:PC, 2: h5支付, 3: App支付, 4: 小程序支付, 5: 米大师支付, 6:客服支付")
     @NotNull(message = "支付类型不可为空")
     private Integer payDevice;
 

+ 5 - 0
game-module/game-sdk/src/main/java/com/zanxiang/sdk/domain/vo/PayParamVO.java

@@ -33,6 +33,11 @@ public class PayParamVO {
      */
     private String describe;
 
+    /**
+     * 应用appId
+     */
+    private String appId;
+
     /**
      * 下单支付参数
      */

+ 18 - 0
game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/Impl/OrderPayParamServiceImpl.java

@@ -0,0 +1,18 @@
+package com.zanxiang.sdk.service.Impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.mybatis.entity.OrderPayParam;
+import com.zanxiang.mybatis.mapper.OrderPayParamMapper;
+import com.zanxiang.sdk.service.OrderPayParamService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-01-06
+ * @description : 订单支付参数
+ */
+@Slf4j
+@Service
+public class OrderPayParamServiceImpl extends ServiceImpl<OrderPayParamMapper, OrderPayParam> implements OrderPayParamService {
+}

+ 52 - 6
game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/Impl/OrderPayServiceImpl.java

@@ -3,15 +3,19 @@ package com.zanxiang.sdk.service.Impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.zanxiang.common.domain.ResultMap;
 import com.zanxiang.common.enums.OrderStateEnum;
+import com.zanxiang.common.enums.PayDeviceEnum;
 import com.zanxiang.common.exception.BaseException;
 import com.zanxiang.common.utils.SpringUtils;
+import com.zanxiang.module.web.util.IpUtil;
 import com.zanxiang.mybatis.entity.Order;
+import com.zanxiang.mybatis.entity.OrderPayParam;
 import com.zanxiang.sdk.domain.bo.ProductPayParamBO;
 import com.zanxiang.sdk.domain.params.ProductPayParam;
 import com.zanxiang.sdk.domain.params.UserData;
 import com.zanxiang.sdk.domain.vo.PayParamVO;
 import com.zanxiang.sdk.enums.PayTypeEnum;
 import com.zanxiang.sdk.service.GamePayWayService;
+import com.zanxiang.sdk.service.OrderPayParamService;
 import com.zanxiang.sdk.service.OrderPayService;
 import com.zanxiang.sdk.service.OrderService;
 import com.zanxiang.sdk.service.pay.PayBaseService;
@@ -39,29 +43,71 @@ public class OrderPayServiceImpl implements OrderPayService {
     @Autowired
     public GamePayWayService gamePayWayService;
 
+    @Autowired
+    private OrderPayParamService orderPayParamService;
+
     @Override
-    public PayParamVO getPayParam(Long orderId) {
+    public PayParamVO getPayParam(String code, Long orderId, HttpServletRequest request) {
+        OrderPayParam orderPayParam = orderPayParamService.getOne(new LambdaQueryWrapper<OrderPayParam>()
+                .eq(OrderPayParam::getOrderId, orderId));
+        if (orderPayParam != null) {
+            return PayParamVO.builder()
+                    .orderId(orderPayParam.getOrderId())
+                    .amount(orderPayParam.getAmount())
+                    .describe("购买" + orderPayParam.getAmount() + "元档充值")
+                    .appId(orderPayParam.getAppId())
+                    .payParam(orderPayParam.getPayParam())
+                    .build();
+        }
         Order order = orderService.getById(orderId);
         if (order == null) {
             throw new BaseException("参数错误, 订单信息不存在");
         }
+        //创建支付参数
+        ProductPayParamBO bo = ProductPayParamBO.builder()
+                .gameId(order.getGameId().toString())
+                .userId(order.getUserId())
+                .payDevice(order.getPayDevice())
+                .deviceSystem(order.getDeviceSystem())
+                .spbillCreateIp(IpUtil.getRealIp(request))
+                .outTradeNo(order.getOrderId())
+                .payWay(2)
+                .code(code)
+                .build();
+        //调起支付
+        PayTypeEnum payTypeEnum = PayTypeEnum.getByPayType(bo.getPayWay());
+        PayBaseService service = SpringUtils.getBean(payTypeEnum.getClazz());
+        service.payCreate(bo);
+        //重新查询
+        orderPayParam = orderPayParamService.getOne(new LambdaQueryWrapper<OrderPayParam>()
+                .eq(OrderPayParam::getOrderId, orderId));
+        if (orderPayParam == null) {
+            throw new BaseException("支付参数获取失败");
+        }
         return PayParamVO.builder()
-                .orderId(order.getOrderId())
-                .amount(order.getAmount())
-                .describe("购买" + order.getAmount() + "元档充值")
-                .payParam(order.getPayParam())
+                .orderId(orderPayParam.getOrderId())
+                .amount(orderPayParam.getAmount())
+                .describe("购买" + orderPayParam.getAmount() + "元档充值")
+                .appId(orderPayParam.getAppId())
+                .payParam(orderPayParam.getPayParam())
                 .build();
     }
 
     @Override
     public Integer getAppletPayDevice(UserData userData) {
-        return 2;
+        return 6;
     }
 
     @Override
     public ResultMap payCreate(ProductPayParam product, UserData userData) {
         //创建订单
         orderService.createOrder(product, userData);
+        //判断游戏类型
+        if (Objects.equals(PayDeviceEnum.MINI_APP_PAY.getCode(), product.getPayDevice())
+                || Objects.equals(PayDeviceEnum.CUSTOM_PAY.getCode(), product.getPayDevice())) {
+            log.error("单独生成订单, 不下单");
+            return ResultMap.ok(product.getOrderId());
+        }
         //创建支付参数
         ProductPayParamBO bo = new ProductPayParamBO();
         bo.setGameId(userData.getGameId().toString());

+ 12 - 0
game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/OrderPayParamService.java

@@ -0,0 +1,12 @@
+package com.zanxiang.sdk.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.mybatis.entity.OrderPayParam;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-01-06
+ * @description : 订单支付参数
+ */
+public interface OrderPayParamService extends IService<OrderPayParam> {
+}

+ 9 - 1
game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/OrderPayService.java

@@ -15,7 +15,15 @@ import java.io.IOException;
  */
 public interface OrderPayService {
 
-    PayParamVO getPayParam(Long orderId);
+    /**
+     * 得到支付参数
+     *
+     * @param code    代码
+     * @param orderId 订单id
+     * @param request 请求
+     * @return {@link PayParamVO}
+     */
+    PayParamVO getPayParam(String code, Long orderId, HttpServletRequest request);
 
     /**
      * 获取小游戏支付方式

+ 20 - 7
game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/pay/WxPayService.java

@@ -1,18 +1,18 @@
 package com.zanxiang.sdk.service.pay;
 
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.zanxiang.common.constant.Constants;
 import com.zanxiang.common.domain.ResultMap;
+import com.zanxiang.common.enums.DeleteEnum;
 import com.zanxiang.common.enums.HttpStatusEnum;
 import com.zanxiang.common.exception.BaseException;
 import com.zanxiang.common.utils.URIUtil;
 import com.zanxiang.module.util.JsonUtil;
-import com.zanxiang.mybatis.entity.Order;
+import com.zanxiang.mybatis.entity.OrderPayParam;
 import com.zanxiang.sdk.constant.WxPayConstants;
 import com.zanxiang.sdk.domain.bo.ProductPayAttachParamBO;
 import com.zanxiang.sdk.domain.bo.ProductPayParamBO;
 import com.zanxiang.sdk.domain.bo.WxPayConfigBO;
-import com.zanxiang.sdk.service.OrderService;
+import com.zanxiang.sdk.service.OrderPayParamService;
 import com.zanxiang.sdk.util.HttpUtil;
 import com.zanxiang.sdk.util.WxPayUtil;
 import com.zanxiang.sdk.util.XmlUtil;
@@ -29,7 +29,9 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.BufferedOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.math.BigDecimal;
 import java.nio.charset.StandardCharsets;
+import java.time.LocalDateTime;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Objects;
@@ -78,7 +80,7 @@ public class WxPayService extends PayBaseService {
     private RestTemplate restTemplate;
 
     @Autowired
-    private OrderService orderService;
+    private OrderPayParamService orderPayParamService;
 
     @Override
     public ResultMap create(ProductPayParamBO product) {
@@ -94,6 +96,7 @@ public class WxPayService extends PayBaseService {
                 //H5
                 return this.h5Pay(product);
             case 4:
+            case 6:
                 //小程序
                 return this.miniAppPay(product);
             default:
@@ -181,9 +184,6 @@ public class WxPayService extends PayBaseService {
             log.error("微信h5支付urlCode转deepLink异常, urlCode:{}", urlCode);
             throw new BaseException("微信h5支付urlCode转deepLink异常");
         }
-        orderService.update(new LambdaUpdateWrapper<Order>()
-                .set(Order::getPayParam, deepLink)
-                .eq(Order::getOrderId, product.getOutTradeNo()));
         //返回结果
         return ResultMap.ok(product.getPayDevice(), deepLink, product.getOutTradeNo());
     }
@@ -228,6 +228,19 @@ public class WxPayService extends PayBaseService {
             miniMap.put("timeStamp", createTime);
             miniMap.put("nonceStr", nonceStr);
             miniMap.put("package", successMap);
+
+            //保存订单支付参数
+            orderPayParamService.save(OrderPayParam.builder()
+                    .orderId(product.getOutTradeNo())
+                    .amount(new BigDecimal(product.getTotalFee()))
+                    .appId(config.getAppId())
+                    .payParam(JsonUtil.toString(miniMap))
+                    .isDelete(DeleteEnum.NO.getCode())
+                    .createTime(LocalDateTime.now())
+                    .updateTime(LocalDateTime.now())
+                    .build());
+
+            //返回
             return ResultMap.ok(miniMap);
         } catch (Exception e) {
             log.error("微信小程序支付通信异常, 订单号:{}, e : {}", product.getOutTradeNo(), e.getMessage());