whycxzp
2025-05-09 862c0bb948a9fb8282bfacacb0cda165b28a29af
src/main/java/com/whyc/controller/MailUserController.java
@@ -1,13 +1,14 @@
package com.whyc.controller;
import com.whyc.dto.Response;
import com.whyc.pojo.MailUser;
import com.whyc.service.MailUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RequestMapping("mailUser")
@RestController
@@ -19,7 +20,19 @@
    @GetMapping
    @ApiOperation("查询所有用户")
    public Response getAll(){
        return service.getAll();
    public Response getAll(@RequestParam int type){
        return service.getAll(type);
    }
    @PostMapping("add")
    @ApiOperation("添加用户列表")
    public Response add(@RequestBody List<MailUser> mailUserList){
        return service.add(mailUserList);
    }
    @PostMapping("delete")
    @ApiOperation("删除用户列表")
    public Response delete(@RequestBody List<Integer> ids){
        return service.delete(ids);
    }
}