1 Star 0 Fork 5

恒进97786 / fastesign

forked from psoho / fastesign 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

GitHub Repo stars gitee Repo stars csharp license version

介绍

由于e签宝官方提供的demo,杂乱无章并且没有进行API接口的封装,加密方式也比较特殊,导致开发接入成本很高。

所以特意进行了封装,方便开发人员快速接入。节省时间。

也欢迎大家对其他接口进行扩展。

快速上手

一、编辑pom.xml文件,添加以下依赖

<dependency>
    <groupId>cn.psoho</groupId>
    <artifactId>fastesign-starter</artifactId>
    <version>1.2.2</version>
</dependency>

二、增加以下配置

fastesign:
  appId: 511******46
  secret: 603***************269f

三、开始使用

public class EsignTest {

    @Autowired
    FastEsignService esignService;

    String docTemplateId = "d2dcab327b4******dfd1d7dd17";
    
    @Test
    void docTemplate() {
        EsignResponse<DocTemplateResponse> r = esignService.getDocTemplateService().get(docTemplateId);
        log.info("返回: r={}", JsonUtils.toPrettyJson(r));
    }

}

扩展接口

目前只封装了最常用的API接口,如果不满足需求,自己扩展新接口即可。

扩展非常方便,对照e签宝的文档,定义好请求和响应实体bean,扩展对应的service方法即可。

建议参考官方文档标准来扩展:

https://open.esign.cn/tools/api-debug

示例如下

/**
 * 签署
 */
@RequiredArgsConstructor
public class SignFlowService {

    final FastEsignService fastEsignService;

    /**
     * 填写模板生成文件
     *
     * @param request
     * @return
     */
    public EsignResponse<FilesCreateByDocTemplateResponse> filesCreateByDocTemplate(FilesCreateByDocTemplateRequest request) {
        String path = "/v3/files/create-by-doc-template";
        return fastEsignService.post(path, request, FilesCreateByDocTemplateResponse.class);
    }

}
MIT License Copyright (c) 2022 fastegsin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

🔥🔥🔥e签宝javaSDK,快速完成e签宝电子签开发 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/yuefb/fastesign.git
git@gitee.com:yuefb/fastesign.git
yuefb
fastesign
fastesign
master

搜索帮助