From 891f27732cb43528e36f4c795054b2922bcece5f Mon Sep 17 00:00:00 2001 From: yss <17921@qq.com> Date: Thu, 13 Jul 2023 11:05:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=BA=E6=9D=A5=E8=83=BD?= =?UTF-8?q?=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BizFuncSwitchConfigController.java | 58 +++++++++++++++++++ .../service/IBizFuncSwitchConfigService.java | 16 +++++ .../impl/BizFuncSwitchConfigServiceImpl.java | 24 ++++++++ 3 files changed, 98 insertions(+) create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/controller/BizFuncSwitchConfigController.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/service/IBizFuncSwitchConfigService.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/service/impl/BizFuncSwitchConfigServiceImpl.java diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/controller/BizFuncSwitchConfigController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/controller/BizFuncSwitchConfigController.java new file mode 100644 index 0000000..4a78c7a --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/controller/BizFuncSwitchConfigController.java @@ -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 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 getFaceRecognitionFlag(){ + + Integer bizFuncSwitchConfig = ibizFuncSwitchConfigService.selectByType("face-recognition"); + + return BaseResponse.success(bizFuncSwitchConfig); + } + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/service/IBizFuncSwitchConfigService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/service/IBizFuncSwitchConfigService.java new file mode 100644 index 0000000..c8e579f --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/service/IBizFuncSwitchConfigService.java @@ -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{ + + + Integer selectByType(String type); +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/service/impl/BizFuncSwitchConfigServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/service/impl/BizFuncSwitchConfigServiceImpl.java new file mode 100644 index 0000000..d82bb46 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/service/impl/BizFuncSwitchConfigServiceImpl.java @@ -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 implements IBizFuncSwitchConfigService { + + @Autowired + private BizFuncSwitchConfigMapper funcSwitchConfigMapper; + + @Override + public Integer selectByType(String type){ + return funcSwitchConfigMapper.selectByType(type); + } +}