master:购买档口正式会员完善;

pull/1121/head
liujiang 2025-11-06 19:01:16 +08:00
parent 75f8c3165d
commit aa17f4e29b
1 changed files with 4 additions and 2 deletions

View File

@ -485,7 +485,8 @@ public class StoreServiceImpl implements IStoreService {
store.setStoreStatus(StoreStatus.FORMAL_USE.getValue());
}
// 更新服务到期时间 在原服务时间基础上 往后推 1年
store.setServiceEndTime(Date.from(store.getServiceEndTime().toInstant().plus(1, ChronoUnit.YEARS)));
Date serviceEndTime = ObjectUtils.isNotEmpty(store.getServiceEndTime()) ? store.getServiceEndTime() : new Date();
store.setServiceEndTime(Date.from(serviceEndTime.toInstant().plus(12, ChronoUnit.MONTHS)));
int count = this.storeMapper.updateById(store);
// 更新redis 中的 store信息
this.redisCache.setCacheObject(CacheConstants.STORE_KEY + store.getId(), store);
@ -518,7 +519,8 @@ public class StoreServiceImpl implements IStoreService {
store.setStoreStatus(StoreStatus.FORMAL_USE.getValue());
}
// 更新服务到期时间 在原服务时间基础上 往后推 1年
store.setServiceEndTime(Date.from(store.getServiceEndTime().toInstant().plus(1, ChronoUnit.YEARS)));
Date serviceEndTime = ObjectUtils.isNotEmpty(store.getServiceEndTime()) ? store.getServiceEndTime() : new Date();
store.setServiceEndTime(Date.from(serviceEndTime.toInstant().plus(12, ChronoUnit.MONTHS)));
// 更新redis 中的 store信息
this.redisCache.setCacheObject(CacheConstants.STORE_KEY + store.getId(), store);
return this.storeMapper.updateById(store);