You've already forked FrameTour-BE
添加用户人脸相关的基础业务接口和实现
This commit is contained in:
@ -0,0 +1,64 @@
|
||||
package com.ycwl.basic.controller.pc;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ycwl.basic.model.pc.face.entity.FaceEntity;
|
||||
import com.ycwl.basic.model.pc.face.req.FaceReqQuery;
|
||||
import com.ycwl.basic.model.pc.face.resp.FaceRespVO;
|
||||
import com.ycwl.basic.service.pc.FaceService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/12/2 16:33
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/face/v1")
|
||||
@Api(tags = "用户上传人脸管理")
|
||||
public class FaceController {
|
||||
@Autowired
|
||||
private FaceService faceService;
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<FaceRespVO>> pageQuery(@RequestBody FaceReqQuery faceReqQuery) {
|
||||
return faceService.pageQuery(faceReqQuery);
|
||||
}
|
||||
@ApiOperation("列表查询")
|
||||
@PostMapping("/list")
|
||||
public ApiResponse<List<FaceRespVO>> list(@RequestBody FaceReqQuery faceReqQuery) {
|
||||
return faceService.list(faceReqQuery);
|
||||
}
|
||||
@ApiOperation("详情查询")
|
||||
@GetMapping("/getDetail/{id}")
|
||||
public ApiResponse<FaceRespVO> getDetail(@PathVariable("id") Long id) {
|
||||
return faceService.getById(id);
|
||||
}
|
||||
@ApiOperation("添加")
|
||||
@PostMapping("/add")
|
||||
public ApiResponse<Integer> add(@RequestBody FaceEntity face) {
|
||||
return faceService.add(face);
|
||||
}
|
||||
@ApiOperation("删除")
|
||||
@PostMapping("/deleteById/{id}")
|
||||
public ApiResponse<Integer> deleteById(@PathVariable Long id) {
|
||||
return faceService.deleteById(id);
|
||||
}
|
||||
@ApiOperation("批量删除")
|
||||
@PostMapping("/deleteByIds")
|
||||
public ApiResponse<Integer> deleteByIds(@RequestBody List<Long> ids) {
|
||||
return faceService.deleteByIds(ids);
|
||||
}
|
||||
@ApiOperation("修改")
|
||||
@PostMapping("/update")
|
||||
public ApiResponse<Integer> update(@RequestBody FaceEntity face) {
|
||||
return faceService.update(face);
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user