bug
This commit is contained in:
@@ -257,6 +257,7 @@ public class BuyOrderController {
|
||||
return R.error(500, "信息中不能含有“+”、“&”符号!");
|
||||
}
|
||||
}
|
||||
buyOrder.setOrderStatus("0");
|
||||
buyOrderService.save(buyOrder);
|
||||
|
||||
//解决购物车相关问题
|
||||
@@ -904,9 +905,9 @@ public class BuyOrderController {
|
||||
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){
|
||||
if(userCourseBuyEntities.size()>0){//延长有效期
|
||||
UserCourseBuyEntity userCourseBuyEntity = userCourseBuyEntities.get(0);
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(userCourseBuyEntity.getEndTime());
|
||||
@@ -917,6 +918,7 @@ public class BuyOrderController {
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user