协议新增分类

This commit is contained in:
SjS 2025-04-26 18:55:47 +08:00
parent a7f7aaefc7
commit 92468c86e1

View File

@ -86,7 +86,8 @@ public class AdServiceImpl implements AdService {
AdQuery query = new AdQuery();
query.setAreaId(ad.getAreaId());
query.setDeleted(false);
ServiceUtil.assertion(adMapper.selectOne(query) != null, "当前运营区存在广告已达上限");
List<AdVO> adVOList = adMapper.selectAdList(query);
ServiceUtil.assertion(adVOList.size() > 1, "当前运营区存在广告已达上限");
}
ad.setCreateTime(DateUtils.getNowDate());
return adMapper.insertAd(ad);