Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
1c4927b3
提交
1c4927b3
编写于
12月 14, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mosher 部署微服务接口 [后台服务,接口示例]
上级
bbcf51fd
变更
12
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
255 行增加
和
15 行删除
+255
-15
config.xml
config.xml
+5
-0
IBIZTASKTEAM.java
...main/java/cn/ibizlab/core/sample/domain/IBIZTASKTEAM.java
+30
-0
h2_table.xml
demo-core/src/main/resources/liquibase/h2_table.xml
+10
-6
view.xml
demo-core/src/main/resources/liquibase/view.xml
+2
-2
IBIZTASKTEAMMapper.xml
...sources/mapper/sample/ibiztaskteam/IBIZTASKTEAMMapper.xml
+3
-3
systemResource.json
demo-core/src/main/resources/permission/systemResource.json
+2
-2
DemoSys.json
demo-core/src/main/resources/sysmodel/DemoSys.json
+28
-0
Dockerfile
...provider/demo-provider-demoapi/src/main/docker/Dockerfile
+1
-1
demo-provider-demoapi.yaml
...ovider-demoapi/src/main/docker/demo-provider-demoapi.yaml
+16
-1
IBIZTASKDTO.java
...api/src/main/java/cn/ibizlab/demoapi/dto/IBIZTASKDTO.java
+7
-0
IBIZTASKTEAMDTO.java
...src/main/java/cn/ibizlab/demoapi/dto/IBIZTASKTEAMDTO.java
+34
-0
IBIZTASKResource.java
...c/main/java/cn/ibizlab/demoapi/rest/IBIZTASKResource.java
+117
-0
未找到文件。
config.xml
浏览文件 @
1c4927b3
...
...
@@ -37,6 +37,11 @@
git clone -b master $para2 demosys/
export NODE_OPTIONS=--max-old-space-size=4096
cd demosys/
mvn clean package -Pdemoapi
cd demo-provider/demo-provider-demoapi
mvn -Pdemoapi docker:build
mvn -Pdemoapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/demo-provider-demoapi.yaml iBizDemo --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
demo-core/src/main/java/cn/ibizlab/core/sample/domain/IBIZTASKTEAM.java
浏览文件 @
1c4927b3
...
...
@@ -99,6 +99,20 @@ public class IBIZTASKTEAM extends EntityMP implements Serializable {
@JSONField
(
name
=
"root"
)
@JsonProperty
(
"root"
)
private
String
root
;
/**
* 用户
*/
@TableField
(
value
=
"account"
)
@JSONField
(
name
=
"account"
)
@JsonProperty
(
"account"
)
private
String
account
;
/**
* 角色
*/
@TableField
(
value
=
"role"
)
@JSONField
(
name
=
"role"
)
@JsonProperty
(
"role"
)
private
String
role
;
/**
*
...
...
@@ -126,6 +140,22 @@ public class IBIZTASKTEAM extends EntityMP implements Serializable {
this
.
modify
(
"root"
,
root
);
}
/**
* 设置 [用户]
*/
public
void
setAccount
(
String
account
)
{
this
.
account
=
account
;
this
.
modify
(
"account"
,
account
);
}
/**
* 设置 [角色]
*/
public
void
setRole
(
String
role
)
{
this
.
role
=
role
;
this
.
modify
(
"role"
,
role
);
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
...
...
demo-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
1c4927b3
...
...
@@ -172,7 +172,7 @@
<!--输出实体[IBIZBOOK]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-10
52
-7"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-10
80
-7"
>
<createTable
tableName=
"T_IBIZBOOK"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
...
...
@@ -344,7 +344,7 @@
<!--输出实体[IBIZORDER]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizorder-58
0
-14"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizorder-58
2
-14"
>
<createTable
tableName=
"T_IBIZORDER"
>
<column
name=
"TP"
remarks=
""
type=
"TEXT(1048576)"
>
</column>
...
...
@@ -644,7 +644,7 @@
<!--输出实体[IBIZSAMPLE0003]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizsample0003-3
5
-21"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizsample0003-3
9
-21"
>
<createTable
tableName=
"T_IBIZSAMPLE0003"
>
<column
name=
"IBIZSAMPLE0003NAME"
remarks=
""
type=
"VARCHAR(200)"
>
</column>
...
...
@@ -1262,7 +1262,7 @@
<!--输出实体[IBIZTASK]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibiztask-6-43"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibiztask-
2
6-43"
>
<createTable
tableName=
"T_IBIZTASK"
>
<column
name=
"IBIZTASKID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_IBIZTASK_IBIZTASKID"
/>
...
...
@@ -1284,7 +1284,7 @@
<!--输出实体[IBIZTASKTEAM]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibiztaskteam-
8
-44"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibiztaskteam-
33
-44"
>
<createTable
tableName=
"T_IBIZTASKTEAM"
>
<column
name=
"UPDATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
...
...
@@ -1301,6 +1301,10 @@
</column>
<column
name=
"ROOT"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
<column
name=
"ACCOUNT"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
<column
name=
"ROLE"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
</createTable>
</changeSet>
...
...
@@ -1503,7 +1507,7 @@
<!--输出实体[IBIZSUPPLIER]外键关系 -->
<!--输出实体[IBIZTASK]外键关系 -->
<!--输出实体[IBIZTASKTEAM]外键关系 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"fk-ibiztaskteam-
8
-51"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"fk-ibiztaskteam-
33
-51"
>
<addForeignKeyConstraint
baseColumnNames=
"ROOT"
baseTableName=
"T_IBIZTASKTEAM"
constraintName=
"DER1N_IBIZTASKTEAM_IBIZTASK_RO"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"IBIZTASKID"
referencedTableName=
"T_IBIZTASK"
validate=
"true"
/>
</changeSet>
<!--输出实体[IBIZUNIPRODUCT]外键关系 -->
...
...
demo-core/src/main/resources/liquibase/view.xml
浏览文件 @
1c4927b3
...
...
@@ -37,7 +37,7 @@
</createView>
</changeSet>
<!--输出实体[IBIZORDER]视图结构信息 runOnChange="true" 当视图发生变更时,通过liquibase强刷prod的视图,实现视图的同步-->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"view-ibizorder-58
0
-8"
runOnChange=
"true"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"view-ibizorder-58
2
-8"
runOnChange=
"true"
>
<createView
fullDefinition=
"false"
replaceIfExists=
"true"
viewName=
"V_IBIZORDER"
>
<![CDATA[ SELECT t1.[AMOUNT], t1.[CREATEDATE], t1.[CREATEMAN], t1.[DETAILNUM], t1.[IBIZCUSTOMERID], t11.[IBIZCUSTOMERNAME], t1.[IBIZORDERID], t1.[IBIZORDERNAME], t1.[MEMO], t1.[ORDERSTATE], t1.[ORDERTIME], t1.[ORDERTYPE], t1.[ORDERUID], t1.[UPDATEDATE], t1.[UPDATEMAN], t1.[WFINSTANCEID], t1.[WFSTATE], t1.[WFSTEP] FROM [T_IBIZORDER] t1 LEFT JOIN T_IBIZCUSTOMER t11 ON t1.IBIZCUSTOMERID = t11.IBIZCUSTOMERID ]]>
</createView>
...
...
@@ -79,7 +79,7 @@
</createView>
</changeSet>
<!--输出实体[IBIZSAMPLE0003]视图结构信息 runOnChange="true" 当视图发生变更时,通过liquibase强刷prod的视图,实现视图的同步-->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"view-ibizsample0003-3
5
-15"
runOnChange=
"true"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"view-ibizsample0003-3
9
-15"
runOnChange=
"true"
>
<createView
fullDefinition=
"false"
replaceIfExists=
"true"
viewName=
"V_IBIZSAMPLE0003"
>
<![CDATA[ SELECT t1.[CREATEDATE], t1.[CREATEMAN], t1.[FIELD01], t1.[IBIZSAMPLE0003ID], t1.[IBIZSAMPLE0003NAME], t1.[MEMO], t1.[PIBIZSAMPLE0003ID], t11.[IBIZSAMPLE0003NAME] AS [PIBIZSAMPLE0003NAME], t1.[UPDATEDATE], t1.[UPDATEMAN] FROM [T_IBIZSAMPLE0003] t1 LEFT JOIN T_IBIZSAMPLE0003 t11 ON t1.PIBIZSAMPLE0003ID = t11.IBIZSAMPLE0003ID ]]>
</createView>
...
...
demo-core/src/main/resources/mapper/sample/ibiztaskteam/IBIZTASKTEAMMapper.xml
浏览文件 @
1c4927b3
...
...
@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"IBIZTASKTEAMResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`
CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZTASKTEAMID`, t1.`IBIZTASKTEAMNAM
E`, t1.`ROOT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZTASKTEAM` t1 ) t1 where ibiztaskteamid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`
ACCOUNT`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZTASKTEAMID`, t1.`IBIZTASKTEAMNAME`, t1.`ROL
E`, t1.`ROOT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZTASKTEAM` t1 ) t1 where ibiztaskteamid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
...
...
@@ -37,12 +37,12 @@
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`
CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZTASKTEAMID`, t1.`IBIZTASKTEAMNAM
E`, t1.`ROOT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZTASKTEAM` t1
<![CDATA[ SELECT t1.`
ACCOUNT`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZTASKTEAMID`, t1.`IBIZTASKTEAMNAME`, t1.`ROL
E`, t1.`ROOT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZTASKTEAM` t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`
CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZTASKTEAMID`, t1.`IBIZTASKTEAMNAM
E`, t1.`ROOT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZTASKTEAM` t1
<![CDATA[ SELECT t1.`
ACCOUNT`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZTASKTEAMID`, t1.`IBIZTASKTEAMNAME`, t1.`ROL
E`, t1.`ROOT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZTASKTEAM` t1
]]>
</sql>
</mapper>
...
...
demo-core/src/main/resources/permission/systemResource.json
浏览文件 @
1c4927b3
...
...
@@ -341,7 +341,7 @@
"delogicname"
:
"任务"
,
"sysmoudle"
:{
"id"
:
"SAMPLE"
,
"name"
:
"示例"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"数据集"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"
Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft
"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"
CreateTemp"
,
"name"
:
"CreateTemp"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CreateTempMajor"
,
"name"
:
"CreateTempMajor"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UpdateTemp"
,
"name"
:
"UpdateTemp"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UpdateTempMajor"
,
"name"
:
"UpdateTempMajor"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"RemoveTemp"
,
"name"
:
"RemoveTemp"
,
"type"
:
"BUILTIN"
},{
"id"
:
"RemoveTempMajor"
,
"name"
:
"RemoveTempMajor"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetTemp"
,
"name"
:
"GetTemp"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetTempMajor"
,
"name"
:
"GetTempMajor"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraftTemp"
,
"name"
:
"GetDraftTemp"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraftTempMajor"
,
"name"
:
"GetDraftTempMajor
"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"createman"
,
"name"
:
"创建人"
}]
}
,
{
...
...
@@ -349,7 +349,7 @@
"delogicname"
:
"任务团队"
,
"sysmoudle"
:{
"id"
:
"SAMPLE"
,
"name"
:
"示例"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"数据集"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"
Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft
"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"
CreateTemp"
,
"name"
:
"CreateTemp"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CreateTempMajor"
,
"name"
:
"CreateTempMajor"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UpdateTemp"
,
"name"
:
"UpdateTemp"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UpdateTempMajor"
,
"name"
:
"UpdateTempMajor"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"RemoveTemp"
,
"name"
:
"RemoveTemp"
,
"type"
:
"BUILTIN"
},{
"id"
:
"RemoveTempMajor"
,
"name"
:
"RemoveTempMajor"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetTemp"
,
"name"
:
"GetTemp"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetTempMajor"
,
"name"
:
"GetTempMajor"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraftTemp"
,
"name"
:
"GetDraftTemp"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraftTempMajor"
,
"name"
:
"GetDraftTempMajor
"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"createman"
,
"name"
:
"创建人"
}]
}
,
{
...
...
demo-core/src/main/resources/sysmodel/DemoSys.json
浏览文件 @
1c4927b3
...
...
@@ -8814,6 +8814,34 @@
"key_field"
:
0
,
"show_order"
:
1000
,
"major_field"
:
0
},
{
"fieldname"
:
"ACCOUNT"
,
"codename"
:
"Account"
,
"field_logic_name"
:
"用户"
,
"entity_name"
:
"IBIZTASKTEAM"
,
"field_type"
:
"TEXT"
,
"nullable"
:
1
,
"physical_field"
:
1
,
"data_type"
:
"VARCHAR"
,
"data_length"
:
100
,
"key_field"
:
0
,
"show_order"
:
1000
,
"major_field"
:
0
},
{
"fieldname"
:
"ROLE"
,
"codename"
:
"Role"
,
"field_logic_name"
:
"角色"
,
"entity_name"
:
"IBIZTASKTEAM"
,
"field_type"
:
"TEXT"
,
"nullable"
:
1
,
"physical_field"
:
1
,
"data_type"
:
"VARCHAR"
,
"data_length"
:
100
,
"key_field"
:
0
,
"show_order"
:
1000
,
"major_field"
:
0
}
],
"subEntitys"
:[
...
...
demo-provider/demo-provider-demoapi/src/main/docker/Dockerfile
浏览文件 @
1c4927b3
...
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /demo-provider-demoapi.jar
EXPOSE
8081
EXPOSE
51000
ADD
demo-provider-demoapi.jar /demo-provider-demoapi.jar
demo-provider/demo-provider-demoapi/src/main/docker/demo-provider-demoapi.yaml
浏览文件 @
1c4927b3
...
...
@@ -3,9 +3,24 @@ services:
demo-provider-demoapi
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/demo-provider-demoapi:latest
ports
:
-
"
8081:8081
"
-
"
51000:51000
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
-
SERVER_PORT=51000
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
-
SPRING_REDIS_HOST=172.16.240.110
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_LAB01_df847bdfd
-
SPRING_DATASOURCE_PASSWORD=3d6@460A
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_df847bdfd?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_df847bdfd
-
NACOS=172.16.240.110:8848
-
SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
-
SEATA_ENABLED=true
deploy
:
resources
:
limits
:
...
...
demo-provider/demo-provider-demoapi/src/main/java/cn/ibizlab/demoapi/dto/IBIZTASKDTO.java
浏览文件 @
1c4927b3
...
...
@@ -110,6 +110,13 @@ public class IBIZTASKDTO extends DTOBase implements Serializable {
}
/**
* [IBIZTASKTEAM]
*/
@JsonProperty
(
"ibiztaskteams"
)
@JSONField
(
name
=
"ibiztaskteams"
)
private
List
<
IBIZTASKTEAMDTO
>
ibiztaskteam
;
}
demo-provider/demo-provider-demoapi/src/main/java/cn/ibizlab/demoapi/dto/IBIZTASKTEAMDTO.java
浏览文件 @
1c4927b3
...
...
@@ -92,6 +92,24 @@ public class IBIZTASKTEAMDTO extends DTOBase implements Serializable {
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
private
String
root
;
/**
* 属性 [ACCOUNT]
*
*/
@JSONField
(
name
=
"account"
)
@JsonProperty
(
"account"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
private
String
account
;
/**
* 属性 [ROLE]
*
*/
@JSONField
(
name
=
"role"
)
@JsonProperty
(
"role"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
private
String
role
;
/**
* 设置 [IBIZTASKTEAMNAME]
...
...
@@ -109,6 +127,22 @@ public class IBIZTASKTEAMDTO extends DTOBase implements Serializable {
this
.
modify
(
"root"
,
root
);
}
/**
* 设置 [ACCOUNT]
*/
public
void
setAccount
(
String
account
){
this
.
account
=
account
;
this
.
modify
(
"account"
,
account
);
}
/**
* 设置 [ROLE]
*/
public
void
setRole
(
String
role
){
this
.
role
=
role
;
this
.
modify
(
"role"
,
role
);
}
}
...
...
demo-provider/demo-provider-demoapi/src/main/java/cn/ibizlab/demoapi/rest/IBIZTASKResource.java
浏览文件 @
1c4927b3
...
...
@@ -33,6 +33,9 @@ import cn.ibizlab.core.sample.domain.IBIZTASK;
import
cn.ibizlab.core.sample.service.IIBIZTASKService
;
import
cn.ibizlab.core.sample.filter.IBIZTASKSearchContext
;
import
cn.ibizlab.util.annotation.VersionCheck
;
import
cn.ibizlab.core.sample.filter.IBIZTASKTEAMSearchContext
;
import
cn.ibizlab.core.sample.domain.IBIZTASKTEAM
;
import
cn.ibizlab.core.sample.service.IIBIZTASKTEAMService
;
@Slf4j
@Api
(
tags
=
{
"任务"
})
...
...
@@ -47,6 +50,120 @@ public class IBIZTASKResource {
@Lazy
public
IBIZTASKMapping
ibiztaskMapping
;
@Autowired
private
IIBIZTASKTEAMService
ibiztaskteamService
;
@PreAuthorize
(
"hasPermission(this.ibiztaskMapping.toDomain(#ibiztaskdto),'DemoSys-IBIZTASK-Create')"
)
@ApiOperation
(
value
=
"新建任务"
,
tags
=
{
"任务"
},
notes
=
"新建任务"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibiztasks"
)
public
ResponseEntity
<
IBIZTASKDTO
>
create
(
@Validated
@RequestBody
IBIZTASKDTO
ibiztaskdto
)
{
IBIZTASK
domain
=
ibiztaskMapping
.
toDomain
(
ibiztaskdto
);
ibiztaskService
.
create
(
domain
);
IBIZTASKDTO
dto
=
ibiztaskMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.ibiztaskMapping.toDomain(#ibiztaskdtos),'DemoSys-IBIZTASK-Create')"
)
@ApiOperation
(
value
=
"批量新建任务"
,
tags
=
{
"任务"
},
notes
=
"批量新建任务"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibiztasks/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
IBIZTASKDTO
>
ibiztaskdtos
)
{
ibiztaskService
.
createBatch
(
ibiztaskMapping
.
toDomain
(
ibiztaskdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@VersionCheck
(
entity
=
"ibiztask"
,
versionfield
=
"updatedate"
)
@PreAuthorize
(
"hasPermission(this.ibiztaskService.get(#ibiztask_id),'DemoSys-IBIZTASK-Update')"
)
@ApiOperation
(
value
=
"更新任务"
,
tags
=
{
"任务"
},
notes
=
"更新任务"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibiztasks/{ibiztask_id}"
)
public
ResponseEntity
<
IBIZTASKDTO
>
update
(
@PathVariable
(
"ibiztask_id"
)
String
ibiztask_id
,
@RequestBody
IBIZTASKDTO
ibiztaskdto
)
{
IBIZTASK
domain
=
ibiztaskMapping
.
toDomain
(
ibiztaskdto
);
domain
.
setIbiztaskid
(
ibiztask_id
);
ibiztaskService
.
update
(
domain
);
IBIZTASKDTO
dto
=
ibiztaskMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.ibiztaskService.getIbiztaskByEntities(this.ibiztaskMapping.toDomain(#ibiztaskdtos)),'DemoSys-IBIZTASK-Update')"
)
@ApiOperation
(
value
=
"批量更新任务"
,
tags
=
{
"任务"
},
notes
=
"批量更新任务"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibiztasks/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
IBIZTASKDTO
>
ibiztaskdtos
)
{
ibiztaskService
.
updateBatch
(
ibiztaskMapping
.
toDomain
(
ibiztaskdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.ibiztaskService.get(#ibiztask_id),'DemoSys-IBIZTASK-Remove')"
)
@ApiOperation
(
value
=
"删除任务"
,
tags
=
{
"任务"
},
notes
=
"删除任务"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibiztasks/{ibiztask_id}"
)
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"ibiztask_id"
)
String
ibiztask_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibiztaskService
.
remove
(
ibiztask_id
));
}
@PreAuthorize
(
"hasPermission(this.ibiztaskService.getIbiztaskByIds(#ids),'DemoSys-IBIZTASK-Remove')"
)
@ApiOperation
(
value
=
"批量删除任务"
,
tags
=
{
"任务"
},
notes
=
"批量删除任务"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibiztasks/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
ibiztaskService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.ibiztaskMapping.toDomain(returnObject.body),'DemoSys-IBIZTASK-Get')"
)
@ApiOperation
(
value
=
"获取任务"
,
tags
=
{
"任务"
},
notes
=
"获取任务"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibiztasks/{ibiztask_id}"
)
public
ResponseEntity
<
IBIZTASKDTO
>
get
(
@PathVariable
(
"ibiztask_id"
)
String
ibiztask_id
)
{
IBIZTASK
domain
=
ibiztaskService
.
get
(
ibiztask_id
);
IBIZTASKDTO
dto
=
ibiztaskMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取任务草稿"
,
tags
=
{
"任务"
},
notes
=
"获取任务草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibiztasks/getdraft"
)
public
ResponseEntity
<
IBIZTASKDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibiztaskMapping
.
toDto
(
ibiztaskService
.
getDraft
(
new
IBIZTASK
())));
}
@ApiOperation
(
value
=
"检查任务"
,
tags
=
{
"任务"
},
notes
=
"检查任务"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibiztasks/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
IBIZTASKDTO
ibiztaskdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibiztaskService
.
checkKey
(
ibiztaskMapping
.
toDomain
(
ibiztaskdto
)));
}
@PreAuthorize
(
"hasPermission(this.ibiztaskMapping.toDomain(#ibiztaskdto),'DemoSys-IBIZTASK-Save')"
)
@ApiOperation
(
value
=
"保存任务"
,
tags
=
{
"任务"
},
notes
=
"保存任务"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibiztasks/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
IBIZTASKDTO
ibiztaskdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibiztaskService
.
save
(
ibiztaskMapping
.
toDomain
(
ibiztaskdto
)));
}
@PreAuthorize
(
"hasPermission(this.ibiztaskMapping.toDomain(#ibiztaskdtos),'DemoSys-IBIZTASK-Save')"
)
@ApiOperation
(
value
=
"批量保存任务"
,
tags
=
{
"任务"
},
notes
=
"批量保存任务"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibiztasks/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
IBIZTASKDTO
>
ibiztaskdtos
)
{
ibiztaskService
.
saveBatch
(
ibiztaskMapping
.
toDomain
(
ibiztaskdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZTASK-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZTASK-Get')"
)
@ApiOperation
(
value
=
"获取数据集"
,
tags
=
{
"任务"
}
,
notes
=
"获取数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibiztasks/fetchdefault"
)
public
ResponseEntity
<
List
<
IBIZTASKDTO
>>
fetchDefault
(
IBIZTASKSearchContext
context
)
{
Page
<
IBIZTASK
>
domains
=
ibiztaskService
.
searchDefault
(
context
)
;
List
<
IBIZTASKDTO
>
list
=
ibiztaskMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZTASK-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZTASK-Get')"
)
@ApiOperation
(
value
=
"查询数据集"
,
tags
=
{
"任务"
}
,
notes
=
"查询数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibiztasks/searchdefault"
)
public
ResponseEntity
<
Page
<
IBIZTASKDTO
>>
searchDefault
(
@RequestBody
IBIZTASKSearchContext
context
)
{
Page
<
IBIZTASK
>
domains
=
ibiztaskService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibiztaskMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录