Browse Source

支付回调优化

fushengqian 1 year ago
parent
commit
a5998b2f17

+ 9 - 9
fuint-application/src/main/java/com/fuint/common/service/OrderService.java

@@ -31,7 +31,7 @@ public interface OrderService extends IService<MtOrder> {
     /**
      * 创建订单
      *
-     * @param reqDto
+     * @param  reqDto
      * @throws BusinessCheckException
      */
     MtOrder saveOrder(OrderDto reqDto) throws BusinessCheckException;
@@ -39,7 +39,7 @@ public interface OrderService extends IService<MtOrder> {
     /**
      * 获取订单详情
      *
-     * @param id
+     * @param  id
      * @throws BusinessCheckException
      */
     MtOrder getOrderInfo(Integer id) throws BusinessCheckException;
@@ -47,7 +47,7 @@ public interface OrderService extends IService<MtOrder> {
     /**
      * 根据ID获取订单
      *
-     * @param id
+     * @param  id
      * @throws BusinessCheckException
      */
     UserOrderDto getOrderById(Integer id) throws BusinessCheckException;
@@ -55,14 +55,14 @@ public interface OrderService extends IService<MtOrder> {
     /**
      * 根据ID获取订单
      *
-     * @param id
+     * @param  id
      * @throws BusinessCheckException
      */
     UserOrderDto getMyOrderById(Integer id) throws BusinessCheckException;
 
     /**
      * 取消订单
-     * @param id 订单ID
+     * @param  id 订单ID
      * @return
      * */
     MtOrder cancelOrder(Integer id, String remark) throws BusinessCheckException;
@@ -70,8 +70,8 @@ public interface OrderService extends IService<MtOrder> {
     /**
      * 根据订单ID删除
      *
-     * @param id       ID
-     * @param operator 操作人
+     * @param  id       ID
+     * @param  operator 操作人
      * @throws BusinessCheckException
      */
     void deleteOrder(Integer id, String operator) throws BusinessCheckException;
@@ -79,14 +79,14 @@ public interface OrderService extends IService<MtOrder> {
     /**
      * 根据订单号获取订单
      *
-     * @param orderSn
+     * @param  orderSn
      * @throws BusinessCheckException
      */
     UserOrderDto getOrderByOrderSn(String orderSn) throws BusinessCheckException;
 
     /**
      * 更新订单
-     * @param reqDto
+     * @param  reqDto
      * @throws BusinessCheckException
      * */
     MtOrder updateOrder(OrderDto reqDto) throws BusinessCheckException;

+ 1 - 1
fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java

@@ -829,7 +829,7 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
 
         // 处理消费返积分,查询返1积分所需消费金额
         MtSetting setting = settingService.querySettingByName(mtOrder.getMerchantId(), "pointNeedConsume");
-        if (setting != null && orderInfo.getIsVisitor().equals(YesOrNoEnum.NO.getKey())) {
+        if (setting != null && !orderInfo.getPayType().equals(PayTypeEnum.BALANCE.getKey()) && orderInfo.getIsVisitor().equals(YesOrNoEnum.NO.getKey())) {
             String needPayAmount = setting.getValue();
             Integer needPayAmountInt = Math.round(Integer.parseInt(needPayAmount));
             Double pointNum = 0d;

+ 0 - 3
fuint-application/src/main/java/com/fuint/common/service/impl/PaymentServiceImpl.java

@@ -8,7 +8,6 @@ import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.ResponseObject;
 import com.fuint.repository.mapper.MtOrderMapper;
-import com.fuint.repository.mapper.MtUserGradeMapper;
 import com.fuint.repository.model.*;
 import com.fuint.utils.StringUtil;
 import org.slf4j.Logger;
@@ -16,13 +15,11 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 /**