Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
bb711fb4
提交
bb711fb4
authored
8月 09, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 添加ak,sk
上级
f87ac3ca
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
945 行增加
和
3 行删除
+945
-3
UserKey.java
backend/src/main/java/io/dataease/base/domain/UserKey.java
+22
-0
UserKeyExample.java
...src/main/java/io/dataease/base/domain/UserKeyExample.java
+591
-0
UserKeyMapper.java
.../src/main/java/io/dataease/base/mapper/UserKeyMapper.java
+31
-0
UserKeyMapper.xml
...d/src/main/java/io/dataease/base/mapper/UserKeyMapper.xml
+229
-0
XUserKeysServer.java
...main/java/io/dataease/plugins/server/XUserKeysServer.java
+61
-0
en.js
frontend/src/lang/en.js
+2
-1
tw.js
frontend/src/lang/tw.js
+2
-1
zh.js
frontend/src/lang/zh.js
+2
-1
Topbar.vue
frontend/src/layout/components/Topbar.vue
+5
-0
没有找到文件。
backend/src/main/java/io/dataease/base/domain/UserKey.java
0 → 100644
浏览文件 @
bb711fb4
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
lombok.Data
;
@Data
public
class
UserKey
implements
Serializable
{
private
Long
id
;
private
Long
userId
;
private
String
accessKey
;
private
String
secretKey
;
private
Long
createTime
;
private
String
status
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/UserKeyExample.java
0 → 100644
浏览文件 @
bb711fb4
package
io
.
dataease
.
base
.
domain
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
UserKeyExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
UserKeyExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNull
()
{
addCriterion
(
"user_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNotNull
()
{
addCriterion
(
"user_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyIsNull
()
{
addCriterion
(
"access_key is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyIsNotNull
()
{
addCriterion
(
"access_key is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyEqualTo
(
String
value
)
{
addCriterion
(
"access_key ="
,
value
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyNotEqualTo
(
String
value
)
{
addCriterion
(
"access_key <>"
,
value
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyGreaterThan
(
String
value
)
{
addCriterion
(
"access_key >"
,
value
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"access_key >="
,
value
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyLessThan
(
String
value
)
{
addCriterion
(
"access_key <"
,
value
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"access_key <="
,
value
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyLike
(
String
value
)
{
addCriterion
(
"access_key like"
,
value
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyNotLike
(
String
value
)
{
addCriterion
(
"access_key not like"
,
value
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyIn
(
List
<
String
>
values
)
{
addCriterion
(
"access_key in"
,
values
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"access_key not in"
,
values
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"access_key between"
,
value1
,
value2
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAccessKeyNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"access_key not between"
,
value1
,
value2
,
"accessKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyIsNull
()
{
addCriterion
(
"secret_key is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyIsNotNull
()
{
addCriterion
(
"secret_key is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyEqualTo
(
String
value
)
{
addCriterion
(
"secret_key ="
,
value
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyNotEqualTo
(
String
value
)
{
addCriterion
(
"secret_key <>"
,
value
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyGreaterThan
(
String
value
)
{
addCriterion
(
"secret_key >"
,
value
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"secret_key >="
,
value
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyLessThan
(
String
value
)
{
addCriterion
(
"secret_key <"
,
value
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"secret_key <="
,
value
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyLike
(
String
value
)
{
addCriterion
(
"secret_key like"
,
value
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyNotLike
(
String
value
)
{
addCriterion
(
"secret_key not like"
,
value
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyIn
(
List
<
String
>
values
)
{
addCriterion
(
"secret_key in"
,
values
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"secret_key not in"
,
values
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"secret_key between"
,
value1
,
value2
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSecretKeyNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"secret_key not between"
,
value1
,
value2
,
"secretKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Long
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Long
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Long
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Long
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Long
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusIsNull
()
{
addCriterion
(
"`status` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusIsNotNull
()
{
addCriterion
(
"`status` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusEqualTo
(
String
value
)
{
addCriterion
(
"`status` ="
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotEqualTo
(
String
value
)
{
addCriterion
(
"`status` <>"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusGreaterThan
(
String
value
)
{
addCriterion
(
"`status` >"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`status` >="
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusLessThan
(
String
value
)
{
addCriterion
(
"`status` <"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`status` <="
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusLike
(
String
value
)
{
addCriterion
(
"`status` like"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotLike
(
String
value
)
{
addCriterion
(
"`status` not like"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusIn
(
List
<
String
>
values
)
{
addCriterion
(
"`status` in"
,
values
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`status` not in"
,
values
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`status` between"
,
value1
,
value2
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`status` not between"
,
value1
,
value2
,
"status"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/UserKeyMapper.java
0 → 100644
浏览文件 @
bb711fb4
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.UserKey
;
import
io.dataease.base.domain.UserKeyExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
UserKeyMapper
{
long
countByExample
(
UserKeyExample
example
);
int
deleteByExample
(
UserKeyExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
UserKey
record
);
int
insertSelective
(
UserKey
record
);
List
<
UserKey
>
selectByExample
(
UserKeyExample
example
);
UserKey
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
UserKey
record
,
@Param
(
"example"
)
UserKeyExample
example
);
int
updateByExample
(
@Param
(
"record"
)
UserKey
record
,
@Param
(
"example"
)
UserKeyExample
example
);
int
updateByPrimaryKeySelective
(
UserKey
record
);
int
updateByPrimaryKey
(
UserKey
record
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/UserKeyMapper.xml
0 → 100644
浏览文件 @
bb711fb4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.dataease.base.mapper.UserKeyMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.dataease.base.domain.UserKey"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"access_key"
jdbcType=
"VARCHAR"
property=
"accessKey"
/>
<result
column=
"secret_key"
jdbcType=
"VARCHAR"
property=
"secretKey"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
<result
column=
"status"
jdbcType=
"VARCHAR"
property=
"status"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, user_id, access_key, secret_key, create_time, `status`
</sql>
<select
id=
"selectByExample"
parameterType=
"io.dataease.base.domain.UserKeyExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from user_key
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from user_key
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from user_key
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.dataease.base.domain.UserKeyExample"
>
delete from user_key
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.UserKey"
>
insert into user_key (id, user_id, access_key,
secret_key, create_time, `status`
)
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{accessKey,jdbcType=VARCHAR},
#{secretKey,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.UserKey"
>
insert into user_key
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"accessKey != null"
>
access_key,
</if>
<if
test=
"secretKey != null"
>
secret_key,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"status != null"
>
`status`,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"accessKey != null"
>
#{accessKey,jdbcType=VARCHAR},
</if>
<if
test=
"secretKey != null"
>
#{secretKey,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=BIGINT},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.dataease.base.domain.UserKeyExample"
resultType=
"java.lang.Long"
>
select count(*) from user_key
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update user_key
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.accessKey != null"
>
access_key = #{record.accessKey,jdbcType=VARCHAR},
</if>
<if
test=
"record.secretKey != null"
>
secret_key = #{record.secretKey,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if
test=
"record.status != null"
>
`status` = #{record.status,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update user_key
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
access_key = #{record.accessKey,jdbcType=VARCHAR},
secret_key = #{record.secretKey,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
`status` = #{record.status,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"io.dataease.base.domain.UserKey"
>
update user_key
<set>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"accessKey != null"
>
access_key = #{accessKey,jdbcType=VARCHAR},
</if>
<if
test=
"secretKey != null"
>
secret_key = #{secretKey,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if
test=
"status != null"
>
`status` = #{status,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"io.dataease.base.domain.UserKey"
>
update user_key
set user_id = #{userId,jdbcType=BIGINT},
access_key = #{accessKey,jdbcType=VARCHAR},
secret_key = #{secretKey,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
`status` = #{status,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/dataease/plugins/server/XUserKeysServer.java
0 → 100644
浏览文件 @
bb711fb4
package
io
.
dataease
.
plugins
.
server
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.plugins.config.SpringContextUtil
;
import
io.dataease.plugins.xpack.ukey.dto.request.XpackUkeyDto
;
import
io.dataease.plugins.xpack.ukey.service.UkeyXpackService
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.ServletRequest
;
import
java.util.List
;
@RequestMapping
(
"/plugin/ukey"
)
@RestController
public
class
XUserKeysServer
{
@PostMapping
(
"info"
)
public
List
<
XpackUkeyDto
>
getUserKeysInfo
()
{
UkeyXpackService
ukeyXpackService
=
SpringContextUtil
.
getBean
(
UkeyXpackService
.
class
);
Long
userId
=
AuthUtils
.
getUser
().
getUserId
();
return
ukeyXpackService
.
getUserKeysInfo
(
userId
);
}
@PostMapping
(
"validate"
)
public
String
validate
(
ServletRequest
request
)
{
// return ApiKeyHandler.getUser(WebUtils.toHttp(request));
return
null
;
}
@PostMapping
(
"generate"
)
public
void
generateUserKey
()
{
UkeyXpackService
ukeyXpackService
=
SpringContextUtil
.
getBean
(
UkeyXpackService
.
class
);
Long
userId
=
AuthUtils
.
getUser
().
getUserId
();
ukeyXpackService
.
generateUserKey
(
userId
);
}
@PostMapping
(
"delete/{id}"
)
public
void
deleteUserKey
(
@PathVariable
Long
id
)
{
UkeyXpackService
ukeyXpackService
=
SpringContextUtil
.
getBean
(
UkeyXpackService
.
class
);
ukeyXpackService
.
deleteUserKey
(
id
);
}
@PostMapping
(
"changeStatus/{id}"
)
public
void
changeStatus
(
@PathVariable
Long
id
)
{
UkeyXpackService
ukeyXpackService
=
SpringContextUtil
.
getBean
(
UkeyXpackService
.
class
);
ukeyXpackService
.
switchStatus
(
id
);
}
/*@GetMapping("active/{id}")
public void activeUserKey(@PathVariable Long id) {
UkeyXpackService ukeyXpackService = SpringContextUtil.getBean(UkeyXpackService.class);
ukeyXpackService.activeUserKey(id);
}
@GetMapping("disable/{id}")
public void disabledUserKey(@PathVariable Long id) {
UkeyXpackService ukeyXpackService = SpringContextUtil.getBean(UkeyXpackService.class);
ukeyXpackService.disableUserKey(id);
}*/
}
frontend/src/lang/en.js
浏览文件 @
bb711fb4
...
...
@@ -337,7 +337,8 @@ export default {
confirm
:
'Confirm'
,
ok
:
'Confirm'
,
cancel
:
'Cancel'
}
},
ukey_title
:
'API Keys'
},
documentation
:
{
documentation
:
'Documentation'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
bb711fb4
...
...
@@ -337,7 +337,8 @@ export default {
confirm
:
'確認'
,
ok
:
'確認'
,
cancel
:
'取消'
}
},
ukey_title
:
'API Keys'
},
documentation
:
{
documentation
:
'文檔'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
bb711fb4
...
...
@@ -337,7 +337,8 @@ export default {
confirm
:
'确认'
,
ok
:
'确认'
,
cancel
:
'取消'
}
},
ukey_title
:
'API Keys'
},
documentation
:
{
documentation
:
'文档'
,
...
...
frontend/src/layout/components/Topbar.vue
浏览文件 @
bb711fb4
...
...
@@ -53,6 +53,11 @@
<router-link
to=
"/person-info/index"
>
<el-dropdown-item>
{{ $t('commons.personal_info') }}
</el-dropdown-item>
</router-link>
<router-link
to=
"/ukey/index"
>
<el-dropdown-item>
{{ $t('commons.ukey_title') }}
</el-dropdown-item>
</router-link>
<router-link
to=
"/person-pwd/index"
>
<el-dropdown-item>
{{ $t('user.change_password') }}
</el-dropdown-item>
</router-link>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论