|
@@ -126,12 +126,12 @@ public class CmsVipOrderServiceImpl implements CmsVipOrderService {
|
|
|
Integer extendsDays = orderDon.getExtendsDays();
|
|
Integer extendsDays = orderDon.getExtendsDays();
|
|
|
DateTime now = DateTime.now();
|
|
DateTime now = DateTime.now();
|
|
|
if (remainExpiryTime.compareTo(now) > 0 && extendsDays > 0) {
|
|
if (remainExpiryTime.compareTo(now) > 0 && extendsDays > 0) {
|
|
|
- subExpiryTime = now;
|
|
|
|
|
|
|
+ subExpiryTime = DateUtil.offsetDay(subExpiryTime, -extendsDays);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//若会员过期清除镜像user
|
|
//若会员过期清除镜像user
|
|
|
vipUser.setExpiryTime(subExpiryTime);
|
|
vipUser.setExpiryTime(subExpiryTime);
|
|
|
- clearVipMirrorUser(vipUser.getUserId(), subExpiryTime);
|
|
|
|
|
|
|
+ clearVipMirrorUser(userIdList, subExpiryTime);
|
|
|
vipUserMapper.updateById(vipUser);
|
|
vipUserMapper.updateById(vipUser);
|
|
|
}
|
|
}
|
|
|
if (StrUtil.isNotBlank(refundType) && !refundType.equals(VipOrderDon.Type.BALANCE.getType())) {
|
|
if (StrUtil.isNotBlank(refundType) && !refundType.equals(VipOrderDon.Type.BALANCE.getType())) {
|
|
@@ -288,10 +288,10 @@ public class CmsVipOrderServiceImpl implements CmsVipOrderService {
|
|
|
* 整理会员车票时长
|
|
* 整理会员车票时长
|
|
|
* 过期清除镜像user
|
|
* 过期清除镜像user
|
|
|
*/
|
|
*/
|
|
|
- private void clearVipMirrorUser(Long userId, Date expiryTimeAfterSub) {
|
|
|
|
|
|
|
+ private void clearVipMirrorUser(List<Long> userIds, Date expiryTimeAfterSub) {
|
|
|
Boolean overdue = expiryTimeAfterSub.before(DateTime.now());
|
|
Boolean overdue = expiryTimeAfterSub.before(DateTime.now());
|
|
|
List<GroupsRelation> groupsRelations = relationMapper.selectList(Wrappers.lambdaQuery(GroupsRelation.class)
|
|
List<GroupsRelation> groupsRelations = relationMapper.selectList(Wrappers.lambdaQuery(GroupsRelation.class)
|
|
|
- .eq(GroupsRelation::getUserId, userId)
|
|
|
|
|
|
|
+ .in(GroupsRelation::getUserId, userIds)
|
|
|
.eq(GroupsRelation::getIsVip, Boolean.TRUE));
|
|
.eq(GroupsRelation::getIsVip, Boolean.TRUE));
|
|
|
groupsRelations.forEach(ticket -> {
|
|
groupsRelations.forEach(ticket -> {
|
|
|
if (overdue) {
|
|
if (overdue) {
|