Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
5781da13
提交
5781da13
authored
3月 16, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 仪表板收藏分享 后台接口
上级
f775dc8c
隐藏空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
1862 行增加
和
0 行删除
+1862
-0
PanelShare.java
...end/src/main/java/io/dataease/base/domain/PanelShare.java
+18
-0
PanelShareExample.java
.../main/java/io/dataease/base/domain/PanelShareExample.java
+451
-0
PanelStore.java
...end/src/main/java/io/dataease/base/domain/PanelStore.java
+18
-0
PanelStoreExample.java
.../main/java/io/dataease/base/domain/PanelStoreExample.java
+451
-0
PanelShareMapper.java
...c/main/java/io/dataease/base/mapper/PanelShareMapper.java
+31
-0
PanelShareMapper.xml
...rc/main/java/io/dataease/base/mapper/PanelShareMapper.xml
+197
-0
PanelStoreMapper.java
...c/main/java/io/dataease/base/mapper/PanelStoreMapper.java
+31
-0
PanelStoreMapper.xml
...rc/main/java/io/dataease/base/mapper/PanelStoreMapper.xml
+197
-0
ExtPanelShareMapper.java
...java/io/dataease/base/mapper/ext/ExtPanelShareMapper.java
+14
-0
ExtPanelShareMapper.xml
.../java/io/dataease/base/mapper/ext/ExtPanelShareMapper.xml
+39
-0
ExtPanelStoreMapper.java
...java/io/dataease/base/mapper/ext/ExtPanelStoreMapper.java
+11
-0
ExtPanelStoreMapper.xml
.../java/io/dataease/base/mapper/ext/ExtPanelStoreMapper.xml
+33
-0
ShareApi.java
.../main/java/io/dataease/controller/panel/api/ShareApi.java
+29
-0
StoreApi.java
.../main/java/io/dataease/controller/panel/api/StoreApi.java
+36
-0
ShareServer.java
...java/io/dataease/controller/panel/server/ShareServer.java
+26
-0
StoreServer.java
...java/io/dataease/controller/panel/server/StoreServer.java
+32
-0
PanelShareRequest.java
.../dataease/controller/request/panel/PanelShareRequest.java
+16
-0
PanelShareDto.java
...nd/src/main/java/io/dataease/dto/panel/PanelShareDto.java
+23
-0
PanelStoreDto.java
...nd/src/main/java/io/dataease/dto/panel/PanelStoreDto.java
+15
-0
ShareService.java
...src/main/java/io/dataease/service/panel/ShareService.java
+94
-0
StoreService.java
...src/main/java/io/dataease/service/panel/StoreService.java
+57
-0
V12__panel_table.sql
backend/src/main/resources/db/migration/V12__panel_table.sql
+43
-0
没有找到文件。
backend/src/main/java/io/dataease/base/domain/PanelShare.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
lombok.Data
;
@Data
public
class
PanelShare
implements
Serializable
{
private
Long
shareId
;
private
String
panelGroupId
;
private
Long
userId
;
private
Long
createTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/PanelShareExample.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
base
.
domain
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PanelShareExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
PanelShareExample
()
{
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
andShareIdIsNull
()
{
addCriterion
(
"share_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdIsNotNull
()
{
addCriterion
(
"share_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdEqualTo
(
Long
value
)
{
addCriterion
(
"share_id ="
,
value
,
"shareId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"share_id <>"
,
value
,
"shareId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdGreaterThan
(
Long
value
)
{
addCriterion
(
"share_id >"
,
value
,
"shareId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"share_id >="
,
value
,
"shareId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdLessThan
(
Long
value
)
{
addCriterion
(
"share_id <"
,
value
,
"shareId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"share_id <="
,
value
,
"shareId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"share_id in"
,
values
,
"shareId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"share_id not in"
,
values
,
"shareId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"share_id between"
,
value1
,
value2
,
"shareId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShareIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"share_id not between"
,
value1
,
value2
,
"shareId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdIsNull
()
{
addCriterion
(
"panel_group_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdIsNotNull
()
{
addCriterion
(
"panel_group_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdEqualTo
(
String
value
)
{
addCriterion
(
"panel_group_id ="
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdNotEqualTo
(
String
value
)
{
addCriterion
(
"panel_group_id <>"
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdGreaterThan
(
String
value
)
{
addCriterion
(
"panel_group_id >"
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"panel_group_id >="
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdLessThan
(
String
value
)
{
addCriterion
(
"panel_group_id <"
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"panel_group_id <="
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdLike
(
String
value
)
{
addCriterion
(
"panel_group_id like"
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdNotLike
(
String
value
)
{
addCriterion
(
"panel_group_id not like"
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"panel_group_id in"
,
values
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"panel_group_id not in"
,
values
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"panel_group_id between"
,
value1
,
value2
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"panel_group_id not between"
,
value1
,
value2
,
"panelGroupId"
);
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
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
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/domain/PanelStore.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
lombok.Data
;
@Data
public
class
PanelStore
implements
Serializable
{
private
Long
storeId
;
private
String
panelGroupId
;
private
Long
userId
;
private
Long
createTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/PanelStoreExample.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
base
.
domain
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PanelStoreExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
PanelStoreExample
()
{
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
andStoreIdIsNull
()
{
addCriterion
(
"store_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdIsNotNull
()
{
addCriterion
(
"store_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdEqualTo
(
Long
value
)
{
addCriterion
(
"store_id ="
,
value
,
"storeId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"store_id <>"
,
value
,
"storeId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdGreaterThan
(
Long
value
)
{
addCriterion
(
"store_id >"
,
value
,
"storeId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"store_id >="
,
value
,
"storeId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdLessThan
(
Long
value
)
{
addCriterion
(
"store_id <"
,
value
,
"storeId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"store_id <="
,
value
,
"storeId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"store_id in"
,
values
,
"storeId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"store_id not in"
,
values
,
"storeId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"store_id between"
,
value1
,
value2
,
"storeId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"store_id not between"
,
value1
,
value2
,
"storeId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdIsNull
()
{
addCriterion
(
"panel_group_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdIsNotNull
()
{
addCriterion
(
"panel_group_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdEqualTo
(
String
value
)
{
addCriterion
(
"panel_group_id ="
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdNotEqualTo
(
String
value
)
{
addCriterion
(
"panel_group_id <>"
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdGreaterThan
(
String
value
)
{
addCriterion
(
"panel_group_id >"
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"panel_group_id >="
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdLessThan
(
String
value
)
{
addCriterion
(
"panel_group_id <"
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"panel_group_id <="
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdLike
(
String
value
)
{
addCriterion
(
"panel_group_id like"
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdNotLike
(
String
value
)
{
addCriterion
(
"panel_group_id not like"
,
value
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"panel_group_id in"
,
values
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"panel_group_id not in"
,
values
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"panel_group_id between"
,
value1
,
value2
,
"panelGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPanelGroupIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"panel_group_id not between"
,
value1
,
value2
,
"panelGroupId"
);
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
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
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/PanelShareMapper.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.PanelShare
;
import
io.dataease.base.domain.PanelShareExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
PanelShareMapper
{
long
countByExample
(
PanelShareExample
example
);
int
deleteByExample
(
PanelShareExample
example
);
int
deleteByPrimaryKey
(
Long
shareId
);
int
insert
(
PanelShare
record
);
int
insertSelective
(
PanelShare
record
);
List
<
PanelShare
>
selectByExample
(
PanelShareExample
example
);
PanelShare
selectByPrimaryKey
(
Long
shareId
);
int
updateByExampleSelective
(
@Param
(
"record"
)
PanelShare
record
,
@Param
(
"example"
)
PanelShareExample
example
);
int
updateByExample
(
@Param
(
"record"
)
PanelShare
record
,
@Param
(
"example"
)
PanelShareExample
example
);
int
updateByPrimaryKeySelective
(
PanelShare
record
);
int
updateByPrimaryKey
(
PanelShare
record
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/PanelShareMapper.xml
0 → 100644
浏览文件 @
5781da13
<?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.PanelShareMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.dataease.base.domain.PanelShare"
>
<id
column=
"share_id"
jdbcType=
"BIGINT"
property=
"shareId"
/>
<result
column=
"panel_group_id"
jdbcType=
"VARCHAR"
property=
"panelGroupId"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
</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"
>
share_id, panel_group_id, user_id, create_time
</sql>
<select
id=
"selectByExample"
parameterType=
"io.dataease.base.domain.PanelShareExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from panel_share
<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 panel_share
where share_id = #{shareId,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from panel_share
where share_id = #{shareId,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.dataease.base.domain.PanelShareExample"
>
delete from panel_share
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.PanelShare"
>
insert into panel_share (share_id, panel_group_id, user_id,
create_time)
values (#{shareId,jdbcType=BIGINT}, #{panelGroupId,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT},
#{createTime,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.PanelShare"
>
insert into panel_share
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"shareId != null"
>
share_id,
</if>
<if
test=
"panelGroupId != null"
>
panel_group_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"shareId != null"
>
#{shareId,jdbcType=BIGINT},
</if>
<if
test=
"panelGroupId != null"
>
#{panelGroupId,jdbcType=VARCHAR},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.dataease.base.domain.PanelShareExample"
resultType=
"java.lang.Long"
>
select count(*) from panel_share
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update panel_share
<set>
<if
test=
"record.shareId != null"
>
share_id = #{record.shareId,jdbcType=BIGINT},
</if>
<if
test=
"record.panelGroupId != null"
>
panel_group_id = #{record.panelGroupId,jdbcType=VARCHAR},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update panel_share
set share_id = #{record.shareId,jdbcType=BIGINT},
panel_group_id = #{record.panelGroupId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"io.dataease.base.domain.PanelShare"
>
update panel_share
<set>
<if
test=
"panelGroupId != null"
>
panel_group_id = #{panelGroupId,jdbcType=VARCHAR},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=BIGINT},
</if>
</set>
where share_id = #{shareId,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"io.dataease.base.domain.PanelShare"
>
update panel_share
set panel_group_id = #{panelGroupId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=BIGINT}
where share_id = #{shareId,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/PanelStoreMapper.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.PanelStore
;
import
io.dataease.base.domain.PanelStoreExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
PanelStoreMapper
{
long
countByExample
(
PanelStoreExample
example
);
int
deleteByExample
(
PanelStoreExample
example
);
int
deleteByPrimaryKey
(
Long
storeId
);
int
insert
(
PanelStore
record
);
int
insertSelective
(
PanelStore
record
);
List
<
PanelStore
>
selectByExample
(
PanelStoreExample
example
);
PanelStore
selectByPrimaryKey
(
Long
storeId
);
int
updateByExampleSelective
(
@Param
(
"record"
)
PanelStore
record
,
@Param
(
"example"
)
PanelStoreExample
example
);
int
updateByExample
(
@Param
(
"record"
)
PanelStore
record
,
@Param
(
"example"
)
PanelStoreExample
example
);
int
updateByPrimaryKeySelective
(
PanelStore
record
);
int
updateByPrimaryKey
(
PanelStore
record
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/PanelStoreMapper.xml
0 → 100644
浏览文件 @
5781da13
<?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.PanelStoreMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.dataease.base.domain.PanelStore"
>
<id
column=
"store_id"
jdbcType=
"BIGINT"
property=
"storeId"
/>
<result
column=
"panel_group_id"
jdbcType=
"VARCHAR"
property=
"panelGroupId"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
</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"
>
store_id, panel_group_id, user_id, create_time
</sql>
<select
id=
"selectByExample"
parameterType=
"io.dataease.base.domain.PanelStoreExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from panel_store
<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 panel_store
where store_id = #{storeId,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from panel_store
where store_id = #{storeId,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.dataease.base.domain.PanelStoreExample"
>
delete from panel_store
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.PanelStore"
>
insert into panel_store (store_id, panel_group_id, user_id,
create_time)
values (#{storeId,jdbcType=BIGINT}, #{panelGroupId,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT},
#{createTime,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.PanelStore"
>
insert into panel_store
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"panelGroupId != null"
>
panel_group_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=BIGINT},
</if>
<if
test=
"panelGroupId != null"
>
#{panelGroupId,jdbcType=VARCHAR},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.dataease.base.domain.PanelStoreExample"
resultType=
"java.lang.Long"
>
select count(*) from panel_store
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update panel_store
<set>
<if
test=
"record.storeId != null"
>
store_id = #{record.storeId,jdbcType=BIGINT},
</if>
<if
test=
"record.panelGroupId != null"
>
panel_group_id = #{record.panelGroupId,jdbcType=VARCHAR},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update panel_store
set store_id = #{record.storeId,jdbcType=BIGINT},
panel_group_id = #{record.panelGroupId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"io.dataease.base.domain.PanelStore"
>
update panel_store
<set>
<if
test=
"panelGroupId != null"
>
panel_group_id = #{panelGroupId,jdbcType=VARCHAR},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=BIGINT},
</if>
</set>
where store_id = #{storeId,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"io.dataease.base.domain.PanelStore"
>
update panel_store
set panel_group_id = #{panelGroupId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=BIGINT}
where store_id = #{storeId,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/ext/ExtPanelShareMapper.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
base
.
mapper
.
ext
;
import
io.dataease.base.domain.PanelShare
;
import
io.dataease.base.mapper.ext.query.GridExample
;
import
io.dataease.dto.panel.PanelShareDto
;
import
java.util.List
;
public
interface
ExtPanelShareMapper
{
int
batchInsert
(
List
<
PanelShare
>
shares
);
List
<
PanelShareDto
>
query
(
GridExample
example
);
}
backend/src/main/java/io/dataease/base/mapper/ext/ExtPanelShareMapper.xml
0 → 100644
浏览文件 @
5781da13
<?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.ext.ExtPanelShareMapper"
>
<resultMap
id=
"treeNodeMap"
type=
"io.dataease.dto.panel.PanelShareDto"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"pid"
property=
"pid"
/>
</resultMap>
<insert
id=
"batchInsert"
parameterType=
"io.dataease.base.domain.PanelStore"
>
INSERT INTO panel_store (panel_group_id,user_id,create_time)
VALUES
<foreach
collection=
"list"
item=
"store"
separator=
","
>
(#{store.panelGroupId}, #{store.userId}, #{store.createTime})
</foreach>
</insert>
<select
id=
"query"
parameterType=
"io.dataease.base.mapper.ext.query.GridExample"
resultMap=
"treeNodeMap"
>
select s.panel_group_id as id, g.create_by as pid, g.name
from panel_share s
left join panel_group g on g.id = s.panel_group_id
<if
test=
"_parameter != null"
>
<include
refid=
"io.dataease.base.mapper.ext.query.GridSql.gridCondition"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
<if
test=
"orderByClause == null"
>
order by s.create_time desc
</if>
</select>
</mapper>
backend/src/main/java/io/dataease/base/mapper/ext/ExtPanelStoreMapper.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
base
.
mapper
.
ext
;
import
io.dataease.base.mapper.ext.query.GridExample
;
import
io.dataease.dto.panel.PanelStoreDto
;
import
java.util.List
;
public
interface
ExtPanelStoreMapper
{
List
<
PanelStoreDto
>
query
(
GridExample
example
);
}
backend/src/main/java/io/dataease/base/mapper/ext/ExtPanelStoreMapper.xml
0 → 100644
浏览文件 @
5781da13
<?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.ext.ExtPanelStoreMapper"
>
<resultMap
id=
"panelStoreMap"
type=
"io.dataease.dto.panel.PanelStoreDto"
>
<id
column=
"store_id"
property=
"storeId"
></id>
<result
column=
"name"
property=
"name"
></result>
</resultMap>
<select
id=
"query"
parameterType=
"io.dataease.base.mapper.ext.query.GridExample"
resultMap=
"panelStoreMap"
>
select s.store_id, g.name
from panel_store s
left join panel_group g on g.id = s.panel_group_id
<if
test=
"_parameter != null"
>
<include
refid=
"io.dataease.base.mapper.ext.query.GridSql.gridCondition"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
<if
test=
"orderByClause == null"
>
order by s.create_time desc
</if>
</select>
</mapper>
backend/src/main/java/io/dataease/controller/panel/api/ShareApi.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
controller
.
panel
.
api
;
import
io.dataease.controller.request.panel.PanelShareRequest
;
import
io.dataease.controller.sys.base.BaseGridRequest
;
import
io.dataease.dto.panel.PanelShareDto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
java.util.List
;
/**
* 分享API
*/
@Api
(
tags
=
"仪表板:分享管理"
)
@RequestMapping
(
"/api/share"
)
public
interface
ShareApi
{
@ApiOperation
(
"创建分享"
)
@PostMapping
(
"/"
)
void
share
(
PanelShareRequest
request
);
@ApiOperation
(
"查询分享"
)
@PostMapping
(
"/treeList"
)
List
<
PanelShareDto
>
treeList
(
BaseGridRequest
request
);
}
backend/src/main/java/io/dataease/controller/panel/api/StoreApi.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
controller
.
panel
.
api
;
import
io.dataease.controller.sys.base.BaseGridRequest
;
import
io.dataease.dto.panel.PanelStoreDto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
java.util.List
;
/**
* 收藏API
*/
@Api
(
tags
=
"仪表板:收藏管理"
)
@RequestMapping
(
"/api/store"
)
public
interface
StoreApi
{
@ApiOperation
(
"创建收藏"
)
@PostMapping
(
"/{id}"
)
void
store
(
@PathVariable
(
"id"
)
String
id
);
@ApiOperation
(
"查询收藏"
)
@PostMapping
(
"/list"
)
List
<
PanelStoreDto
>
list
(
@RequestBody
BaseGridRequest
request
);
@ApiOperation
(
"移除收藏"
)
@PostMapping
(
"/remove/{storeId}"
)
void
remove
(
@PathVariable
(
"storeId"
)
Long
storeId
);
}
backend/src/main/java/io/dataease/controller/panel/server/ShareServer.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
controller
.
panel
.
server
;
import
io.dataease.controller.panel.api.ShareApi
;
import
io.dataease.controller.request.panel.PanelShareRequest
;
import
io.dataease.controller.sys.base.BaseGridRequest
;
import
io.dataease.dto.panel.PanelShareDto
;
import
io.dataease.service.panel.ShareService
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
public
class
ShareServer
implements
ShareApi
{
@Resource
private
ShareService
shareService
;
@Override
public
void
share
(
@RequestBody
PanelShareRequest
request
)
{
shareService
.
save
(
request
);
}
@Override
public
List
<
PanelShareDto
>
treeList
(
@RequestBody
BaseGridRequest
request
)
{
return
shareService
.
queryTree
(
request
);
}
}
backend/src/main/java/io/dataease/controller/panel/server/StoreServer.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
controller
.
panel
.
server
;
import
io.dataease.controller.panel.api.StoreApi
;
import
io.dataease.controller.sys.base.BaseGridRequest
;
import
io.dataease.dto.panel.PanelStoreDto
;
import
io.dataease.service.panel.StoreService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
@RestController
public
class
StoreServer
implements
StoreApi
{
@Autowired
private
StoreService
storeService
;
@Override
public
void
store
(
String
id
)
{
storeService
.
save
(
id
);
}
@Override
public
List
<
PanelStoreDto
>
list
(
BaseGridRequest
request
)
{
return
storeService
.
query
(
request
);
}
@Override
public
void
remove
(
Long
storeId
)
{
storeService
.
remove
(
storeId
);
}
}
backend/src/main/java/io/dataease/controller/request/panel/PanelShareRequest.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
controller
.
request
.
panel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
public
class
PanelShareRequest
implements
Serializable
{
@ApiModelProperty
(
"分享目标用户集合"
)
private
List
<
Long
>
userIds
;
@ApiModelProperty
(
"分享仪表板集合"
)
private
List
<
String
>
panelIds
;
}
backend/src/main/java/io/dataease/dto/panel/PanelShareDto.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
dto
.
panel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.util.List
;
@Data
@Builder
public
class
PanelShareDto
{
@ApiModelProperty
(
"节点ID"
)
private
String
id
;
@ApiModelProperty
(
"名称"
)
private
String
name
;
@ApiModelProperty
(
"节点父ID"
)
private
String
creator
;
@ApiModelProperty
(
"子节点"
)
private
List
<
PanelShareDto
>
children
;
}
backend/src/main/java/io/dataease/dto/panel/PanelStoreDto.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
dto
.
panel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
PanelStoreDto
{
@ApiModelProperty
(
"收藏ID"
)
private
Long
storeId
;
@ApiModelProperty
(
"仪表板名称"
)
private
String
name
;
}
backend/src/main/java/io/dataease/service/panel/ShareService.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
service
.
panel
;
import
io.dataease.base.domain.PanelShare
;
import
io.dataease.base.domain.PanelShareExample
;
import
io.dataease.base.mapper.PanelShareMapper
;
import
io.dataease.base.mapper.ext.ExtPanelShareMapper
;
import
io.dataease.base.mapper.ext.query.GridExample
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.CommonBeanFactory
;
import
io.dataease.controller.request.panel.PanelShareRequest
;
import
io.dataease.controller.sys.base.BaseGridRequest
;
import
io.dataease.controller.sys.base.ConditionEntity
;
import
io.dataease.dto.panel.PanelShareDto
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Service
public
class
ShareService
{
@Autowired
(
required
=
false
)
private
PanelShareMapper
mapper
;
@Resource
private
ExtPanelShareMapper
extPanelShareMapper
;
@Transactional
public
void
save
(
PanelShareRequest
request
){
//1.先根据仪表板删除所有已经分享的
List
<
String
>
panelIds
=
request
.
getPanelIds
();
List
<
Long
>
userIds
=
request
.
getUserIds
();
// 使用原生对象会导致事物失效 所以这里需要使用spring代理对象
if
(
CollectionUtils
.
isNotEmpty
(
panelIds
)){
ShareService
proxy
=
CommonBeanFactory
.
getBean
(
ShareService
.
class
);
panelIds
.
forEach
(
proxy:
:
delete
);
}
if
(
CollectionUtils
.
isEmpty
(
userIds
))
return
;
long
now
=
System
.
currentTimeMillis
();
List
<
PanelShare
>
shares
=
panelIds
.
stream
().
flatMap
(
panelId
->
userIds
.
stream
().
map
(
userId
->
{
PanelShare
share
=
new
PanelShare
();
share
.
setCreateTime
(
now
);
share
.
setPanelGroupId
(
panelId
);
share
.
setUserId
(
userId
);
return
share
;
})
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
shares
)){
extPanelShareMapper
.
batchInsert
(
shares
);
}
}
/**
* panel_group_id建了索引 效率不会很差
* @param panel_group_id
*/
@Transactional
public
void
delete
(
String
panel_group_id
){
PanelShareExample
example
=
new
PanelShareExample
();
example
.
createCriteria
().
andPanelGroupIdEqualTo
(
panel_group_id
);
mapper
.
deleteByExample
(
example
);
}
public
List
<
PanelShareDto
>
queryTree
(
BaseGridRequest
request
){
Long
userId
=
AuthUtils
.
getUser
().
getUserId
();
ConditionEntity
condition
=
new
ConditionEntity
();
condition
.
setField
(
"s.user_id"
);
condition
.
setOperator
(
"eq"
);
condition
.
setValue
(
userId
);
request
.
setConditions
(
new
ArrayList
<
ConditionEntity
>(){{
add
(
condition
);}});
GridExample
example
=
request
.
convertExample
();
List
<
PanelShareDto
>
datas
=
extPanelShareMapper
.
query
(
example
);
return
convertTree
(
datas
);
}
//List构建Tree
private
List
<
PanelShareDto
>
convertTree
(
List
<
PanelShareDto
>
datas
){
Map
<
String
,
List
<
PanelShareDto
>>
map
=
datas
.
stream
().
collect
(
Collectors
.
groupingBy
(
PanelShareDto:
:
getCreator
));
List
<
PanelShareDto
>
roots
=
new
ArrayList
<>();
return
map
.
entrySet
().
stream
().
map
(
entry
->
PanelShareDto
.
builder
().
name
(
entry
.
getKey
()).
children
(
entry
.
getValue
()).
build
()).
collect
(
Collectors
.
toList
());
}
}
backend/src/main/java/io/dataease/service/panel/StoreService.java
0 → 100644
浏览文件 @
5781da13
package
io
.
dataease
.
service
.
panel
;
import
io.dataease.base.domain.PanelStore
;
import
io.dataease.base.mapper.PanelStoreMapper
;
import
io.dataease.base.mapper.ext.ExtPanelStoreMapper
;
import
io.dataease.base.mapper.ext.query.GridExample
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.controller.sys.base.BaseGridRequest
;
import
io.dataease.controller.sys.base.ConditionEntity
;
import
io.dataease.dto.panel.PanelStoreDto
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
public
class
StoreService
{
@Resource
private
PanelStoreMapper
panelStoreMapper
;
@Resource
private
ExtPanelStoreMapper
extPanelStoreMapper
;
public
void
save
(
String
panelGroupId
){
Long
userId
=
AuthUtils
.
getUser
().
getUserId
();
PanelStore
panelStore
=
new
PanelStore
();
panelStore
.
setCreateTime
(
System
.
currentTimeMillis
());
panelStore
.
setPanelGroupId
(
panelGroupId
);
panelStore
.
setUserId
(
userId
);
panelStoreMapper
.
insert
(
panelStore
);
}
public
void
remove
(
Long
storeId
){
panelStoreMapper
.
deleteByPrimaryKey
(
storeId
);
}
/**
* 按照当前用户ID查询收藏仪表板
* @param request
* @return
*/
public
List
<
PanelStoreDto
>
query
(
BaseGridRequest
request
){
Long
userId
=
AuthUtils
.
getUser
().
getUserId
();
ConditionEntity
condition
=
new
ConditionEntity
();
condition
.
setField
(
"s.user_id"
);
condition
.
setOperator
(
"eq"
);
condition
.
setValue
(
userId
);
request
.
setConditions
(
new
ArrayList
<
ConditionEntity
>(){{
add
(
condition
);}});
GridExample
example
=
request
.
convertExample
();
List
<
PanelStoreDto
>
stores
=
extPanelStoreMapper
.
query
(
example
);
return
stores
;
}
}
backend/src/main/resources/db/migration/V12__panel_table.sql
浏览文件 @
5781da13
...
...
@@ -53,3 +53,46 @@ BEGIN
RETURN
oTemp
;
END
$$
DELIMITER
;
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for panel_store
-- ----------------------------
DROP
TABLE
IF
EXISTS
`panel_store`
;
CREATE
TABLE
`panel_store`
(
`store_id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'ID'
,
`panel_group_id`
varchar
(
50
)
NOT
NULL
COMMENT
'仪表板ID'
,
`user_id`
bigint
(
20
)
NOT
NULL
COMMENT
'用户ID'
,
`create_time`
bigint
(
13
)
DEFAULT
NULL
COMMENT
'创建日期'
,
PRIMARY
KEY
(
`store_id`
)
USING
BTREE
,
UNIQUE
KEY
`UK_store_user_id`
(
`user_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
7
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
COMPACT
COMMENT
=
'仪表板收藏'
;
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for panel_share
-- ----------------------------
DROP
TABLE
IF
EXISTS
`panel_share`
;
CREATE
TABLE
`panel_share`
(
`share_id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'分享ID'
,
`panel_group_id`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'仪表板ID'
,
`user_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'用户ID'
,
`create_time`
bigint
(
13
)
DEFAULT
NULL
COMMENT
'创建日期'
,
PRIMARY
KEY
(
`share_id`
)
USING
BTREE
,
UNIQUE
KEY
`UK_share_user_id`
(
`user_id`
)
USING
BTREE
,
UNIQUE
KEY
`UK_share_panel_group_id`
(
`panel_group_id`
)
USING
BTREE
,
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
7
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
COMPACT
COMMENT
=
'仪表板分享'
;
SET
FOREIGN_KEY_CHECKS
=
1
;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论