Merge branch 'master-增加人脸识别控制' into uat_code
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user