Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
workflow-core
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄夏豪
workflow-core
Commits
c6e65a2b
提交
c6e65a2b
authored
3月 11, 2021
作者:
黄夏豪
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[工作流模块] 为UserService增加了默认实现
上级
92367aee
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
132 行增加
和
215 行删除
+132
-215
WorkflowCoreApplication.java
...n/java/com/tykj/workflowcore/WorkflowCoreApplication.java
+0
-1
WorkflowCoreRunner.java
src/main/java/com/tykj/workflowcore/WorkflowCoreRunner.java
+0
-2
WebMvcConfig.java
src/main/java/com/tykj/workflowcore/config/WebMvcConfig.java
+1
-1
PageEntityController.java
...core/workflow_editer/controller/PageEntityController.java
+0
-42
UserController.java
...rkflowcore/workflow_editer/controller/UserController.java
+0
-57
PageEntityService.java
...rkflowcore/workflow_editer/service/PageEntityService.java
+0
-32
DefaultUserServiceImpl.java
.../workflow_editer/service/impl/DefaultUserServiceImpl.java
+66
-0
PageEntityServiceImpl.java
...e/workflow_editer/service/impl/PageEntityServiceImpl.java
+0
-48
WorkFlowServiceImpl.java
...ore/workflow_editer/service/impl/WorkFlowServiceImpl.java
+31
-23
UserServiceBeanUtil.java
...orkflowcore/workflow_editer/util/UserServiceBeanUtil.java
+30
-0
application.yml
src/main/resources/application.yml
+4
-9
没有找到文件。
src/main/java/com/tykj/workflowcore/WorkflowCoreApplication.java
浏览文件 @
c6e65a2b
...
@@ -2,7 +2,6 @@ package com.tykj.workflowcore;
...
@@ -2,7 +2,6 @@ package com.tykj.workflowcore;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
/**
/**
* 测试时的启动类
* 测试时的启动类
...
...
src/main/java/com/tykj/workflowcore/WorkflowCoreRunner.java
浏览文件 @
c6e65a2b
package
com
.
tykj
.
workflowcore
;
package
com
.
tykj
.
workflowcore
;
import
com.tykj.workflowcore.api.service.ApiService
;
import
com.tykj.workflowcore.model_layer.service.ModelService
;
import
com.tykj.workflowcore.model_layer.service.ModelService
;
import
liquibase.pro.packaged.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
...
...
src/main/java/com/tykj/workflowcore/WebMvcConfig.java
→
src/main/java/com/tykj/workflowcore/
config/
WebMvcConfig.java
浏览文件 @
c6e65a2b
package
com
.
tykj
.
workflowcore
;
package
com
.
tykj
.
workflowcore
.
config
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
...
...
src/main/java/com/tykj/workflowcore/workflow_editer/controller/PageEntityController.java
deleted
100644 → 0
浏览文件 @
92367aee
//package com.tykj.workflowcore.workflow_editer.controller;
//
//import com.tykj.workflowcore.model_layer.model.TableInfo;
//import com.tykj.workflowcore.workflow_editer.entity.PageEntity;
//import com.tykj.workflowcore.workflow_editer.service.PageEntityService;
//import io.swagger.annotations.Api;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
///**
// * ClassName: PageEntityController
// * Package: com.tykj.controller
// * Description:
// * Datetime: 2021/3/4 9:50
// *
// * @Author: zsp
// */
//@RestController
//@RequestMapping("/pageEntity")
//@Api("页面跟实体的管理")
//
//public class PageEntityController {
//
// @Autowired
// private PageEntityService pageEntityService;
//
// @PostMapping("/savePageEntity")
// public void savePageEntity(@RequestBody PageEntity pageEntity){
// pageEntityService.savePageEntity(pageEntity);
// }
//
// @PostMapping("/findByPages")
// public List<TableInfo> findByPages(List<Integer> pageIds){
//
// return pageEntityService.findByPageIds(pageIds);
// }
//}
src/main/java/com/tykj/workflowcore/workflow_editer/controller/UserController.java
deleted
100644 → 0
浏览文件 @
92367aee
package
com
.
tykj
.
workflowcore
.
workflow_editer
.
controller
;
import
com.tykj.workflowcore.base.result.ResultUtil
;
import
com.tykj.workflowcore.workflow_editer.entity.WorkFlowRole
;
import
com.tykj.workflowcore.workflow_editer.entity.WorkFlowRoleType
;
import
com.tykj.workflowcore.workflow_editer.entity.WorkFlowUser
;
import
com.tykj.workflowcore.workflow_editer.service.UserService
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* @author HuangXiahao
* @version V1.0
* @class UserController
* @packageName com.tykj.workflowcore.workflow_editer.controller
**/
@RestController
()
@RequestMapping
(
"/workflow/user"
)
@Api
(
"页面管理接口"
)
public
class
UserController
{
@Autowired
(
required
=
false
)
UserService
userService
;
@PostMapping
(
"/getCurrentUser"
)
public
ResponseEntity
getCurrentUser
(){
WorkFlowUser
currentUser
=
userService
.
getCurrentUser
();
return
ResultUtil
.
success
(
currentUser
,
"查询成功"
);
}
@PostMapping
(
"/getAllUser"
)
public
ResponseEntity
getAllUser
(){
List
<
WorkFlowUser
>
allUser
=
userService
.
getAllUser
();
return
ResultUtil
.
success
(
allUser
,
"查询成功"
);
}
@PostMapping
(
"/getAllRole"
)
public
ResponseEntity
getAllRole
(
String
roleType
){
List
<
WorkFlowRole
>
allRole
=
userService
.
getAllRole
(
roleType
);
return
ResultUtil
.
success
(
allRole
,
"查询成功"
);
}
@PostMapping
(
"/getRoleType"
)
public
ResponseEntity
getRoleType
(){
List
<
WorkFlowRoleType
>
roleType
=
userService
.
getRoleType
();
return
ResultUtil
.
success
(
roleType
,
"查询成功"
);
}
}
src/main/java/com/tykj/workflowcore/workflow_editer/service/PageEntityService.java
deleted
100644 → 0
浏览文件 @
92367aee
//package com.tykj.workflowcore.workflow_editer.service;
//
//import com.tykj.workflowcore.model_layer.model.TableInfo;
//import com.tykj.workflowcore.workflow_editer.entity.PageEntity;
//
//import java.util.List;
//
///**
// * ClassName: PageEntityService
// * Package: com.tykj.service
// * Description:
// * Datetime: 2021/3/4 9:52
// *
// * @Author: zsp
// */
//public interface PageEntityService {
//
// /**
// * 保存
// * @param pageEntity 页面实体之间关系
// */
// void savePageEntity(PageEntity pageEntity);
//
// /**
// * 根据页面id查询tableInfo
// * @param pageIds 页面id
// * @return
// */
// List<TableInfo> findByPageIds(List<Integer> pageIds);
//
//
//}
src/main/java/com/tykj/workflowcore/workflow_editer/service/impl/DefaultUserServiceImpl.java
0 → 100644
浏览文件 @
c6e65a2b
package
com
.
tykj
.
workflowcore
.
workflow_editer
.
service
.
impl
;
import
com.tykj.workflowcore.workflow_editer.entity.WorkFlowRole
;
import
com.tykj.workflowcore.workflow_editer.entity.WorkFlowRoleType
;
import
com.tykj.workflowcore.workflow_editer.entity.WorkFlowUser
;
import
com.tykj.workflowcore.workflow_editer.service.UserService
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author HuangXiahao
* @version V1.0
* @class DefaultUserSerbiveImpl
* @packageName com.tykj.workflowcore.workflow_editer.service.impl
**/
@Service
@Order
public
class
DefaultUserServiceImpl
implements
UserService
{
@Override
public
WorkFlowUser
getCurrentUser
()
{
WorkFlowUser
workFlowUser
=
new
WorkFlowUser
();
workFlowUser
.
setId
(
1L
);
workFlowUser
.
setUserName
(
"张三"
);
return
workFlowUser
;
}
@Override
public
List
<
WorkFlowUser
>
getAllUser
()
{
List
<
WorkFlowUser
>
workFlowUsers
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
WorkFlowUser
workFlowUser
=
new
WorkFlowUser
();
workFlowUser
.
setUserName
(
"张1"
);
workFlowUser
.
setId
((
long
)
i
);
workFlowUsers
.
add
(
workFlowUser
);
}
return
workFlowUsers
;
}
@Override
public
List
<
WorkFlowRole
>
getAllRole
(
String
roleType
)
{
List
<
WorkFlowRole
>
workFlowUsers
=
new
ArrayList
<>();
if
(
roleType
.
equals
(
"department"
)){
workFlowUsers
.
add
(
new
WorkFlowRole
(
"开发部"
,
"department"
,
"1"
));
workFlowUsers
.
add
(
new
WorkFlowRole
(
"运营部"
,
"department"
,
"2"
));
workFlowUsers
.
add
(
new
WorkFlowRole
(
"测试部"
,
"department"
,
"3"
));
}
else
{
workFlowUsers
.
add
(
new
WorkFlowRole
(
"管理员"
,
"role"
,
"1"
));
workFlowUsers
.
add
(
new
WorkFlowRole
(
"普通用户"
,
"role"
,
"2"
));
workFlowUsers
.
add
(
new
WorkFlowRole
(
"运维人员"
,
"role"
,
"3"
));
}
return
workFlowUsers
;
}
@Override
public
List
<
WorkFlowRoleType
>
getRoleType
()
{
List
<
WorkFlowRoleType
>
workFlowRoleTypes
=
new
ArrayList
<>();
workFlowRoleTypes
.
add
(
new
WorkFlowRoleType
(
"部门"
,
"department"
));
workFlowRoleTypes
.
add
(
new
WorkFlowRoleType
(
"角色"
,
"role"
));
return
workFlowRoleTypes
;
}
}
src/main/java/com/tykj/workflowcore/workflow_editer/service/impl/PageEntityServiceImpl.java
deleted
100644 → 0
浏览文件 @
92367aee
//package com.tykj.workflowcore.workflow_editer.service.impl;
//
//import com.github.wenhao.jpa.PredicateBuilder;
//import com.github.wenhao.jpa.Specifications;
//import com.tykj.workflowcore.model_layer.dao.TableInfoDao;
//import com.tykj.workflowcore.model_layer.model.TableInfo;
//import com.tykj.workflowcore.workflow_editer.entity.PageEntity;
//import com.tykj.workflowcore.workflow_editer.mapper.PageEntityMapper;
//import com.tykj.workflowcore.workflow_editer.service.PageEntityService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * ClassName: PageEntityServiceImpl
// * Package: com.tykj.service.impl
// * Description:
// * Datetime: 2021/3/4 9:55
// *
// * @Author: zsp
// */
//@Service
//public class PageEntityServiceImpl implements PageEntityService {
//
// @Autowired
// private PageEntityMapper pageEntityMapper;
// @Autowired
// private TableInfoDao tableInfoDao;
// @Override
// public void savePageEntity(PageEntity pageEntity) {
// pageEntityMapper.save(pageEntity);
// }
//
// @Override
// public List<TableInfo> findByPageIds(List<Integer> pageIds) {
// ArrayList<TableInfo> list = new ArrayList<>();
// for (Integer pageId : pageIds) {
// String entityId = pageEntityMapper.findByPageId(pageId).getEntityId();
// //根据entityId查询出表
// PredicateBuilder<TableInfo> builder = Specifications.and();
// builder.eq("id",entityId);
// List<TableInfo> tableInfoList = tableInfoDao.findAll(builder.build());
// list.addAll(tableInfoList);
// }
// return list;
// }
//}
src/main/java/com/tykj/workflowcore/workflow_editer/service/impl/WorkFlowServiceImpl.java
浏览文件 @
c6e65a2b
...
@@ -3,12 +3,14 @@ package com.tykj.workflowcore.workflow_editer.service.impl;
...
@@ -3,12 +3,14 @@ package com.tykj.workflowcore.workflow_editer.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.tykj.workflowcore.api.entity.InvokeRequest
;
import
com.tykj.workflowcore.api.entity.InvokeRequest
;
import
com.tykj.workflowcore.api.entity.Parameter
;
import
com.tykj.workflowcore.api.entity.Parameter
;
import
com.tykj.workflowcore.api.service.SpringBeanService
;
import
com.tykj.workflowcore.workflow_editer.entity.*
;
import
com.tykj.workflowcore.workflow_editer.entity.*
;
import
com.tykj.workflowcore.workflow_editer.mapper.FlowsInfoMapper
;
import
com.tykj.workflowcore.workflow_editer.mapper.FlowsInfoMapper
;
import
com.tykj.workflowcore.workflow_editer.service.NodeInfoService
;
import
com.tykj.workflowcore.workflow_editer.service.NodeInfoService
;
import
com.tykj.workflowcore.workflow_editer.service.UserService
;
import
com.tykj.workflowcore.workflow_editer.service.UserService
;
import
com.tykj.workflowcore.workflow_editer.service.VariableStorageService
;
import
com.tykj.workflowcore.workflow_editer.service.VariableStorageService
;
import
com.tykj.workflowcore.workflow_editer.service.WorkFlowService
;
import
com.tykj.workflowcore.workflow_editer.service.WorkFlowService
;
import
com.tykj.workflowcore.workflow_editer.util.UserServiceBeanUtil
;
import
com.tykj.workflowcore.workflow_editer.vo.*
;
import
com.tykj.workflowcore.workflow_editer.vo.*
;
import
org.dom4j.Attribute
;
import
org.dom4j.Attribute
;
import
org.dom4j.Document
;
import
org.dom4j.Document
;
...
@@ -30,6 +32,7 @@ import org.flowable.task.api.TaskQuery;
...
@@ -30,6 +32,7 @@ import org.flowable.task.api.TaskQuery;
import
org.flowable.task.api.history.HistoricTaskInstance
;
import
org.flowable.task.api.history.HistoricTaskInstance
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -51,30 +54,35 @@ import java.util.*;
...
@@ -51,30 +54,35 @@ import java.util.*;
@Service
@Service
public
class
WorkFlowServiceImpl
implements
WorkFlowService
{
public
class
WorkFlowServiceImpl
implements
WorkFlowService
{
@Autowired
private
final
RepositoryService
repositoryService
;
private
RepositoryService
repositoryService
;
private
final
RuntimeService
runtimeService
;
@Autowired
private
final
TaskService
taskService
;
private
RuntimeService
runtimeService
;
private
final
FlowsInfoMapper
flowsInfoMapper
;
@Autowired
private
TaskService
taskService
;
private
final
UserService
userService
;
@Autowired
private
final
HistoryService
historyService
;
private
FlowsInfoMapper
flowsInfoMapper
;
private
final
ProcessEngineConfigurationImpl
processEngineConfiguration
;
@Autowired
private
final
ProcessEngine
processEngine
;
private
UserService
userService
;
@Autowired
private
final
VariableStorageService
variableStorageService
;
private
HistoryService
historyService
;
@Autowired
final
private
NodeInfoService
nodeInfoService
;
@Autowired
ProcessEngineConfigurationImpl
processEngineConfiguration
;
@Autowired
private
ProcessEngine
processEngine
;
@Autowired
private
VariableStorageService
variableStorageService
;
@Autowired
ClassLoader
classLoader
;
ClassLoader
classLoader
;
public
WorkFlowServiceImpl
(
SpringBeanService
springBeanService
,
HistoryService
historyService
,
RepositoryService
repositoryService
,
RuntimeService
runtimeService
,
TaskService
taskService
,
FlowsInfoMapper
flowsInfoMapper
,
ProcessEngineConfigurationImpl
processEngineConfiguration
,
ProcessEngine
processEngine
,
VariableStorageService
variableStorageService
,
ClassLoader
classLoader
)
{
this
.
historyService
=
historyService
;
this
.
repositoryService
=
repositoryService
;
this
.
runtimeService
=
runtimeService
;
this
.
taskService
=
taskService
;
this
.
flowsInfoMapper
=
flowsInfoMapper
;
this
.
userService
=
UserServiceBeanUtil
.
getUserService
(
springBeanService
);
this
.
processEngineConfiguration
=
processEngineConfiguration
;
this
.
processEngine
=
processEngine
;
this
.
variableStorageService
=
variableStorageService
;
this
.
classLoader
=
classLoader
;
System
.
out
.
println
(
userService
!=
null
?
"成功"
:
"失败"
);
}
@Override
@Override
public
String
saveXml
(
@RequestParam
(
"file"
)
MultipartFile
file
)
{
public
String
saveXml
(
@RequestParam
(
"file"
)
MultipartFile
file
)
{
...
...
src/main/java/com/tykj/workflowcore/workflow_editer/util/UserServiceBeanUtil.java
0 → 100644
浏览文件 @
c6e65a2b
package
com
.
tykj
.
workflowcore
.
workflow_editer
.
util
;
import
com.tykj.workflowcore.api.service.SpringBeanService
;
import
com.tykj.workflowcore.workflow_editer.service.UserService
;
import
java.util.Map
;
import
java.util.Set
;
/**
* @author HuangXiahao
* @version V1.0
* @class UserServiceBeanUtil
* @packageName com.tykj.workflowcore.workflow_editer.util
**/
public
class
UserServiceBeanUtil
{
public
static
UserService
getUserService
(
SpringBeanService
springBeanService
)
{
Map
<
String
,
UserService
>
beansOfType
=
springBeanService
.
getApplicationContext
().
getBeansOfType
(
UserService
.
class
);
Set
<
String
>
strings
=
beansOfType
.
keySet
();
if
(
strings
.
size
()>
1
){
for
(
String
key
:
strings
)
{
if
(!
key
.
equals
(
"defaultUserServiceImpl"
)){
return
beansOfType
.
get
(
key
);
}
}
}
return
beansOfType
.
get
(
"defaultUserServiceImpl"
);
}
}
src/main/resources/application.yml
浏览文件 @
c6e65a2b
spring
:
spring
:
datasource
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
druid
:
username
:
root
username
:
root
password
:
123456
password
:
Huang123+
url
:
jdbc:mysql://localhost:3306/model_layer?serverTimezone=UTC&characterEncoding=UTF-8&useUnicode
=true
url
:
jdbc:mysql://47.106.142.73:3306/www?useSSL=false&serverTimezone=UTC&characterEncoding=utf-8&nullCatalogMeansCurrent
=true
driver-class-name
:
com.mysql.cj.jdbc.Driver
jpa
:
jpa
:
show-sql
:
true
hibernate
:
hibernate
:
ddl-auto
:
update
ddl-auto
:
update
naming
:
implicit-strategy
:
org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl
physical-strategy
:
org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
show-sql
:
true
server
:
server
:
port
:
8900
port
:
8900
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论