提交 424b955b 编写于 作者: ibizdev's avatar ibizdev

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

上级 6f6be442
......@@ -37,6 +37,11 @@
git clone -b master $para2 ibzuaa/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzuaa/
mvn clean package -Papi
cd ibzuaa-provider/ibzuaa-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-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;
......
......@@ -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.uaa.domain.SysApp;
......
......@@ -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.uaa.domain.SysAuthLog;
......
......@@ -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.uaa.domain.SysOpenAccess;
......
......@@ -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.uaa.domain.SysPSSystem;
......
......@@ -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.uaa.domain.SysPermission;
......
......@@ -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.uaa.domain.SysRolePermission;
......
......@@ -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.uaa.domain.SysRole;
......
......@@ -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.uaa.domain.SysUserAuth;
......
......@@ -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.uaa.domain.SysUserRole;
......
......@@ -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.uaa.domain.SysUser;
......
......@@ -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 /ibzuaa-provider-api.jar
EXPOSE 8081
EXPOSE 40002
ADD ibzuaa-provider-api.jar /ibzuaa-provider-api.jar
......@@ -3,9 +3,22 @@ services:
ibzuaa-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-provider-api:latest
ports:
- "8081:8081"
- "40002:40002"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=40002
- 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;
......@@ -49,7 +48,6 @@ public class SysAppResource {
@ApiOperation(value = "新建应用", tags = {"应用" }, notes = "新建应用")
@RequestMapping(method = RequestMethod.POST, value = "/sysapps")
@Transactional
public ResponseEntity<SysAppDTO> create(@RequestBody SysAppDTO sysappdto) {
SysApp domain = sysappMapping.toDomain(sysappdto);
sysappService.create(domain);
......@@ -66,7 +64,6 @@ public class SysAppResource {
@ApiOperation(value = "更新应用", tags = {"应用" }, notes = "更新应用")
@RequestMapping(method = RequestMethod.PUT, value = "/sysapps/{sysapp_id}")
@Transactional
public ResponseEntity<SysAppDTO> update(@PathVariable("sysapp_id") String sysapp_id, @RequestBody SysAppDTO sysappdto) {
SysApp domain = sysappMapping.toDomain(sysappdto);
domain .setId(sysapp_id);
......@@ -84,7 +81,6 @@ public class SysAppResource {
@ApiOperation(value = "删除应用", tags = {"应用" }, notes = "删除应用")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysapps/{sysapp_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysapp_id") String sysapp_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysappService.remove(sysapp_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 SysAuthLogResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Create-all')")
@ApiOperation(value = "新建认证日志", tags = {"认证日志" }, notes = "新建认证日志")
@RequestMapping(method = RequestMethod.POST, value = "/sysauthlogs")
@Transactional
public ResponseEntity<SysAuthLogDTO> create(@RequestBody SysAuthLogDTO sysauthlogdto) {
SysAuthLog domain = sysauthlogMapping.toDomain(sysauthlogdto);
sysauthlogService.create(domain);
......@@ -69,7 +67,6 @@ public class SysAuthLogResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Update-all')")
@ApiOperation(value = "更新认证日志", tags = {"认证日志" }, notes = "更新认证日志")
@RequestMapping(method = RequestMethod.PUT, value = "/sysauthlogs/{sysauthlog_id}")
@Transactional
public ResponseEntity<SysAuthLogDTO> update(@PathVariable("sysauthlog_id") String sysauthlog_id, @RequestBody SysAuthLogDTO sysauthlogdto) {
SysAuthLog domain = sysauthlogMapping.toDomain(sysauthlogdto);
domain .setLogid(sysauthlog_id);
......@@ -89,7 +86,6 @@ public class SysAuthLogResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Remove-all')")
@ApiOperation(value = "删除认证日志", tags = {"认证日志" }, notes = "删除认证日志")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysauthlogs/{sysauthlog_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysauthlog_id") String sysauthlog_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysauthlogService.remove(sysauthlog_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 SysOpenAccessResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Create-all')")
@ApiOperation(value = "新建第三方认证平台", tags = {"第三方认证平台" }, notes = "新建第三方认证平台")
@RequestMapping(method = RequestMethod.POST, value = "/sysopenaccesses")
@Transactional
public ResponseEntity<SysOpenAccessDTO> create(@RequestBody SysOpenAccessDTO sysopenaccessdto) {
SysOpenAccess domain = sysopenaccessMapping.toDomain(sysopenaccessdto);
sysopenaccessService.create(domain);
......@@ -69,7 +67,6 @@ public class SysOpenAccessResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Update-all')")
@ApiOperation(value = "更新第三方认证平台", tags = {"第三方认证平台" }, notes = "更新第三方认证平台")
@RequestMapping(method = RequestMethod.PUT, value = "/sysopenaccesses/{sysopenaccess_id}")
@Transactional
public ResponseEntity<SysOpenAccessDTO> update(@PathVariable("sysopenaccess_id") String sysopenaccess_id, @RequestBody SysOpenAccessDTO sysopenaccessdto) {
SysOpenAccess domain = sysopenaccessMapping.toDomain(sysopenaccessdto);
domain .setId(sysopenaccess_id);
......@@ -89,7 +86,6 @@ public class SysOpenAccessResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Remove-all')")
@ApiOperation(value = "删除第三方认证平台", tags = {"第三方认证平台" }, notes = "删除第三方认证平台")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysopenaccesses/{sysopenaccess_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysopenaccess_id") String sysopenaccess_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysopenaccessService.remove(sysopenaccess_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 SysPermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Create-all')")
@ApiOperation(value = "新建权限/资源", tags = {"权限/资源" }, notes = "新建权限/资源")
@RequestMapping(method = RequestMethod.POST, value = "/syspermissions")
@Transactional
public ResponseEntity<SysPermissionDTO> create(@RequestBody SysPermissionDTO syspermissiondto) {
SysPermission domain = syspermissionMapping.toDomain(syspermissiondto);
syspermissionService.create(domain);
......@@ -70,7 +68,6 @@ public class SysPermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Update-all')")
@ApiOperation(value = "更新权限/资源", tags = {"权限/资源" }, notes = "更新权限/资源")
@RequestMapping(method = RequestMethod.PUT, value = "/syspermissions/{syspermission_id}")
@Transactional
public ResponseEntity<SysPermissionDTO> update(@PathVariable("syspermission_id") String syspermission_id, @RequestBody SysPermissionDTO syspermissiondto) {
SysPermission domain = syspermissionMapping.toDomain(syspermissiondto);
domain .setPermissionid(syspermission_id);
......@@ -90,7 +87,6 @@ public class SysPermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Remove-all')")
@ApiOperation(value = "删除权限/资源", tags = {"权限/资源" }, notes = "删除权限/资源")
@RequestMapping(method = RequestMethod.DELETE, value = "/syspermissions/{syspermission_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("syspermission_id") String syspermission_id) {
return ResponseEntity.status(HttpStatus.OK).body(syspermissionService.remove(syspermission_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 SysRolePermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRolePermission-Create-all')")
@ApiOperation(value = "新建角色权限关系", tags = {"角色权限关系" }, notes = "新建角色权限关系")
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions")
@Transactional
public ResponseEntity<SysRolePermissionDTO> create(@RequestBody SysRolePermissionDTO sysrolepermissiondto) {
SysRolePermission domain = sysrolepermissionMapping.toDomain(sysrolepermissiondto);
sysrolepermissionService.create(domain);
......@@ -70,7 +68,6 @@ public class SysRolePermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRolePermission-Update-all')")
@ApiOperation(value = "更新角色权限关系", tags = {"角色权限关系" }, notes = "更新角色权限关系")
@RequestMapping(method = RequestMethod.PUT, value = "/sysrolepermissions/{sysrolepermission_id}")
@Transactional
public ResponseEntity<SysRolePermissionDTO> update(@PathVariable("sysrolepermission_id") String sysrolepermission_id, @RequestBody SysRolePermissionDTO sysrolepermissiondto) {
SysRolePermission domain = sysrolepermissionMapping.toDomain(sysrolepermissiondto);
domain .setRolepermissionid(sysrolepermission_id);
......@@ -90,7 +87,6 @@ public class SysRolePermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRolePermission-Remove-all')")
@ApiOperation(value = "删除角色权限关系", tags = {"角色权限关系" }, notes = "删除角色权限关系")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysrolepermissions/{sysrolepermission_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysrolepermission_id") String sysrolepermission_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionService.remove(sysrolepermission_id));
}
......@@ -163,7 +159,6 @@ public class SysRolePermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRolePermission-Create-all')")
@ApiOperation(value = "根据权限/资源建立角色权限关系", tags = {"角色权限关系" }, notes = "根据权限/资源建立角色权限关系")
@RequestMapping(method = RequestMethod.POST, value = "/syspermissions/{syspermission_id}/sysrolepermissions")
@Transactional
public ResponseEntity<SysRolePermissionDTO> createBySysPermission(@PathVariable("syspermission_id") String syspermission_id, @RequestBody SysRolePermissionDTO sysrolepermissiondto) {
SysRolePermission domain = sysrolepermissionMapping.toDomain(sysrolepermissiondto);
domain.setPermissionid(syspermission_id);
......@@ -188,7 +183,6 @@ public class SysRolePermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRolePermission-Update-all')")
@ApiOperation(value = "根据权限/资源更新角色权限关系", tags = {"角色权限关系" }, notes = "根据权限/资源更新角色权限关系")
@RequestMapping(method = RequestMethod.PUT, value = "/syspermissions/{syspermission_id}/sysrolepermissions/{sysrolepermission_id}")
@Transactional
public ResponseEntity<SysRolePermissionDTO> updateBySysPermission(@PathVariable("syspermission_id") String syspermission_id, @PathVariable("sysrolepermission_id") String sysrolepermission_id, @RequestBody SysRolePermissionDTO sysrolepermissiondto) {
SysRolePermission domain = sysrolepermissionMapping.toDomain(sysrolepermissiondto);
domain.setPermissionid(syspermission_id);
......@@ -213,7 +207,6 @@ public class SysRolePermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRolePermission-Remove-all')")
@ApiOperation(value = "根据权限/资源删除角色权限关系", tags = {"角色权限关系" }, notes = "根据权限/资源删除角色权限关系")
@RequestMapping(method = RequestMethod.DELETE, value = "/syspermissions/{syspermission_id}/sysrolepermissions/{sysrolepermission_id}")
@Transactional
public ResponseEntity<Boolean> removeBySysPermission(@PathVariable("syspermission_id") String syspermission_id, @PathVariable("sysrolepermission_id") String sysrolepermission_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionService.remove(sysrolepermission_id));
}
......@@ -296,7 +289,6 @@ public class SysRolePermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRolePermission-Create-all')")
@ApiOperation(value = "根据系统角色建立角色权限关系", tags = {"角色权限关系" }, notes = "根据系统角色建立角色权限关系")
@RequestMapping(method = RequestMethod.POST, value = "/sysroles/{sysrole_id}/sysrolepermissions")
@Transactional
public ResponseEntity<SysRolePermissionDTO> createBySysRole(@PathVariable("sysrole_id") String sysrole_id, @RequestBody SysRolePermissionDTO sysrolepermissiondto) {
SysRolePermission domain = sysrolepermissionMapping.toDomain(sysrolepermissiondto);
domain.setRoleid(sysrole_id);
......@@ -321,7 +313,6 @@ public class SysRolePermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRolePermission-Update-all')")
@ApiOperation(value = "根据系统角色更新角色权限关系", tags = {"角色权限关系" }, notes = "根据系统角色更新角色权限关系")
@RequestMapping(method = RequestMethod.PUT, value = "/sysroles/{sysrole_id}/sysrolepermissions/{sysrolepermission_id}")
@Transactional
public ResponseEntity<SysRolePermissionDTO> updateBySysRole(@PathVariable("sysrole_id") String sysrole_id, @PathVariable("sysrolepermission_id") String sysrolepermission_id, @RequestBody SysRolePermissionDTO sysrolepermissiondto) {
SysRolePermission domain = sysrolepermissionMapping.toDomain(sysrolepermissiondto);
domain.setRoleid(sysrole_id);
......@@ -346,7 +337,6 @@ public class SysRolePermissionResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRolePermission-Remove-all')")
@ApiOperation(value = "根据系统角色删除角色权限关系", tags = {"角色权限关系" }, notes = "根据系统角色删除角色权限关系")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysroles/{sysrole_id}/sysrolepermissions/{sysrolepermission_id}")
@Transactional
public ResponseEntity<Boolean> removeBySysRole(@PathVariable("sysrole_id") String sysrole_id, @PathVariable("sysrolepermission_id") String sysrolepermission_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionService.remove(sysrolepermission_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 SysRoleResource {
@PreAuthorize("hasPermission(this.sysroleMapping.toDomain(#sysroledto),'ibzuaa-SysRole-Create')")
@ApiOperation(value = "新建系统角色", tags = {"系统角色" }, notes = "新建系统角色")
@RequestMapping(method = RequestMethod.POST, value = "/sysroles")
@Transactional
public ResponseEntity<SysRoleDTO> create(@RequestBody SysRoleDTO sysroledto) {
SysRole domain = sysroleMapping.toDomain(sysroledto);
sysroleService.create(domain);
......@@ -70,7 +68,6 @@ public class SysRoleResource {
@PreAuthorize("hasPermission(this.sysroleService.get(#sysrole_id),'ibzuaa-SysRole-Update')")
@ApiOperation(value = "更新系统角色", tags = {"系统角色" }, notes = "更新系统角色")
@RequestMapping(method = RequestMethod.PUT, value = "/sysroles/{sysrole_id}")
@Transactional
public ResponseEntity<SysRoleDTO> update(@PathVariable("sysrole_id") String sysrole_id, @RequestBody SysRoleDTO sysroledto) {
SysRole domain = sysroleMapping.toDomain(sysroledto);
domain .setRoleid(sysrole_id);
......@@ -90,7 +87,6 @@ public class SysRoleResource {
@PreAuthorize("hasPermission(this.sysroleService.get(#sysrole_id),'ibzuaa-SysRole-Remove')")
@ApiOperation(value = "删除系统角色", tags = {"系统角色" }, notes = "删除系统角色")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysroles/{sysrole_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysrole_id") String sysrole_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysroleService.remove(sysrole_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 SysUserResource {
@PreAuthorize("hasPermission(this.sysuserMapping.toDomain(#sysuserdto),'ibzuaa-SysUser-Create')")
@ApiOperation(value = "新建系统用户", tags = {"系统用户" }, notes = "新建系统用户")
@RequestMapping(method = RequestMethod.POST, value = "/sysusers")
@Transactional
public ResponseEntity<SysUserDTO> create(@RequestBody SysUserDTO sysuserdto) {
SysUser domain = sysuserMapping.toDomain(sysuserdto);
sysuserService.create(domain);
......@@ -69,7 +67,6 @@ public class SysUserResource {
@PreAuthorize("hasPermission(this.sysuserService.get(#sysuser_id),'ibzuaa-SysUser-Update')")
@ApiOperation(value = "更新系统用户", tags = {"系统用户" }, notes = "更新系统用户")
@RequestMapping(method = RequestMethod.PUT, value = "/sysusers/{sysuser_id}")
@Transactional
public ResponseEntity<SysUserDTO> update(@PathVariable("sysuser_id") String sysuser_id, @RequestBody SysUserDTO sysuserdto) {
SysUser domain = sysuserMapping.toDomain(sysuserdto);
domain .setUserid(sysuser_id);
......@@ -89,7 +86,6 @@ public class SysUserResource {
@PreAuthorize("hasPermission(this.sysuserService.get(#sysuser_id),'ibzuaa-SysUser-Remove')")
@ApiOperation(value = "删除系统用户", tags = {"系统用户" }, notes = "删除系统用户")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysusers/{sysuser_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysuser_id") String sysuser_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserService.remove(sysuser_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 SysUserRoleResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserRole-Create-all')")
@ApiOperation(value = "新建用户角色关系", tags = {"用户角色关系" }, notes = "新建用户角色关系")
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles")
@Transactional
public ResponseEntity<SysUserRoleDTO> create(@RequestBody SysUserRoleDTO sysuserroledto) {
SysUserRole domain = sysuserroleMapping.toDomain(sysuserroledto);
sysuserroleService.create(domain);
......@@ -70,7 +68,6 @@ public class SysUserRoleResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserRole-Update-all')")
@ApiOperation(value = "更新用户角色关系", tags = {"用户角色关系" }, notes = "更新用户角色关系")
@RequestMapping(method = RequestMethod.PUT, value = "/sysuserroles/{sysuserrole_id}")
@Transactional
public ResponseEntity<SysUserRoleDTO> update(@PathVariable("sysuserrole_id") String sysuserrole_id, @RequestBody SysUserRoleDTO sysuserroledto) {
SysUserRole domain = sysuserroleMapping.toDomain(sysuserroledto);
domain .setUserroleid(sysuserrole_id);
......@@ -90,7 +87,6 @@ public class SysUserRoleResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserRole-Remove-all')")
@ApiOperation(value = "删除用户角色关系", tags = {"用户角色关系" }, notes = "删除用户角色关系")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysuserroles/{sysuserrole_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysuserrole_id") String sysuserrole_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserroleService.remove(sysuserrole_id));
}
......@@ -163,7 +159,6 @@ public class SysUserRoleResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserRole-Create-all')")
@ApiOperation(value = "根据系统角色建立用户角色关系", tags = {"用户角色关系" }, notes = "根据系统角色建立用户角色关系")
@RequestMapping(method = RequestMethod.POST, value = "/sysroles/{sysrole_id}/sysuserroles")
@Transactional
public ResponseEntity<SysUserRoleDTO> createBySysRole(@PathVariable("sysrole_id") String sysrole_id, @RequestBody SysUserRoleDTO sysuserroledto) {
SysUserRole domain = sysuserroleMapping.toDomain(sysuserroledto);
domain.setRoleid(sysrole_id);
......@@ -188,7 +183,6 @@ public class SysUserRoleResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserRole-Update-all')")
@ApiOperation(value = "根据系统角色更新用户角色关系", tags = {"用户角色关系" }, notes = "根据系统角色更新用户角色关系")
@RequestMapping(method = RequestMethod.PUT, value = "/sysroles/{sysrole_id}/sysuserroles/{sysuserrole_id}")
@Transactional
public ResponseEntity<SysUserRoleDTO> updateBySysRole(@PathVariable("sysrole_id") String sysrole_id, @PathVariable("sysuserrole_id") String sysuserrole_id, @RequestBody SysUserRoleDTO sysuserroledto) {
SysUserRole domain = sysuserroleMapping.toDomain(sysuserroledto);
domain.setRoleid(sysrole_id);
......@@ -213,7 +207,6 @@ public class SysUserRoleResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserRole-Remove-all')")
@ApiOperation(value = "根据系统角色删除用户角色关系", tags = {"用户角色关系" }, notes = "根据系统角色删除用户角色关系")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysroles/{sysrole_id}/sysuserroles/{sysuserrole_id}")
@Transactional
public ResponseEntity<Boolean> removeBySysRole(@PathVariable("sysrole_id") String sysrole_id, @PathVariable("sysuserrole_id") String sysuserrole_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserroleService.remove(sysuserrole_id));
}
......@@ -296,7 +289,6 @@ public class SysUserRoleResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserRole-Create-all')")
@ApiOperation(value = "根据系统用户建立用户角色关系", tags = {"用户角色关系" }, notes = "根据系统用户建立用户角色关系")
@RequestMapping(method = RequestMethod.POST, value = "/sysusers/{sysuser_id}/sysuserroles")
@Transactional
public ResponseEntity<SysUserRoleDTO> createBySysUser(@PathVariable("sysuser_id") String sysuser_id, @RequestBody SysUserRoleDTO sysuserroledto) {
SysUserRole domain = sysuserroleMapping.toDomain(sysuserroledto);
domain.setUserid(sysuser_id);
......@@ -321,7 +313,6 @@ public class SysUserRoleResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserRole-Update-all')")
@ApiOperation(value = "根据系统用户更新用户角色关系", tags = {"用户角色关系" }, notes = "根据系统用户更新用户角色关系")
@RequestMapping(method = RequestMethod.PUT, value = "/sysusers/{sysuser_id}/sysuserroles/{sysuserrole_id}")
@Transactional
public ResponseEntity<SysUserRoleDTO> updateBySysUser(@PathVariable("sysuser_id") String sysuser_id, @PathVariable("sysuserrole_id") String sysuserrole_id, @RequestBody SysUserRoleDTO sysuserroledto) {
SysUserRole domain = sysuserroleMapping.toDomain(sysuserroledto);
domain.setUserid(sysuser_id);
......@@ -346,7 +337,6 @@ public class SysUserRoleResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserRole-Remove-all')")
@ApiOperation(value = "根据系统用户删除用户角色关系", tags = {"用户角色关系" }, notes = "根据系统用户删除用户角色关系")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysusers/{sysuser_id}/sysuserroles/{sysuserrole_id}")
@Transactional
public ResponseEntity<Boolean> removeBySysUser(@PathVariable("sysuser_id") String sysuser_id, @PathVariable("sysuserrole_id") String sysuserrole_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserroleService.remove(sysuserrole_id));
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册