You've already forked FrameTour-BE
- 将人脸识别相关接口从PC端控制器迁移至移动端控制器 - 更新人脸识别详情和样本VO类的包路径至mobile.face - 修改人脸识别更新请求参数默认值 - 删除PC端冗余的人脸识别接口实现 - 调整服务层依赖引用至新的mobile.face包路径 - 移除过时的FaceSampleRespVO引用依赖
57 lines
1.8 KiB
Java
57 lines
1.8 KiB
Java
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 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")
|
|
// 用户人脸管理
|
|
public class FaceController {
|
|
@Autowired
|
|
private FaceService faceService;
|
|
|
|
// 分页查询用户人脸
|
|
@PostMapping("/page")
|
|
public ApiResponse<PageInfo<FaceRespVO>> pageQuery(@RequestBody FaceReqQuery faceReqQuery) {
|
|
return faceService.pageQuery(faceReqQuery);
|
|
}
|
|
// 用户人脸列表查询
|
|
@PostMapping("/list")
|
|
public ApiResponse<List<FaceRespVO>> list(@RequestBody FaceReqQuery faceReqQuery) {
|
|
return faceService.list(faceReqQuery);
|
|
}
|
|
// 用户人脸详情查询
|
|
@GetMapping("/getDetail/{id}")
|
|
public ApiResponse<FaceRespVO> getDetail(@PathVariable("id") Long id) {
|
|
return faceService.getById(id);
|
|
}
|
|
// 添加用户人脸信息
|
|
@PostMapping("/add")
|
|
public ApiResponse<Integer> add(@RequestBody FaceEntity face) {
|
|
return faceService.add(face);
|
|
}
|
|
// 删除用户人脸信息
|
|
@PostMapping("/deleteById/{id}")
|
|
public ApiResponse<Integer> deleteById(@PathVariable Long id) {
|
|
return faceService.deleteById(id);
|
|
}
|
|
// 批量删除用户人脸
|
|
@PostMapping("/deleteByIds")
|
|
public ApiResponse<Integer> deleteByIds(@RequestBody List<Long> ids) {
|
|
return faceService.deleteByIds(ids);
|
|
}
|
|
|
|
}
|