Jelajahi Sumber

feat: 增加数据鉴权接口

huangzqa 2 tahun lalu
induk
melakukan
4d35b2d1ae

+ 39 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v2/controller/DataAuthApiV2Controller.java

@@ -0,0 +1,39 @@
+package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v2.controller;
+
+import com.dragoninfo.dcuc.auth.auth.api.IApiDataAuthFacade;
+import com.dragoninfo.dcuc.auth.auth.vo.DataAuthV2ReqVO;
+import com.dragoninfo.dcuc.auth.auth.vo.DataAuthV2RespVO;
+import com.dragoninfo.dcuc.authweb.util.VersionUtils;
+import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 数据鉴权
+ *
+ * @author huangzqa
+ * @version 2.0
+ * @date 2022/10/03
+ */
+@Api(tags = {"数据鉴权"})
+@RestController
+@RequestMapping(value = "/api/auth-service/" + VersionUtils.VERSION_UID + "/")
+public class DataAuthApiV2Controller {
+
+    @Autowired
+    private IApiDataAuthFacade apiDataAuthFacade;
+
+    @ApiOperation(value = "数据鉴权")
+    @ApiImplicitParams({@ApiImplicitParam(name = "dataAuthV2ReqVO", value = "数据资源对象")})
+    @PostMapping(value = "data-auth/data-items/check")
+    public ResponseDTO<DataAuthV2RespVO> checkDataItems(@RequestBody DataAuthV2ReqVO dataAuthV2ReqVO) {
+        return apiDataAuthFacade.dataItemsCheckV2(dataAuthV2ReqVO);
+    }
+}