店铺停业判断修改

This commit is contained in:
张松 2025-03-20 09:57:14 +08:00
parent 95175c98d5
commit b1e12922cb
1 changed files with 2 additions and 2 deletions

View File

@ -66,10 +66,10 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
if (shopInfo == null) {
throw new ApiNotPrintException("店铺不存在");
}
if ((DateUtil.date().toLocalDateTime().isAfter(shopInfo.getExpireTime())) || shopInfo.getStatus() != StatusEnum.ENABLED.value()) {
if ((DateUtil.date().toLocalDateTime().isAfter(shopInfo.getExpireTime()))) {
throw new ApiNotPrintException("店铺已过期,请联系商家");
}
if (StatusEnum.DISABLE.value() == shopInfo.getOnSale()) {
if (StatusEnum.DISABLE.value() == shopInfo.getOnSale() || shopInfo.getStatus() != StatusEnum.ENABLED.value()) {
throw new ApiNotPrintException("店铺已停业,请联系商家");
}