jinpengyong
2020-07-01 6f70d5babbb4291f2f7b3059144368eb407fe7ed
src/main/java/com/moral/controller/AccountController.java
@@ -9,6 +9,7 @@
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -39,15 +40,16 @@
       return new ResultBean<Integer>(result);
    }
    
    @PostMapping("account/id")
    public ResultBean<Integer> deleteAccountByLogic(@RequestBody Account account) {
       Integer result = accountService.deleteAccountByLogic(account);
       return new ResultBean<Integer>(result);
    }
    @PostMapping("accounts/ids")
    @PostMapping("ids")
    public ResultBean<Integer> deleteAccountsByLogic(@RequestBody List<Integer> ids) {
       Integer result = accountService.deleteAccountsByLogic(ids);
       return new ResultBean<Integer>(result);
    }
    @GetMapping("{accountName}")
    public ResultBean<Integer> getAccountCountByAccountName(@PathVariable("accountName") String accountName) {
       Integer result = accountService.getAccountCountByAccountName(accountName);
        return new ResultBean<Integer>(result);
    }
}