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)); } }