feat: 支付宝相关支付
parent
b106db5ca0
commit
797dd8cb9c
|
@ -1,5 +1,6 @@
|
|||
package cn.iocoder.yudao.module.shop.dal.dataobject.recharge;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
@ -29,7 +30,7 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RechargeOrderDO extends BaseDO {
|
||||
public class RechargeOrderDO extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package cn.iocoder.yudao.module.shop.dal.dataobject.recharge;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
@ -22,7 +23,7 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RechargeOrderInfoDO extends BaseDO {
|
||||
public class RechargeOrderInfoDO extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
|
|
|
@ -14,6 +14,8 @@ import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
|||
import cn.iocoder.yudao.framework.pay.properties.AliPayProperties;
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
||||
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
||||
import cn.iocoder.yudao.module.member.api.user.dto.PromoterDTO;
|
||||
|
@ -1149,6 +1151,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
}
|
||||
|
||||
@Override
|
||||
@TenantIgnore
|
||||
@Transactional
|
||||
public InitOrderResponse memberTopUp(OrderContentRequest request, HttpServletRequest servletRequest) {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
|
@ -1352,6 +1355,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
|
||||
|
||||
private RechargeOrderDO initializeOrder(OrderContentRequest request, String code, MemberUserRespDTO user, PromoterDTO promoterDTO) {
|
||||
Long tenantId = TenantContextHolder.getTenantId();
|
||||
RechargeOrderDO orderDO = new RechargeOrderDO();
|
||||
List<OrderContentRequest.OrderInfo> orderInfos = request.getOrderInfos();
|
||||
orderDO.setOrderId(code);
|
||||
|
@ -1372,6 +1376,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
orderDO.setBeforePayPrice(sum);
|
||||
orderDO.setPromoterId(user.getPromoterId());
|
||||
orderDO.setDeptId(promoterDTO.getDeptId());
|
||||
orderDO.setTenantId(tenantId);
|
||||
rechargeOrderMapper.insert(orderDO);
|
||||
List<RechargeOrderInfoDO> infoDOS = new ArrayList<>();
|
||||
orderInfos.forEach(info -> {
|
||||
|
@ -1387,6 +1392,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
infoDO.setDeptId(promoterDTO.getDeptId());
|
||||
infoDO.setUid(user.getId());
|
||||
infoDO.setRechargeGearId(info.getGearId());
|
||||
infoDO.setTenantId(tenantId);
|
||||
infoDOS.add(infoDO);
|
||||
});
|
||||
rechargeOrderInfoMapper.insertBatch(infoDOS);
|
||||
|
|
Loading…
Reference in New Issue