From 36b1aca3edb042c45e2288960a317c925dcaf1ef Mon Sep 17 00:00:00 2001 From: jlyanss Date: Fri, 14 Apr 2023 02:28:55 +0000 Subject: [PATCH 1/2] =?UTF-8?q?Update=20deployment-uat.yaml=20=E5=8E=BB?= =?UTF-8?q?=E6=8E=89cfs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment-uat.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/deployment-uat.yaml b/deployment-uat.yaml index c75f587..a3ce480 100644 --- a/deployment-uat.yaml +++ b/deployment-uat.yaml @@ -40,10 +40,6 @@ spec: - name: log hostPath: path: /var/lib/docker/log/349553515466-uat/default-group/all #开发环境 - - name: storage - persistentVolumeClaim: - claimName: file-pvc - readOnly: false # 必选,Pod中容器列表 containers: - name: biz-service-ebtp-extend @@ -52,8 +48,6 @@ spec: volumeMounts: - name: log mountPath: /log - - name: storage - mountPath: /storage # 需要暴露的端口库号列表 ports: - containerPort: 18018 @@ -111,4 +105,4 @@ spec: status: loadBalancer: {} ---- \ No newline at end of file +--- From b28d4651ee470cbebc3a750e4f5956812bbb94fa Mon Sep 17 00:00:00 2001 From: yss <17921@qq.com> Date: Sun, 23 Apr 2023 14:21:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=9B=91=E7=9D=A3=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/BizFuncSwitchConfigMapper.java | 8 +++++ .../dao/mapper/BizFuncSwitchConfigMapper.xml | 4 +++ .../userswitch/UserSwitchController.java | 28 +++++++++++++++++ .../userswitch/service/UserSwitchService.java | 17 ++++++++++ .../service/impl/UserSwitchServiceImpl.java | 31 +++++++++++++++++++ 5 files changed, 88 insertions(+) create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/UserSwitchController.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/service/UserSwitchService.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/service/impl/UserSwitchServiceImpl.java diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/dao/BizFuncSwitchConfigMapper.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/dao/BizFuncSwitchConfigMapper.java index be26038..0d37a7c 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/dao/BizFuncSwitchConfigMapper.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/dao/BizFuncSwitchConfigMapper.java @@ -9,4 +9,12 @@ import org.springframework.stereotype.Repository; public interface BizFuncSwitchConfigMapper extends BaseMapper { Integer selectByType(String type); + + /** + * 监督角色功能根据是否有次账号控制 + * @param role + * @param account + * @return + */ + String selectByUser(String role,String account); } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/dao/mapper/BizFuncSwitchConfigMapper.xml b/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/dao/mapper/BizFuncSwitchConfigMapper.xml index 6d745e8..2fc0d32 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/dao/mapper/BizFuncSwitchConfigMapper.xml +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/funcswitch/dao/mapper/BizFuncSwitchConfigMapper.xml @@ -13,4 +13,8 @@ resultType="java.lang.Integer"> SELECT active FROM biz_func_switch_config WHERE `type` = #{type} + \ No newline at end of file diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/UserSwitchController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/UserSwitchController.java new file mode 100644 index 0000000..f1ec2c1 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/UserSwitchController.java @@ -0,0 +1,28 @@ +package com.chinaunicom.mall.ebtp.extend.userswitch; + +import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; +import com.chinaunicom.mall.ebtp.extend.userswitch.service.UserSwitchService; +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +@RestController +@Api(tags = "用户控制") +@RequestMapping("/v1/userswitch") +public class UserSwitchController { + + @Resource + private UserSwitchService userSwitchService; + + /** + * 监督角色功能控制 + * @param key + * @param role + * @return + */ + @PostMapping({"/findUser/{key}/{role}"}) + public BaseResponse findUser(@PathVariable String key,@PathVariable String role){ + return BaseResponse.success(userSwitchService.findUser(key,role)); + } +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/service/UserSwitchService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/service/UserSwitchService.java new file mode 100644 index 0000000..2256248 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/service/UserSwitchService.java @@ -0,0 +1,17 @@ +package com.chinaunicom.mall.ebtp.extend.userswitch.service; + +/** + * 监督角色控制 + * @author yanss + * @date 2023/04/23 + */ +public interface UserSwitchService { + + /** + * + * @param key + * @param role + * @return + */ + Boolean findUser(String key, String role); +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/service/impl/UserSwitchServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/service/impl/UserSwitchServiceImpl.java new file mode 100644 index 0000000..d70fe91 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userswitch/service/impl/UserSwitchServiceImpl.java @@ -0,0 +1,31 @@ +package com.chinaunicom.mall.ebtp.extend.userswitch.service.impl; + +import com.chinaunicom.mall.ebtp.extend.funcswitch.dao.BizFuncSwitchConfigMapper; +import com.chinaunicom.mall.ebtp.extend.userswitch.service.UserSwitchService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +/** + * 风险管控接口实现 + * @author daixc + * @date 2021/08/19 + */ +@Slf4j +@Service +public class UserSwitchServiceImpl implements UserSwitchService { + + @Resource + private BizFuncSwitchConfigMapper funcSwitchConfigMapper; + + @Override + public Boolean findUser(String key, String role) { + String accout=funcSwitchConfigMapper.selectByUser(role,key); + if(accout!=null && StringUtils.isNotBlank(accout)){ + return Boolean.TRUE; + } + return Boolean.FALSE; + } +}