店铺停业判断修改
This commit is contained in:
@@ -66,10 +66,10 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
if (shopInfo == null) {
|
if (shopInfo == null) {
|
||||||
throw new ApiNotPrintException("店铺不存在");
|
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("店铺已过期,请联系商家");
|
throw new ApiNotPrintException("店铺已过期,请联系商家");
|
||||||
}
|
}
|
||||||
if (StatusEnum.DISABLE.value() == shopInfo.getOnSale()) {
|
if (StatusEnum.DISABLE.value() == shopInfo.getOnSale() || shopInfo.getStatus() != StatusEnum.ENABLED.value()) {
|
||||||
throw new ApiNotPrintException("店铺已停业,请联系商家");
|
throw new ApiNotPrintException("店铺已停业,请联系商家");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user