|
@@ -121,16 +121,28 @@ public class ActiveServiceImpl implements ActiveService {
|
|
|
active.setApplyUserName(userUtil.getUser().getUserName());
|
|
|
active.setBeginTime(req.getBeginTime());
|
|
|
active.setEndTime(req.getEndTime());
|
|
|
- // 6.03已废弃
|
|
|
-// active.setBrandCode(CollectionUtil.isNotEmpty(req.getBrandCodeList()) ? String.join(",", req.getBrandCodeList()) : null);
|
|
|
active.setUrlTab(req.getUrlTab());
|
|
|
active.setActiveUrl(req.getActiveUrl());
|
|
|
active.setUpdateBy(userId);
|
|
|
baseActiveMapper.updateById(active);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除活动
|
|
|
+ **/
|
|
|
+ @Override
|
|
|
+ public void deleteActive(DeleteActiveReq req) {
|
|
|
+ //1-查询活动
|
|
|
+ BaseActive active = baseActiveMapper.selectById(req.getId());
|
|
|
+ AssertUtil.isNull(active,"活动不存在");
|
|
|
+ if(ActiveAuditStatusEnum.REVIEW_PASS.is(active.getAuditStatus())){
|
|
|
+ throw new BusinessException("活动已审核通过,不可删除");
|
|
|
+ }
|
|
|
+
|
|
|
+ //2-删除活动
|
|
|
+ active.setIsDelete(1);
|
|
|
+ baseActiveMapper.updateById(active);
|
|
|
|
|
|
- // 6.03已废弃
|
|
|
-// //删除添加关联的码包,重新插入
|
|
|
-// updateActivePackageMappiing(req.getId(), req.getQrPackageIdAddList(), req.getQrPackageIdDeleteList());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -343,7 +355,7 @@ public class ActiveServiceImpl implements ActiveService {
|
|
|
BaseActive active = baseActiveMapper.selectById(req.getId());
|
|
|
AssertUtil.isNull(active, "活动不存在");
|
|
|
|
|
|
- if(ActiveAuditStatusEnum.WAIT_REVIEW.is(active.getAuditStatus())){
|
|
|
+ if(!ActiveAuditStatusEnum.WAIT_REVIEW.is(active.getAuditStatus())){
|
|
|
throw new BusinessException("该活动不能审核");
|
|
|
}
|
|
|
Long userId = userUtil.getUser().getId();
|
|
@@ -360,7 +372,7 @@ public class ActiveServiceImpl implements ActiveService {
|
|
|
public void refuseActive(RefuseActiveReq req) {
|
|
|
BaseActive active = baseActiveMapper.selectById(req.getId());
|
|
|
AssertUtil.isNull(active, "活动不存在");
|
|
|
- if(ActiveAuditStatusEnum.WAIT_REVIEW.is(active.getAuditStatus())){
|
|
|
+ if(!ActiveAuditStatusEnum.WAIT_REVIEW.is(active.getAuditStatus())){
|
|
|
throw new BusinessException("该活动不能审核");
|
|
|
}
|
|
|
Long userId = userUtil.getUser().getId();
|