提交 55546b6a 编写于 作者: ibizdev's avatar ibizdev

zhouweidong@lab.ibiz5.com 部署微服务接口

上级 10201d6f
......@@ -37,6 +37,11 @@
git clone -b master $para2 ibzwf/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzwf/
mvn clean package -Papi
cd ibzwf-provider/ibzwf-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzwf-provider-api.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -59,6 +59,10 @@ zuul:
path: /dictionarys/**/Ibzou**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou:
path: /ibzdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
uaadict:
path: /dictionarys/**/SysOperator
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
......
......@@ -28,6 +28,10 @@ zuul:
path: /dictionarys/**/Ibzou**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou:
path: /ibzdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
uaadict:
path: /dictionarys/**/SysOperator
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.workflow.domain.WFGroup;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.workflow.domain.WFHistory;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.workflow.domain.WFMember;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.workflow.domain.WFProcessDefinition;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.workflow.domain.WFProcessInstance;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.workflow.domain.WFProcessNode;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.workflow.domain.WFSystem;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.workflow.domain.WFTaskWay;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.workflow.domain.WFUser;
......
......@@ -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 /ibzwf-provider-api.jar
EXPOSE 8081
EXPOSE 40003
ADD ibzwf-provider-api.jar /ibzwf-provider-api.jar
......@@ -3,9 +3,22 @@ services:
ibzwf-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-provider-api:latest
ports:
- "8081:8081"
- "40003:40003"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=40003
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
- SPRING_REDIS_HOST=172.16.100.243
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
- SPRING_DATASOURCE_PASSWORD=@6dEfb3@
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- NACOS=172.16.102.211:8848
deploy:
resources:
limits:
......
......@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -50,7 +49,6 @@ public class WFGroupResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Create-all')")
@ApiOperation(value = "新建角色/用户组", tags = {"角色/用户组" }, notes = "新建角色/用户组")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups")
@Transactional
public ResponseEntity<WFGroupDTO> create(@RequestBody WFGroupDTO wfgroupdto) {
WFGroup domain = wfgroupMapping.toDomain(wfgroupdto);
wfgroupService.create(domain);
......@@ -69,7 +67,6 @@ public class WFGroupResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Update-all')")
@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) {
WFGroup domain = wfgroupMapping.toDomain(wfgroupdto);
domain .setId(wfgroup_id);
......@@ -89,7 +86,6 @@ public class WFGroupResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Remove-all')")
@ApiOperation(value = "删除角色/用户组", tags = {"角色/用户组" }, notes = "删除角色/用户组")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/{wfgroup_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfgroup_id") String wfgroup_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.remove(wfgroup_id));
}
......
......@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -50,7 +49,6 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(this.wfmemberMapping.toDomain(#wfmemberdto),'ibzwf-WFMember-Create')")
@ApiOperation(value = "新建成员", tags = {"成员" }, notes = "新建成员")
@RequestMapping(method = RequestMethod.POST, value = "/wfmembers")
@Transactional
public ResponseEntity<WFMemberDTO> create(@RequestBody WFMemberDTO wfmemberdto) {
WFMember domain = wfmemberMapping.toDomain(wfmemberdto);
wfmemberService.create(domain);
......@@ -69,7 +67,6 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(this.wfmemberService.get(#wfmember_id),'ibzwf-WFMember-Update')")
@ApiOperation(value = "更新成员", tags = {"成员" }, notes = "更新成员")
@RequestMapping(method = RequestMethod.PUT, value = "/wfmembers/{wfmember_id}")
@Transactional
public ResponseEntity<WFMemberDTO> update(@PathVariable("wfmember_id") String wfmember_id, @RequestBody WFMemberDTO wfmemberdto) {
WFMember domain = wfmemberMapping.toDomain(wfmemberdto);
domain .setMemberid(wfmember_id);
......@@ -89,7 +86,6 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(this.wfmemberService.get(#wfmember_id),'ibzwf-WFMember-Remove')")
@ApiOperation(value = "删除成员", tags = {"成员" }, notes = "删除成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfmembers/{wfmember_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfmember_id") String wfmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfmemberService.remove(wfmember_id));
}
......@@ -162,7 +158,6 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(this.wfmemberMapping.toDomain(#wfmemberdto),'ibzwf-WFMember-Create')")
@ApiOperation(value = "根据角色/用户组建立成员", tags = {"成员" }, notes = "根据角色/用户组建立成员")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/{wfgroup_id}/wfmembers")
@Transactional
public ResponseEntity<WFMemberDTO> createByWFGroup(@PathVariable("wfgroup_id") String wfgroup_id, @RequestBody WFMemberDTO wfmemberdto) {
WFMember domain = wfmemberMapping.toDomain(wfmemberdto);
domain.setGroupid(wfgroup_id);
......@@ -186,7 +181,6 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(this.wfmemberService.get(#wfmember_id),'ibzwf-WFMember-Update')")
@ApiOperation(value = "根据角色/用户组更新成员", tags = {"成员" }, notes = "根据角色/用户组更新成员")
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/{wfgroup_id}/wfmembers/{wfmember_id}")
@Transactional
public ResponseEntity<WFMemberDTO> updateByWFGroup(@PathVariable("wfgroup_id") String wfgroup_id, @PathVariable("wfmember_id") String wfmember_id, @RequestBody WFMemberDTO wfmemberdto) {
WFMember domain = wfmemberMapping.toDomain(wfmemberdto);
domain.setGroupid(wfgroup_id);
......@@ -211,7 +205,6 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(this.wfmemberService.get(#wfmember_id),'ibzwf-WFMember-Remove')")
@ApiOperation(value = "根据角色/用户组删除成员", tags = {"成员" }, notes = "根据角色/用户组删除成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/{wfgroup_id}/wfmembers/{wfmember_id}")
@Transactional
public ResponseEntity<Boolean> removeByWFGroup(@PathVariable("wfgroup_id") String wfgroup_id, @PathVariable("wfmember_id") String wfmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfmemberService.remove(wfmember_id));
}
......@@ -294,7 +287,6 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(this.wfmemberMapping.toDomain(#wfmemberdto),'ibzwf-WFMember-Create')")
@ApiOperation(value = "根据用户建立成员", tags = {"成员" }, notes = "根据用户建立成员")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/{wfuser_id}/wfmembers")
@Transactional
public ResponseEntity<WFMemberDTO> createByWFUser(@PathVariable("wfuser_id") String wfuser_id, @RequestBody WFMemberDTO wfmemberdto) {
WFMember domain = wfmemberMapping.toDomain(wfmemberdto);
domain.setUserid(wfuser_id);
......@@ -318,7 +310,6 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(this.wfmemberService.get(#wfmember_id),'ibzwf-WFMember-Update')")
@ApiOperation(value = "根据用户更新成员", tags = {"成员" }, notes = "根据用户更新成员")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/{wfuser_id}/wfmembers/{wfmember_id}")
@Transactional
public ResponseEntity<WFMemberDTO> updateByWFUser(@PathVariable("wfuser_id") String wfuser_id, @PathVariable("wfmember_id") String wfmember_id, @RequestBody WFMemberDTO wfmemberdto) {
WFMember domain = wfmemberMapping.toDomain(wfmemberdto);
domain.setUserid(wfuser_id);
......@@ -343,7 +334,6 @@ public class WFMemberResource {
@PreAuthorize("hasPermission(this.wfmemberService.get(#wfmember_id),'ibzwf-WFMember-Remove')")
@ApiOperation(value = "根据用户删除成员", tags = {"成员" }, notes = "根据用户删除成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{wfuser_id}/wfmembers/{wfmember_id}")
@Transactional
public ResponseEntity<Boolean> removeByWFUser(@PathVariable("wfuser_id") String wfuser_id, @PathVariable("wfmember_id") String wfmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfmemberService.remove(wfmember_id));
}
......
......@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -50,7 +49,6 @@ public class WFProcessDefinitionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Create-all')")
@ApiOperation(value = "新建流程定义", tags = {"流程定义" }, notes = "新建流程定义")
@RequestMapping(method = RequestMethod.POST, value = "/wfprocessdefinitions")
@Transactional
public ResponseEntity<WFProcessDefinitionDTO> create(@RequestBody WFProcessDefinitionDTO wfprocessdefinitiondto) {
WFProcessDefinition domain = wfprocessdefinitionMapping.toDomain(wfprocessdefinitiondto);
wfprocessdefinitionService.create(domain);
......@@ -69,7 +67,6 @@ public class WFProcessDefinitionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Update-all')")
@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) {
WFProcessDefinition domain = wfprocessdefinitionMapping.toDomain(wfprocessdefinitiondto);
domain .setDefinitionkey(wfprocessdefinition_id);
......@@ -89,7 +86,6 @@ public class WFProcessDefinitionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFProcessDefinition-Remove-all')")
@ApiOperation(value = "删除流程定义", tags = {"流程定义" }, notes = "删除流程定义")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfprocessdefinitions/{wfprocessdefinition_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfprocessdefinition_id") String wfprocessdefinition_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfprocessdefinitionService.remove(wfprocessdefinition_id));
}
......
......@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -49,7 +48,6 @@ public class WFREModelResource {
@ApiOperation(value = "新建流程模型", tags = {"流程模型" }, notes = "新建流程模型")
@RequestMapping(method = RequestMethod.POST, value = "/wfremodels")
@Transactional
public ResponseEntity<WFREModelDTO> create(@RequestBody WFREModelDTO wfremodeldto) {
WFREModel domain = wfremodelMapping.toDomain(wfremodeldto);
wfremodelService.create(domain);
......@@ -66,7 +64,6 @@ public class WFREModelResource {
@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) {
WFREModel domain = wfremodelMapping.toDomain(wfremodeldto);
domain .setId(wfremodel_id);
......@@ -84,7 +81,6 @@ public class WFREModelResource {
@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));
}
......
......@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -50,7 +49,6 @@ public class WFSystemResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Create-all')")
@ApiOperation(value = "新建系统", tags = {"系统" }, notes = "新建系统")
@RequestMapping(method = RequestMethod.POST, value = "/wfsystems")
@Transactional
public ResponseEntity<WFSystemDTO> create(@RequestBody WFSystemDTO wfsystemdto) {
WFSystem domain = wfsystemMapping.toDomain(wfsystemdto);
wfsystemService.create(domain);
......@@ -69,7 +67,6 @@ public class WFSystemResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Update-all')")
@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) {
WFSystem domain = wfsystemMapping.toDomain(wfsystemdto);
domain .setPssystemid(wfsystem_id);
......@@ -89,7 +86,6 @@ public class WFSystemResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Remove-all')")
@ApiOperation(value = "删除系统", tags = {"系统" }, notes = "删除系统")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfsystems/{wfsystem_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfsystem_id") String wfsystem_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfsystemService.remove(wfsystem_id));
}
......
......@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -49,7 +48,6 @@ public class WFTaskResource {
@ApiOperation(value = "新建工作流任务", tags = {"工作流任务" }, notes = "新建工作流任务")
@RequestMapping(method = RequestMethod.POST, value = "/wftasks")
@Transactional
public ResponseEntity<WFTaskDTO> create(@RequestBody WFTaskDTO wftaskdto) {
WFTask domain = wftaskMapping.toDomain(wftaskdto);
wftaskService.create(domain);
......@@ -66,7 +64,6 @@ public class WFTaskResource {
@ApiOperation(value = "更新工作流任务", tags = {"工作流任务" }, notes = "更新工作流任务")
@RequestMapping(method = RequestMethod.PUT, value = "/wftasks/{wftask_id}")
@Transactional
public ResponseEntity<WFTaskDTO> update(@PathVariable("wftask_id") String wftask_id, @RequestBody WFTaskDTO wftaskdto) {
WFTask domain = wftaskMapping.toDomain(wftaskdto);
domain .setId(wftask_id);
......@@ -84,7 +81,6 @@ public class WFTaskResource {
@ApiOperation(value = "删除工作流任务", tags = {"工作流任务" }, notes = "删除工作流任务")
@RequestMapping(method = RequestMethod.DELETE, value = "/wftasks/{wftask_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wftask_id") String wftask_id) {
return ResponseEntity.status(HttpStatus.OK).body(wftaskService.remove(wftask_id));
}
......
......@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -50,7 +49,6 @@ public class WFUserResource {
@PreAuthorize("hasPermission(this.wfuserMapping.toDomain(#wfuserdto),'ibzwf-WFUser-Create')")
@ApiOperation(value = "新建用户", tags = {"用户" }, notes = "新建用户")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers")
@Transactional
public ResponseEntity<WFUserDTO> create(@RequestBody WFUserDTO wfuserdto) {
WFUser domain = wfuserMapping.toDomain(wfuserdto);
wfuserService.create(domain);
......@@ -69,7 +67,6 @@ public class WFUserResource {
@PreAuthorize("hasPermission(this.wfuserService.get(#wfuser_id),'ibzwf-WFUser-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) {
WFUser domain = wfuserMapping.toDomain(wfuserdto);
domain .setId(wfuser_id);
......@@ -89,7 +86,6 @@ public class WFUserResource {
@PreAuthorize("hasPermission(this.wfuserService.get(#wfuser_id),'ibzwf-WFUser-Remove')")
@ApiOperation(value = "删除用户", tags = {"用户" }, notes = "删除用户")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{wfuser_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfuser_id") String wfuser_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfuserService.remove(wfuser_id));
}
......
......@@ -60,7 +60,7 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter {
if (authTokenUtil.validateToken(authToken, userDetails)) {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
log.info("authorizated user '{}', setting security context", username);
// log.info("authorizated user '{}', setting security context", username);
SecurityContextHolder.getContext().setAuthentication(authentication);
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册