+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 授权回调url反参表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+public class AuthCodeDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ *
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 授权方APPID
+ */
+ private String authAppid;
+
+ /**
+ * 授权码
+ */
+ private String authCode;
+
+ /**
+ * 有效期 10min
+ */
+ private Integer expiresIn;
+
+ /**
+ *
+ */
+ private Integer delFlag;
+
+ /**
+ *
+ */
+ private String createdBy;
+
+ /**
+ *
+ */
+ private Date createdTime;
+
+ /**
+ *
+ */
+ private String updatedBy;
+
+ /**
+ *
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthorizationInfoDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthorizationInfoDTO.java
new file mode 100644
index 0000000000..ebdc051c24
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthorizationInfoDTO.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 授权信息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+public class AuthorizationInfoDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ *
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 授权方 appid
+ */
+ private String authorizerAppid;
+
+ /**
+ * 接口调用令牌(在授权的公众号/小程序具备 API 权限时,才有此返回值)
+ */
+ private String authorizerAccessToken;
+
+ /**
+ * authorizer_access_token 的有效期(在授权的公众号/小程序具备API权限时,才有此返回值),单位:秒
+ */
+ private Integer expiresIn;
+
+ /**
+ * 刷新令牌(在授权的公众号具备API权限时,才有此返回值),刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token。一旦丢失,只能让用户重新授权,才能再次拿到新的刷新令牌。用户重新授权后,之前的刷新令牌会失效
+ */
+ private String authorizerRefreshToken;
+
+ /**
+ *
+ */
+ private Integer delFlag;
+
+ /**
+ *
+ */
+ private String createdBy;
+
+ /**
+ *
+ */
+ private Date createdTime;
+
+ /**
+ *
+ */
+ private String updatedBy;
+
+ /**
+ *
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthorizerRefreshTokenDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthorizerRefreshTokenDTO.java
new file mode 100644
index 0000000000..32b509fe6f
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthorizerRefreshTokenDTO.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 授权方的刷新令牌表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+public class AuthorizerRefreshTokenDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 授权方的刷新令牌
+ */
+ private String authorizerRefreshToken;
+
+ /**
+ * 授权方appid
+ */
+ private String authorizerAppid;
+
+ /**
+ * 删除标识 0-否,1-是
+ */
+ private String delFlag;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ComponentAccessTokenDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ComponentAccessTokenDTO.java
new file mode 100644
index 0000000000..630898d5db
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ComponentAccessTokenDTO.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 第三方平台调用凭证
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+public class ComponentAccessTokenDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ private String id;
+
+ /**
+ * 令牌 【第三方平台接口的调用凭据】
+ */
+ private String componentAccessToken;
+
+ /**
+ * 令牌有效期 单位:s 最长 60*60*2
+ */
+ private Integer expiresIn;
+
+ /**
+ * 删除状态 0:正常 1:删除
+ */
+ private Integer delFlag;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/FuncInfoDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/FuncInfoDTO.java
new file mode 100644
index 0000000000..482e71f206
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/FuncInfoDTO.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 授权给开发者的权限集列表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+public class FuncInfoDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ private String id;
+
+ /**
+ * 权限类别
+ */
+ private String funcscopeCategory;
+
+ /**
+ * 权限ID
+ */
+ private String funcscopeId;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 授权方APPID
+ */
+ private String authorizationInfoAppid;
+
+ /**
+ *
+ */
+ private Integer delFlag;
+
+ /**
+ *
+ */
+ private String createdBy;
+
+ /**
+ *
+ */
+ private Date createdTime;
+
+ /**
+ *
+ */
+ private String updatedBy;
+
+ /**
+ *
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PreAuthTokenDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PreAuthTokenDTO.java
new file mode 100644
index 0000000000..e0caf8be1c
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PreAuthTokenDTO.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 预授权码历史记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+public class PreAuthTokenDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ private String id;
+
+ /**
+ * 预授权码 【第三方平台方实现授权托管的必备信息,每个预授权码有效期为 10 分钟。需要先获取令牌才能调用】
+ */
+ private String preAuthToken;
+
+ /**
+ * 预授权码有效期 单位:s 最长 60*60*2
+ */
+ private Integer expiresIn;
+
+ /**
+ * 删除状态 0:正常 1:删除
+ */
+ private Integer delFlag;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/RefreshAuthorizerAccessTokenDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/RefreshAuthorizerAccessTokenDTO.java
new file mode 100644
index 0000000000..aed9b812f7
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/RefreshAuthorizerAccessTokenDTO.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.form.AuthCodeFormDTO;
+import com.epmet.entity.AuthCodeEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 授权回调url反参表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-08
+ */
+@Mapper
+public interface AuthCodeDao extends BaseDao {
+
+ void insertRedirectAuthCode(AuthCodeFormDTO formDTO);
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizationInfoDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizationInfoDao.java
new file mode 100644
index 0000000000..908d924afb
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizationInfoDao.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.form.AuthorizationInfoFormDTO;
+import com.epmet.entity.AuthorizationInfoEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 授权信息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-08
+ */
+@Mapper
+public interface AuthorizationInfoDao extends BaseDao {
+
+ /**
+ * @Description 插入 授权信息
+ * @param formDTO
+ * @author zxc
+ */
+ void insertAuthorizationInfo(AuthorizationInfoFormDTO formDTO);
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizerRefreshTokenDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizerRefreshTokenDao.java
new file mode 100644
index 0000000000..087e781c1a
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizerRefreshTokenDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.AuthorizerRefreshTokenEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 授权方的刷新令牌表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-08
+ */
+@Mapper
+public interface AuthorizerRefreshTokenDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentAccessTokenDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentAccessTokenDao.java
new file mode 100644
index 0000000000..12666b9f01
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentAccessTokenDao.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.form.ComponentAccessTokenFormDTO;
+import com.epmet.entity.ComponentAccessTokenEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 第三方平台调用凭证
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-08
+ */
+@Mapper
+public interface ComponentAccessTokenDao extends BaseDao {
+
+ /**
+ * @Description 插入component_access_token信息
+ * @param formDTO
+ * @author zxc
+ */
+ void insertComponentAccessToken(ComponentAccessTokenFormDTO formDTO);
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/FuncInfoDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/FuncInfoDao.java
new file mode 100644
index 0000000000..fb54341e90
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/FuncInfoDao.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.form.FuncInfoFormDTO;
+import com.epmet.entity.FuncInfoEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 授权给开发者的权限集列表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-08
+ */
+@Mapper
+public interface FuncInfoDao extends BaseDao {
+
+ void insertFuncInfo(@Param("funcInfoList") List funcInfoList);
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java
index cec7dcc514..179a27459d 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java
@@ -20,14 +20,22 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.PaCustomerAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
/**
* 客户根组织信息
*
* @author generator generator@elink-cn.com
- * @since v1.0.0 2020-07-09
+ * @since v1.0.0 2020-07-08
*/
@Mapper
public interface PaCustomerAgencyDao extends BaseDao {
-
+
+ /**
+ * @Description 根据userId查询客户Id
+ * @param userId
+ * @author zxc
+ */
+ String getCustomerIdByUserId(@Param("userId")String userId);
+
}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PreAuthTokenDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PreAuthTokenDao.java
new file mode 100644
index 0000000000..36e0dce88b
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PreAuthTokenDao.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.form.PreAuthTokenFormDTO;
+import com.epmet.entity.PreAuthTokenEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 预授权码历史记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-08
+ */
+@Mapper
+public interface PreAuthTokenDao extends BaseDao {
+
+ /**
+ * @Description 插入 预授权码
+ * @param formDTO
+ * @author zxc
+ */
+ void insertPreAuthToken(PreAuthTokenFormDTO formDTO);
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/RefreshAuthorizerAccessTokenDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/RefreshAuthorizerAccessTokenDao.java
new file mode 100644
index 0000000000..c6293fbd37
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/RefreshAuthorizerAccessTokenDao.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.form.AuthorizerAccessTokenFormDTO;
+import com.epmet.dto.result.WillOverDueResultDTO;
+import com.epmet.entity.RefreshAuthorizerAccessTokenEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 获取/刷新接口调用令牌记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-08
+ */
+@Mapper
+public interface RefreshAuthorizerAccessTokenDao extends BaseDao {
+
+ /**
+ * @Description 查询即将过期的 authorizer_access_token
+ * @param
+ * @author zxc
+ */
+ List checkWillOverDue();
+
+ void insertAuthorizerAccessToken(AuthorizerAccessTokenFormDTO refreshAccessToken);
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/AuthCodeEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/AuthCodeEntity.java
new file mode 100644
index 0000000000..fd9d829d2c
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/AuthCodeEntity.java
@@ -0,0 +1,61 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 授权回调url反参表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("auth_code")
+public class AuthCodeEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 授权方APPID
+ */
+ private String authAppid;
+
+ /**
+ * 授权码
+ */
+ private String authCode;
+
+ /**
+ * 有效期 10min
+ */
+ private Integer expiresIn;
+
+}
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/AuthorizationInfoEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/AuthorizationInfoEntity.java
new file mode 100644
index 0000000000..f774abb2cf
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/AuthorizationInfoEntity.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 授权信息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("authorization_info")
+public class AuthorizationInfoEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 授权方 appid
+ */
+ private String authorizerAppid;
+
+ /**
+ * 接口调用令牌(在授权的公众号/小程序具备 API 权限时,才有此返回值)
+ */
+ private String authorizerAccessToken;
+
+ /**
+ * authorizer_access_token 的有效期(在授权的公众号/小程序具备API权限时,才有此返回值),单位:秒
+ */
+ private Integer expiresIn;
+
+ /**
+ * 刷新令牌(在授权的公众号具备API权限时,才有此返回值),刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token。一旦丢失,只能让用户重新授权,才能再次拿到新的刷新令牌。用户重新授权后,之前的刷新令牌会失效
+ */
+ private String authorizerRefreshToken;
+
+}
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/AuthorizerRefreshTokenEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/AuthorizerRefreshTokenEntity.java
new file mode 100644
index 0000000000..1f6d7127d4
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/AuthorizerRefreshTokenEntity.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 授权方的刷新令牌表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("authorizer_refresh_token")
+public class AuthorizerRefreshTokenEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 授权方的刷新令牌
+ */
+ private String authorizerRefreshToken;
+
+ /**
+ * 授权方appid
+ */
+ private String authorizerAppid;
+
+}
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ComponentAccessTokenEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ComponentAccessTokenEntity.java
new file mode 100644
index 0000000000..47ed337383
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ComponentAccessTokenEntity.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 第三方平台调用凭证
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("component_access_token")
+public class ComponentAccessTokenEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 令牌 【第三方平台接口的调用凭据】
+ */
+ private String componentAccessToken;
+
+ /**
+ * 令牌有效期 单位:s 最长 60*60*2
+ */
+ private Integer expiresIn;
+
+}
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/FuncInfoEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/FuncInfoEntity.java
new file mode 100644
index 0000000000..fd32f8067f
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/FuncInfoEntity.java
@@ -0,0 +1,61 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 授权给开发者的权限集列表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("func_info")
+public class FuncInfoEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 权限类别
+ */
+ private String funcscopeCategory;
+
+ /**
+ * 权限ID
+ */
+ private String funcscopeId;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 授权方APPID
+ */
+ private String authorizationInfoAppid;
+
+}
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PreAuthTokenEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PreAuthTokenEntity.java
new file mode 100644
index 0000000000..9ccb82efe1
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PreAuthTokenEntity.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 预授权码历史记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("pre_auth_token")
+public class PreAuthTokenEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 预授权码 【第三方平台方实现授权托管的必备信息,每个预授权码有效期为 10 分钟。需要先获取令牌才能调用】
+ */
+ private String preAuthToken;
+
+ /**
+ * 预授权码有效期 单位:s 最长 60*60*2
+ */
+ private Integer expiresIn;
+
+}
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/RefreshAuthorizerAccessTokenEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/RefreshAuthorizerAccessTokenEntity.java
new file mode 100644
index 0000000000..0a5c9ddfe2
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/RefreshAuthorizerAccessTokenEntity.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *