|
|
@@ -1,13 +1,17 @@
|
|
|
package com.goafanti.admin.controller;
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
+
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import com.goafanti.activityUser.service.ActivityUserService;
|
|
|
import com.goafanti.common.bo.Result;
|
|
|
+import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.BaseApiController;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
|
|
|
|
@@ -38,6 +42,20 @@ public class AdminActivityUserApiController extends BaseApiController {
|
|
|
res.setData(activityUserService.listActivityOrg(activityName, mobile, unitName, number, getPSize(pageSize), getPNo(pageNo)));
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量删除活动报名记录
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
|
+ public Result delete(@RequestParam(name = "ids[]", required = false) String[] ids) {
|
|
|
+ Result res = new Result();
|
|
|
+ if (ids == null || ids.length < 1) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
|
|
|
+ } else {
|
|
|
+ res.setData(activityUserService.batchDeleteByPrimaryKey(Arrays.asList(ids)));
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
private Integer getPNo(String pageNo) {
|
|
|
Integer pNo = 1;
|