@PreAuthorize("hasPermission('tienchin:activity:remove')")
@Log(title = "活动管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{activityIds}")
AjaxResult remove(@PathVariable Object[] activityIds) {
return toAjax(iActivityService.deleteActivityByIds(activityIds));
}
/**
* 删除活动
*
* @param activityIds 活动Ids
* @return int 删除结果
* @author BNTang
* @since 2023/09/22 01:37:35
*/
int deleteActivityByIds(Object[] activityIds);
@Override
public int deleteActivityByIds(Object[] activityIds) {
UpdateWrapper<Activity> uw = new UpdateWrapper<>();
uw.lambda()
.set(Activity::getDelFlag, "2")
.in(Activity::getActivityId, activityIds);
return update(uw) ? 1 : 0;
}