Compare commits

..

No commits in common. "0eabf4fc3c53b2ecc3be8c46a0558fc3278829a2" and "12dd84bb4c417042eef625ff513d8bebc394df21" have entirely different histories.

7 changed files with 12 additions and 9 deletions

View File

@ -21,6 +21,6 @@ public interface TradeMemberUserService {
void updateUserDo(TradeMemberUserDO user); void updateUserDo(TradeMemberUserDO user);
void updateActivate(String cardName,Long userId); void updateActivate(String cardName);
} }

View File

@ -93,8 +93,8 @@ public class TradeMemberUserServiceImpl implements TradeMemberUserService {
} }
@Override @Override
public void updateActivate(String cardName,Long userId) { public void updateActivate(String cardName) {
TradeMemberUserDO tradeMemberUserDO = getUser(userId); TradeMemberUserDO tradeMemberUserDO = getUser(getLoginUserId());
//设置个人信息的会员状态0未开通1试用2有效期3永久 //设置个人信息的会员状态0未开通1试用2有效期3永久
if(cardName.equals("永久")){ if(cardName.equals("永久")){
tradeMemberUserDO.setActivate(3); tradeMemberUserDO.setActivate(3);

View File

@ -78,6 +78,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*;
import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.minusTime; import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.minusTime;
import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getTerminal; import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getTerminal;
import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.*;
import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.ORDER_NOT_FOUND; import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.ORDER_NOT_FOUND;
@ -337,7 +338,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
PayOrderRespDTO payOrder = orderResult.getValue(); PayOrderRespDTO payOrder = orderResult.getValue();
System.out.println("交易订单成功id"+id+"和payOrderId"+payOrderId); System.out.println("交易订单成功id"+id+"和payOrderId"+payOrderId);
//会员用户信息支付状态修改 //会员用户信息支付状态修改
TradeMemberUserDO tradeMemberUserDO = tradeMemberUserService.getUser(order.getUserId()); TradeMemberUserDO tradeMemberUserDO = tradeMemberUserService.getUser(getLoginUserId());
TradePaidMemberUserDO tradePaidMemberUserDO = tradePaidMemberUserService.getByPayOrderId(payOrderId); TradePaidMemberUserDO tradePaidMemberUserDO = tradePaidMemberUserService.getByPayOrderId(payOrderId);
if(tradePaidMemberUserDO != null ){ if(tradePaidMemberUserDO != null ){
System.out.println("进入会员支付修改操作paid"+tradePaidMemberUserDO+"和member"+tradeMemberUserDO); System.out.println("进入会员支付修改操作paid"+tradePaidMemberUserDO+"和member"+tradeMemberUserDO);
@ -354,7 +355,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
tradePaidMemberUserService.update(tradePaidMemberUserDO); tradePaidMemberUserService.update(tradePaidMemberUserDO);
System.out.println("成功更新会员订单paid"+tradePaidMemberUserDO); System.out.println("成功更新会员订单paid"+tradePaidMemberUserDO);
//更新用户会员状态 //更新用户会员状态
tradeMemberUserService.updateActivate(tradePaidMemberUserDO.getPayMemberType(),order.getUserId()); tradeMemberUserService.updateActivate(tradePaidMemberUserDO.getPayMemberType());
System.out.println("成功更新用户的会员状态member"+tradeMemberUserDO); System.out.println("成功更新用户的会员状态member"+tradeMemberUserDO);
} }
System.out.println("会员修改操作结束!!!"); System.out.println("会员修改操作结束!!!");

View File

@ -189,6 +189,6 @@ public interface MemberUserService {
void updateUserDo(MemberUserDO user); void updateUserDo(MemberUserDO user);
void updateActivate(String cardName,Long userId); void updateActivate(String cardName);
} }

View File

@ -38,6 +38,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*;
/** /**
@ -329,8 +330,8 @@ public class MemberUserServiceImpl implements MemberUserService {
} }
@Override @Override
public void updateActivate(String cardName,Long userId) { public void updateActivate(String cardName) {
MemberUserDO memberUserDO = getUser(userId); MemberUserDO memberUserDO = getUser(getLoginUserId());
//设置个人信息的会员状态0未开通1试用2有效期3永久 //设置个人信息的会员状态0未开通1试用2有效期3永久
if(cardName.equals("永久")){ if(cardName.equals("永久")){
memberUserDO.setActivate(3); memberUserDO.setActivate(3);

View File

@ -36,6 +36,7 @@ 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.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getTerminal; import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getTerminal;
import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*;

View File

@ -186,7 +186,7 @@ public class AppPaidMembeController {
//更新会员订单 //更新会员订单
paidMemberUserService.update(paidMemberUserDO); paidMemberUserService.update(paidMemberUserDO);
//更新用户会员状态 //更新用户会员状态
memberUserService.updateActivate(paidMemberUserDO.getPayMemberType(),getLoginUserId()); memberUserService.updateActivate(paidMemberUserDO.getPayMemberType());
// return success(PayMemberOrderConvert.INSTANCE.convert(paidMemberUserDO.getId(),payOrderId // return success(PayMemberOrderConvert.INSTANCE.convert(paidMemberUserDO.getId(),payOrderId
// ,paidMemberUserDO.getCardExpirationTime(),memberUserDO.getActivate())); // ,paidMemberUserDO.getCardExpirationTime(),memberUserDO.getActivate()));
return success(true); return success(true);