后端
ActivityController.java
代码语言:javascript
复制@PreAuthorize("hasPermission('tienchin:activity:remove')")
@Log(title = "活动管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{activityIds}")
AjaxResult remove(@PathVariable Object[] activityIds) {
return toAjax(iActivityService.deleteActivityByIds(activityIds));
}
IActivityService.java
代码语言:javascript
复制/**
* 删除活动
*
* @param activityIds 活动Ids
* @return int 删除结果
* @author BNTang
* @since 2023/09/22 01:37:35
*/
int deleteActivityByIds(Object[] activityIds);
ActivityServiceImpl.java
代码语言:javascript
复制@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;
}