|
@@ -116,15 +116,10 @@ public class ActiveServiceImpl implements ActiveService {
|
|
|
QueryWrapper<BaseActive> qw = new QueryWrapper<>();
|
|
|
qw.eq("active_name", req.getActiveName());
|
|
|
qw.eq("is_delete", 0);
|
|
|
- List<BaseActive> activeList = baseActiveMapper.selectList(qw);
|
|
|
- if(!CollectionUtils.isEmpty(activeList) && activeList.size()>=2){
|
|
|
+ BaseActive activeOne = baseActiveMapper.selectOne(qw);
|
|
|
+ if(null != activeOne && !activeOne.getId().equals(active.getId())){
|
|
|
throw new BusinessException("活动名称已存在。");
|
|
|
}
|
|
|
- if(!CollectionUtils.isEmpty(activeList) && activeList.size()==1){
|
|
|
- if(!activeList.get(0).getId().equals(active.getId())){
|
|
|
- throw new BusinessException("活动名称已存在。");
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
if (ActiveAuditStatusEnum.REVIEW_PASS.is(active.getAuditStatus())) {
|
|
|
throw new BusinessException("该数据已审核通过,请调用码活动申请单的接口。");
|