提交 7cb6b9fb 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 abafc21a
## v7.0.0-alpha.7 [2020-5-28]
### Bug修复
修复门户部件flex布局
修复表格选择框列样式出现省略号
修复批删除传递参数调整
修复表单上界面行为参数传递bug
修复分页导航、编辑类视图标题
修复界面行为多主键分隔符由";"改为","
修复导航类视图宽度格式
修复图表排序
修复关系界面逻辑
修复401跳登录页清除user和token
### 功能新增及优化
#### 模板
列表,数据视图默认排序
面板项支持偏移
应用支持自定义默认端口
门户部件图标和容器样式
表格列头图片和头部样式
表格操作列图标
表格编辑项值规则
增加树选择双击事件
增加图表分组属性计数统计(srfcount)
增加雷达图支持
#### 基础文件
修复分页导航、编辑类视图标题
修复界面行为多主键分隔符由";"改为","
修复关系界面逻辑
修复401跳登录页清除user和token
## v7.0.0-alpha.6 [2020-5-23]
### Bug修复
......
.context-menu-container {
// width: 100vw;
// height: 100vh;
// z-index: -10000;
// position: absolute;
// top: 0;
// left: 0;
line-height: 1;
// width: 100vw;
// height: 100vh;
// z-index: -10000;
// position: absolute;
// top: 0;
// left: 0;
// line-height: 1;
z-index: 10001;
.context-menu-content {
z-index: 10001;
position: absolute;
background: #FFF;
// border: 1px solid #e3e3e3;
}
.context-menu-content {
position: absolute;
background: #FFF;
// border: 1px solid #e3e3e3;
.ivu-divider{
width: 100%;
}
.context-menus {
}
.context-menus-item {
list-style: none;
line-height: 36px;
padding: 0 13px;
margin: 0;
font-size: 14px;
color: #606266;
cursor: pointer;
outline: none;
display: flex;
.icon {
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
width: 20px;
margin-right: 8px;
}
}
.context-menus-item:hover {
background-color: #ecf5ff;
color: #66b1ff;
}
}
.context-menus {
.context-menus-item {
list-style: none;
line-height: 36px;
padding: 0 13px;
margin: 0;
font-size: 14px;
color: #606266;
cursor: pointer;
outline: none;
display: flex;
.icon {
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
width: 20px;
margin-right: 8px;
}
}
.context-menus-item:hover {
background-color: #ecf5ff;
color: #66b1ff;
}
}
}
.context-menu {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
\ No newline at end of file
......@@ -207,7 +207,7 @@
}
}
.view-container.degridview, .view-container.degridview9, .view-container.dewfgridview{
.view-container.degridview, .view-container.degridview9, .view-container.dewfgridview, .view-container.delistview, .view-container.delistview9, .view-container.dedataview, .view-container.dedataview9{
>.view-card.view-no-caption{
>.ivu-card-body{
height: 100%;
......
......@@ -125,6 +125,13 @@ export class Interceptors {
* @memberof Interceptors
*/
private doNoLogin(data: any = {}): void {
// 清除user和token
if(localStorage.getItem('user')){
localStorage.removeItem('user');
}
if(localStorage.getItem('token')){
localStorage.removeItem('token');
}
if (data.loginurl && !Object.is(data.loginurl, '') && data.originurl && !Object.is(data.originurl, '')) {
let _url = encodeURIComponent(encodeURIComponent(window.location.href));
let loginurl: string = data.loginurl;
......
......@@ -2,11 +2,11 @@
FROM openjdk:8-jre-alpine
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
IBZ_SLEEP=0 \
IBIZ_SLEEP=0 \
JAVA_OPTS=""
CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-app-web.jar
EXPOSE 8080
......
......@@ -101,7 +101,10 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
"/**/fonts/**",
"/**/js/**",
"/**/img/**",
"/"
"/",
"webjars/**",
"/swagger-resources/**",
"/v2/**"
).permitAll()
//放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
......
package cn.ibizlab.core.util.config;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.StringUtils;
/**
* xxl-job config
* 分布式任务调度平台XXL-JOB配置加载
* @author xuxueli 2017-04-28
*/
@Configuration
public class XxlJobConfig {
private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
@Value("${xxl.job.admin.addresses:}")
private String adminAddresses;
@Value("${xxl.job.accessToken:}")
private String accessToken;
@Value("${xxl.job.executor.appname:ibzwf}")
private String appName;
@Value("${xxl.job.executor.ip:127.0.0.1}")
private String ip;
@Value("${xxl.job.executor.port:9999}")
private int port;
@Value("${xxl.job.executor.logpath:/app/joblog}")
private String logPath;
@Value("${xxl.job.executor.logretentiondays:-1}")
private int logRetentionDays;
@Bean(initMethod = "start", destroyMethod = "destroy")
public XxlJobSpringExecutor xxlJobExecutor() {
if(!StringUtils.isEmpty(adminAddresses)){
logger.info(">>>>>>>>>>> xxl-job config init.");
logger.info(">>>>>>>>>>> adminAddresses:"+adminAddresses);
logger.info(">>>>>>>>>>> appName:"+appName);
logger.info(">>>>>>>>>>> ip:"+ip);
logger.info(">>>>>>>>>>> port:"+port);
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
xxlJobSpringExecutor.setAppName(appName);
xxlJobSpringExecutor.setIp(ip);
xxlJobSpringExecutor.setPort(port);
xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setLogPath(logPath);
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
return xxlJobSpringExecutor;
}
logger.info(">>>>>>>>>>> xxl-job config not init.");
return null;
}
/**
* 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
*
* 1、引入依赖:
* <dependency>
* <groupId>org.springframework.cloud</groupId>
* <artifactId>spring-cloud-commons</artifactId>
* <version>${version}"</version>
* </dependency>
*
* 2、配置文件,或者容器启动变量
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
*
* 3、获取IP
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
*/
}
......@@ -29,7 +29,6 @@ import cn.ibizlab.util.domain.EntityMP;
/**
* 实体[角色/用户组]
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
......
......@@ -29,7 +29,6 @@ import cn.ibizlab.util.domain.EntityMP;
/**
* 实体[成员]
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
......
......@@ -29,7 +29,6 @@ import cn.ibizlab.util.domain.EntityMP;
/**
* 实体[流程定义]
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
......
......@@ -29,7 +29,6 @@ import cn.ibizlab.util.domain.EntityMP;
/**
* 实体[系统]
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
......
......@@ -29,7 +29,6 @@ import cn.ibizlab.util.domain.EntityMP;
/**
* 实体[用户]
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
......
......@@ -74,6 +74,9 @@
<!--httpClient -->
<openfeign-httpclient.version>11.0</openfeign-httpclient.version>
<!--xxl-job定时服务 -->
<xxl-job.version>2.1.0</xxl-job.version>
</properties>
<dependencyManagement>
......@@ -249,6 +252,12 @@
<version>${openfeign-httpclient.version}</version>
</dependency>
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>${xxl-job.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
......@@ -308,6 +317,12 @@
<artifactId>h2</artifactId>
</dependency>
<!--xxl-job定时服务 -->
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
</dependency>
<!-- Error -->
<!-- Security -->
......
......@@ -2,11 +2,11 @@
FROM openjdk:8-jre-alpine
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
IBZ_SLEEP=0 \
IBIZ_SLEEP=0 \
JAVA_OPTS=""
CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-provider-api.jar
EXPOSE 8081
......
......@@ -106,7 +106,10 @@ public class apiSecurityConfig extends WebSecurityConfigurerAdapter {
"/**/fonts/**",
"/**/js/**",
"/**/img/**",
"/"
"/",
"webjars/**",
"/swagger-resources/**",
"/v2/**"
).permitAll()
//放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
......
......@@ -34,7 +34,7 @@ import cn.ibizlab.core.workflow.service.IWFGroupService;
import cn.ibizlab.core.workflow.filter.WFGroupSearchContext;
@Slf4j
@Api(tags = {"WFGroup" })
@Api(tags = {"角色/用户组" })
@RestController("api-wfgroup")
@RequestMapping("")
public class WFGroupResource {
......@@ -47,14 +47,14 @@ public class WFGroupResource {
public WFGroupMapping wfgroupMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Save-all')")
@ApiOperation(value = "Save", tags = {"WFGroup" }, notes = "Save")
@ApiOperation(value = "保存角色/用户组", tags = {"角色/用户组" }, notes = "保存角色/用户组")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/save")
public ResponseEntity<Boolean> save(@RequestBody WFGroupDTO wfgroupdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.save(wfgroupMapping.toDomain(wfgroupdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"WFGroup" }, notes = "SaveBatch")
@ApiOperation(value = "批量保存角色/用户组", tags = {"角色/用户组" }, notes = "批量保存角色/用户组")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
wfgroupService.saveBatch(wfgroupMapping.toDomain(wfgroupdtos));
......@@ -62,7 +62,7 @@ public class WFGroupResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Update-all')")
@ApiOperation(value = "Update", tags = {"WFGroup" }, notes = "Update")
@ApiOperation(value = "更新角色/用户组", tags = {"角色/用户组" }, notes = "更新角色/用户组")
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/{wfgroup_id}")
@Transactional
public ResponseEntity<WFGroupDTO> update(@PathVariable("wfgroup_id") String wfgroup_id, @RequestBody WFGroupDTO wfgroupdto) {
......@@ -74,27 +74,27 @@ public class WFGroupResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFGroup" }, notes = "UpdateBatch")
@ApiOperation(value = "批量更新角色/用户组", tags = {"角色/用户组" }, notes = "批量更新角色/用户组")
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
wfgroupService.updateBatch(wfgroupMapping.toDomain(wfgroupdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "GetDraft", tags = {"WFGroup" }, notes = "GetDraft")
@ApiOperation(value = "获取角色/用户组草稿", tags = {"角色/用户组" }, notes = "获取角色/用户组草稿")
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/getdraft")
public ResponseEntity<WFGroupDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(wfgroupMapping.toDto(wfgroupService.getDraft(new WFGroup())));
}
@ApiOperation(value = "CheckKey", tags = {"WFGroup" }, notes = "CheckKey")
@ApiOperation(value = "检查角色/用户组", tags = {"角色/用户组" }, notes = "检查角色/用户组")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody WFGroupDTO wfgroupdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.checkKey(wfgroupMapping.toDomain(wfgroupdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Create-all')")
@ApiOperation(value = "Create", tags = {"WFGroup" }, notes = "Create")
@ApiOperation(value = "新建角色/用户组", tags = {"角色/用户组" }, notes = "新建角色/用户组")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups")
@Transactional
public ResponseEntity<WFGroupDTO> create(@RequestBody WFGroupDTO wfgroupdto) {
......@@ -105,7 +105,7 @@ public class WFGroupResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFGroup" }, notes = "createBatch")
@ApiOperation(value = "批量新建角色/用户组", tags = {"角色/用户组" }, notes = "批量新建角色/用户组")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
wfgroupService.createBatch(wfgroupMapping.toDomain(wfgroupdtos));
......@@ -113,7 +113,7 @@ public class WFGroupResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFGroup" }, notes = "Remove")
@ApiOperation(value = "删除角色/用户组", tags = {"角色/用户组" }, notes = "删除角色/用户组")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/{wfgroup_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfgroup_id") String wfgroup_id) {
......@@ -121,7 +121,7 @@ public class WFGroupResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"WFGroup" }, notes = "RemoveBatch")
@ApiOperation(value = "批量删除角色/用户组", tags = {"角色/用户组" }, notes = "批量删除角色/用户组")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
wfgroupService.removeBatch(ids);
......@@ -129,7 +129,7 @@ public class WFGroupResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Get-all')")
@ApiOperation(value = "Get", tags = {"WFGroup" }, notes = "Get")
@ApiOperation(value = "获取角色/用户组", tags = {"角色/用户组" }, notes = "获取角色/用户组")
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/{wfgroup_id}")
public ResponseEntity<WFGroupDTO> get(@PathVariable("wfgroup_id") String wfgroup_id) {
WFGroup domain = wfgroupService.get(wfgroup_id);
......@@ -138,7 +138,7 @@ public class WFGroupResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFGroup" } ,notes = "fetchDEFAULT")
@ApiOperation(value = "获取DEFAULT", tags = {"角色/用户组" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfgroups/fetchdefault")
public ResponseEntity<List<WFGroupDTO>> fetchDefault(WFGroupSearchContext context) {
Page<WFGroup> domains = wfgroupService.searchDefault(context) ;
......@@ -151,7 +151,7 @@ public class WFGroupResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFGroup" } ,notes = "searchDEFAULT")
@ApiOperation(value = "查询DEFAULT", tags = {"角色/用户组" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/wfgroups/searchdefault")
public ResponseEntity<Page<WFGroupDTO>> searchDefault(@RequestBody WFGroupSearchContext context) {
Page<WFGroup> domains = wfgroupService.searchDefault(context) ;
......
......@@ -34,7 +34,7 @@ import cn.ibizlab.core.workflow.service.IWFProcessDefinitionService;
import cn.ibizlab.core.workflow.filter.WFProcessDefinitionSearchContext;
@Slf4j
@Api(tags = {"WFProcessDefinition" })
@Api(tags = {"流程定义" })
@RestController("api-wfprocessdefinition")
@RequestMapping("")
public class WFProcessDefinitionResource {
......@@ -47,14 +47,14 @@ public class WFProcessDefinitionResource {
public WFProcessDefinitionMapping wfprocessdefinitionMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Save-all')")
@ApiOperation(value = "Save", tags = {"WFProcessDefinition" }, notes = "Save")
@ApiOperation(value = "保存流程定义", tags = {"流程定义" }, notes = "保存流程定义")
@RequestMapping(method = RequestMethod.POST, value = "/wfprocessdefinitions/save")
public ResponseEntity<Boolean> save(@RequestBody WFProcessDefinitionDTO wfprocessdefinitiondto) {
return ResponseEntity.status(HttpStatus.OK).body(wfprocessdefinitionService.save(wfprocessdefinitionMapping.toDomain(wfprocessdefinitiondto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"WFProcessDefinition" }, notes = "SaveBatch")
@ApiOperation(value = "批量保存流程定义", tags = {"流程定义" }, notes = "批量保存流程定义")
@RequestMapping(method = RequestMethod.POST, value = "/wfprocessdefinitions/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFProcessDefinitionDTO> wfprocessdefinitiondtos) {
wfprocessdefinitionService.saveBatch(wfprocessdefinitionMapping.toDomain(wfprocessdefinitiondtos));
......@@ -62,7 +62,7 @@ public class WFProcessDefinitionResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Update-all')")
@ApiOperation(value = "Update", tags = {"WFProcessDefinition" }, notes = "Update")
@ApiOperation(value = "更新流程定义", tags = {"流程定义" }, notes = "更新流程定义")
@RequestMapping(method = RequestMethod.PUT, value = "/wfprocessdefinitions/{wfprocessdefinition_id}")
@Transactional
public ResponseEntity<WFProcessDefinitionDTO> update(@PathVariable("wfprocessdefinition_id") String wfprocessdefinition_id, @RequestBody WFProcessDefinitionDTO wfprocessdefinitiondto) {
......@@ -74,7 +74,7 @@ public class WFProcessDefinitionResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFProcessDefinition" }, notes = "UpdateBatch")
@ApiOperation(value = "批量更新流程定义", tags = {"流程定义" }, notes = "批量更新流程定义")
@RequestMapping(method = RequestMethod.PUT, value = "/wfprocessdefinitions/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFProcessDefinitionDTO> wfprocessdefinitiondtos) {
wfprocessdefinitionService.updateBatch(wfprocessdefinitionMapping.toDomain(wfprocessdefinitiondtos));
......@@ -82,7 +82,7 @@ public class WFProcessDefinitionResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Get-all')")
@ApiOperation(value = "Get", tags = {"WFProcessDefinition" }, notes = "Get")
@ApiOperation(value = "获取流程定义", tags = {"流程定义" }, notes = "获取流程定义")
@RequestMapping(method = RequestMethod.GET, value = "/wfprocessdefinitions/{wfprocessdefinition_id}")
public ResponseEntity<WFProcessDefinitionDTO> get(@PathVariable("wfprocessdefinition_id") String wfprocessdefinition_id) {
WFProcessDefinition domain = wfprocessdefinitionService.get(wfprocessdefinition_id);
......@@ -90,20 +90,20 @@ public class WFProcessDefinitionResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "CheckKey", tags = {"WFProcessDefinition" }, notes = "CheckKey")
@ApiOperation(value = "检查流程定义", tags = {"流程定义" }, notes = "检查流程定义")
@RequestMapping(method = RequestMethod.POST, value = "/wfprocessdefinitions/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody WFProcessDefinitionDTO wfprocessdefinitiondto) {
return ResponseEntity.status(HttpStatus.OK).body(wfprocessdefinitionService.checkKey(wfprocessdefinitionMapping.toDomain(wfprocessdefinitiondto)));
}
@ApiOperation(value = "GetDraft", tags = {"WFProcessDefinition" }, notes = "GetDraft")
@ApiOperation(value = "获取流程定义草稿", tags = {"流程定义" }, notes = "获取流程定义草稿")
@RequestMapping(method = RequestMethod.GET, value = "/wfprocessdefinitions/getdraft")
public ResponseEntity<WFProcessDefinitionDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(wfprocessdefinitionMapping.toDto(wfprocessdefinitionService.getDraft(new WFProcessDefinition())));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Create-all')")
@ApiOperation(value = "Create", tags = {"WFProcessDefinition" }, notes = "Create")
@ApiOperation(value = "新建流程定义", tags = {"流程定义" }, notes = "新建流程定义")
@RequestMapping(method = RequestMethod.POST, value = "/wfprocessdefinitions")
@Transactional
public ResponseEntity<WFProcessDefinitionDTO> create(@RequestBody WFProcessDefinitionDTO wfprocessdefinitiondto) {
......@@ -114,7 +114,7 @@ public class WFProcessDefinitionResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFProcessDefinition" }, notes = "createBatch")
@ApiOperation(value = "批量新建流程定义", tags = {"流程定义" }, notes = "批量新建流程定义")
@RequestMapping(method = RequestMethod.POST, value = "/wfprocessdefinitions/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFProcessDefinitionDTO> wfprocessdefinitiondtos) {
wfprocessdefinitionService.createBatch(wfprocessdefinitionMapping.toDomain(wfprocessdefinitiondtos));
......@@ -122,7 +122,7 @@ public class WFProcessDefinitionResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFProcessDefinition" }, notes = "Remove")
@ApiOperation(value = "删除流程定义", tags = {"流程定义" }, notes = "删除流程定义")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfprocessdefinitions/{wfprocessdefinition_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfprocessdefinition_id") String wfprocessdefinition_id) {
......@@ -130,7 +130,7 @@ public class WFProcessDefinitionResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"WFProcessDefinition" }, notes = "RemoveBatch")
@ApiOperation(value = "批量删除流程定义", tags = {"流程定义" }, notes = "批量删除流程定义")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfprocessdefinitions/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
wfprocessdefinitionService.removeBatch(ids);
......@@ -138,7 +138,7 @@ public class WFProcessDefinitionResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFProcessDefinition" } ,notes = "fetchDEFAULT")
@ApiOperation(value = "获取DEFAULT", tags = {"流程定义" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfprocessdefinitions/fetchdefault")
public ResponseEntity<List<WFProcessDefinitionDTO>> fetchDefault(WFProcessDefinitionSearchContext context) {
Page<WFProcessDefinition> domains = wfprocessdefinitionService.searchDefault(context) ;
......@@ -151,7 +151,7 @@ public class WFProcessDefinitionResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFProcessDefinition" } ,notes = "searchDEFAULT")
@ApiOperation(value = "查询DEFAULT", tags = {"流程定义" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/wfprocessdefinitions/searchdefault")
public ResponseEntity<Page<WFProcessDefinitionDTO>> searchDefault(@RequestBody WFProcessDefinitionSearchContext context) {
Page<WFProcessDefinition> domains = wfprocessdefinitionService.searchDefault(context) ;
......
......@@ -34,7 +34,7 @@ import cn.ibizlab.core.workflow.service.IWFREModelService;
import cn.ibizlab.core.workflow.filter.WFREModelSearchContext;
@Slf4j
@Api(tags = {"WFREModel" })
@Api(tags = {"流程模型" })
@RestController("api-wfremodel")
@RequestMapping("")
public class WFREModelResource {
......@@ -46,7 +46,7 @@ public class WFREModelResource {
@Lazy
public WFREModelMapping wfremodelMapping;
@ApiOperation(value = "Update", tags = {"WFREModel" }, notes = "Update")
@ApiOperation(value = "更新流程模型", tags = {"流程模型" }, notes = "更新流程模型")
@RequestMapping(method = RequestMethod.PUT, value = "/wfremodels/{wfremodel_id}")
@Transactional
public ResponseEntity<WFREModelDTO> update(@PathVariable("wfremodel_id") String wfremodel_id, @RequestBody WFREModelDTO wfremodeldto) {
......@@ -57,27 +57,27 @@ public class WFREModelResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "UpdateBatch", tags = {"WFREModel" }, notes = "UpdateBatch")
@ApiOperation(value = "批量更新流程模型", tags = {"流程模型" }, notes = "批量更新流程模型")
@RequestMapping(method = RequestMethod.PUT, value = "/wfremodels/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFREModelDTO> wfremodeldtos) {
wfremodelService.updateBatch(wfremodelMapping.toDomain(wfremodeldtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "Save", tags = {"WFREModel" }, notes = "Save")
@ApiOperation(value = "保存流程模型", tags = {"流程模型" }, notes = "保存流程模型")
@RequestMapping(method = RequestMethod.POST, value = "/wfremodels/save")
public ResponseEntity<Boolean> save(@RequestBody WFREModelDTO wfremodeldto) {
return ResponseEntity.status(HttpStatus.OK).body(wfremodelService.save(wfremodelMapping.toDomain(wfremodeldto)));
}
@ApiOperation(value = "SaveBatch", tags = {"WFREModel" }, notes = "SaveBatch")
@ApiOperation(value = "批量保存流程模型", tags = {"流程模型" }, notes = "批量保存流程模型")
@RequestMapping(method = RequestMethod.POST, value = "/wfremodels/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFREModelDTO> wfremodeldtos) {
wfremodelService.saveBatch(wfremodelMapping.toDomain(wfremodeldtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "Get", tags = {"WFREModel" }, notes = "Get")
@ApiOperation(value = "获取流程模型", tags = {"流程模型" }, notes = "获取流程模型")
@RequestMapping(method = RequestMethod.GET, value = "/wfremodels/{wfremodel_id}")
public ResponseEntity<WFREModelDTO> get(@PathVariable("wfremodel_id") String wfremodel_id) {
WFREModel domain = wfremodelService.get(wfremodel_id);
......@@ -85,7 +85,7 @@ public class WFREModelResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "Create", tags = {"WFREModel" }, notes = "Create")
@ApiOperation(value = "新建流程模型", tags = {"流程模型" }, notes = "新建流程模型")
@RequestMapping(method = RequestMethod.POST, value = "/wfremodels")
@Transactional
public ResponseEntity<WFREModelDTO> create(@RequestBody WFREModelDTO wfremodeldto) {
......@@ -95,40 +95,40 @@ public class WFREModelResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "createBatch", tags = {"WFREModel" }, notes = "createBatch")
@ApiOperation(value = "批量新建流程模型", tags = {"流程模型" }, notes = "批量新建流程模型")
@RequestMapping(method = RequestMethod.POST, value = "/wfremodels/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFREModelDTO> wfremodeldtos) {
wfremodelService.createBatch(wfremodelMapping.toDomain(wfremodeldtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "CheckKey", tags = {"WFREModel" }, notes = "CheckKey")
@ApiOperation(value = "检查流程模型", tags = {"流程模型" }, notes = "检查流程模型")
@RequestMapping(method = RequestMethod.POST, value = "/wfremodels/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody WFREModelDTO wfremodeldto) {
return ResponseEntity.status(HttpStatus.OK).body(wfremodelService.checkKey(wfremodelMapping.toDomain(wfremodeldto)));
}
@ApiOperation(value = "Remove", tags = {"WFREModel" }, notes = "Remove")
@ApiOperation(value = "删除流程模型", tags = {"流程模型" }, notes = "删除流程模型")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfremodels/{wfremodel_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfremodel_id") String wfremodel_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfremodelService.remove(wfremodel_id));
}
@ApiOperation(value = "RemoveBatch", tags = {"WFREModel" }, notes = "RemoveBatch")
@ApiOperation(value = "批量删除流程模型", tags = {"流程模型" }, notes = "批量删除流程模型")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfremodels/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
wfremodelService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "GetDraft", tags = {"WFREModel" }, notes = "GetDraft")
@ApiOperation(value = "获取流程模型草稿", tags = {"流程模型" }, notes = "获取流程模型草稿")
@RequestMapping(method = RequestMethod.GET, value = "/wfremodels/getdraft")
public ResponseEntity<WFREModelDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(wfremodelMapping.toDto(wfremodelService.getDraft(new WFREModel())));
}
@ApiOperation(value = "fetchDEFAULT", tags = {"WFREModel" } ,notes = "fetchDEFAULT")
@ApiOperation(value = "获取DEFAULT", tags = {"流程模型" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfremodels/fetchdefault")
public ResponseEntity<List<WFREModelDTO>> fetchDefault(WFREModelSearchContext context) {
Page<WFREModel> domains = wfremodelService.searchDefault(context) ;
......@@ -140,7 +140,7 @@ public class WFREModelResource {
.body(list);
}
@ApiOperation(value = "searchDEFAULT", tags = {"WFREModel" } ,notes = "searchDEFAULT")
@ApiOperation(value = "查询DEFAULT", tags = {"流程模型" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/wfremodels/searchdefault")
public ResponseEntity<Page<WFREModelDTO>> searchDefault(@RequestBody WFREModelSearchContext context) {
Page<WFREModel> domains = wfremodelService.searchDefault(context) ;
......
......@@ -34,7 +34,7 @@ import cn.ibizlab.core.workflow.service.IWFSystemService;
import cn.ibizlab.core.workflow.filter.WFSystemSearchContext;
@Slf4j
@Api(tags = {"WFSystem" })
@Api(tags = {"系统" })
@RestController("api-wfsystem")
@RequestMapping("")
public class WFSystemResource {
......@@ -47,7 +47,7 @@ public class WFSystemResource {
public WFSystemMapping wfsystemMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFSystem" }, notes = "Remove")
@ApiOperation(value = "删除系统", tags = {"系统" }, notes = "删除系统")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfsystems/{wfsystem_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfsystem_id") String wfsystem_id) {
......@@ -55,7 +55,7 @@ public class WFSystemResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"WFSystem" }, notes = "RemoveBatch")
@ApiOperation(value = "批量删除系统", tags = {"系统" }, notes = "批量删除系统")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfsystems/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
wfsystemService.removeBatch(ids);
......@@ -63,7 +63,7 @@ public class WFSystemResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Update-all')")
@ApiOperation(value = "Update", tags = {"WFSystem" }, notes = "Update")
@ApiOperation(value = "更新系统", tags = {"系统" }, notes = "更新系统")
@RequestMapping(method = RequestMethod.PUT, value = "/wfsystems/{wfsystem_id}")
@Transactional
public ResponseEntity<WFSystemDTO> update(@PathVariable("wfsystem_id") String wfsystem_id, @RequestBody WFSystemDTO wfsystemdto) {
......@@ -75,28 +75,28 @@ public class WFSystemResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFSystem" }, notes = "UpdateBatch")
@ApiOperation(value = "批量更新系统", tags = {"系统" }, notes = "批量更新系统")
@RequestMapping(method = RequestMethod.PUT, value = "/wfsystems/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFSystemDTO> wfsystemdtos) {
wfsystemService.updateBatch(wfsystemMapping.toDomain(wfsystemdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "GetDraft", tags = {"WFSystem" }, notes = "GetDraft")
@ApiOperation(value = "获取系统草稿", tags = {"系统" }, notes = "获取系统草稿")
@RequestMapping(method = RequestMethod.GET, value = "/wfsystems/getdraft")
public ResponseEntity<WFSystemDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(wfsystemMapping.toDto(wfsystemService.getDraft(new WFSystem())));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Save-all')")
@ApiOperation(value = "Save", tags = {"WFSystem" }, notes = "Save")
@ApiOperation(value = "保存系统", tags = {"系统" }, notes = "保存系统")
@RequestMapping(method = RequestMethod.POST, value = "/wfsystems/save")
public ResponseEntity<Boolean> save(@RequestBody WFSystemDTO wfsystemdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfsystemService.save(wfsystemMapping.toDomain(wfsystemdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"WFSystem" }, notes = "SaveBatch")
@ApiOperation(value = "批量保存系统", tags = {"系统" }, notes = "批量保存系统")
@RequestMapping(method = RequestMethod.POST, value = "/wfsystems/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFSystemDTO> wfsystemdtos) {
wfsystemService.saveBatch(wfsystemMapping.toDomain(wfsystemdtos));
......@@ -104,7 +104,7 @@ public class WFSystemResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Create-all')")
@ApiOperation(value = "Create", tags = {"WFSystem" }, notes = "Create")
@ApiOperation(value = "新建系统", tags = {"系统" }, notes = "新建系统")
@RequestMapping(method = RequestMethod.POST, value = "/wfsystems")
@Transactional
public ResponseEntity<WFSystemDTO> create(@RequestBody WFSystemDTO wfsystemdto) {
......@@ -115,21 +115,21 @@ public class WFSystemResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFSystem" }, notes = "createBatch")
@ApiOperation(value = "批量新建系统", tags = {"系统" }, notes = "批量新建系统")
@RequestMapping(method = RequestMethod.POST, value = "/wfsystems/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFSystemDTO> wfsystemdtos) {
wfsystemService.createBatch(wfsystemMapping.toDomain(wfsystemdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "CheckKey", tags = {"WFSystem" }, notes = "CheckKey")
@ApiOperation(value = "检查系统", tags = {"系统" }, notes = "检查系统")
@RequestMapping(method = RequestMethod.POST, value = "/wfsystems/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody WFSystemDTO wfsystemdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfsystemService.checkKey(wfsystemMapping.toDomain(wfsystemdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Get-all')")
@ApiOperation(value = "Get", tags = {"WFSystem" }, notes = "Get")
@ApiOperation(value = "获取系统", tags = {"系统" }, notes = "获取系统")
@RequestMapping(method = RequestMethod.GET, value = "/wfsystems/{wfsystem_id}")
public ResponseEntity<WFSystemDTO> get(@PathVariable("wfsystem_id") String wfsystem_id) {
WFSystem domain = wfsystemService.get(wfsystem_id);
......@@ -138,7 +138,7 @@ public class WFSystemResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFSystem" } ,notes = "fetchDEFAULT")
@ApiOperation(value = "获取DEFAULT", tags = {"系统" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfsystems/fetchdefault")
public ResponseEntity<List<WFSystemDTO>> fetchDefault(WFSystemSearchContext context) {
Page<WFSystem> domains = wfsystemService.searchDefault(context) ;
......@@ -151,7 +151,7 @@ public class WFSystemResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFSystem" } ,notes = "searchDEFAULT")
@ApiOperation(value = "查询DEFAULT", tags = {"系统" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/wfsystems/searchdefault")
public ResponseEntity<Page<WFSystemDTO>> searchDefault(@RequestBody WFSystemSearchContext context) {
Page<WFSystem> domains = wfsystemService.searchDefault(context) ;
......
......@@ -34,7 +34,7 @@ import cn.ibizlab.core.workflow.service.IWFUserService;
import cn.ibizlab.core.workflow.filter.WFUserSearchContext;
@Slf4j
@Api(tags = {"WFUser" })
@Api(tags = {"用户" })
@RestController("api-wfuser")
@RequestMapping("")
public class WFUserResource {
......@@ -47,7 +47,7 @@ public class WFUserResource {
public WFUserMapping wfuserMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFUser" }, notes = "Remove")
@ApiOperation(value = "删除用户", tags = {"用户" }, notes = "删除用户")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{wfuser_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfuser_id") String wfuser_id) {
......@@ -55,28 +55,28 @@ public class WFUserResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"WFUser" }, notes = "RemoveBatch")
@ApiOperation(value = "批量删除用户", tags = {"用户" }, notes = "批量删除用户")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
wfuserService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "GetDraft", tags = {"WFUser" }, notes = "GetDraft")
@ApiOperation(value = "获取用户草稿", tags = {"用户" }, notes = "获取用户草稿")
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/getdraft")
public ResponseEntity<WFUserDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(wfuserMapping.toDto(wfuserService.getDraft(new WFUser())));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Save-all')")
@ApiOperation(value = "Save", tags = {"WFUser" }, notes = "Save")
@ApiOperation(value = "保存用户", tags = {"用户" }, notes = "保存用户")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/save")
public ResponseEntity<Boolean> save(@RequestBody WFUserDTO wfuserdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfuserService.save(wfuserMapping.toDomain(wfuserdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"WFUser" }, notes = "SaveBatch")
@ApiOperation(value = "批量保存用户", tags = {"用户" }, notes = "批量保存用户")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
wfuserService.saveBatch(wfuserMapping.toDomain(wfuserdtos));
......@@ -84,7 +84,7 @@ public class WFUserResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Update-all')")
@ApiOperation(value = "Update", tags = {"WFUser" }, notes = "Update")
@ApiOperation(value = "更新用户", tags = {"用户" }, notes = "更新用户")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/{wfuser_id}")
@Transactional
public ResponseEntity<WFUserDTO> update(@PathVariable("wfuser_id") String wfuser_id, @RequestBody WFUserDTO wfuserdto) {
......@@ -96,7 +96,7 @@ public class WFUserResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFUser" }, notes = "UpdateBatch")
@ApiOperation(value = "批量更新用户", tags = {"用户" }, notes = "批量更新用户")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
wfuserService.updateBatch(wfuserMapping.toDomain(wfuserdtos));
......@@ -104,7 +104,7 @@ public class WFUserResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Get-all')")
@ApiOperation(value = "Get", tags = {"WFUser" }, notes = "Get")
@ApiOperation(value = "获取用户", tags = {"用户" }, notes = "获取用户")
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/{wfuser_id}")
public ResponseEntity<WFUserDTO> get(@PathVariable("wfuser_id") String wfuser_id) {
WFUser domain = wfuserService.get(wfuser_id);
......@@ -113,7 +113,7 @@ public class WFUserResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Create-all')")
@ApiOperation(value = "Create", tags = {"WFUser" }, notes = "Create")
@ApiOperation(value = "新建用户", tags = {"用户" }, notes = "新建用户")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers")
@Transactional
public ResponseEntity<WFUserDTO> create(@RequestBody WFUserDTO wfuserdto) {
......@@ -124,21 +124,21 @@ public class WFUserResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFUser" }, notes = "createBatch")
@ApiOperation(value = "批量新建用户", tags = {"用户" }, notes = "批量新建用户")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
wfuserService.createBatch(wfuserMapping.toDomain(wfuserdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "CheckKey", tags = {"WFUser" }, notes = "CheckKey")
@ApiOperation(value = "检查用户", tags = {"用户" }, notes = "检查用户")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody WFUserDTO wfuserdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfuserService.checkKey(wfuserMapping.toDomain(wfuserdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFUser" } ,notes = "fetchDEFAULT")
@ApiOperation(value = "获取DEFAULT", tags = {"用户" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfusers/fetchdefault")
public ResponseEntity<List<WFUserDTO>> fetchDefault(WFUserSearchContext context) {
Page<WFUser> domains = wfuserService.searchDefault(context) ;
......@@ -151,7 +151,7 @@ public class WFUserResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFUser" } ,notes = "searchDEFAULT")
@ApiOperation(value = "查询DEFAULT", tags = {"用户" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/wfusers/searchdefault")
public ResponseEntity<Page<WFUserDTO>> searchDefault(@RequestBody WFUserSearchContext context) {
Page<WFUser> domains = wfuserService.searchDefault(context) ;
......
package cn.ibizlab.util.domain;
import cn.ibizlab.util.helper.DataObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.*;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.sql.Timestamp;
@TableName(value = "IBZCFG")
@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class IBZConfig {
/**
* 配置标识
* 系统+配置类型+引用对象+用户标识联合主键
*/
@TableId
private String cfgId;
/**
* 系统标识
*/
private String systemId;
/**
* 配置类型
* 门户配置/表格自定义配置/自定义查询...消费方自定义
*/
private String cfgType;
/**
* 引用对象
* 门户页标识/具体表格视图标识...消费方具体使用位置的标识
*/
private String targetType;
/**
* 用户标识
* 默认当前登录者
*/
private String userId;
/**
* 配置
* JSONObject
*/
private String cfg;
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(format="yyyy-MM-dd HH:mm:ss")
private Timestamp updateDate;
public String getCfgId()
{
if(StringUtils.isEmpty(cfgId)&&
(!(StringUtils.isEmpty(systemId)))&&
(!(StringUtils.isEmpty(cfgType)))&&
(!(StringUtils.isEmpty(targetType)))&&
(!(StringUtils.isEmpty(userId))))
{
cfgId= DigestUtils.md5DigestAsHex((systemId+"||"+cfgType+"||"+targetType+"||"+userId).getBytes());
}
return cfgId;
}
}
package cn.ibizlab.util.mapper;
import cn.ibizlab.util.domain.IBZConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface IBZConfigMapper extends BaseMapper<IBZConfig>{
}
\ No newline at end of file
package cn.ibizlab.util.rest;
import cn.ibizlab.util.errors.BadRequestAlertException;
import cn.ibizlab.util.service.IBZConfigService;
import com.alibaba.fastjson.JSONObject;
import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.service.AuthenticationUserService;
......@@ -8,9 +10,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
......@@ -23,6 +24,10 @@ public class AppController {
@Value("${ibiz.enablePermissionValid:false}")
boolean enablePermissionValid; //是否开启权限校验
@Value("${ibiz.systemid:ibzwf}")
private String systemId;
@Autowired
private AuthenticationUserService userDetailsService;
......@@ -39,10 +44,10 @@ public class AppController {
while(it.hasNext()) {
GrantedAuthority authority = (GrantedAuthority)it.next();
String strAuthority=authority.getAuthority();
if(strAuthority.startsWith("UNIRES"))
uniRes.add(strAuthority);
else if(strAuthority.startsWith("APPMENU"))
appMenu.add(strAuthority);
if(strAuthority.startsWith("UNIRES_"+systemId))
uniRes.add(strAuthority.substring(systemId.length()+8));
else if(strAuthority.startsWith("APPMENU_"+systemId))
appMenu.add(strAuthority.substring(systemId.length()+9));
}
}
appData.put("unires",uniRes);
......@@ -57,4 +62,23 @@ public class AppController {
userDetailsService.resetByUsername(AuthenticationUser.getAuthenticationUser().getUsername());
}
}
@Autowired
private IBZConfigService ibzConfigService;
@RequestMapping(method = RequestMethod.PUT, value = "/configs/{configType}/{targetType}")
public ResponseEntity<Boolean> saveConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType, @RequestBody JSONObject config) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId))
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",configType);
return ResponseEntity.ok(ibzConfigService.saveConfig(configType,targetType,userId,config));
}
@RequestMapping(method = RequestMethod.GET, value = "/configs/{configType}/{targetType}")
public ResponseEntity<JSONObject> getConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId))
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",configType);
return ResponseEntity.ok(ibzConfigService.getConfig(configType,targetType,userId));
}
}
package cn.ibizlab.util.service;
import cn.ibizlab.util.domain.IBZConfig;
import cn.ibizlab.util.errors.BadRequestAlertException;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.mapper.IBZConfigMapper;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
@Slf4j
@Service
public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> implements IService<IBZConfig> {
@Value("${ibiz.systemid:ibzwf}")
private String systemId;
@Cacheable( value="ibzou_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public JSONObject getConfig(String cfgType,String targetType,String userId)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",cfgType);
IBZConfig config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()),false);
if(config==null)
return new JSONObject();
else
return JSON.parseObject(config.getCfg());
}
@CacheEvict( value="ibzou_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public boolean saveConfig(String cfgType,String targetType,String userId,JSONObject config)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",cfgType);
String cfg="{}";
if(config!=null)
cfg=JSONObject.toJSONString(config);
return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build());
}
@CacheEvict( value="ibzou_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public void resetConfig(String cfgType,String targetType,String userId)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
throw new BadRequestAlertException("重置配置失败,参数缺失","IBZConfig",cfgType);
this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()));
}
}
\ No newline at end of file
......@@ -85,3 +85,16 @@ ibiz:
enablePermissionValid: true
cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存
#xxl-job定时服务
xxl:
job:
accessToken:
admin:
addresses: #127.0.0.1
executor:
appname: ibzwf
ip:
port: 9999
logpath: /app/joblog
logretentiondays: -1
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册