增加人来能识别

This commit is contained in:
yss
2023-07-13 11:05:00 +08:00
parent aeeedbc0ed
commit 891f27732c
3 changed files with 98 additions and 0 deletions

View File

@ -0,0 +1,58 @@
package com.chinaunicom.mall.ebtp.extend.funcswitch.controller;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.chinaunicom.mall.ebtp.extend.funcswitch.entity.BizFuncSwitchConfig;
import com.chinaunicom.mall.ebtp.extend.funcswitch.service.IBizFuncSwitchConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import javax.annotation.Resource;
import javax.validation.Valid;
@RestController
@Api(tags = "")
@RequestMapping("/v1/BizFuncSwitchConfig/bizfuncswitchconfig")
public class BizFuncSwitchConfigController{
@Resource
private IBizFuncSwitchConfigService ibizFuncSwitchConfigService;
/**
* 查询数据
*
* @param type
*
* @return
*/
@ApiOperation("查询标识")
@GetMapping("/{type}")
public BaseResponse<Integer> selectByType(@ApiParam(value = "主键id", required = true) @PathVariable String type){
Integer bizFuncSwitchConfig = ibizFuncSwitchConfigService.selectByType(type);
return BaseResponse.success(bizFuncSwitchConfig);
}
/**
* 查询数据
*
* @param
*
* @return
*/
@ApiOperation("查询人脸识别标识")
@GetMapping("/getFaceRecognitionFlag")
public BaseResponse<Integer> getFaceRecognitionFlag(){
Integer bizFuncSwitchConfig = ibizFuncSwitchConfigService.selectByType("face-recognition");
return BaseResponse.success(bizFuncSwitchConfig);
}
}

View File

@ -0,0 +1,16 @@
package com.chinaunicom.mall.ebtp.extend.funcswitch.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chinaunicom.mall.ebtp.extend.funcswitch.entity.BizFuncSwitchConfig;
/**
* 对数据表 biz_func_switch_config 操作的 service
* @author Auto create
*
*/
public interface IBizFuncSwitchConfigService extends IService<BizFuncSwitchConfig>{
Integer selectByType(String type);
}

View File

@ -0,0 +1,24 @@
package com.chinaunicom.mall.ebtp.extend.funcswitch.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chinaunicom.mall.ebtp.extend.funcswitch.dao.BizFuncSwitchConfigMapper;
import com.chinaunicom.mall.ebtp.extend.funcswitch.entity.BizFuncSwitchConfig;
import com.chinaunicom.mall.ebtp.extend.funcswitch.service.IBizFuncSwitchConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 对数据表 biz_func_switch_config 操作的 serviceImpl
* @auto.generated
*
*/
@Service
public class BizFuncSwitchConfigServiceImpl extends ServiceImpl<BizFuncSwitchConfigMapper,BizFuncSwitchConfig> implements IBizFuncSwitchConfigService {
@Autowired
private BizFuncSwitchConfigMapper funcSwitchConfigMapper;
@Override
public Integer selectByType(String type){
return funcSwitchConfigMapper.selectByType(type);
}
}