fixbug 展示退款金额有误 & 关闭余额充值服务
This commit is contained in:
@@ -8,6 +8,7 @@ import com.ydd.framework.core.common.Pagination;
|
||||
import com.ydd.framework.core.common.dto.ResponseDTO;
|
||||
import com.ydd.framework.core.common.utils.RequestUtils;
|
||||
import com.ydd.framework.core.controller.BaseApiController;
|
||||
import com.ydd.framework.core.exception.ServiceException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -71,7 +72,7 @@ public class OrderController extends BaseApiController {
|
||||
@RequestMapping(value = "/order/recharge", method = RequestMethod.POST)
|
||||
@AccessToken
|
||||
public ResponseDTO recharge(@RequestParam("rechargeId") Integer rechargeId){
|
||||
return ResponseDTO.ok().
|
||||
addAttribute("pay",orderService.createRecharge(getLoginMemberId(),PlatformContext.getValue(),rechargeId,RequestUtils.getIp()));
|
||||
throw new ServiceException("请优先使用实时支付,暂不支持余额充值!");
|
||||
// return ResponseDTO.ok().addAttribute("pay",orderService.createRecharge(getLoginMemberId(),PlatformContext.getValue(),rechargeId,RequestUtils.getIp()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class BarcodeTimeOrderTask {
|
||||
logger.info("用户" + barcodeOrderTime.getMemberId() + "的订单" + barcodeOrderTime.getOrderSn() + "需要退款" + barcodeOrderTime.getPayMoney());
|
||||
MemberRefund memberRefund = new MemberRefund();
|
||||
memberRefund.setMemberId(barcodeOrderTime.getMemberId());
|
||||
memberRefund.setLessonId(1);
|
||||
memberRefund.setLessonId(barcodeOrderTime.getId());
|
||||
memberRefund.setMoney(order.getPrice());
|
||||
memberRefund.setOrderSn(barcodeOrderTime.getOrderSn());
|
||||
memberRefund.setTransactionId(order.getTradeSn());
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.sv.service.api;
|
||||
|
||||
import com.enums.MoneyLogEnum;
|
||||
import com.enums.OrderPayEnum;
|
||||
import com.enums.PayTypeEnum;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.sv.dto.api.MemberLessonTicketDetailDTO;
|
||||
@@ -191,6 +190,7 @@ public class MemberRefundService extends BaseServiceImpl {
|
||||
if (barcodeOrderTime.getOrderSn() != null
|
||||
&& barcodeOrderTime.getOrderSn().equals(memberRefund.getOrderSn())) {
|
||||
barcodeOrderTime.setSumPayMoney(barcodeOrderTime.getSumPayMoney() == null ? 0 : barcodeOrderTime.getSumPayMoney() + memberRefund.getMoney().intValue());
|
||||
barcodeOrderTime.setPayMoney(0);
|
||||
barcodeOrderTime.setModifiedTime(new Date());
|
||||
barcodeOrderTimeMapper.updateByPrimaryKey(barcodeOrderTime);
|
||||
}
|
||||
|
||||
@@ -182,7 +182,6 @@ public class VenueEnterService extends BaseServiceImpl {
|
||||
} else {
|
||||
// 不需要补交钱且需要退钱
|
||||
lastOrder.setPayMoney(price.abs().intValue());
|
||||
lastOrder.setSumPayMoney(price.abs().intValue());
|
||||
if (lastOrder.getPayMoney() > 0) {
|
||||
lastOrder.setPaying(1);
|
||||
lastOrder.setModifiedTime(new Date());
|
||||
|
||||
Reference in New Issue
Block a user