提交 908ede4b 编写于 作者: ibizdev's avatar ibizdev

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

上级 ea9d02db
......@@ -37,6 +37,11 @@
git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/
mvn clean package -Papi
cd ibzou-provider/ibzou-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-provider-api.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -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.ou.domain.IBZDepartment;
......
......@@ -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.ou.domain.IBZDeptMember;
......
......@@ -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.ou.domain.IBZEmployee;
......
......@@ -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.ou.domain.IBZOrganization;
......
......@@ -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.ou.domain.IBZPost;
......
......@@ -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.ou.domain.IBZTeamMember;
......
......@@ -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.ou.domain.IBZTeam;
......
......@@ -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 /ibzou-provider-api.jar
EXPOSE 8081
EXPOSE 40001
ADD ibzou-provider-api.jar /ibzou-provider-api.jar
......@@ -3,9 +3,22 @@ services:
ibzou-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest
ports:
- "8081:8081"
- "40001:40001"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=40001
- 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 IBZDepartmentResource {
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Create')")
@ApiOperation(value = "新建部门", tags = {"部门" }, notes = "新建部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments")
@Transactional
public ResponseEntity<IBZDepartmentDTO> create(@RequestBody IBZDepartmentDTO ibzdepartmentdto) {
IBZDepartment domain = ibzdepartmentMapping.toDomain(ibzdepartmentdto);
ibzdepartmentService.create(domain);
......@@ -70,7 +68,6 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Update')")
@ApiOperation(value = "更新部门", tags = {"部门" }, notes = "更新部门")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}")
@Transactional
public ResponseEntity<IBZDepartmentDTO> update(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) {
IBZDepartment domain = ibzdepartmentMapping.toDomain(ibzdepartmentdto);
domain .setDeptid(ibzdepartment_id);
......@@ -90,7 +87,6 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Remove')")
@ApiOperation(value = "删除部门", tags = {"部门" }, notes = "删除部门")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzdepartment_id") String ibzdepartment_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.remove(ibzdepartment_id));
}
......@@ -163,7 +159,6 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Create')")
@ApiOperation(value = "根据单位机构建立部门", tags = {"部门" }, notes = "根据单位机构建立部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments")
@Transactional
public ResponseEntity<IBZDepartmentDTO> createByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) {
IBZDepartment domain = ibzdepartmentMapping.toDomain(ibzdepartmentdto);
domain.setOrgid(ibzorganization_id);
......@@ -188,7 +183,6 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Update')")
@ApiOperation(value = "根据单位机构更新部门", tags = {"部门" }, notes = "根据单位机构更新部门")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}")
@Transactional
public ResponseEntity<IBZDepartmentDTO> updateByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) {
IBZDepartment domain = ibzdepartmentMapping.toDomain(ibzdepartmentdto);
domain.setOrgid(ibzorganization_id);
......@@ -213,7 +207,6 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Remove')")
@ApiOperation(value = "根据单位机构删除部门", tags = {"部门" }, notes = "根据单位机构删除部门")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.remove(ibzdepartment_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 IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "新建部门成员", tags = {"部门成员" }, notes = "新建部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> create(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
ibzdeptmemberService.create(domain);
......@@ -69,7 +67,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "更新部门成员", tags = {"部门成员" }, notes = "更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> update(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain .setMemberid(ibzdeptmember_id);
......@@ -89,7 +86,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "删除部门成员", tags = {"部门成员" }, notes = "删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.remove(ibzdeptmember_id));
}
......@@ -162,7 +158,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "根据部门建立部门成员", tags = {"部门成员" }, notes = "根据部门建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzdepartment_id);
......@@ -186,7 +181,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "根据部门更新部门成员", tags = {"部门成员" }, notes = "根据部门更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzdepartment_id);
......@@ -211,7 +205,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "根据部门删除部门成员", tags = {"部门成员" }, notes = "根据部门删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.remove(ibzdeptmember_id));
}
......@@ -294,7 +287,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "根据人员建立部门成员", tags = {"部门成员" }, notes = "根据人员建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzemployee_id);
......@@ -318,7 +310,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "根据人员更新部门成员", tags = {"部门成员" }, notes = "根据人员更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzemployee_id);
......@@ -343,7 +334,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "根据人员删除部门成员", tags = {"部门成员" }, notes = "根据人员删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.remove(ibzdeptmember_id));
}
......@@ -426,7 +416,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "根据部门人员建立部门成员", tags = {"部门成员" }, notes = "根据部门人员建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzemployee_id);
......@@ -450,7 +439,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "根据部门人员更新部门成员", tags = {"部门成员" }, notes = "根据部门人员更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzemployee_id);
......@@ -475,7 +463,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "根据部门人员删除部门成员", tags = {"部门成员" }, notes = "根据部门人员删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.remove(ibzdeptmember_id));
}
......@@ -558,7 +545,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "根据单位机构部门建立部门成员", tags = {"部门成员" }, notes = "根据单位机构部门建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzdepartment_id);
......@@ -582,7 +568,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "根据单位机构部门更新部门成员", tags = {"部门成员" }, notes = "根据单位机构部门更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzdepartment_id);
......@@ -607,7 +592,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "根据单位机构部门删除部门成员", tags = {"部门成员" }, notes = "根据单位机构部门删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.remove(ibzdeptmember_id));
}
......@@ -690,7 +674,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "根据单位机构人员建立部门成员", tags = {"部门成员" }, notes = "根据单位机构人员建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzemployee_id);
......@@ -714,7 +697,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "根据单位机构人员更新部门成员", tags = {"部门成员" }, notes = "根据单位机构人员更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzemployee_id);
......@@ -739,7 +721,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "根据单位机构人员删除部门成员", tags = {"部门成员" }, notes = "根据单位机构人员删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.remove(ibzdeptmember_id));
}
......@@ -822,7 +803,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "根据单位机构部门人员建立部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzemployee_id);
......@@ -846,7 +826,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "根据单位机构部门人员更新部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain.setUserid(ibzemployee_id);
......@@ -871,7 +850,6 @@ public class IBZDeptMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "根据单位机构部门人员删除部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.remove(ibzdeptmember_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 IBZEmployeeResource {
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "新建人员", tags = {"人员" }, notes = "新建人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees")
@Transactional
public ResponseEntity<IBZEmployeeDTO> create(@RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
ibzemployeeService.create(domain);
......@@ -70,7 +68,6 @@ public class IBZEmployeeResource {
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "更新人员", tags = {"人员" }, notes = "更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}")
@Transactional
public ResponseEntity<IBZEmployeeDTO> update(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain .setUserid(ibzemployee_id);
......@@ -90,7 +87,6 @@ public class IBZEmployeeResource {
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "删除人员", tags = {"人员" }, notes = "删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzemployee_id") String ibzemployee_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.remove(ibzemployee_id));
}
......@@ -127,7 +123,6 @@ public class IBZEmployeeResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "初始化密码", tags = {"人员" }, notes = "初始化密码")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional
public ResponseEntity<IBZEmployeeDTO> initPwd(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain.setUserid(ibzemployee_id);
......@@ -175,7 +170,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "根据部门建立人员", tags = {"人员" }, notes = "根据部门建立人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees")
@Transactional
public ResponseEntity<IBZEmployeeDTO> createByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain.setMdeptid(ibzdepartment_id);
......@@ -200,7 +194,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "根据部门更新人员", tags = {"人员" }, notes = "根据部门更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}")
@Transactional
public ResponseEntity<IBZEmployeeDTO> updateByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain.setMdeptid(ibzdepartment_id);
......@@ -225,7 +218,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "根据部门删除人员", tags = {"人员" }, notes = "根据部门删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.remove(ibzemployee_id));
}
......@@ -264,7 +256,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "根据部门人员", tags = {"人员" }, notes = "根据部门人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional
public ResponseEntity<IBZEmployeeDTO> initPwdByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain.setMdeptid(ibzdepartment_id);
......@@ -320,7 +311,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "根据单位机构建立人员", tags = {"人员" }, notes = "根据单位机构建立人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees")
@Transactional
public ResponseEntity<IBZEmployeeDTO> createByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain.setOrgid(ibzorganization_id);
......@@ -345,7 +335,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "根据单位机构更新人员", tags = {"人员" }, notes = "根据单位机构更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}")
@Transactional
public ResponseEntity<IBZEmployeeDTO> updateByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain.setOrgid(ibzorganization_id);
......@@ -370,7 +359,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "根据单位机构删除人员", tags = {"人员" }, notes = "根据单位机构删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.remove(ibzemployee_id));
}
......@@ -409,7 +397,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "根据单位机构人员", tags = {"人员" }, notes = "根据单位机构人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional
public ResponseEntity<IBZEmployeeDTO> initPwdByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain.setOrgid(ibzorganization_id);
......@@ -465,7 +452,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "根据单位机构部门建立人员", tags = {"人员" }, notes = "根据单位机构部门建立人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees")
@Transactional
public ResponseEntity<IBZEmployeeDTO> createByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain.setMdeptid(ibzdepartment_id);
......@@ -490,7 +476,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "根据单位机构部门更新人员", tags = {"人员" }, notes = "根据单位机构部门更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}")
@Transactional
public ResponseEntity<IBZEmployeeDTO> updateByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain.setMdeptid(ibzdepartment_id);
......@@ -515,7 +500,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "根据单位机构部门删除人员", tags = {"人员" }, notes = "根据单位机构部门删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.remove(ibzemployee_id));
}
......@@ -554,7 +538,6 @@ domain.setUserid(ibzemployee_id);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "根据单位机构部门人员", tags = {"人员" }, notes = "根据单位机构部门人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional
public ResponseEntity<IBZEmployeeDTO> initPwdByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain.setMdeptid(ibzdepartment_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 IBZOrganizationResource {
@PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdto),'ibzou-IBZOrganization-Create')")
@ApiOperation(value = "新建单位机构", tags = {"单位机构" }, notes = "新建单位机构")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations")
@Transactional
public ResponseEntity<IBZOrganizationDTO> create(@RequestBody IBZOrganizationDTO ibzorganizationdto) {
IBZOrganization domain = ibzorganizationMapping.toDomain(ibzorganizationdto);
ibzorganizationService.create(domain);
......@@ -70,7 +68,6 @@ public class IBZOrganizationResource {
@PreAuthorize("hasPermission(this.ibzorganizationService.get(#ibzorganization_id),'ibzou-IBZOrganization-Update')")
@ApiOperation(value = "更新单位机构", tags = {"单位机构" }, notes = "更新单位机构")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}")
@Transactional
public ResponseEntity<IBZOrganizationDTO> update(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZOrganizationDTO ibzorganizationdto) {
IBZOrganization domain = ibzorganizationMapping.toDomain(ibzorganizationdto);
domain .setOrgid(ibzorganization_id);
......@@ -90,7 +87,6 @@ public class IBZOrganizationResource {
@PreAuthorize("hasPermission(this.ibzorganizationService.get(#ibzorganization_id),'ibzou-IBZOrganization-Remove')")
@ApiOperation(value = "删除单位机构", tags = {"单位机构" }, notes = "删除单位机构")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzorganization_id") String ibzorganization_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.remove(ibzorganization_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 IBZPostResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZPost-Create-all')")
@ApiOperation(value = "新建岗位", tags = {"岗位" }, notes = "新建岗位")
@RequestMapping(method = RequestMethod.POST, value = "/ibzposts")
@Transactional
public ResponseEntity<IBZPostDTO> create(@RequestBody IBZPostDTO ibzpostdto) {
IBZPost domain = ibzpostMapping.toDomain(ibzpostdto);
ibzpostService.create(domain);
......@@ -69,7 +67,6 @@ public class IBZPostResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZPost-Update-all')")
@ApiOperation(value = "更新岗位", tags = {"岗位" }, notes = "更新岗位")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzposts/{ibzpost_id}")
@Transactional
public ResponseEntity<IBZPostDTO> update(@PathVariable("ibzpost_id") String ibzpost_id, @RequestBody IBZPostDTO ibzpostdto) {
IBZPost domain = ibzpostMapping.toDomain(ibzpostdto);
domain .setPostid(ibzpost_id);
......@@ -89,7 +86,6 @@ public class IBZPostResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZPost-Remove-all')")
@ApiOperation(value = "删除岗位", tags = {"岗位" }, notes = "删除岗位")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzposts/{ibzpost_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzpost_id") String ibzpost_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzpostService.remove(ibzpost_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 IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Create-all')")
@ApiOperation(value = "新建组成员", tags = {"组成员" }, notes = "新建组成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzteammembers")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> create(@RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
ibzteammemberService.create(domain);
......@@ -69,7 +67,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Update-all')")
@ApiOperation(value = "更新组成员", tags = {"组成员" }, notes = "更新组成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> update(@PathVariable("ibzteammember_id") String ibzteammember_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain .setTeammemberid(ibzteammember_id);
......@@ -89,7 +86,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Remove-all')")
@ApiOperation(value = "删除组成员", tags = {"组成员" }, notes = "删除组成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzteammember_id") String ibzteammember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzteammemberService.remove(ibzteammember_id));
}
......@@ -162,7 +158,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Create-all')")
@ApiOperation(value = "根据人员建立组成员", tags = {"组成员" }, notes = "根据人员建立组成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzteammembers")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> createByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain.setUserid(ibzemployee_id);
......@@ -186,7 +181,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Update-all')")
@ApiOperation(value = "根据人员更新组成员", tags = {"组成员" }, notes = "根据人员更新组成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> updateByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzteammember_id") String ibzteammember_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain.setUserid(ibzemployee_id);
......@@ -211,7 +205,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Remove-all')")
@ApiOperation(value = "根据人员删除组成员", tags = {"组成员" }, notes = "根据人员删除组成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzteammember_id") String ibzteammember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzteammemberService.remove(ibzteammember_id));
}
......@@ -294,7 +287,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Create-all')")
@ApiOperation(value = "根据组建立组成员", tags = {"组成员" }, notes = "根据组建立组成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzteams/{ibzteam_id}/ibzteammembers")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> createByIBZTeam(@PathVariable("ibzteam_id") String ibzteam_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain.setTeamid(ibzteam_id);
......@@ -318,7 +310,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Update-all')")
@ApiOperation(value = "根据组更新组成员", tags = {"组成员" }, notes = "根据组更新组成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzteams/{ibzteam_id}/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> updateByIBZTeam(@PathVariable("ibzteam_id") String ibzteam_id, @PathVariable("ibzteammember_id") String ibzteammember_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain.setTeamid(ibzteam_id);
......@@ -343,7 +334,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Remove-all')")
@ApiOperation(value = "根据组删除组成员", tags = {"组成员" }, notes = "根据组删除组成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzteams/{ibzteam_id}/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZTeam(@PathVariable("ibzteam_id") String ibzteam_id, @PathVariable("ibzteammember_id") String ibzteammember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzteammemberService.remove(ibzteammember_id));
}
......@@ -426,7 +416,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Create-all')")
@ApiOperation(value = "根据部门人员建立组成员", tags = {"组成员" }, notes = "根据部门人员建立组成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> createByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain.setUserid(ibzemployee_id);
......@@ -450,7 +439,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Update-all')")
@ApiOperation(value = "根据部门人员更新组成员", tags = {"组成员" }, notes = "根据部门人员更新组成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> updateByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzteammember_id") String ibzteammember_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain.setUserid(ibzemployee_id);
......@@ -475,7 +463,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Remove-all')")
@ApiOperation(value = "根据部门人员删除组成员", tags = {"组成员" }, notes = "根据部门人员删除组成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzteammember_id") String ibzteammember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzteammemberService.remove(ibzteammember_id));
}
......@@ -558,7 +545,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Create-all')")
@ApiOperation(value = "根据单位机构人员建立组成员", tags = {"组成员" }, notes = "根据单位机构人员建立组成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> createByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain.setUserid(ibzemployee_id);
......@@ -582,7 +568,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Update-all')")
@ApiOperation(value = "根据单位机构人员更新组成员", tags = {"组成员" }, notes = "根据单位机构人员更新组成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> updateByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzteammember_id") String ibzteammember_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain.setUserid(ibzemployee_id);
......@@ -607,7 +592,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Remove-all')")
@ApiOperation(value = "根据单位机构人员删除组成员", tags = {"组成员" }, notes = "根据单位机构人员删除组成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzteammember_id") String ibzteammember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzteammemberService.remove(ibzteammember_id));
}
......@@ -690,7 +674,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Create-all')")
@ApiOperation(value = "根据单位机构部门人员建立组成员", tags = {"组成员" }, notes = "根据单位机构部门人员建立组成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> createByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain.setUserid(ibzemployee_id);
......@@ -714,7 +697,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Update-all')")
@ApiOperation(value = "根据单位机构部门人员更新组成员", tags = {"组成员" }, notes = "根据单位机构部门人员更新组成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<IBZTeamMemberDTO> updateByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzteammember_id") String ibzteammember_id, @RequestBody IBZTeamMemberDTO ibzteammemberdto) {
IBZTeamMember domain = ibzteammemberMapping.toDomain(ibzteammemberdto);
domain.setUserid(ibzemployee_id);
......@@ -739,7 +721,6 @@ public class IBZTeamMemberResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeamMember-Remove-all')")
@ApiOperation(value = "根据单位机构部门人员删除组成员", tags = {"组成员" }, notes = "根据单位机构部门人员删除组成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}")
@Transactional
public ResponseEntity<Boolean> removeByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzteammember_id") String ibzteammember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzteammemberService.remove(ibzteammember_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 IBZTeamResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeam-Create-all')")
@ApiOperation(value = "新建组", tags = {"组" }, notes = "新建组")
@RequestMapping(method = RequestMethod.POST, value = "/ibzteams")
@Transactional
public ResponseEntity<IBZTeamDTO> create(@RequestBody IBZTeamDTO ibzteamdto) {
IBZTeam domain = ibzteamMapping.toDomain(ibzteamdto);
ibzteamService.create(domain);
......@@ -69,7 +67,6 @@ public class IBZTeamResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeam-Update-all')")
@ApiOperation(value = "更新组", tags = {"组" }, notes = "更新组")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzteams/{ibzteam_id}")
@Transactional
public ResponseEntity<IBZTeamDTO> update(@PathVariable("ibzteam_id") String ibzteam_id, @RequestBody IBZTeamDTO ibzteamdto) {
IBZTeam domain = ibzteamMapping.toDomain(ibzteamdto);
domain .setTeamid(ibzteam_id);
......@@ -89,7 +86,6 @@ public class IBZTeamResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeam-Remove-all')")
@ApiOperation(value = "删除组", tags = {"组" }, notes = "删除组")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzteams/{ibzteam_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzteam_id") String ibzteam_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzteamService.remove(ibzteam_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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册