This commit is contained in:
wangjinlei
2024-04-28 10:25:31 +08:00
parent 3980da2fb1
commit dbe836f884
4 changed files with 46 additions and 4 deletions

View File

@@ -226,7 +226,7 @@ public class AliPayServiceImpl implements AliPayService {
LambdaQueryWrapper<UserCourseBuyEntity> wrapper2 = new LambdaQueryWrapper<>();
wrapper2.eq(UserCourseBuyEntity::getUserId,orderEntity.getUserId());
wrapper2.eq(UserCourseBuyEntity::getCatalogueId,s.getCatalogueId());
wrapper2.lt(UserCourseBuyEntity::getEndTime,new Date());
wrapper2.gt(UserCourseBuyEntity::getEndTime,new Date());
List<UserCourseBuyEntity> userCourseBuyEntities = userCourseBuyDao.selectList(wrapper2);
if(userCourseBuyEntities.size()>0){
UserCourseBuyEntity userCourseBuyEntity = userCourseBuyEntities.get(0);
@@ -239,6 +239,7 @@ public class AliPayServiceImpl implements AliPayService {
UserCourseBuyEntity userCourseBuyEntity = new UserCourseBuyEntity();
userCourseBuyEntity.setUserId(orderEntity.getUserId());
userCourseBuyEntity.setCourseId(s.getCourseId());
userCourseBuyEntity.setCatalogueId(s.getCatalogueId());
userCourseBuyEntity.setDays(s.getDays());
userCourseBuyEntity.setCreateTime(new Date());
userCourseBuyEntity.setStartTime(new Date());

View File

@@ -168,6 +168,7 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
UserCourseBuyEntity userCourseBuyEntity = new UserCourseBuyEntity();
userCourseBuyEntity.setUserId(order.getUserId());
userCourseBuyEntity.setCourseId(s.getCourseId());
userCourseBuyEntity.setCatalogueId(s.getCatalogueId());
userCourseBuyEntity.setDays(s.getDays());
userCourseBuyEntity.setCreateTime(new Date());
userCourseBuyEntity.setStartTime(new Date());