From a4cc10ccb9dad154d85999d80bf04fee5a3bcc85 Mon Sep 17 00:00:00 2001 From: khy <2908249413@qq.com> Date: Wed, 23 Oct 2024 18:11:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E8=AE=A2=E5=8D=95=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/enums/ErrorCodeConstants.java | 3 +- .../user/vo/PaidMemberUserSaveReqVO.java | 2 + .../app/type/AppMemberCardTypeController.java | 2 +- .../dal/dataobject/user/PaidMemberUserDO.java | 6 ++ .../PaidMemberCardTypeService.java | 2 +- .../PaidMemberCardTypeServiceImpl.java | 2 +- .../service/user/PaidMemberUserService.java | 12 +++ .../user/PaidMemberUserServiceImpl.java | 56 +++++++---- .../app/member/AppPaidMembeController.java | 99 ++++++++++++++----- .../member/vo/AppPaidMemberCreateRespVO.java | 8 +- .../member/vo/AppPaidMemeberOrderReqDto.java | 2 + .../convert/member/PayMemberOrderConvert.java | 2 +- 12 files changed, 147 insertions(+), 49 deletions(-) diff --git a/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java b/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java index 20995c4..79655f2 100644 --- a/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java +++ b/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java @@ -68,8 +68,9 @@ public interface ErrorCodeConstants { ErrorCode CARD_NOT_EXISTS = new ErrorCode(1_004_020_000, "会员卡类型不存在"); ErrorCode MEMBER_USER_NOT_EXISTS = new ErrorCode(1_004_021_000, "会员不存在"); ErrorCode PAID_MEMBER_ORDER_NOT_EXISTS = new ErrorCode(1_004_022_000, "付费会员订单不存在"); - ErrorCode PAID_MEMBER_USER_ORDER_NO_NOT_EXISTS = new ErrorCode(1_004_023_000, "生成会员订单号失败,请重新提交"); + ErrorCode PAID_MEMBER_USER_NOT_OPEN = new ErrorCode(1_004_021_000, "会员未开通"); + ErrorCode PAID_MEMBER_USER_PASSED = new ErrorCode(1_004_021_000, "会员已过期"); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/PaidMemberUserSaveReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/PaidMemberUserSaveReqVO.java index e495ec3..850e384 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/PaidMemberUserSaveReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/PaidMemberUserSaveReqVO.java @@ -101,4 +101,6 @@ public class PaidMemberUserSaveReqVO { @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED) private String orderNo; + @Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED) + private Long payOrderId; } \ No newline at end of file diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/type/AppMemberCardTypeController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/type/AppMemberCardTypeController.java index 6bd33b2..5b96de1 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/type/AppMemberCardTypeController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/type/AppMemberCardTypeController.java @@ -41,7 +41,7 @@ public class AppMemberCardTypeController { List list = cardService.getCardTypeList(memberUserDO.getActivate()); if(name != null){ //根据用户查询是否有有效期会员的类型列表 - list = cardService.getCardTypeList2(memberUserDO.getActivate(),name); + list = cardService.getCardTypeValidList(memberUserDO.getActivate(),name); } return success(MemberCardTypeConvert.INSTANCE.convertList(list)); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/PaidMemberUserDO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/PaidMemberUserDO.java index d1fbc00..f875f9c 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/PaidMemberUserDO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/PaidMemberUserDO.java @@ -145,6 +145,12 @@ public class PaidMemberUserDO extends TenantBaseDO { * 订单号 */ private String orderNo; + /** + * 支付订单编号 + * + * 关联 {@link PayOrderDO#getId()} + */ + private Long payOrderId; } \ No newline at end of file diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/membercardtype/PaidMemberCardTypeService.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/membercardtype/PaidMemberCardTypeService.java index 82830d3..f7c8c64 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/membercardtype/PaidMemberCardTypeService.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/membercardtype/PaidMemberCardTypeService.java @@ -68,7 +68,7 @@ public interface PaidMemberCardTypeService { * @param activate * @return */ - List getCardTypeList2 (Integer activate,String name); + List getCardTypeValidList (Integer activate,String name); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/membercardtype/PaidMemberCardTypeServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/membercardtype/PaidMemberCardTypeServiceImpl.java index 2f3b10e..7a3ab0e 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/membercardtype/PaidMemberCardTypeServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/membercardtype/PaidMemberCardTypeServiceImpl.java @@ -91,7 +91,7 @@ public class PaidMemberCardTypeServiceImpl implements PaidMemberCardTypeService } @Override - public List getCardTypeList2(Integer activate,String name) { + public List getCardTypeValidList(Integer activate,String name) { List list = new ArrayList<>(); Integer status = 1; if (activate == 2){ diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserService.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserService.java index b96c42e..c8c2de2 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserService.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserService.java @@ -50,12 +50,24 @@ public interface PaidMemberUserService { */ PaidMemberUserDO getMemberUser(Long id); +// /** +// * 判断是否为会员 +// */ +// PaidMemberUserDO isValidPaidMember(Integer activate,LocalDateTime cardExpirationTime); + int getPriceByTtype(Integer activate, String cardName); LocalDateTime getDeadLineDay(String cardName); PaidMemberUserDO getPaidMemberUserByOrderNo(String orderNO); + /** + * 更新会员 + * + * @param updateReqVO 更新信息 + */ + void update(@Valid PaidMemberUserDO updateReqVO); + // /** // * 获得会员分页 diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserServiceImpl.java index bd6068b..d45fd8f 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/PaidMemberUserServiceImpl.java @@ -23,6 +23,7 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.member.dal.mysql.user.PaidMemberUserMapper; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*; /** @@ -41,12 +42,11 @@ public class PaidMemberUserServiceImpl implements PaidMemberUserService { private PaidMemberCardTypeService memberCardTypeService; + @Override public Long createMemberUser(PaidMemberUserSaveReqVO createReqVO) { // 插入 PaidMemberUserDO memberUser = BeanUtils.toBean(createReqVO, PaidMemberUserDO.class); - String prefix = String.valueOf('m'); - memberUser.setOrderNo(generate(prefix)); if(getPaidMemberUserByOrderNo(memberUser.getOrderNo()) != null){ throw exception(PAID_MEMBER_USER_ORDER_NO_NOT_EXISTS); } @@ -55,10 +55,10 @@ public class PaidMemberUserServiceImpl implements PaidMemberUserService { return memberUser.getId(); } - public String generate(String prefix){ - String no = prefix + DateUtil.format(LocalDateTime.now(), DatePattern.PURE_DATETIME_PATTERN); - return no; - } +// public String generate(String prefix){ +// String no = prefix + DateUtil.format(LocalDateTime.now(), DatePattern.PURE_DATETIME_PATTERN); +// return no; +// } @Override public void updateMemberUser(PaidMemberUserSaveReqVO updateReqVO) { @@ -89,6 +89,20 @@ public class PaidMemberUserServiceImpl implements PaidMemberUserService { return paidMemberUserMapper.selectById(id); } +// @Override +// public PaidMemberUserDO isValidPaidMember(Integer activate, LocalDateTime cardExpirationTime) { +// if (activate == 0){ +// throw exception(PAID_MEMBER_USER_NOT_OPEN); +// } else if (activate != 0 && cardExpirationTime.isBefore(LocalDateTime.now())) { +// throw exception(PAID_MEMBER_USER_PASSED); +// }else { +// //当前用户为会员 +// List list = paidMemberUserMapper.selectList(PaidMemberUserDO::getUid,getLoginUserId(), +// ) +// } +// return null; +// } + @Override public int getPriceByTtype(Integer activate, String cardName) { int price = 0; @@ -108,17 +122,19 @@ public class PaidMemberUserServiceImpl implements PaidMemberUserService { public LocalDateTime getDeadLineDay(String cardName) { LocalDateTime now = LocalDateTime.now(); LocalDateTime deadlineDay; - if (cardName.equals("试用")){ - deadlineDay = now.plus(1, ChronoUnit.DAYS); - } else if (cardName.equals("月卡")) { - deadlineDay = now.plus(1,ChronoUnit.MONTHS); - } else if (cardName.equals("季卡")) { - deadlineDay = now.plus(3,ChronoUnit.MONTHS); - } else if (cardName.equals("年卡")) { - deadlineDay = now.plus(1,ChronoUnit.YEARS); - } else { - deadlineDay = null; - } + //判断是否具有过期时间,该操作为续费 + if (cardName.equals("试用")){ + deadlineDay = now.plus(1, ChronoUnit.DAYS); + } else if (cardName.equals("月卡")) { + deadlineDay = now.plus(1,ChronoUnit.MONTHS); + } else if (cardName.equals("季卡")) { + deadlineDay = now.plus(3,ChronoUnit.MONTHS); + } else if (cardName.equals("年卡")) { + deadlineDay = now.plus(1,ChronoUnit.YEARS); + } else { + //永久设置为一个非常远的的日期 + deadlineDay = LocalDateTime.of(9999,12,31,23,59,59); + } return deadlineDay; } @@ -128,6 +144,12 @@ public class PaidMemberUserServiceImpl implements PaidMemberUserService { return paidMemberUserDO; } + @Override + public void update(PaidMemberUserDO updateReqVO) { + // 校验存在 + validateMemberUserExists(updateReqVO.getId()); + paidMemberUserMapper.updateById(updateReqVO); + } // @Override // public PageResult getMemberUserPage(PaidMemberUserPageReqVO pageReqVO) { // return memberUserMapper.selectPage(pageReqVO); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/AppPaidMembeController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/AppPaidMembeController.java index 3699ea7..9e2df10 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/AppPaidMembeController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/AppPaidMembeController.java @@ -13,6 +13,7 @@ import cn.iocoder.yudao.module.member.service.membercardtype.PaidMemberCardTypeS import cn.iocoder.yudao.module.member.service.order.PaidMemberOrderService; import cn.iocoder.yudao.module.member.service.user.MemberUserService; import cn.iocoder.yudao.module.member.service.user.PaidMemberUserService; +import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; import cn.iocoder.yudao.module.pay.controller.app.member.vo.AppPaidMemberCreateReqVO; import cn.iocoder.yudao.module.pay.controller.app.member.vo.AppPaidMemberCreateRespVO; import cn.iocoder.yudao.module.pay.controller.app.member.vo.AppPaidMemeberOrderReqDto; @@ -20,6 +21,7 @@ import cn.iocoder.yudao.module.pay.convert.member.PayMemberOrderConvert; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletDO; import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO; +import cn.iocoder.yudao.module.pay.dal.redis.no.PayNoRedisDAO; import cn.iocoder.yudao.module.pay.service.order.PayOrderService; import cn.iocoder.yudao.module.pay.service.wallet.PayWalletService; import io.swagger.v3.oas.annotations.Operation; @@ -33,11 +35,14 @@ import javax.annotation.Resource; import javax.validation.Valid; import java.math.BigDecimal; +import java.time.Duration; import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.addTime; import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; +import static cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum.WALLET; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserType; import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.MEMBER_USER_NOT_EXISTS; @@ -45,6 +50,7 @@ import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.WALLET_BALANC import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.WALLET_NOT_FOUND; import static cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum.PAYMENT; + @Tag(name = "用户 APP - 会员支付") @RestController @RequestMapping("/pay/member") @@ -52,6 +58,12 @@ import static cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum.PAYM @Slf4j public class AppPaidMembeController { + /** + * 会员支付的 no 前缀 + * */ + private static final String PAID_MEMBER_NO_PREFIX = "M"; + + private static final String PAID_MEMBER_USER_SUBJECT = "会员支付购卡"; @Resource private MemberUserService memberUserService; @@ -64,6 +76,12 @@ public class AppPaidMembeController { @Resource private PayWalletService payWalletService; + @Resource + private PayNoRedisDAO noRedisDAO; + + @Resource + private PayOrderService payOrderService; + @PostMapping("/create") @Operation(summary = "创建会员支付记录(发起支付)") public CommonResult createcard(@Valid @RequestBody AppPaidMemberCreateReqVO reqVO) { @@ -76,6 +94,7 @@ public class AppPaidMembeController { PaidMemberUserSaveReqVO paidMemberUserSaveReqVO = new PaidMemberUserSaveReqVO(); //初始化支付金额,单位为分 int price = 0; + Long payOrderId = null; if(reqVO.getCardName().equals("试用")){ BeanUtils.copyProperties(memberUserDO,paidMemberUserSaveReqVO); paidMemberUserSaveReqVO.setId(null); @@ -92,6 +111,8 @@ public class AppPaidMembeController { //获取试用类型的过期时间 LocalDateTime cardExpirationTime = paidMemberUserService.getDeadLineDay(reqVO.getCardName()); paidMemberUserSaveReqVO.setCardExpirationTime(cardExpirationTime); + //设置会员订单号 + paidMemberUserSaveReqVO.setOrderNo(noRedisDAO.generate(PAID_MEMBER_NO_PREFIX)); //新增会员订单记录 Long id = paidMemberUserService.createMemberUser(paidMemberUserSaveReqVO); //查询新增的会员订单记录 @@ -110,37 +131,69 @@ public class AppPaidMembeController { String deadlineDay = memberCardService.selectByName(reqVO.getCardName()).getVid(); paidMemberUserSaveReqVO.setDeadlineDay(deadlineDay); paidMemberUserSaveReqVO.setPrice(price); - paidMemberUserSaveReqVO.setPayType("钱包支付"); + //设置会员订单号 + paidMemberUserSaveReqVO.setOrderNo(noRedisDAO.generate(PAID_MEMBER_NO_PREFIX)); //新增会员订单记录 Long id = paidMemberUserService.createMemberUser(paidMemberUserSaveReqVO); //查询新增的会员订单记录 paidMemberUserDO = paidMemberUserService.getMemberUser(id); + // 创建支付订单号 + payOrderId = payOrderService.createOrder(new PayOrderCreateReqDTO() + .setAppId(1L).setUserIp(getClientIP()) + .setMerchantOrderId(""+paidMemberUserDO.getId()) + .setSubject(PAID_MEMBER_USER_SUBJECT).setBody("") + .setPrice(paidMemberUserDO.getPrice()) + .setExpireTime(addTime(Duration.ofHours(2L)))); // TODO @芋艿:支付超时时间 + paidMemberUserDO.setPayOrderId(payOrderId); + //跟新支付订单号进付费会员表里 + paidMemberUserService.update(paidMemberUserDO); } - return success(PayMemberOrderConvert.INSTANCE.convert(paidMemberUserDO.getId(),paidMemberUserDO.getOrderNo() + return success(PayMemberOrderConvert.INSTANCE.convert(paidMemberUserDO.getId(),payOrderId ,paidMemberUserDO.getCardExpirationTime(),memberUserDO.getActivate())); } -// @PostMapping("/update") -// @Operation(summary = "更新会员订单未支付为已支付") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob -// public CommonResult updatePaidMemberUser(@Valid @RequestBody AppPaidMemeberOrderReqDto notifyReqDTO){ -// //获取订单记录 -// PaidMemberUserDO paidMemberUserDO = paidMemberUserService.getMemberUser(notifyReqDTO.getId()); -//// 校验钱包充值是否可以支付 -// PayWalletDO walletDO = payWalletService.getOrCreateWallet(WebFrameworkUtils.getLoginUserId(),getLoginUserType()); -// if(walletDO.getBalance() updatePaidMemberUser(@Valid @RequestBody AppPaidMemeberOrderReqDto notifyReqDTO){ + //获取当前登录用户信息,并判断用户是否为会员 + MemberUserDO memberUserDO = memberUserService.getUser(getLoginUserId()); + //获取订单记录 + PaidMemberUserDO paidMemberUserDO = paidMemberUserService.getMemberUser(notifyReqDTO.getId()); +// 获取当前用户钱包信息 + PayWalletDO walletDO = payWalletService.getOrCreateWallet(WebFrameworkUtils.getLoginUserId(),getLoginUserType()); +// 扣减钱包余额 + payWalletService.reduceWalletBalance + (walletDO.getId(),notifyReqDTO.getId(),PAYMENT,paidMemberUserDO.getPrice()); + //获取支付时间 + LocalDateTime payTime = LocalDateTime.now(); + paidMemberUserDO.setPayTime(payTime); + //更新会员订单支付状态为已支付 + paidMemberUserDO.setPaid(true); + //获取试用类型的过期时间 + LocalDateTime cardExpirationTime = paidMemberUserService.getDeadLineDay(notifyReqDTO.getCardName()); + paidMemberUserDO.setCardExpirationTime(cardExpirationTime); + paidMemberUserDO.setPayChannel(notifyReqDTO.getPayChannel()); + if (notifyReqDTO.getPayChannel().equals("wallet")){ + paidMemberUserDO.setPayType("余额"); + } else if(notifyReqDTO.getPayChannel().startsWith("wx")){ + paidMemberUserDO.setPayType("微信"); + } else if (notifyReqDTO.getPayChannel().startsWith("alipay")) { + paidMemberUserDO.setPayType("支付宝"); + } else { + paidMemberUserDO.setPayType("模拟支付"); + } + //更新会员订单 + paidMemberUserService.update(paidMemberUserDO); + //设置个人信息的会员状态,0:未开通,1试用,2有效期,3永久 + if(notifyReqDTO.getCardName().equals("永久")){ + memberUserDO.setActivate(3); + }else { + memberUserDO.setActivate(2); + } + //更新用户会员状态 + memberUserService.updateUserDo(memberUserDO); + return success(true); + } } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/vo/AppPaidMemberCreateRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/vo/AppPaidMemberCreateRespVO.java index ca86552..da82ce6 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/vo/AppPaidMemberCreateRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/vo/AppPaidMemberCreateRespVO.java @@ -15,11 +15,11 @@ public class AppPaidMemberCreateRespVO { @Schema(description = "会员支付编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long id; -// @Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "o100") -// private Long payOrderId; + @Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "o100") + private Long payOrderId; - @Schema(description = "会员订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "m100") - private String orderNo; +// @Schema(description = "会员订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "m100") +// private String orderNo; @Schema(description = "到期时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-11-22 09:30:05") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/vo/AppPaidMemeberOrderReqDto.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/vo/AppPaidMemeberOrderReqDto.java index 29b3a38..98a6594 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/vo/AppPaidMemeberOrderReqDto.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/member/vo/AppPaidMemeberOrderReqDto.java @@ -22,6 +22,8 @@ public class AppPaidMemeberOrderReqDto { @Schema(description = "会员支付编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long id; + @Schema(description = "会员卡名称", example = "试用") + private String cardName; @Schema(description = "支付渠道", example = "公众号,mini-小程序,h5-网页支付,wechatIos-微信Ios,wechatAndroid-微信Android,alipay-支付包,alipayApp-支付宝App,give-平台赠送") private String payChannel; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/member/PayMemberOrderConvert.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/member/PayMemberOrderConvert.java index f5381d5..0ebf675 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/member/PayMemberOrderConvert.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/member/PayMemberOrderConvert.java @@ -13,5 +13,5 @@ public interface PayMemberOrderConvert { PayMemberOrderConvert INSTANCE = Mappers.getMapper(PayMemberOrderConvert.class); - AppPaidMemberCreateRespVO convert(Long id, String orderNo, LocalDateTime cardExpirationTime, Integer activate); + AppPaidMemberCreateRespVO convert(Long id, Long payOrderId, LocalDateTime cardExpirationTime, Integer activate); }