kongzy
2024-01-29 983bdb5b89932b38d08a11ad1eed6ea89d1597e1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.gkhy.assess.admin.controller.app;
 
import com.gkhy.assess.common.annotation.RepeatSubmit;
import com.gkhy.assess.common.api.CommonResult;
import com.gkhy.assess.system.domain.SysUserFace;
import com.gkhy.assess.system.service.SysUserFaceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@Api(tags = "APP人脸数据控制器")
@RestController
@RequestMapping("/app/system/user-face")
public class AppUserFaceController {
    @Autowired
    private SysUserFaceService userFaceService;
 
 
    @RepeatSubmit
    @ApiOperation(value = "新增人脸数据")
    @PostMapping("/add")
    public CommonResult addUserFace(@Validated @ModelAttribute SysUserFace userFace){
        return CommonResult.success(userFaceService.addUserFace(userFace));
    }
 
 
    @RepeatSubmit
    @ApiOperation(value = "根据用户id获取人脸数据")
    @PostMapping("/getFaceByUserId")
    public CommonResult getUserFace(Long userId){
        return CommonResult.success(userFaceService.getFaceByUserId(userId));
    }
 
}