package com.mindskip.xzs.controller.student;
|
|
import com.mindskip.xzs.base.RestResponse;
|
import com.mindskip.xzs.domain.vo.SelfPracticeVO;
|
import com.mindskip.xzs.service.SelfPracticeService;
|
import lombok.RequiredArgsConstructor;
|
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.validation.constraints.NotEmpty;
|
import java.util.List;
|
|
/**
|
* @author:xp
|
* @date:2024/5/9 16:17
|
*/
|
@RestController
|
@RequiredArgsConstructor
|
@RequestMapping(value = "/api/student/self/practice")
|
public class SelfPracticeController {
|
|
private final SelfPracticeService selfPracticeService;
|
|
@PostMapping
|
public RestResponse add(@RequestBody @Validated SelfPracticeVO vo) {
|
return selfPracticeService.add(vo);
|
}
|
|
@GetMapping("/page")
|
public RestResponse page(SelfPracticeVO vo) {
|
return selfPracticeService.page(vo);
|
}
|
|
@PostMapping("/remove")
|
public RestResponse remove(@RequestBody @NotEmpty(message = "请选择要删除的数据") List<Integer> ids) {
|
return selfPracticeService.remove(ids);
|
}
|
|
}
|