Forráskód Böngészése

feature(数据授权开发): 数据授权开发

数据授权开发
mazq 4 éve
szülő
commit
28a984c0d7

+ 73 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/DataAuthController.java

@@ -0,0 +1,73 @@
+package com.dragoninfo.dcuc.authweb.restcontroller.auth;
+
+import com.dragoninfo.dcuc.auth.auth.facade.IDataAuthFacade;
+import com.dragoninfo.dcuc.authweb.restcontroller.auth.vo.LabelDataAuthAcceptVo;
+import com.dragoninfo.dcuc.authweb.restcontroller.auth.vo.OrgDataAuthAcceptVo;
+import com.dragoninfo.dcuc.authweb.restcontroller.auth.vo.UserDataAuthAcceptVo;
+import com.dragoninfo.duceap.core.response.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author mazq
+ * @date 2021/4/6
+ */
+@Api("数据授权相关接口")
+@RestController
+@RequestMapping("authsvr/v2/dataauth")
+public class DataAuthController {
+
+    @Autowired
+    IDataAuthFacade dataAuthFacade;
+
+
+    @ApiOperation(value = "获取属性列表,树形结构:警种1-业务域N")
+    @GetMapping(value = "attrTreeList", produces = "application/json;charset=UTF-8")
+    public Result<?> getAttrTreeList(){
+
+        return null;
+    }
+
+    @ApiOperation(value = "人员数据授权接口")
+    @PostMapping(value = "dataAuth", produces = "application/json;charset=UTF-8")
+    public Result userDataAuth(@RequestBody UserDataAuthAcceptVo userDataAuthAcceptVo){
+
+
+
+        return Result.success();
+    }
+
+
+    @ApiOperation(value = "机构数据授权接口")
+    @PostMapping(value = "dataAuth", produces = "application/json;charset=UTF-8")
+    public Result orgDataAuth(@RequestBody OrgDataAuthAcceptVo orgDataAuthAcceptVo){
+
+
+
+        return Result.success();
+    }
+
+
+    @ApiOperation(value = "业务域标签数据授权接口")
+    @PostMapping(value = "dataAuth", produces = "application/json;charset=UTF-8")
+    public Result labelDataAuth(@RequestBody LabelDataAuthAcceptVo labelDataAuthAcceptVo){
+
+
+
+        return Result.success();
+    }
+
+    @ApiOperation(value = "人员视角数据权限查询")
+    @GetMapping(value = "userDataAuthInfo")
+    public Result userDataAuthInfo(@RequestParam("userId") String userId){
+
+
+        return Result.success();
+    }
+
+
+
+
+}

+ 28 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/vo/DataAuthVo.java

@@ -0,0 +1,28 @@
+package com.dragoninfo.dcuc.authweb.restcontroller.auth.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author mazq
+ * @date 2021/4/8
+ */
+@ApiModel(value = "同一类别数据授权对象")
+@Data
+public class DataAuthVo {
+
+    @ApiModelProperty(value = "数据资源类型,对应类型码值。" +
+            "DATA_SECURITY_LEVEL:数据安全级别;" +
+            "LEVEL_1_COLUMN_CLASSIFY:字段一级分类;" +
+            "LEVEL_2_COLUMN_CLASSIFY:字段二级分类;" +
+            "DATA_CLASSIFY:数据分级", dataType = "string")
+    private String dataType;
+
+    @ApiModelProperty(value = "该类型数据下需要授权的数据code集合",dataType = "string[]")
+    private List<String> dataCodes;
+
+
+}

+ 23 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/vo/LabelDataAuthAcceptVo.java

@@ -0,0 +1,23 @@
+package com.dragoninfo.dcuc.authweb.restcontroller.auth.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author mazq
+ * @date 2021/4/8
+ */
+@ApiModel("业务域数据授权接收对象")
+@Data
+public class LabelDataAuthAcceptVo {
+
+    @ApiModelProperty(value = "业务域表码code值")
+    private String code;
+
+    @ApiModelProperty(value = "需要授权的数据对象",dataType = "object[]")
+    private List<DataAuthVo> authDataList;
+
+}

+ 23 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/vo/OrgDataAuthAcceptVo.java

@@ -0,0 +1,23 @@
+package com.dragoninfo.dcuc.authweb.restcontroller.auth.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author mazq
+ * @date 2021/4/8
+ */
+@ApiModel(value = "机构数据授权接收对象")
+@Data
+public class OrgDataAuthAcceptVo {
+
+    @ApiModelProperty(value = "机构id")
+    private String orgId;
+
+    @ApiModelProperty(value = "需要授权的数据对象",dataType = "object[]")
+    private List<DataAuthVo> authVoList;
+
+}

+ 22 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/vo/UserDataAuthAcceptVo.java

@@ -0,0 +1,22 @@
+package com.dragoninfo.dcuc.authweb.restcontroller.auth.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author mazq
+ * @date 2021/4/8
+ */
+@ApiModel(value = "人员数据授权接对象")
+@Data
+public class UserDataAuthAcceptVo {
+
+    @ApiModelProperty(value = "")
+    private String userId;
+
+    @ApiModelProperty(value = "需要授权的数据对象",dataType = "object[]")
+    private List<DataAuthVo> authVoList;
+}