bug
jiangqs
2023-08-06 604fe2152a6f25a8d5a4b7eb318d2baadeac6b8e
bug
4个文件已修改
38 ■■■■■ 已修改文件
ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/util/WechatPayUtils.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java
@@ -1,6 +1,7 @@
package com.ruoyi.order.controller.miniapp;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsResult;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.web.controller.BaseController;
@@ -183,8 +184,9 @@
        Long userId = SecurityUtils.getUserId();
        AppPlaceOrderVo appPlaceOrderVo = new AppPlaceOrderVo();
        Order order = orderService.getById(appBaseGetDto.getId());
        order.setOrderStatus(2);
        orderService.saveOrUpdate(order);
        PartnerTransactionsResult transaction = new PartnerTransactionsResult();
        transaction.setOutTradeNo(appBaseGetDto.getId());
        orderService.payBack(transaction);
        appPlaceOrderVo.setOrderId(order.getOrderId());
        appPlaceOrderVo.setOrderNo(order.getOrderNo());
        appPlaceOrderVo.setPayType(order.getPayType());
ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
@@ -3691,7 +3691,7 @@
        if (redisService.hasKey(SecurityConstant.PAY_MONEY_INTEGRAL)) {
            Integer moneyValue = redisService.getCacheObject(SecurityConstant.PAY_MONEY_INTEGRAL);
            BigDecimal moneyValueBig = BigDecimal.valueOf(moneyValue);
            BigDecimal integralBig = moneyValueBig.multiply(order.getPayMoney());
            BigDecimal integralBig = moneyValueBig.multiply(order.getPayMoney()).setScale(0,BigDecimal.ROUND_HALF_UP);
            Integer integral = Integer.valueOf(integralBig.toString());
            memberTotalChangeDto.setChangeIntegral(integral);
            memberTotalChangeDto.setTypeIntegral(1);
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
@@ -6,7 +6,6 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsStatusResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.ruoyi.common.core.constant.CacheConstants;
import com.ruoyi.common.core.exception.ServiceException;
@@ -20,7 +19,6 @@
import com.ruoyi.shop.domain.pojo.shop.*;
import com.ruoyi.shop.domain.pojo.task.ShopFile;
import com.ruoyi.shop.domain.vo.*;
import com.ruoyi.shop.enums.WxApplyMentStateEnum;
import com.ruoyi.shop.mapper.shop.ShopMapper;
import com.ruoyi.shop.service.shop.*;
import com.ruoyi.shop.service.task.MemberTaskService;
@@ -973,7 +971,7 @@
        shopAuthentication.setApplyNumber(applyNumber);
        shopAuthentication.setAuditStatus(3);
        shopAuthenticationService.saveOrUpdate(shopAuthentication);
        wechatPayUtils.ecommerceApply(shopAuthentication,applyNumber,shop);
        //wechatPayUtils.ecommerceApply(shopAuthentication,applyNumber,shop);
    }
    /**
@@ -1353,7 +1351,7 @@
     * @param applymentId
     */
    private void queryApplyStatusByApplymentId(String applymentId, Long shopId) {
        try {
        /*try {
            if (StringUtils.isNotBlank(applymentId)) {
                ApplymentsStatusResult result = wechatPayUtils.queryApplyStatusByApplymentId(applymentId);
                shopAuthenticationService.updateAuditStatusByApplymentId(applymentId, result);
@@ -1364,7 +1362,7 @@
            }
        } catch (WxPayException e) {
            e.printStackTrace();
        }
        }*/
    }
    /**
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/util/WechatPayUtils.java
@@ -1,18 +1,8 @@
package com.ruoyi.shop.util;
import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsRequest;
import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsResult;
import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsStatusResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.EcommerceService;
import com.github.binarywang.wxpay.service.WxPayService;
import com.ruoyi.shop.domain.pojo.shop.ShopAuthentication;
import com.ruoyi.system.api.domain.poji.shop.Shop;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
/**
 * 微信支付
@@ -21,11 +11,11 @@
@AllArgsConstructor
public class WechatPayUtils {
    private final WxPayService wxService;
    /*private final WxPayService wxService;
    /**
    *//**
     * 电商二级商户进件(提交申请单)
     */
     *//*
    public ApplymentsResult ecommerceApply(ShopAuthentication shopAuthentication, String applyNumber, Shop shop) throws WxPayException {
        EcommerceService ecommerceService = wxService.getEcommerceService();
        ApplymentsRequest request = new ApplymentsRequest();
@@ -110,14 +100,14 @@
    }
    /**
    *//**
     * 通过查询申请状态API查询二级商户入驻申请结果
     * @param applymentId 微信支付申请单号
     * @return 申请状态
     * @throws WxPayException
     */
     *//*
    public ApplymentsStatusResult queryApplyStatusByApplymentId(String applymentId) throws WxPayException {
        return wxService.getEcommerceService().queryApplyStatusByApplymentId(applymentId);
    }
    }*/
}