致远OA如何开发 第八篇 新增接口

新增接口
此栏目技术支持

技术大佬对栏目文章的支持 特别感谢

新增接口

1 第一种方式 rest

java文件

java 复制代码
@Path("token1")
public class Resource extends BaseResource {


    @GET
    @Path("/{userName}/{password}")
    @Produces({"text/plain"})
    public String getTokenString(@PathParam("userName") String userName, @PathParam("password") String password, @QueryParam("loginName") String loginName, @QueryParam("memberId") Long memberId, @QueryParam("code") String code, @QueryParam("userAgentFrom") String userAgentFrom) throws Exception {
        System.out.println("欢迎回到财务系统");
        return "ok";
    }


}

2 第二种方式 Ajax

新增文件java

java 复制代码
public class MechanicianPage {
    @AjaxAccess
    public void saveProcessXml(Map<String, Object> Data)
    {
        String processXml=Data.get("processXml").toString();
        String nodeId=Data.get("nodeId").toString();
        String userId=Data.get("userId").toString();
        ((WorkFlowDesignerManagerImpl) workFlowDesignerManager).getWapi().savedProcessXmlTempAndReturnId(null,processXml,nodeId,userId,"-1");
    }

依赖注入

xml 复制代码
<bean id="managerInfo" class="com.seeyon.apps.gzysplugin.listener.MechanicianPage"></bean>
相关推荐
寂夜了无痕13 分钟前
MySQL 主从延迟全链路根因诊断与破局法则
数据库·mysql·mysql主从延迟
爱丽_16 分钟前
分页为什么越翻越慢:offset 陷阱、seek 分页与索引排序优化
数据库·mysql
nbwenren18 分钟前
Springboot中SLF4J详解
java·spring boot·后端
APguantou20 分钟前
NCRE-三级数据库技术-第12章-备份与数据库恢复
数据库·sqlserver
Bat U24 分钟前
MySQL数据库|表设计+新增+分组查询
数据库·mysql
zzzsde34 分钟前
【Linux】库的制作和使用(3)ELF&&动态链接
linux·运维·服务器
CQU_JIAKE34 分钟前
4.3【A]
linux·运维·服务器
wellc36 分钟前
java进阶知识点
java·开发语言
RopenYuan38 分钟前
FastAPI -API Router的应用
前端·网络·python