|
@@ -0,0 +1,77 @@
|
|
|
+package org.jeecg.modules.app.controller;
|
|
|
+
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.modules.app.esign.exception.EsignDemoException;
|
|
|
+import org.jeecg.modules.app.service.IESignService;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@Tag(name = "E签宝相关接口")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/api/esign")
|
|
|
+public class ESignApi {
|
|
|
+ @Resource
|
|
|
+ private IESignService iESignService;
|
|
|
+ /**
|
|
|
+ * @Author SheepHy
|
|
|
+ * @Description 查询用户授权状态
|
|
|
+ * @Date 9:42 2025/7/18
|
|
|
+ * @Param phoneNumber
|
|
|
+ * @return boolean
|
|
|
+ **/
|
|
|
+ @GetMapping("/getUserIdentityInfo")
|
|
|
+ @Operation(summary = "查询用户授权状态")
|
|
|
+ public Result<Boolean> getUserIdentityInfo(@RequestParam("phoneNumber") @Schema(description="联系人手机号")String phoneNumber) throws EsignDemoException{
|
|
|
+ return Result.OK(iESignService.getUserIdentityInfo(phoneNumber));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Author SheepHy
|
|
|
+ * @Description 获取授权链接
|
|
|
+ * @Date 9:42 2025/7/18
|
|
|
+ * @Param
|
|
|
+ * @return
|
|
|
+ **/
|
|
|
+ @GetMapping("/getAuthUrl")
|
|
|
+ @Operation(summary = "用户获取授权链接")
|
|
|
+ public Result<String> getAuthUrl(@RequestParam("phoneNumber") @Schema(description="联系人手机号")String phoneNumber) throws EsignDemoException{
|
|
|
+ return Result.OK(iESignService.getAuthUrl(phoneNumber));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Author SheepHy
|
|
|
+ * @Description 查询企业授权状态
|
|
|
+ * @Date 13:33 2025/7/18
|
|
|
+ * @Param
|
|
|
+ * @return
|
|
|
+ **/
|
|
|
+ @GetMapping("/getOrgIdentityInfos")
|
|
|
+ @Operation(summary = "查询企业授权状态")
|
|
|
+ public Result<Boolean> getOrgIdentityInfos(@RequestParam("orgName") @Schema(description="企业名称")String orgName) throws EsignDemoException{
|
|
|
+ return Result.OK(iESignService.getOrgIdentityInfos(orgName));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Author SheepHy
|
|
|
+ * @Description 企业获取授权链接
|
|
|
+ * @Date 13:33 2025/7/18
|
|
|
+ * @Param
|
|
|
+ * @return
|
|
|
+ **/
|
|
|
+ @GetMapping("/getOrgAuthUrls")
|
|
|
+ @Operation(summary = "企业获取授权链接")
|
|
|
+ public Result<String> getOrgAuthUrls(@RequestParam("orgName") @Schema(description="企业名称")String orgName,
|
|
|
+ @RequestParam("phoneNumber") @Schema(description="联系人手机号")String phoneNumber) throws EsignDemoException{
|
|
|
+ return Result.OK(iESignService.getOrgAuthUrls(orgName,phoneNumber));
|
|
|
+ }
|
|
|
+}
|