提交 71ffc6c5 编写于 作者: ibizdev's avatar ibizdev

lab_qyk 发布系统代码

上级 f4919721
...@@ -535,466 +535,6 @@ const router = new Router({ ...@@ -535,466 +535,6 @@ const router = new Router({
...indexRoutes, ...indexRoutes,
], ],
}, },
{
path: '/ibzdepartments/:ibzdepartment?/pickupview/:pickupview?',
meta: {
caption: 'entities.ibzdepartment.views.pickupview.caption',
parameters: [
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdepartment-pickup-view/ibzdepartment-pickup-view.vue'),
},
{
path: '/ibzemployees/:ibzemployee?/editview/:editview?',
meta: {
caption: 'entities.ibzemployee.views.editview.caption',
parameters: [
{ pathName: 'ibzemployees', parameterName: 'ibzemployee' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzemployee-edit-view/ibzemployee-edit-view.vue'),
},
{
path: '/wfusers/:wfuser?/wfmembers/:wfmember?/gridview/:gridview?',
meta: {
caption: 'entities.wfmember.views.gridview.caption',
parameters: [
{ pathName: 'wfusers', parameterName: 'wfuser' },
{ pathName: 'wfmembers', parameterName: 'wfmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'),
},
{
path: '/wfgroups/:wfgroup?/wfmembers/:wfmember?/gridview/:gridview?',
meta: {
caption: 'entities.wfmember.views.gridview.caption',
parameters: [
{ pathName: 'wfgroups', parameterName: 'wfgroup' },
{ pathName: 'wfmembers', parameterName: 'wfmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'),
},
{
path: '/wfmembers/:wfmember?/gridview/:gridview?',
meta: {
caption: 'entities.wfmember.views.gridview.caption',
parameters: [
{ pathName: 'wfmembers', parameterName: 'wfmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'),
},
{
path: '/sysroles/:sysrole?/gridview/:gridview?',
meta: {
caption: 'entities.sysrole.views.gridview.caption',
parameters: [
{ pathName: 'sysroles', parameterName: 'sysrole' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-rolegrid-view/sys-rolegrid-view.vue'),
},
{
path: '/sysroles/:sysrole?/pickupview/:pickupview?',
meta: {
caption: 'entities.sysrole.views.pickupview.caption',
parameters: [
{ pathName: 'sysroles', parameterName: 'sysrole' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-role-pickup-view/sys-role-pickup-view.vue'),
},
{
path: '/ibzorganizations/:ibzorganization?/optionview/:optionview?',
meta: {
caption: 'entities.ibzorganization.views.optionview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'optionview', parameterName: 'optionview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzorganization-option-view/ibzorganization-option-view.vue'),
},
{
path: '/sysusers/:sysuser?/pickupview/:pickupview?',
meta: {
caption: 'entities.sysuser.views.pickupview.caption',
parameters: [
{ pathName: 'sysusers', parameterName: 'sysuser' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-user-pickup-view/sys-user-pickup-view.vue'),
},
{
path: '/ibzemployees/:ibzemployee?/gridview/:gridview?',
meta: {
caption: 'entities.ibzemployee.views.gridview.caption',
parameters: [
{ pathName: 'ibzemployees', parameterName: 'ibzemployee' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzemployee-grid-view/ibzemployee-grid-view.vue'),
},
{
path: '/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
caption: 'entities.ibzdeptmember.views.gridview.caption',
parameters: [
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{
path: '/wfusers/:wfuser?/pickupview/:pickupview?',
meta: {
caption: 'entities.wfuser.views.pickupview.caption',
parameters: [
{ pathName: 'wfusers', parameterName: 'wfuser' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfuser-pickup-view/wfuser-pickup-view.vue'),
},
{
path: '/ibzorganizations/:ibzorganization?/treeexpview/:treeexpview?',
meta: {
caption: 'entities.ibzorganization.views.treeexpview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'treeexpview', parameterName: 'treeexpview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzorganization-tree-exp-view/ibzorganization-tree-exp-view.vue'),
},
{
path: '/sysuserroles/:sysuserrole?/gridview/:gridview?',
meta: {
caption: 'entities.sysuserrole.views.gridview.caption',
parameters: [
{ pathName: 'sysuserroles', parameterName: 'sysuserrole' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-user-role-grid-view/sys-user-role-grid-view.vue'),
},
{
path: '/sysusers/:sysuser?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.sysuser.views.pickupgridview.caption',
parameters: [
{ pathName: 'sysusers', parameterName: 'sysuser' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-user-pickup-grid-view/sys-user-pickup-grid-view.vue'),
},
{
path: '/sysroles/:sysrole?/editview/:editview?',
meta: {
caption: 'entities.sysrole.views.editview.caption',
parameters: [
{ pathName: 'sysroles', parameterName: 'sysrole' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-role-edit-view/sys-role-edit-view.vue'),
},
{
path: '/wfusers/:wfuser?/wfmembers/:wfmember?/editview/:editview?',
meta: {
caption: 'entities.wfmember.views.editview.caption',
parameters: [
{ pathName: 'wfusers', parameterName: 'wfuser' },
{ pathName: 'wfmembers', parameterName: 'wfmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfmember-edit-view/wfmember-edit-view.vue'),
},
{
path: '/wfgroups/:wfgroup?/wfmembers/:wfmember?/editview/:editview?',
meta: {
caption: 'entities.wfmember.views.editview.caption',
parameters: [
{ pathName: 'wfgroups', parameterName: 'wfgroup' },
{ pathName: 'wfmembers', parameterName: 'wfmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfmember-edit-view/wfmember-edit-view.vue'),
},
{
path: '/wfmembers/:wfmember?/editview/:editview?',
meta: {
caption: 'entities.wfmember.views.editview.caption',
parameters: [
{ pathName: 'wfmembers', parameterName: 'wfmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfmember-edit-view/wfmember-edit-view.vue'),
},
{
path: '/ibzdepartments/:ibzdepartment?/gridview/:gridview?',
meta: {
caption: 'entities.ibzdepartment.views.gridview.caption',
parameters: [
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdepartment-grid-view/ibzdepartment-grid-view.vue'),
},
{
path: '/sysroles/:sysrole?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.sysrole.views.pickupgridview.caption',
parameters: [
{ pathName: 'sysroles', parameterName: 'sysrole' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-role-pickup-grid-view/sys-role-pickup-grid-view.vue'),
},
{
path: '/ibzdepartments/:ibzdepartment?/editview/:editview?',
meta: {
caption: 'entities.ibzdepartment.views.editview.caption',
parameters: [
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdepartment-edit-view/ibzdepartment-edit-view.vue'),
},
{
path: '/ibzorganizations/:ibzorganization?/editview/:editview?',
meta: {
caption: 'entities.ibzorganization.views.editview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzorganization-edit-view/ibzorganization-edit-view.vue'),
},
{
path: '/sysrolepermissions/:sysrolepermission?/customview/:customview?',
meta: {
caption: 'entities.sysrolepermission.views.customview.caption',
parameters: [
{ pathName: 'sysrolepermissions', parameterName: 'sysrolepermission' },
{ pathName: 'customview', parameterName: 'customview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-role-permission-custom-view/sys-role-permission-custom-view.vue'),
},
{
path: '/ibzdepartments/:ibzdepartment?/optionview/:optionview?',
meta: {
caption: 'entities.ibzdepartment.views.optionview.caption',
parameters: [
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'optionview', parameterName: 'optionview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdepartment-option-view/ibzdepartment-option-view.vue'),
},
{
path: '/ibzemployees/:ibzemployee?/optionview/:optionview?',
meta: {
caption: 'entities.ibzemployee.views.optionview.caption',
parameters: [
{ pathName: 'ibzemployees', parameterName: 'ibzemployee' },
{ pathName: 'optionview', parameterName: 'optionview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzemployee-option-view/ibzemployee-option-view.vue'),
},
{
path: '/ibzemployees/:ibzemployee?/pickupview/:pickupview?',
meta: {
caption: 'entities.ibzemployee.views.pickupview.caption',
parameters: [
{ pathName: 'ibzemployees', parameterName: 'ibzemployee' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzemployee-pickup-view/ibzemployee-pickup-view.vue'),
},
{
path: '/wfgroups/:wfgroup?/editview/:editview?',
meta: {
caption: 'entities.wfgroup.views.editview.caption',
parameters: [
{ pathName: 'wfgroups', parameterName: 'wfgroup' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfgroup-edit-view/wfgroup-edit-view.vue'),
},
{
path: '/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
caption: 'entities.ibzdeptmember.views.editview.caption',
parameters: [
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{
path: '/ibzdepartments/:ibzdepartment?/treeexpview/:treeexpview?',
meta: {
caption: 'entities.ibzdepartment.views.treeexpview.caption',
parameters: [
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'treeexpview', parameterName: 'treeexpview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdepartment-tree-exp-view/ibzdepartment-tree-exp-view.vue'),
},
{
path: '/ibzorganizations/:ibzorganization?/gridview/:gridview?',
meta: {
caption: 'entities.ibzorganization.views.gridview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzorganization-grid-view/ibzorganization-grid-view.vue'),
},
{
path: '/ibzemployees/:ibzemployee?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.ibzemployee.views.pickupgridview.caption',
parameters: [
{ pathName: 'ibzemployees', parameterName: 'ibzemployee' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzemployee-pickup-grid-view/ibzemployee-pickup-grid-view.vue'),
},
{
path: '/wfusers/:wfuser?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.wfuser.views.pickupgridview.caption',
parameters: [
{ pathName: 'wfusers', parameterName: 'wfuser' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfuser-pickup-grid-view/wfuser-pickup-grid-view.vue'),
},
{
path: '/ibzorganizations/:ibzorganization?/pickupview/:pickupview?',
meta: {
caption: 'entities.ibzorganization.views.pickupview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzorganization-pickup-view/ibzorganization-pickup-view.vue'),
},
{
path: '/ibzorganizations/:ibzorganization?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.ibzorganization.views.pickupgridview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzorganization-pickup-grid-view/ibzorganization-pickup-grid-view.vue'),
},
{
path: '/ibzdepartments/:ibzdepartment?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.ibzdepartment.views.pickupgridview.caption',
parameters: [
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdepartment-pickup-grid-view/ibzdepartment-pickup-grid-view.vue'),
},
{
path: '/sysuserroles/:sysuserrole?/editview/:editview?',
meta: {
caption: 'entities.sysuserrole.views.editview.caption',
parameters: [
{ pathName: 'sysuserroles', parameterName: 'sysuserrole' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/uaa/sys-user-role-edit-view/sys-user-role-edit-view.vue'),
},
{
path: '/wfgroups/:wfgroup?/gridview/:gridview?',
meta: {
caption: 'entities.wfgroup.views.gridview.caption',
parameters: [
{ pathName: 'wfgroups', parameterName: 'wfgroup' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfgroup-grid-view/wfgroup-grid-view.vue'),
},
...globalRoutes, ...globalRoutes,
{ {
path: '/login/:login?', path: '/login/:login?',
......
...@@ -3,251 +3,6 @@ ...@@ -3,251 +3,6 @@
*/ */
export const viewstate: any = { export const viewstate: any = {
appviews: [ appviews: [
{
viewtag: '10dd7f45f36233049c4af9ca417089f5',
viewmodule: 'ou',
viewname: 'IBZDepartmentPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'e3284e895913f7d38d1bcbe898bda0b7',
],
},
{
viewtag: '119fe650e7efd26bd14bd413cae37ded',
viewmodule: 'ou',
viewname: 'IBZEmployeeEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'61541167ccebbc3f174242ce73e436dd',
'10dd7f45f36233049c4af9ca417089f5',
'ccff36439eacae953f85ff636c9dac74',
],
},
{
viewtag: '135872676ba63d430b2f20bd20364286',
viewmodule: 'workflow',
viewname: 'WFMemberGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'6e1b35989dd6470b5c890369ab87b545',
],
},
{
viewtag: '13c174556f45e9b10b66dc51834a6ab5',
viewmodule: 'uaa',
viewname: 'SYS_ROLEGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'6bd0981f6dd67a59f211b5cf97ac8f30',
],
},
{
viewtag: '26cc2d5c69f1525eaa415b7de1a0d4a6',
viewmodule: 'uaa',
viewname: 'SysRolePickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'7c25865f5864a734477c7cb987632f4f',
],
},
{
viewtag: '2ed85bebb69b8d23388420b95163228a',
viewmodule: 'ou',
viewname: 'IBZOrganizationOptionView',
viewaction: '',
viewdatachange: false,
refviews: [
'ccff36439eacae953f85ff636c9dac74',
],
},
{
viewtag: '32fe9ab4a9e1b8d62b9ee802e4746965',
viewmodule: 'uaa',
viewname: 'SysUserPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'6869875c7409bd1dddd3d0fc62c502db',
],
},
{
viewtag: '40fe6b28b9f7902341da46bb74a02d59',
viewmodule: 'ou',
viewname: 'IBZEmployeeGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'119fe650e7efd26bd14bd413cae37ded',
'9cf7a70099bff83a10f6ae65c4d54692',
],
},
{
viewtag: '61541167ccebbc3f174242ce73e436dd',
viewmodule: 'ou',
viewname: 'IBZDeptMemberGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'bf5e850471bab461fbb6739578e510c5',
],
},
{
viewtag: '61c5bff70bcf56e1dc0bb0900df9c98c',
viewmodule: 'workflow',
viewname: 'WFUserPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'c9c73c8d2e61bd29a304622f3d39b522',
],
},
{
viewtag: '6435e95f9bd03acceda6b7fd610873db',
viewmodule: 'ou',
viewname: 'IBZOrganizationTreeExpView',
viewaction: '',
viewdatachange: false,
refviews: [
'7362390ee25dac238b23fa9ab05ea4ac',
],
},
{
viewtag: '6736591aca71edc23df760e278378566',
viewmodule: 'uaa',
viewname: 'SysUserRoleGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'edde313015e1db7c366028307d88d20c',
],
},
{
viewtag: '6869875c7409bd1dddd3d0fc62c502db',
viewmodule: 'uaa',
viewname: 'SysUserPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '6bd0981f6dd67a59f211b5cf97ac8f30',
viewmodule: 'uaa',
viewname: 'SysRoleEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'6736591aca71edc23df760e278378566',
'983f3ae1533a5cd62619dedb79bb4b28',
],
},
{
viewtag: '6e1b35989dd6470b5c890369ab87b545',
viewmodule: 'workflow',
viewname: 'WFMemberEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'61c5bff70bcf56e1dc0bb0900df9c98c',
],
},
{
viewtag: '7362390ee25dac238b23fa9ab05ea4ac',
viewmodule: 'ou',
viewname: 'IBZDepartmentGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'90c0ced2720b85d5e051e7935a93d3c5',
'9cdad5e2bed51cdcd90b4b7fb3104a5a',
],
},
{
viewtag: '7c25865f5864a734477c7cb987632f4f',
viewmodule: 'uaa',
viewname: 'SysRolePickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '90c0ced2720b85d5e051e7935a93d3c5',
viewmodule: 'ou',
viewname: 'IBZDepartmentEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'10dd7f45f36233049c4af9ca417089f5',
'ccff36439eacae953f85ff636c9dac74',
],
},
{
viewtag: '95e33ff2469ba40d3e0c00f5c3f61501',
viewmodule: 'ou',
viewname: 'IBZOrganizationEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'ccff36439eacae953f85ff636c9dac74',
],
},
{
viewtag: '983f3ae1533a5cd62619dedb79bb4b28',
viewmodule: 'uaa',
viewname: 'SysRolePermissionCustomView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '9cdad5e2bed51cdcd90b4b7fb3104a5a',
viewmodule: 'ou',
viewname: 'IBZDepartmentOptionView',
viewaction: '',
viewdatachange: false,
refviews: [
'10dd7f45f36233049c4af9ca417089f5',
'ccff36439eacae953f85ff636c9dac74',
],
},
{
viewtag: '9cf7a70099bff83a10f6ae65c4d54692',
viewmodule: 'ou',
viewname: 'IBZEmployeeOptionView',
viewaction: '',
viewdatachange: false,
refviews: [
'10dd7f45f36233049c4af9ca417089f5',
'ccff36439eacae953f85ff636c9dac74',
],
},
{
viewtag: '9ffa35efe3d70cf4b9fa4e83dd1979c6',
viewmodule: 'ou',
viewname: 'IBZEmployeePickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'c84df2684f29705ac6c5dec67df9f217',
],
},
{
viewtag: 'b23a721ca159ac2490b768d795e85d17',
viewmodule: 'workflow',
viewname: 'WFGroupEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'135872676ba63d430b2f20bd20364286',
],
},
{ {
viewtag: 'b50d665e5fb8a9da01406754e0ab5f15', viewtag: 'b50d665e5fb8a9da01406754e0ab5f15',
viewmodule: 'rt', viewmodule: 'rt',
...@@ -262,107 +17,6 @@ export const viewstate: any = { ...@@ -262,107 +17,6 @@ export const viewstate: any = {
'f498dfb24e88df7c70a5c09ecb587647', 'f498dfb24e88df7c70a5c09ecb587647',
], ],
}, },
{
viewtag: 'bf5e850471bab461fbb6739578e510c5',
viewmodule: 'ou',
viewname: 'IBZDeptMemberEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'9ffa35efe3d70cf4b9fa4e83dd1979c6',
'10dd7f45f36233049c4af9ca417089f5',
],
},
{
viewtag: 'c0cdac5d5b5691ae8a326f5972aec67f',
viewmodule: 'ou',
viewname: 'IBZDepartmentTreeExpView',
viewaction: '',
viewdatachange: false,
refviews: [
'40fe6b28b9f7902341da46bb74a02d59',
],
},
{
viewtag: 'c42bc30741bd6add20b00494231dfa24',
viewmodule: 'ou',
viewname: 'IBZOrganizationGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'2ed85bebb69b8d23388420b95163228a',
'95e33ff2469ba40d3e0c00f5c3f61501',
'ccff36439eacae953f85ff636c9dac74',
],
},
{
viewtag: 'c84df2684f29705ac6c5dec67df9f217',
viewmodule: 'ou',
viewname: 'IBZEmployeePickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'c9c73c8d2e61bd29a304622f3d39b522',
viewmodule: 'workflow',
viewname: 'WFUserPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'ccff36439eacae953f85ff636c9dac74',
viewmodule: 'ou',
viewname: 'IBZOrganizationPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'cf8e6d455f8e88e66bbbe1bdb4c84274',
],
},
{
viewtag: 'cf8e6d455f8e88e66bbbe1bdb4c84274',
viewmodule: 'ou',
viewname: 'IBZOrganizationPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'ccff36439eacae953f85ff636c9dac74',
],
},
{
viewtag: 'e3284e895913f7d38d1bcbe898bda0b7',
viewmodule: 'ou',
viewname: 'IBZDepartmentPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'edde313015e1db7c366028307d88d20c',
viewmodule: 'uaa',
viewname: 'SysUserRoleEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'26cc2d5c69f1525eaa415b7de1a0d4a6',
'32fe9ab4a9e1b8d62b9ee802e4746965',
],
},
{
viewtag: 'f498dfb24e88df7c70a5c09ecb587647',
viewmodule: 'workflow',
viewname: 'WFGroupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'b23a721ca159ac2490b768d795e85d17',
],
},
], ],
createdviews: [], createdviews: [],
} }
\ No newline at end of file
...@@ -37,11 +37,6 @@ ...@@ -37,11 +37,6 @@
git clone -b master $para2 ibzrt/ git clone -b master $para2 ibzrt/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzrt/ cd ibzrt/
mvn clean package -Pweb
cd ibzrt-app/ibzrt-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzrt-app-web.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzrt-app-web.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzrt-app-web.jar
EXPOSE 30000 EXPOSE 8080
ADD ibzrt-app-web.jar /ibzrt-app-web.jar ADD ibzrt-app-web.jar /ibzrt-app-web.jar
...@@ -3,21 +3,9 @@ services: ...@@ -3,21 +3,9 @@ services:
ibzrt-app-web: ibzrt-app-web:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzrt-app-web:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzrt-app-web:latest
ports: ports:
- "30000:30000" - "8080:8080"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=30000
- 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
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 1
......
...@@ -5,11 +5,11 @@ zuul: ...@@ -5,11 +5,11 @@ zuul:
routes: routes:
sys_role_permission: sys_role_permission:
path: /sysrolepermissions/** path: /sysrolepermissions/**
serviceId: ibzrt-api serviceId: ibzuaa-api
stripPrefix: false stripPrefix: false
sys_user: sys_user:
path: /sysusers/** path: /sysusers/**
serviceId: ibzrt-api serviceId: ibzuaa-api
stripPrefix: false stripPrefix: false
wf_group_member: wf_group_member:
path: /wfmembers/** path: /wfmembers/**
...@@ -21,7 +21,7 @@ zuul: ...@@ -21,7 +21,7 @@ zuul:
stripPrefix: false stripPrefix: false
ibzorg: ibzorg:
path: /ibzorganizations/** path: /ibzorganizations/**
serviceId: ibzrt-api serviceId: ibzou-api
stripPrefix: false stripPrefix: false
wf_group: wf_group:
path: /wfgroups/** path: /wfgroups/**
...@@ -29,23 +29,23 @@ zuul: ...@@ -29,23 +29,23 @@ zuul:
stripPrefix: false stripPrefix: false
sys_user_role: sys_user_role:
path: /sysuserroles/** path: /sysuserroles/**
serviceId: ibzrt-api serviceId: ibzuaa-api
stripPrefix: false stripPrefix: false
sys_role: sys_role:
path: /sysroles/** path: /sysroles/**
serviceId: ibzrt-api serviceId: ibzuaa-api
stripPrefix: false stripPrefix: false
ibzdeptmember: ibzdeptmember:
path: /ibzdeptmembers/** path: /ibzdeptmembers/**
serviceId: ibzrt-api serviceId: ibzou-api
stripPrefix: false stripPrefix: false
ibzdept: ibzdept:
path: /ibzdepartments/** path: /ibzdepartments/**
serviceId: ibzrt-api serviceId: ibzou-api
stripPrefix: false stripPrefix: false
ibzemp: ibzemp:
path: /ibzemployees/** path: /ibzemployees/**
serviceId: ibzrt-api serviceId: ibzou-api
stripPrefix: false stripPrefix: false
loginv7: loginv7:
path: /v7/login path: /v7/login
......
...@@ -4,6 +4,14 @@ server: ...@@ -4,6 +4,14 @@ server:
#zuul网关路由设置 #zuul网关路由设置
zuul: zuul:
routes: routes:
wf_pssystem:
path: /wf_pssystems/**
serviceId: ibzwf-api
stripPrefix: false
ibzorg:
path: /ibzorgs/**
serviceId: ibzou-api
stripPrefix: false
wf_instance: wf_instance:
path: /wf_instances/** path: /wf_instances/**
serviceId: ibzwf-api serviceId: ibzwf-api
...@@ -12,30 +20,74 @@ zuul: ...@@ -12,30 +20,74 @@ zuul:
path: /wf_models/** path: /wf_models/**
serviceId: ibzwf-api serviceId: ibzwf-api
stripPrefix: false stripPrefix: false
wf_group_member: ibzdictitem:
path: /wf_group_members/** path: /ibzdictitems/**
serviceId: ibzdict-api
stripPrefix: false
wf_task_way:
path: /wf_task_ways/**
serviceId: ibzwf-api serviceId: ibzwf-api
stripPrefix: false stripPrefix: false
wf_task: wf_task:
path: /wf_tasks/** path: /wf_tasks/**
serviceId: ibzwf-api serviceId: ibzwf-api
stripPrefix: false stripPrefix: false
wf_group_member:
path: /wf_group_members/**
serviceId: ibzwf-api
stripPrefix: false
sys_authlog:
path: /sys_authlogs/**
serviceId: ibzuaa-api
stripPrefix: false
wf_definition_node: wf_definition_node:
path: /wf_definition_nodes/** path: /wf_definition_nodes/**
serviceId: ibzwf-api serviceId: ibzwf-api
stripPrefix: false stripPrefix: false
wf_pssystem: sys_role_permission:
path: /wf_pssystems/** path: /sys_role_permissions/**
serviceId: ibzwf-api serviceId: ibzuaa-api
stripPrefix: false stripPrefix: false
wf_task_way: sys_user:
path: /wf_task_ways/** path: /sys_users/**
serviceId: ibzwf-api serviceId: ibzuaa-api
stripPrefix: false
ibzdict:
path: /ibzdicts/**
serviceId: ibzdict-api
stripPrefix: false
ibzemp:
path: /ibzemps/**
serviceId: ibzou-api
stripPrefix: false
sys_user_role:
path: /sys_user_roles/**
serviceId: ibzuaa-api
stripPrefix: false stripPrefix: false
wf_definition: wf_definition:
path: /wf_definitions/** path: /wf_definitions/**
serviceId: ibzwf-api serviceId: ibzwf-api
stripPrefix: false stripPrefix: false
sys_role:
path: /sys_roles/**
serviceId: ibzuaa-api
stripPrefix: false
ibzdeptmember:
path: /ibzdeptmembers/**
serviceId: ibzou-api
stripPrefix: false
sys_pssystem:
path: /sys_pssystems/**
serviceId: ibzuaa-api
stripPrefix: false
sys_permission:
path: /sys_permissions/**
serviceId: ibzuaa-api
stripPrefix: false
ibzdept:
path: /ibzdepts/**
serviceId: ibzou-api
stripPrefix: false
loginv7: loginv7:
path: /v7/login path: /v7/login
serviceId: ibzuaa-api serviceId: ibzuaa-api
......
package cn.ibizlab.core.dict.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.dict.domain.IBZDict;
import cn.ibizlab.core.dict.filter.IBZDictSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[IBZDict] 服务对象接口
*/
@Component
public class IBZDictFallback implements IBZDictFeignClient{
public Page<IBZDict> select(){
return null;
}
public IBZDict create(IBZDict ibzdict){
return null;
}
public Boolean createBatch(List<IBZDict> ibzdicts){
return false;
}
public Boolean remove(String dictid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public IBZDict update(String dictid, IBZDict ibzdict){
return null;
}
public Boolean updateBatch(List<IBZDict> ibzdicts){
return false;
}
public IBZDict getDraft(){
return null;
}
public Boolean save(IBZDict ibzdict){
return false;
}
public Boolean saveBatch(List<IBZDict> ibzdicts){
return false;
}
public IBZDict get(String dictid){
return null;
}
public Boolean checkKey(IBZDict ibzdict){
return false;
}
public Page<IBZDict> searchDefault(IBZDictSearchContext context){
return null;
}
}
package cn.ibizlab.core.dict.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.dict.domain.IBZDict;
import cn.ibizlab.core.dict.filter.IBZDictSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[IBZDict] 服务对象接口
*/
@FeignClient(value = "ibzdict-api", contextId = "IBZDict", fallback = IBZDictFallback.class)
public interface IBZDictFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/ibzdicts/select")
Page<IBZDict> select();
@RequestMapping(method = RequestMethod.POST, value = "/ibzdicts")
IBZDict create(@RequestBody IBZDict ibzdict);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdicts/batch")
Boolean createBatch(@RequestBody List<IBZDict> ibzdicts);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdicts/{dictid}")
Boolean remove(@PathVariable("dictid") String dictid);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdicts/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdicts/{dictid}")
IBZDict update(@PathVariable("dictid") String dictid,@RequestBody IBZDict ibzdict);
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdicts/batch")
Boolean updateBatch(@RequestBody List<IBZDict> ibzdicts);
@RequestMapping(method = RequestMethod.GET, value = "/ibzdicts/getdraft")
IBZDict getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/ibzdicts/save")
Boolean save(@RequestBody IBZDict ibzdict);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdicts/save")
Boolean saveBatch(@RequestBody List<IBZDict> ibzdicts);
@RequestMapping(method = RequestMethod.GET, value = "/ibzdicts/{dictid}")
IBZDict get(@PathVariable("dictid") String dictid);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdicts/checkkey")
Boolean checkKey(@RequestBody IBZDict ibzdict);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdicts/searchdefault")
Page<IBZDict> searchDefault(@RequestBody IBZDictSearchContext context);
}
package cn.ibizlab.core.dict.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.dict.domain.IBZDictItem;
import cn.ibizlab.core.dict.filter.IBZDictItemSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[IBZDictItem] 服务对象接口
*/
@Component
public class IBZDictItemFallback implements IBZDictItemFeignClient{
public Page<IBZDictItem> select(){
return null;
}
public IBZDictItem update(String itemid, IBZDictItem ibzdictitem){
return null;
}
public Boolean updateBatch(List<IBZDictItem> ibzdictitems){
return false;
}
public Boolean checkKey(IBZDictItem ibzdictitem){
return false;
}
public Boolean save(IBZDictItem ibzdictitem){
return false;
}
public Boolean saveBatch(List<IBZDictItem> ibzdictitems){
return false;
}
public Boolean remove(String itemid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public IBZDictItem get(String itemid){
return null;
}
public IBZDictItem create(IBZDictItem ibzdictitem){
return null;
}
public Boolean createBatch(List<IBZDictItem> ibzdictitems){
return false;
}
public IBZDictItem getDraft(){
return null;
}
public Page<IBZDictItem> searchDefault(IBZDictItemSearchContext context){
return null;
}
}
package cn.ibizlab.core.dict.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.dict.domain.IBZDictItem;
import cn.ibizlab.core.dict.filter.IBZDictItemSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[IBZDictItem] 服务对象接口
*/
@FeignClient(value = "ibzdict-api", contextId = "IBZDictItem", fallback = IBZDictItemFallback.class)
public interface IBZDictItemFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/ibzdictitems/select")
Page<IBZDictItem> select();
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdictitems/{itemid}")
IBZDictItem update(@PathVariable("itemid") String itemid,@RequestBody IBZDictItem ibzdictitem);
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdictitems/batch")
Boolean updateBatch(@RequestBody List<IBZDictItem> ibzdictitems);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdictitems/checkkey")
Boolean checkKey(@RequestBody IBZDictItem ibzdictitem);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdictitems/save")
Boolean save(@RequestBody IBZDictItem ibzdictitem);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdictitems/save")
Boolean saveBatch(@RequestBody List<IBZDictItem> ibzdictitems);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdictitems/{itemid}")
Boolean remove(@PathVariable("itemid") String itemid);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdictitems/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.GET, value = "/ibzdictitems/{itemid}")
IBZDictItem get(@PathVariable("itemid") String itemid);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdictitems")
IBZDictItem create(@RequestBody IBZDictItem ibzdictitem);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdictitems/batch")
Boolean createBatch(@RequestBody List<IBZDictItem> ibzdictitems);
@RequestMapping(method = RequestMethod.GET, value = "/ibzdictitems/getdraft")
IBZDictItem getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/ibzdictitems/searchdefault")
Page<IBZDictItem> searchDefault(@RequestBody IBZDictItemSearchContext context);
}
...@@ -21,90 +21,83 @@ import java.io.Serializable; ...@@ -21,90 +21,83 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[数据字典] * ServiceApi [数据字典] 对象
*/ */
@Data @Data
@TableName(value = "IBZDICT",resultMap = "IBZDictResultMap") public class IBZDict extends EntityClient implements Serializable {
public class IBZDict extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 字典标识 * 字典标识
*/ */
@DEField(name = "ibzdictid" , isKeyField=true) @DEField(name = "ibzdictid" , isKeyField=true)
@TableId(value= "ibzdictid",type=IdType.UUID)
@JSONField(name = "dictid") @JSONField(name = "dictid")
@JsonProperty("dictid") @JsonProperty("dictid")
private String dictid; private String dictid;
/** /**
* 字典名称 * 字典名称
*/ */
@DEField(name = "ibzdictname") @DEField(name = "ibzdictname")
@TableField(value = "ibzdictname")
@JSONField(name = "dictname") @JSONField(name = "dictname")
@JsonProperty("dictname") @JsonProperty("dictname")
private String dictname; private String dictname;
/** /**
* 逻辑有效标志 * 逻辑有效标志
*/ */
@DEField(preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0") @DEField(preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0")
@TableLogic(value= "1",delval="0")
@TableField(value = "enable")
@JSONField(name = "enable") @JSONField(name = "enable")
@JsonProperty("enable") @JsonProperty("enable")
private Integer enable; private Integer enable;
/** /**
* 建立时间 * 建立时间
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEDATE) @DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createdate; private Timestamp createdate;
/** /**
* 更新时间 * 更新时间
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEDATE) @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate") @JsonProperty("updatedate")
private Timestamp updatedate; private Timestamp updatedate;
/** /**
* 建立人 * 建立人
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEMAN) @DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman") @JSONField(name = "createman")
@JsonProperty("createman") @JsonProperty("createman")
private String createman; private String createman;
/** /**
* 更新人 * 更新人
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEMAN) @DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman") @JSONField(name = "updateman")
@JsonProperty("updateman") @JsonProperty("updateman")
private String updateman; private String updateman;
/** /**
* 字典项目 * 字典项目
*/ */
@JsonIgnore @JSONField(name = "items")
@JSONField(serialize = false) @JsonProperty("items")
@TableField(exist = false)
private List<cn.ibizlab.core.dict.domain.IBZDictItem> items; private List<cn.ibizlab.core.dict.domain.IBZDictItem> items;
/** /**
* 设置 [字典名称] * 设置 [字典名称]
*/ */
......
...@@ -21,133 +21,127 @@ import java.io.Serializable; ...@@ -21,133 +21,127 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[字典项目] * ServiceApi [字典项目] 对象
*/ */
@Data @Data
@TableName(value = "IBZDICTITEM",resultMap = "IBZDictItemResultMap") public class IBZDictItem extends EntityClient implements Serializable {
public class IBZDictItem extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 字典项目标识 * 字典项目标识
*/ */
@DEField(name = "ibzdictitemid" , isKeyField=true) @DEField(name = "ibzdictitemid" , isKeyField=true)
@TableId(value= "ibzdictitemid",type=IdType.UUID)
@JSONField(name = "itemid") @JSONField(name = "itemid")
@JsonProperty("itemid") @JsonProperty("itemid")
private String itemid; private String itemid;
/** /**
* 栏目显示值 * 栏目显示值
*/ */
@DEField(name = "ibzdictitemname") @DEField(name = "ibzdictitemname")
@TableField(value = "ibzdictitemname")
@JSONField(name = "itemname") @JSONField(name = "itemname")
@JsonProperty("itemname") @JsonProperty("itemname")
private String itemname; private String itemname;
/** /**
* 栏目值 * 栏目值
*/ */
@DEField(name = "dictitemval") @DEField(name = "dictitemval")
@TableField(value = "dictitemval")
@JSONField(name = "itemval") @JSONField(name = "itemval")
@JsonProperty("itemval") @JsonProperty("itemval")
private String itemval; private String itemval;
/** /**
* 字典标识 * 字典标识
*/ */
@TableField(value = "dictid")
@JSONField(name = "dictid") @JSONField(name = "dictid")
@JsonProperty("dictid") @JsonProperty("dictid")
private String dictid; private String dictid;
/** /**
* 父栏目值 * 父栏目值
*/ */
@TableField(value = "pitemval")
@JSONField(name = "pitemval") @JSONField(name = "pitemval")
@JsonProperty("pitemval") @JsonProperty("pitemval")
private String pitemval; private String pitemval;
/** /**
* 过滤项 * 过滤项
*/ */
@TableField(value = "itemfilter")
@JSONField(name = "itemfilter") @JSONField(name = "itemfilter")
@JsonProperty("itemfilter") @JsonProperty("itemfilter")
private String itemfilter; private String itemfilter;
/** /**
* 栏目样式 * 栏目样式
*/ */
@DEField(defaultValue = "itemcls" , defaultValueType = DEFieldDefaultValueType.PARAM) @DEField(defaultValue = "itemcls" , defaultValueType = DEFieldDefaultValueType.PARAM)
@TableField(value = "itemcls")
@JSONField(name = "itemcls") @JSONField(name = "itemcls")
@JsonProperty("itemcls") @JsonProperty("itemcls")
private String itemcls; private String itemcls;
/** /**
* 图标 * 图标
*/ */
@DEField(defaultValue = "no,png") @DEField(defaultValue = "no,png")
@TableField(value = "itemicon")
@JSONField(name = "itemicon") @JSONField(name = "itemicon")
@JsonProperty("itemicon") @JsonProperty("itemicon")
private String itemicon; private String itemicon;
/** /**
* 排序 * 排序
*/ */
@TableField(value = "showorder")
@JSONField(name = "showorder") @JSONField(name = "showorder")
@JsonProperty("showorder") @JsonProperty("showorder")
private Integer showorder; private Integer showorder;
/** /**
* 建立时间 * 建立时间
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEDATE) @DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createdate; private Timestamp createdate;
/** /**
* 更新时间 * 更新时间
*/ */
@DEField(defaultValueType = DEFieldDefaultValueType.CURTIME , preType = DEPredefinedFieldType.UPDATEDATE) @DEField(defaultValueType = DEFieldDefaultValueType.CURTIME , preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate") @JsonProperty("updatedate")
private Timestamp updatedate; private Timestamp updatedate;
/** /**
* 更新人 * 更新人
*/ */
@DEField(defaultValue = "SRFPERSONID" , defaultValueType = DEFieldDefaultValueType.SESSION , preType = DEPredefinedFieldType.UPDATEMAN) @DEField(defaultValue = "SRFPERSONID" , defaultValueType = DEFieldDefaultValueType.SESSION , preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman") @JSONField(name = "updateman")
@JsonProperty("updateman") @JsonProperty("updateman")
private String updateman; private String updateman;
/** /**
* 建立人 * 建立人
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEMAN) @DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman") @JSONField(name = "createman")
@JsonProperty("createman") @JsonProperty("createman")
private String createman; private String createman;
/** /**
* 字典 * 字典
*/ */
@JsonIgnore @JSONField(name = "dict")
@JSONField(serialize = false) @JsonProperty("dict")
@TableField(exist = false)
private cn.ibizlab.core.dict.domain.IBZDict dict; private cn.ibizlab.core.dict.domain.IBZDict dict;
/** /**
* 设置 [栏目显示值] * 设置 [栏目显示值]
*/ */
...@@ -205,22 +199,6 @@ public class IBZDictItem extends EntityMP implements Serializable { ...@@ -205,22 +199,6 @@ public class IBZDictItem extends EntityMP implements Serializable {
this.modify("showorder",showorder); this.modify("showorder",showorder);
} }
/**
* 获取 [字典项目标识]
*/
public String getItemid(){
if(ObjectUtils.isEmpty(itemid)){
itemid=(String)getDefaultKey(true);
}
return itemid;
}
@Override
public Serializable getDefaultKey(boolean gen) {
if((!ObjectUtils.isEmpty(this.getDictid()))&&(!ObjectUtils.isEmpty(this.getItemval())))
return DigestUtils.md5DigestAsHex(String.format("%s||%s" ,this.getDictid(),this.getItemval()).getBytes());
return null;
}
} }
...@@ -17,50 +17,21 @@ import org.springframework.util.ObjectUtils; ...@@ -17,50 +17,21 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.dict.domain.IBZDictItem;
/** /**
* 关系型数据实体[IBZDictItem] 查询条件对象 * ServiceApi数据实体[IBZDictItem] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class IBZDictItemSearchContext extends QueryWrapperContext<IBZDictItem> { public class IBZDictItemSearchContext extends SearchContextBase {
private String n_ibzdictitemname_like;//[栏目显示值] private String n_ibzdictitemname_like;//[栏目显示值]
public void setN_ibzdictitemname_like(String n_ibzdictitemname_like) {
this.n_ibzdictitemname_like = n_ibzdictitemname_like;
if(!ObjectUtils.isEmpty(this.n_ibzdictitemname_like)){
this.getSelectCond().like("ibzdictitemname", n_ibzdictitemname_like);
}
}
private String n_dictitemval_like;//[栏目值] private String n_dictitemval_like;//[栏目值]
public void setN_dictitemval_like(String n_dictitemval_like) {
this.n_dictitemval_like = n_dictitemval_like;
if(!ObjectUtils.isEmpty(this.n_dictitemval_like)){
this.getSelectCond().like("dictitemval", n_dictitemval_like);
}
}
private String n_dictid_eq;//[字典标识] private String n_dictid_eq;//[字典标识]
public void setN_dictid_eq(String n_dictid_eq) {
this.n_dictid_eq = n_dictid_eq;
if(!ObjectUtils.isEmpty(this.n_dictid_eq)){
this.getSelectCond().eq("dictid", n_dictid_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("ibzdictitemname",query);
}
}
} }
...@@ -17,43 +17,19 @@ import org.springframework.util.ObjectUtils; ...@@ -17,43 +17,19 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.dict.domain.IBZDict;
/** /**
* 关系型数据实体[IBZDict] 查询条件对象 * ServiceApi数据实体[IBZDict] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class IBZDictSearchContext extends QueryWrapperContext<IBZDict> { public class IBZDictSearchContext extends SearchContextBase {
private String n_ibzdictid_like;//[字典标识] private String n_ibzdictid_like;//[字典标识]
public void setN_ibzdictid_like(String n_ibzdictid_like) {
this.n_ibzdictid_like = n_ibzdictid_like;
if(!ObjectUtils.isEmpty(this.n_ibzdictid_like)){
this.getSelectCond().like("ibzdictid", n_ibzdictid_like);
}
}
private String n_ibzdictname_like;//[字典名称] private String n_ibzdictname_like;//[字典名称]
public void setN_ibzdictname_like(String n_ibzdictname_like) {
this.n_ibzdictname_like = n_ibzdictname_like;
if(!ObjectUtils.isEmpty(this.n_ibzdictname_like)){
this.getSelectCond().like("ibzdictname", n_ibzdictname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("ibzdictname",query);
}
}
}
}
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.dict.domain.IBZDictItem; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.dict.domain.IBZDictItem;
import cn.ibizlab.core.dict.filter.IBZDictItemSearchContext; import cn.ibizlab.core.dict.filter.IBZDictItemSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[IBZDictItem] 服务对象接口 * 实体[IBZDictItem] 服务对象接口
*/ */
public interface IIBZDictItemService extends IService<IBZDictItem>{ public interface IIBZDictItemService{
boolean update(IBZDictItem et) ; boolean update(IBZDictItem et) ;
void updateBatch(List<IBZDictItem> list) ; void updateBatch(List<IBZDictItem> list) ;
...@@ -40,24 +38,8 @@ public interface IIBZDictItemService extends IService<IBZDictItem>{ ...@@ -40,24 +38,8 @@ public interface IIBZDictItemService extends IService<IBZDictItem>{
List<IBZDictItem> selectByDictid(String dictid) ; List<IBZDictItem> selectByDictid(String dictid) ;
void removeByDictid(String dictid) ; void removeByDictid(String dictid) ;
void saveByDictid(String dictid,List<IBZDictItem> list) ; void saveByDictid(String dictid,List<IBZDictItem> list) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<IBZDictItem> getIbzdictitemByIds(List<String> ids) ;
List<IBZDictItem> getIbzdictitemByEntities(List<IBZDictItem> entities) ;
} }
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.dict.domain.IBZDict; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.dict.domain.IBZDict;
import cn.ibizlab.core.dict.filter.IBZDictSearchContext; import cn.ibizlab.core.dict.filter.IBZDictSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[IBZDict] 服务对象接口 * 实体[IBZDict] 服务对象接口
*/ */
public interface IIBZDictService extends IService<IBZDict>{ public interface IIBZDictService{
boolean create(IBZDict et) ; boolean create(IBZDict et) ;
void createBatch(List<IBZDict> list) ; void createBatch(List<IBZDict> list) ;
...@@ -37,24 +35,8 @@ public interface IIBZDictService extends IService<IBZDict>{ ...@@ -37,24 +35,8 @@ public interface IIBZDictService extends IService<IBZDict>{
IBZDict get(String key) ; IBZDict get(String key) ;
boolean checkKey(IBZDict et) ; boolean checkKey(IBZDict et) ;
Page<IBZDict> searchDefault(IBZDictSearchContext context) ; Page<IBZDict> searchDefault(IBZDictSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<IBZDict> getIbzdictByIds(List<String> ids) ;
List<IBZDict> getIbzdictByEntities(List<IBZDict> entities) ;
} }
...@@ -30,95 +30,67 @@ import cn.ibizlab.core.dict.service.IIBZDictItemService; ...@@ -30,95 +30,67 @@ import cn.ibizlab.core.dict.service.IIBZDictItemService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.dict.client.IBZDictItemFeignClient;
import cn.ibizlab.core.dict.mapper.IBZDictItemMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[字典项目] 服务对象接口实现 * 实体[字典项目] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("IBZDictItemServiceImpl") @Service
public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDictItem> implements IIBZDictItemService { public class IBZDictItemServiceImpl implements IIBZDictItemService {
@Autowired @Autowired
@Lazy IBZDictItemFeignClient iBZDictItemFeignClient;
private cn.ibizlab.core.dict.service.IIBZDictService ibzdictService;
private int batchSize = 500;
@Override @Override
@Transactional
public boolean update(IBZDictItem et) { public boolean update(IBZDictItem et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("ibzdictitemid",et.getItemid()))) IBZDictItem rt = iBZDictItemFeignClient.update(et.getItemid(),et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getItemid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<IBZDictItem> list){
public void updateBatch(List<IBZDictItem> list) { iBZDictItemFeignClient.updateBatch(list) ;
updateBatchById(list,batchSize);
} }
@Override @Override
public boolean checkKey(IBZDictItem et) { public boolean checkKey(IBZDictItem et) {
return (!ObjectUtils.isEmpty(et.getItemid()))&&(!Objects.isNull(this.getById(et.getItemid()))); return iBZDictItemFeignClient.checkKey(et);
} }
@Override @Override
@Transactional @Transactional
public boolean save(IBZDictItem et) { public boolean save(IBZDictItem et) {
if(!saveOrUpdate(et)) if(et.getItemid()==null) et.setItemid((String)et.getDefaultKey(true));
if(!iBZDictItemFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(IBZDictItem et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<IBZDictItem> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<IBZDictItem> list) { public void saveBatch(List<IBZDictItem> list) {
saveOrUpdateBatch(list,batchSize); iBZDictItemFeignClient.saveBatch(list) ;
} }
@Override @Override
@Transactional public boolean remove(String itemid) {
public boolean remove(String key) { boolean result=iBZDictItemFeignClient.remove(itemid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { iBZDictItemFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
@Transactional public IBZDictItem get(String itemid) {
public IBZDictItem get(String key) { IBZDictItem et=iBZDictItemFeignClient.get(itemid);
IBZDictItem et = getById(key);
if(et==null){ if(et==null){
et=new IBZDictItem(); et=new IBZDictItem();
et.setItemid(key); et.setItemid(itemid);
} }
else{ else{
} }
...@@ -126,33 +98,42 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi ...@@ -126,33 +98,42 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
} }
@Override @Override
@Transactional
public boolean create(IBZDictItem et) { public boolean create(IBZDictItem et) {
if(!this.retBool(this.baseMapper.insert(et))) IBZDictItem rt = iBZDictItemFeignClient.create(et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getItemid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<IBZDictItem> list){
public void createBatch(List<IBZDictItem> list) { iBZDictItemFeignClient.createBatch(list) ;
this.saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
public IBZDictItem getDraft(IBZDictItem et) { public IBZDictItem getDraft(IBZDictItem et) {
et=iBZDictItemFeignClient.getDraft();
return et; return et;
} }
@Override @Override
public List<IBZDictItem> selectByDictid(String dictid) { public List<IBZDictItem> selectByDictid(String dictid) {
return baseMapper.selectByDictid(dictid); IBZDictItemSearchContext context=new IBZDictItemSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_dictid_eq(dictid);
return iBZDictItemFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByDictid(String dictid) { public void removeByDictid(String dictid) {
this.remove(new QueryWrapper<IBZDictItem>().eq("dictid",dictid)); Set<String> delIds=new HashSet<String>();
for(IBZDictItem before:selectByDictid(dictid)){
delIds.add(before.getItemid());
}
if(delIds.size()>0)
this.removeBatch(delIds);
} }
@Override @Override
...@@ -185,61 +166,16 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi ...@@ -185,61 +166,16 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
} }
/** /**
* 查询集合 DEFAULT * 查询集合 DEFAULT
*/ */
@Override @Override
public Page<IBZDictItem> searchDefault(IBZDictItemSearchContext context) { public Page<IBZDictItem> searchDefault(IBZDictItemSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZDictItem> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<IBZDictItem> iBZDictItems=iBZDictItemFeignClient.searchDefault(context);
return new PageImpl<IBZDictItem>(pages.getRecords(), context.getPageable(), pages.getTotal()); return iBZDictItems;
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
} }
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<IBZDictItem> getIbzdictitemByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<IBZDictItem> getIbzdictitemByEntities(List<IBZDictItem> entities) {
List ids =new ArrayList();
for(IBZDictItem entity : entities){
Serializable id=entity.getItemid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
} }
......
...@@ -30,182 +30,106 @@ import cn.ibizlab.core.dict.service.IIBZDictService; ...@@ -30,182 +30,106 @@ import cn.ibizlab.core.dict.service.IIBZDictService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.dict.client.IBZDictFeignClient;
import cn.ibizlab.core.dict.mapper.IBZDictMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[数据字典] 服务对象接口实现 * 实体[数据字典] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("IBZDictServiceImpl") @Service
public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> implements IIBZDictService { public class IBZDictServiceImpl implements IIBZDictService {
@Autowired @Autowired
@Lazy IBZDictFeignClient iBZDictFeignClient;
private cn.ibizlab.core.dict.service.IIBZDictItemService ibzdictitemService;
private int batchSize = 500;
@Override @Override
@Transactional
public boolean create(IBZDict et) { public boolean create(IBZDict et) {
if(!this.retBool(this.baseMapper.insert(et))) IBZDict rt = iBZDictFeignClient.create(et);
if(rt==null)
return false; return false;
ibzdictitemService.saveByDictid(et.getDictid(),et.getItems()); CachedBeanCopier.copy(rt,et);
CachedBeanCopier.copy(get(et.getDictid()),et);
return true; return true;
} }
@Override public void createBatch(List<IBZDict> list){
public void createBatch(List<IBZDict> list) { iBZDictFeignClient.createBatch(list) ;
this.saveBatch(list,batchSize);
} }
@Override @Override
@Transactional public boolean remove(String dictid) {
public boolean remove(String key) { boolean result=iBZDictFeignClient.remove(dictid) ;
ibzdictitemService.removeByDictid(key) ; return result;
boolean result=removeById(key);
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { iBZDictFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
@Transactional
public boolean update(IBZDict et) { public boolean update(IBZDict et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("ibzdictid",et.getDictid()))) IBZDict rt = iBZDictFeignClient.update(et.getDictid(),et);
if(rt==null)
return false; return false;
ibzdictitemService.saveByDictid(et.getDictid(),et.getItems()); CachedBeanCopier.copy(rt,et);
CachedBeanCopier.copy(get(et.getDictid()),et);
return true; return true;
} }
@Override public void updateBatch(List<IBZDict> list){
public void updateBatch(List<IBZDict> list) { iBZDictFeignClient.updateBatch(list) ;
updateBatchById(list,batchSize);
} }
@Override @Override
public IBZDict getDraft(IBZDict et) { public IBZDict getDraft(IBZDict et) {
et=iBZDictFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional @Transactional
public boolean save(IBZDict et) { public boolean save(IBZDict et) {
if(!saveOrUpdate(et)) if(et.getDictid()==null) et.setDictid((String)et.getDefaultKey(true));
if(!iBZDictFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(IBZDict et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<IBZDict> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<IBZDict> list) { public void saveBatch(List<IBZDict> list) {
saveOrUpdateBatch(list,batchSize); iBZDictFeignClient.saveBatch(list) ;
} }
@Override @Override
@Transactional public IBZDict get(String dictid) {
public IBZDict get(String key) { IBZDict et=iBZDictFeignClient.get(dictid);
IBZDict et = getById(key);
if(et==null){ if(et==null){
et=new IBZDict(); et=new IBZDict();
et.setDictid(key); et.setDictid(dictid);
} }
else{ else{
et.setItems(ibzdictitemService.selectByDictid(key));
} }
return et; return et;
} }
@Override @Override
public boolean checkKey(IBZDict et) { public boolean checkKey(IBZDict et) {
return (!ObjectUtils.isEmpty(et.getDictid()))&&(!Objects.isNull(this.getById(et.getDictid()))); return iBZDictFeignClient.checkKey(et);
} }
/** /**
* 查询集合 DEFAULT * 查询集合 DEFAULT
*/ */
@Override @Override
public Page<IBZDict> searchDefault(IBZDictSearchContext context) { public Page<IBZDict> searchDefault(IBZDictSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZDict> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<IBZDict> iBZDicts=iBZDictFeignClient.searchDefault(context);
return new PageImpl<IBZDict>(pages.getRecords(), context.getPageable(), pages.getTotal()); return iBZDicts;
} }
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<IBZDict> getIbzdictByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<IBZDict> getIbzdictByEntities(List<IBZDict> entities) {
List ids =new ArrayList();
for(IBZDict entity : entities){
Serializable id=entity.getDictid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
} }
package cn.ibizlab.core.ou.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.ou.domain.IBZDepartment;
import cn.ibizlab.core.ou.filter.IBZDepartmentSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[IBZDepartment] 服务对象接口
*/
@Component
public class IBZDepartmentFallback implements IBZDepartmentFeignClient{
public Page<IBZDepartment> select(){
return null;
}
public Boolean save(IBZDepartment ibzdepartment){
return false;
}
public Boolean saveBatch(List<IBZDepartment> ibzdepartments){
return false;
}
public IBZDepartment get(String deptid){
return null;
}
public Boolean remove(String deptid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public Boolean checkKey(IBZDepartment ibzdepartment){
return false;
}
public IBZDepartment update(String deptid, IBZDepartment ibzdepartment){
return null;
}
public Boolean updateBatch(List<IBZDepartment> ibzdepartments){
return false;
}
public IBZDepartment create(IBZDepartment ibzdepartment){
return null;
}
public Boolean createBatch(List<IBZDepartment> ibzdepartments){
return false;
}
public IBZDepartment getDraft(){
return null;
}
public Page<IBZDepartment> searchCurDept(IBZDepartmentSearchContext context){
return null;
}
public Page<IBZDepartment> searchDefault(IBZDepartmentSearchContext context){
return null;
}
}
package cn.ibizlab.core.ou.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.ou.domain.IBZDepartment;
import cn.ibizlab.core.ou.filter.IBZDepartmentSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[IBZDepartment] 服务对象接口
*/
@FeignClient(value = "ibzou-api", contextId = "IBZDepartment", fallback = IBZDepartmentFallback.class)
public interface IBZDepartmentFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/select")
Page<IBZDepartment> select();
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/save")
Boolean save(@RequestBody IBZDepartment ibzdepartment);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/save")
Boolean saveBatch(@RequestBody List<IBZDepartment> ibzdepartments);
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{deptid}")
IBZDepartment get(@PathVariable("deptid") String deptid);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{deptid}")
Boolean remove(@PathVariable("deptid") String deptid);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/checkkey")
Boolean checkKey(@RequestBody IBZDepartment ibzdepartment);
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{deptid}")
IBZDepartment update(@PathVariable("deptid") String deptid,@RequestBody IBZDepartment ibzdepartment);
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/batch")
Boolean updateBatch(@RequestBody List<IBZDepartment> ibzdepartments);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments")
IBZDepartment create(@RequestBody IBZDepartment ibzdepartment);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/batch")
Boolean createBatch(@RequestBody List<IBZDepartment> ibzdepartments);
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/getdraft")
IBZDepartment getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/searchcurdept")
Page<IBZDepartment> searchCurDept(@RequestBody IBZDepartmentSearchContext context);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/searchdefault")
Page<IBZDepartment> searchDefault(@RequestBody IBZDepartmentSearchContext context);
}
package cn.ibizlab.core.ou.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.ou.domain.IBZDeptMember;
import cn.ibizlab.core.ou.filter.IBZDeptMemberSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[IBZDeptMember] 服务对象接口
*/
@Component
public class IBZDeptMemberFallback implements IBZDeptMemberFeignClient{
public Page<IBZDeptMember> select(){
return null;
}
public IBZDeptMember update(String memberid, IBZDeptMember ibzdeptmember){
return null;
}
public Boolean updateBatch(List<IBZDeptMember> ibzdeptmembers){
return false;
}
public IBZDeptMember get(String memberid){
return null;
}
public Boolean checkKey(IBZDeptMember ibzdeptmember){
return false;
}
public Boolean remove(String memberid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public IBZDeptMember create(IBZDeptMember ibzdeptmember){
return null;
}
public Boolean createBatch(List<IBZDeptMember> ibzdeptmembers){
return false;
}
public IBZDeptMember getDraft(){
return null;
}
public Boolean save(IBZDeptMember ibzdeptmember){
return false;
}
public Boolean saveBatch(List<IBZDeptMember> ibzdeptmembers){
return false;
}
public Page<IBZDeptMember> searchDefault(IBZDeptMemberSearchContext context){
return null;
}
}
package cn.ibizlab.core.ou.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.ou.domain.IBZDeptMember;
import cn.ibizlab.core.ou.filter.IBZDeptMemberSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[IBZDeptMember] 服务对象接口
*/
@FeignClient(value = "ibzou-api", contextId = "IBZDeptMember", fallback = IBZDeptMemberFallback.class)
public interface IBZDeptMemberFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/ibzdeptmembers/select")
Page<IBZDeptMember> select();
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/{memberid}")
IBZDeptMember update(@PathVariable("memberid") String memberid,@RequestBody IBZDeptMember ibzdeptmember);
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/batch")
Boolean updateBatch(@RequestBody List<IBZDeptMember> ibzdeptmembers);
@RequestMapping(method = RequestMethod.GET, value = "/ibzdeptmembers/{memberid}")
IBZDeptMember get(@PathVariable("memberid") String memberid);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/checkkey")
Boolean checkKey(@RequestBody IBZDeptMember ibzdeptmember);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/{memberid}")
Boolean remove(@PathVariable("memberid") String memberid);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers")
IBZDeptMember create(@RequestBody IBZDeptMember ibzdeptmember);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/batch")
Boolean createBatch(@RequestBody List<IBZDeptMember> ibzdeptmembers);
@RequestMapping(method = RequestMethod.GET, value = "/ibzdeptmembers/getdraft")
IBZDeptMember getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/save")
Boolean save(@RequestBody IBZDeptMember ibzdeptmember);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/save")
Boolean saveBatch(@RequestBody List<IBZDeptMember> ibzdeptmembers);
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/searchdefault")
Page<IBZDeptMember> searchDefault(@RequestBody IBZDeptMemberSearchContext context);
}
package cn.ibizlab.core.ou.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.ou.domain.IBZEmployee;
import cn.ibizlab.core.ou.filter.IBZEmployeeSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[IBZEmployee] 服务对象接口
*/
@Component
public class IBZEmployeeFallback implements IBZEmployeeFeignClient{
public Page<IBZEmployee> select(){
return null;
}
public Boolean remove(String userid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public IBZEmployee update(String userid, IBZEmployee ibzemployee){
return null;
}
public Boolean updateBatch(List<IBZEmployee> ibzemployees){
return false;
}
public Boolean checkKey(IBZEmployee ibzemployee){
return false;
}
public IBZEmployee get(String userid){
return null;
}
public Boolean save(IBZEmployee ibzemployee){
return false;
}
public Boolean saveBatch(List<IBZEmployee> ibzemployees){
return false;
}
public IBZEmployee initPwd( String userid, IBZEmployee ibzemployee){
return null;
}
public IBZEmployee getDraft(){
return null;
}
public IBZEmployee create(IBZEmployee ibzemployee){
return null;
}
public Boolean createBatch(List<IBZEmployee> ibzemployees){
return false;
}
public Page<IBZEmployee> searchDefault(IBZEmployeeSearchContext context){
return null;
}
}
package cn.ibizlab.core.ou.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.ou.domain.IBZEmployee;
import cn.ibizlab.core.ou.filter.IBZEmployeeSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[IBZEmployee] 服务对象接口
*/
@FeignClient(value = "ibzou-api", contextId = "IBZEmployee", fallback = IBZEmployeeFallback.class)
public interface IBZEmployeeFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/select")
Page<IBZEmployee> select();
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{userid}")
Boolean remove(@PathVariable("userid") String userid);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{userid}")
IBZEmployee update(@PathVariable("userid") String userid,@RequestBody IBZEmployee ibzemployee);
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/batch")
Boolean updateBatch(@RequestBody List<IBZEmployee> ibzemployees);
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/checkkey")
Boolean checkKey(@RequestBody IBZEmployee ibzemployee);
@RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{userid}")
IBZEmployee get(@PathVariable("userid") String userid);
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/save")
Boolean save(@RequestBody IBZEmployee ibzemployee);
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/save")
Boolean saveBatch(@RequestBody List<IBZEmployee> ibzemployees);
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{userid}/initpwd")
IBZEmployee initPwd(@PathVariable("userid") String userid,@RequestBody IBZEmployee ibzemployee);
@RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/getdraft")
IBZEmployee getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees")
IBZEmployee create(@RequestBody IBZEmployee ibzemployee);
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/batch")
Boolean createBatch(@RequestBody List<IBZEmployee> ibzemployees);
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/searchdefault")
Page<IBZEmployee> searchDefault(@RequestBody IBZEmployeeSearchContext context);
}
package cn.ibizlab.core.ou.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.ou.domain.IBZOrganization;
import cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[IBZOrganization] 服务对象接口
*/
@Component
public class IBZOrganizationFallback implements IBZOrganizationFeignClient{
public Page<IBZOrganization> select(){
return null;
}
public Boolean save(IBZOrganization ibzorganization){
return false;
}
public Boolean saveBatch(List<IBZOrganization> ibzorganizations){
return false;
}
public Boolean checkKey(IBZOrganization ibzorganization){
return false;
}
public IBZOrganization get(String orgid){
return null;
}
public IBZOrganization create(IBZOrganization ibzorganization){
return null;
}
public Boolean createBatch(List<IBZOrganization> ibzorganizations){
return false;
}
public Boolean remove(String orgid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public IBZOrganization getDraft(){
return null;
}
public IBZOrganization update(String orgid, IBZOrganization ibzorganization){
return null;
}
public Boolean updateBatch(List<IBZOrganization> ibzorganizations){
return false;
}
public Page<IBZOrganization> searchDefault(IBZOrganizationSearchContext context){
return null;
}
public Page<IBZOrganization> searchSelectPOrg(IBZOrganizationSearchContext context){
return null;
}
public Page<IBZOrganization> searchSelectSOrg(IBZOrganizationSearchContext context){
return null;
}
}
package cn.ibizlab.core.ou.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.ou.domain.IBZOrganization;
import cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[IBZOrganization] 服务对象接口
*/
@FeignClient(value = "ibzou-api", contextId = "IBZOrganization", fallback = IBZOrganizationFallback.class)
public interface IBZOrganizationFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/select")
Page<IBZOrganization> select();
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/save")
Boolean save(@RequestBody IBZOrganization ibzorganization);
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/save")
Boolean saveBatch(@RequestBody List<IBZOrganization> ibzorganizations);
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/checkkey")
Boolean checkKey(@RequestBody IBZOrganization ibzorganization);
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{orgid}")
IBZOrganization get(@PathVariable("orgid") String orgid);
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations")
IBZOrganization create(@RequestBody IBZOrganization ibzorganization);
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/batch")
Boolean createBatch(@RequestBody List<IBZOrganization> ibzorganizations);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{orgid}")
Boolean remove(@PathVariable("orgid") String orgid);
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/getdraft")
IBZOrganization getDraft();
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{orgid}")
IBZOrganization update(@PathVariable("orgid") String orgid,@RequestBody IBZOrganization ibzorganization);
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/batch")
Boolean updateBatch(@RequestBody List<IBZOrganization> ibzorganizations);
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/searchdefault")
Page<IBZOrganization> searchDefault(@RequestBody IBZOrganizationSearchContext context);
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/searchselectporg")
Page<IBZOrganization> searchSelectPOrg(@RequestBody IBZOrganizationSearchContext context);
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/searchselectsorg")
Page<IBZOrganization> searchSelectSOrg(@RequestBody IBZOrganizationSearchContext context);
}
...@@ -21,160 +21,152 @@ import java.io.Serializable; ...@@ -21,160 +21,152 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[部门] * ServiceApi [部门] 对象
*/ */
@Data @Data
@TableName(value = "IBZDEPT",resultMap = "IBZDepartmentResultMap") public class IBZDepartment extends EntityClient implements Serializable {
public class IBZDepartment extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 部门标识 * 部门标识
*/ */
@DEField(isKeyField=true) @DEField(isKeyField=true)
@TableId(value= "deptid",type=IdType.UUID)
@JSONField(name = "deptid") @JSONField(name = "deptid")
@JsonProperty("deptid") @JsonProperty("deptid")
private String deptid; private String deptid;
/** /**
* 部门代码 * 部门代码
*/ */
@TableField(value = "deptcode")
@JSONField(name = "deptcode") @JSONField(name = "deptcode")
@JsonProperty("deptcode") @JsonProperty("deptcode")
private String deptcode; private String deptcode;
/** /**
* 部门名称 * 部门名称
*/ */
@TableField(value = "deptname")
@JSONField(name = "deptname") @JSONField(name = "deptname")
@JsonProperty("deptname") @JsonProperty("deptname")
private String deptname; private String deptname;
/** /**
* 单位 * 单位
*/ */
@DEField(preType = DEPredefinedFieldType.ORGID) @DEField(preType = DEPredefinedFieldType.ORGID)
@TableField(value = "orgid")
@JSONField(name = "orgid") @JSONField(name = "orgid")
@JsonProperty("orgid") @JsonProperty("orgid")
private String orgid; private String orgid;
/** /**
* 上级部门 * 上级部门
*/ */
@DEField(name = "pdeptid") @DEField(name = "pdeptid")
@TableField(value = "pdeptid")
@JSONField(name = "parentdeptid") @JSONField(name = "parentdeptid")
@JsonProperty("parentdeptid") @JsonProperty("parentdeptid")
private String parentdeptid; private String parentdeptid;
/** /**
* 部门简称 * 部门简称
*/ */
@TableField(value = "shortname")
@JSONField(name = "shortname") @JSONField(name = "shortname")
@JsonProperty("shortname") @JsonProperty("shortname")
private String shortname; private String shortname;
/** /**
* 部门级别 * 部门级别
*/ */
@TableField(value = "deptlevel")
@JSONField(name = "deptlevel") @JSONField(name = "deptlevel")
@JsonProperty("deptlevel") @JsonProperty("deptlevel")
private Integer deptlevel; private Integer deptlevel;
/** /**
* 排序 * 排序
*/ */
@TableField(value = "showorder")
@JSONField(name = "showorder") @JSONField(name = "showorder")
@JsonProperty("showorder") @JsonProperty("showorder")
private Integer showorder; private Integer showorder;
/** /**
* 业务编码 * 业务编码
*/ */
@TableField(value = "bcode")
@JSONField(name = "bcode") @JSONField(name = "bcode")
@JsonProperty("bcode") @JsonProperty("bcode")
private String bcode; private String bcode;
/** /**
* 分管领导标识 * 分管领导标识
*/ */
@TableField(value = "leaderid")
@JSONField(name = "leaderid") @JSONField(name = "leaderid")
@JsonProperty("leaderid") @JsonProperty("leaderid")
private String leaderid; private String leaderid;
/** /**
* 分管领导 * 分管领导
*/ */
@TableField(value = "leadername")
@JSONField(name = "leadername") @JSONField(name = "leadername")
@JsonProperty("leadername") @JsonProperty("leadername")
private String leadername; private String leadername;
/** /**
* 逻辑有效 * 逻辑有效
*/ */
@DEField(preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0") @DEField(preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0")
@TableLogic(value= "1",delval="0")
@TableField(value = "enable")
@JSONField(name = "enable") @JSONField(name = "enable")
@JsonProperty("enable") @JsonProperty("enable")
private Integer enable; private Integer enable;
/** /**
* 单位 * 单位
*/ */
@TableField(exist = false)
@JSONField(name = "orgname") @JSONField(name = "orgname")
@JsonProperty("orgname") @JsonProperty("orgname")
private String orgname; private String orgname;
/** /**
* 上级部门 * 上级部门
*/ */
@TableField(exist = false)
@JSONField(name = "parentdeptname") @JSONField(name = "parentdeptname")
@JsonProperty("parentdeptname") @JsonProperty("parentdeptname")
private String parentdeptname; private String parentdeptname;
/** /**
* 创建时间 * 创建时间
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEDATE) @DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createdate; private Timestamp createdate;
/** /**
* 最后修改时间 * 最后修改时间
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEDATE) @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate") @JsonProperty("updatedate")
private Timestamp updatedate; private Timestamp updatedate;
/** /**
* *
*/ */
@JsonIgnore @JSONField(name = "parentdept")
@JSONField(serialize = false) @JsonProperty("parentdept")
@TableField(exist = false)
private cn.ibizlab.core.ou.domain.IBZDepartment parentdept; private cn.ibizlab.core.ou.domain.IBZDepartment parentdept;
/** /**
* 单位 * 单位
*/ */
@JsonIgnore @JSONField(name = "org")
@JSONField(serialize = false) @JsonProperty("org")
@TableField(exist = false)
private cn.ibizlab.core.ou.domain.IBZOrganization org; private cn.ibizlab.core.ou.domain.IBZOrganization org;
/** /**
* 设置 [部门代码] * 设置 [部门代码]
*/ */
......
...@@ -21,75 +21,68 @@ import java.io.Serializable; ...@@ -21,75 +21,68 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[部门成员] * ServiceApi [部门成员] 对象
*/ */
@Data @Data
@TableName(value = "IBZDEPTMEMBER",resultMap = "IBZDeptMemberResultMap") public class IBZDeptMember extends EntityClient implements Serializable {
public class IBZDeptMember extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 标识 * 标识
*/ */
@DEField(isKeyField=true) @DEField(isKeyField=true)
@TableId(value= "memberid",type=IdType.UUID)
@JSONField(name = "memberid") @JSONField(name = "memberid")
@JsonProperty("memberid") @JsonProperty("memberid")
private String memberid; private String memberid;
/** /**
* 部门标识 * 部门标识
*/ */
@TableField(value = "deptid")
@JSONField(name = "deptid") @JSONField(name = "deptid")
@JsonProperty("deptid") @JsonProperty("deptid")
private String deptid; private String deptid;
/** /**
* 部门名称 * 部门名称
*/ */
@TableField(exist = false)
@JSONField(name = "deptname") @JSONField(name = "deptname")
@JsonProperty("deptname") @JsonProperty("deptname")
private String deptname; private String deptname;
/** /**
* 用户标识 * 用户标识
*/ */
@TableField(value = "userid")
@JSONField(name = "userid") @JSONField(name = "userid")
@JsonProperty("userid") @JsonProperty("userid")
private String userid; private String userid;
/** /**
* 成员 * 成员
*/ */
@TableField(exist = false)
@JSONField(name = "personname") @JSONField(name = "personname")
@JsonProperty("personname") @JsonProperty("personname")
private String personname; private String personname;
/** /**
* 部门 * 部门
*/ */
@JsonIgnore @JSONField(name = "dept")
@JSONField(serialize = false) @JsonProperty("dept")
@TableField(exist = false)
private cn.ibizlab.core.ou.domain.IBZDepartment dept; private cn.ibizlab.core.ou.domain.IBZDepartment dept;
/** /**
* 人员 * 人员
*/ */
@JsonIgnore @JSONField(name = "emp")
@JSONField(serialize = false) @JsonProperty("emp")
@TableField(exist = false)
private cn.ibizlab.core.ou.domain.IBZEmployee emp; private cn.ibizlab.core.ou.domain.IBZEmployee emp;
/** /**
* 设置 [部门标识] * 设置 [部门标识]
*/ */
...@@ -105,22 +98,6 @@ public class IBZDeptMember extends EntityMP implements Serializable { ...@@ -105,22 +98,6 @@ public class IBZDeptMember extends EntityMP implements Serializable {
this.modify("userid",userid); this.modify("userid",userid);
} }
/**
* 获取 [标识]
*/
public String getMemberid(){
if(ObjectUtils.isEmpty(memberid)){
memberid=(String)getDefaultKey(true);
}
return memberid;
}
@Override
public Serializable getDefaultKey(boolean gen) {
if((!ObjectUtils.isEmpty(this.getDeptid()))&&(!ObjectUtils.isEmpty(this.getUserid())))
return DigestUtils.md5DigestAsHex(String.format("%s||%s" ,this.getDeptid(),this.getUserid()).getBytes());
return null;
}
} }
...@@ -21,301 +21,293 @@ import java.io.Serializable; ...@@ -21,301 +21,293 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[人员] * ServiceApi [人员] 对象
*/ */
@Data @Data
@TableName(value = "IBZEMP",resultMap = "IBZEmployeeResultMap") public class IBZEmployee extends EntityClient implements Serializable {
public class IBZEmployee extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 用户标识 * 用户标识
*/ */
@DEField(isKeyField=true) @DEField(isKeyField=true)
@TableId(value= "userid",type=IdType.UUID)
@JSONField(name = "userid") @JSONField(name = "userid")
@JsonProperty("userid") @JsonProperty("userid")
private String userid; private String userid;
/** /**
* 用户全局名 * 用户全局名
*/ */
@TableField(value = "username")
@JSONField(name = "username") @JSONField(name = "username")
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
/** /**
* 姓名 * 姓名
*/ */
@TableField(value = "personname")
@JSONField(name = "personname") @JSONField(name = "personname")
@JsonProperty("personname") @JsonProperty("personname")
private String personname; private String personname;
/** /**
* 用户工号 * 用户工号
*/ */
@TableField(value = "usercode")
@JSONField(name = "usercode") @JSONField(name = "usercode")
@JsonProperty("usercode") @JsonProperty("usercode")
private String usercode; private String usercode;
/** /**
* 登录名 * 登录名
*/ */
@TableField(value = "loginname")
@JSONField(name = "loginname") @JSONField(name = "loginname")
@JsonProperty("loginname") @JsonProperty("loginname")
private String loginname; private String loginname;
/** /**
* 密码 * 密码
*/ */
@TableField(value = "password")
@JSONField(name = "password") @JSONField(name = "password")
@JsonProperty("password") @JsonProperty("password")
private String password; private String password;
/** /**
* 区属 * 区属
*/ */
@TableField(value = "domains")
@JSONField(name = "domains") @JSONField(name = "domains")
@JsonProperty("domains") @JsonProperty("domains")
private String domains; private String domains;
/** /**
* 主部门 * 主部门
*/ */
@TableField(value = "mdeptid")
@JSONField(name = "mdeptid") @JSONField(name = "mdeptid")
@JsonProperty("mdeptid") @JsonProperty("mdeptid")
private String mdeptid; private String mdeptid;
/** /**
* 主部门代码 * 主部门代码
*/ */
@TableField(value = "mdeptcode")
@JSONField(name = "mdeptcode") @JSONField(name = "mdeptcode")
@JsonProperty("mdeptcode") @JsonProperty("mdeptcode")
private String mdeptcode; private String mdeptcode;
/** /**
* 主部门名称 * 主部门名称
*/ */
@TableField(value = "mdeptname")
@JSONField(name = "mdeptname") @JSONField(name = "mdeptname")
@JsonProperty("mdeptname") @JsonProperty("mdeptname")
private String mdeptname; private String mdeptname;
/** /**
* 业务编码 * 业务编码
*/ */
@TableField(value = "bcode")
@JSONField(name = "bcode") @JSONField(name = "bcode")
@JsonProperty("bcode") @JsonProperty("bcode")
private String bcode; private String bcode;
/** /**
* 岗位 * 岗位
*/ */
@TableField(value = "postid")
@JSONField(name = "postid") @JSONField(name = "postid")
@JsonProperty("postid") @JsonProperty("postid")
private String postid; private String postid;
/** /**
* 岗位代码 * 岗位代码
*/ */
@TableField(value = "postcode")
@JSONField(name = "postcode") @JSONField(name = "postcode")
@JsonProperty("postcode") @JsonProperty("postcode")
private String postcode; private String postcode;
/** /**
* 岗位名称 * 岗位名称
*/ */
@TableField(value = "postname")
@JSONField(name = "postname") @JSONField(name = "postname")
@JsonProperty("postname") @JsonProperty("postname")
private String postname; private String postname;
/** /**
* 单位 * 单位
*/ */
@DEField(preType = DEPredefinedFieldType.ORGID) @DEField(preType = DEPredefinedFieldType.ORGID)
@TableField(value = "orgid")
@JSONField(name = "orgid") @JSONField(name = "orgid")
@JsonProperty("orgid") @JsonProperty("orgid")
private String orgid; private String orgid;
/** /**
* 单位代码 * 单位代码
*/ */
@TableField(value = "orgcode")
@JSONField(name = "orgcode") @JSONField(name = "orgcode")
@JsonProperty("orgcode") @JsonProperty("orgcode")
private String orgcode; private String orgcode;
/** /**
* 单位名称 * 单位名称
*/ */
@DEField(preType = DEPredefinedFieldType.ORGNAME) @DEField(preType = DEPredefinedFieldType.ORGNAME)
@TableField(value = "orgname")
@JSONField(name = "orgname") @JSONField(name = "orgname")
@JsonProperty("orgname") @JsonProperty("orgname")
private String orgname; private String orgname;
/** /**
* 昵称别名 * 昵称别名
*/ */
@TableField(value = "nickname")
@JSONField(name = "nickname") @JSONField(name = "nickname")
@JsonProperty("nickname") @JsonProperty("nickname")
private String nickname; private String nickname;
/** /**
* 性别 * 性别
*/ */
@TableField(value = "sex")
@JSONField(name = "sex") @JSONField(name = "sex")
@JsonProperty("sex") @JsonProperty("sex")
private String sex; private String sex;
/** /**
* 证件号码 * 证件号码
*/ */
@TableField(value = "certcode")
@JSONField(name = "certcode") @JSONField(name = "certcode")
@JsonProperty("certcode") @JsonProperty("certcode")
private String certcode; private String certcode;
/** /**
* 联系方式 * 联系方式
*/ */
@TableField(value = "phone")
@JSONField(name = "phone") @JSONField(name = "phone")
@JsonProperty("phone") @JsonProperty("phone")
private String phone; private String phone;
/** /**
* 出生日期 * 出生日期
*/ */
@TableField(value = "birthday")
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "birthday" , format="yyyy-MM-dd") @JSONField(name = "birthday" , format="yyyy-MM-dd")
@JsonProperty("birthday") @JsonProperty("birthday")
private Timestamp birthday; private Timestamp birthday;
/** /**
* 邮件 * 邮件
*/ */
@TableField(value = "email")
@JSONField(name = "email") @JSONField(name = "email")
@JsonProperty("email") @JsonProperty("email")
private String email; private String email;
/** /**
* 社交账号 * 社交账号
*/ */
@TableField(value = "avatar")
@JSONField(name = "avatar") @JSONField(name = "avatar")
@JsonProperty("avatar") @JsonProperty("avatar")
private String avatar; private String avatar;
/** /**
* 地址 * 地址
*/ */
@TableField(value = "addr")
@JSONField(name = "addr") @JSONField(name = "addr")
@JsonProperty("addr") @JsonProperty("addr")
private String addr; private String addr;
/** /**
* 照片 * 照片
*/ */
@TableField(value = "usericon")
@JSONField(name = "usericon") @JSONField(name = "usericon")
@JsonProperty("usericon") @JsonProperty("usericon")
private String usericon; private String usericon;
/** /**
* ip地址 * ip地址
*/ */
@TableField(value = "ipaddr")
@JSONField(name = "ipaddr") @JSONField(name = "ipaddr")
@JsonProperty("ipaddr") @JsonProperty("ipaddr")
private String ipaddr; private String ipaddr;
/** /**
* 样式 * 样式
*/ */
@TableField(value = "theme")
@JSONField(name = "theme") @JSONField(name = "theme")
@JsonProperty("theme") @JsonProperty("theme")
private String theme; private String theme;
/** /**
* 语言 * 语言
*/ */
@TableField(value = "lang")
@JSONField(name = "lang") @JSONField(name = "lang")
@JsonProperty("lang") @JsonProperty("lang")
private String lang; private String lang;
/** /**
* 字号 * 字号
*/ */
@TableField(value = "fontsize")
@JSONField(name = "fontsize") @JSONField(name = "fontsize")
@JsonProperty("fontsize") @JsonProperty("fontsize")
private String fontsize; private String fontsize;
/** /**
* 备注 * 备注
*/ */
@TableField(value = "memo")
@JSONField(name = "memo") @JSONField(name = "memo")
@JsonProperty("memo") @JsonProperty("memo")
private String memo; private String memo;
/** /**
* 保留 * 保留
*/ */
@TableField(value = "reserver")
@JSONField(name = "reserver") @JSONField(name = "reserver")
@JsonProperty("reserver") @JsonProperty("reserver")
private String reserver; private String reserver;
/** /**
* 排序 * 排序
*/ */
@TableField(value = "showorder")
@JSONField(name = "showorder") @JSONField(name = "showorder")
@JsonProperty("showorder") @JsonProperty("showorder")
private Integer showorder; private Integer showorder;
/** /**
* 逻辑有效 * 逻辑有效
*/ */
@DEField(preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0") @DEField(preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0")
@TableLogic(value= "1",delval="0")
@TableField(value = "enable")
@JSONField(name = "enable") @JSONField(name = "enable")
@JsonProperty("enable") @JsonProperty("enable")
private Integer enable; private Integer enable;
/** /**
* 创建时间 * 创建时间
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEDATE) @DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createdate; private Timestamp createdate;
/** /**
* 最后修改时间 * 最后修改时间
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEDATE) @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate") @JsonProperty("updatedate")
private Timestamp updatedate; private Timestamp updatedate;
/** /**
* *
*/ */
@JsonIgnore @JSONField(name = "maindept")
@JSONField(serialize = false) @JsonProperty("maindept")
@TableField(exist = false)
private cn.ibizlab.core.ou.domain.IBZDepartment maindept; private cn.ibizlab.core.ou.domain.IBZDepartment maindept;
/** /**
* *
*/ */
@JsonIgnore @JSONField(name = "org")
@JSONField(serialize = false) @JsonProperty("org")
@TableField(exist = false)
private cn.ibizlab.core.ou.domain.IBZOrganization org; private cn.ibizlab.core.ou.domain.IBZOrganization org;
/** /**
* 设置 [用户全局名] * 设置 [用户全局名]
*/ */
......
...@@ -21,125 +21,117 @@ import java.io.Serializable; ...@@ -21,125 +21,117 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[单位机构] * ServiceApi [单位机构] 对象
*/ */
@Data @Data
@TableName(value = "IBZORG",resultMap = "IBZOrganizationResultMap") public class IBZOrganization extends EntityClient implements Serializable {
public class IBZOrganization extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 单位标识 * 单位标识
*/ */
@DEField(defaultValue = "orgcode" , defaultValueType = DEFieldDefaultValueType.PARAM , isKeyField=true) @DEField(defaultValue = "orgcode" , defaultValueType = DEFieldDefaultValueType.PARAM , isKeyField=true)
@TableId(value= "orgid",type=IdType.UUID)
@JSONField(name = "orgid") @JSONField(name = "orgid")
@JsonProperty("orgid") @JsonProperty("orgid")
private String orgid; private String orgid;
/** /**
* 单位代码 * 单位代码
*/ */
@TableField(value = "orgcode")
@JSONField(name = "orgcode") @JSONField(name = "orgcode")
@JsonProperty("orgcode") @JsonProperty("orgcode")
private String orgcode; private String orgcode;
/** /**
* 名称 * 名称
*/ */
@DEField(preType = DEPredefinedFieldType.ORGNAME) @DEField(preType = DEPredefinedFieldType.ORGNAME)
@TableField(value = "orgname")
@JSONField(name = "orgname") @JSONField(name = "orgname")
@JsonProperty("orgname") @JsonProperty("orgname")
private String orgname; private String orgname;
/** /**
* 上级单位 * 上级单位
*/ */
@DEField(name = "porgid") @DEField(name = "porgid")
@TableField(value = "porgid")
@JSONField(name = "parentorgid") @JSONField(name = "parentorgid")
@JsonProperty("parentorgid") @JsonProperty("parentorgid")
private String parentorgid; private String parentorgid;
/** /**
* 单位简称 * 单位简称
*/ */
@TableField(value = "shortname")
@JSONField(name = "shortname") @JSONField(name = "shortname")
@JsonProperty("shortname") @JsonProperty("shortname")
private String shortname; private String shortname;
/** /**
* 单位级别 * 单位级别
*/ */
@TableField(value = "orglevel")
@JSONField(name = "orglevel") @JSONField(name = "orglevel")
@JsonProperty("orglevel") @JsonProperty("orglevel")
private Integer orglevel; private Integer orglevel;
/** /**
* 排序 * 排序
*/ */
@TableField(value = "showorder")
@JSONField(name = "showorder") @JSONField(name = "showorder")
@JsonProperty("showorder") @JsonProperty("showorder")
private Integer showorder; private Integer showorder;
/** /**
* 上级单位 * 上级单位
*/ */
@TableField(exist = false)
@JSONField(name = "parentorgname") @JSONField(name = "parentorgname")
@JsonProperty("parentorgname") @JsonProperty("parentorgname")
private String parentorgname; private String parentorgname;
/** /**
* 逻辑有效 * 逻辑有效
*/ */
@DEField(preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0") @DEField(preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0")
@TableLogic(value= "1",delval="0")
@TableField(value = "enable")
@JSONField(name = "enable") @JSONField(name = "enable")
@JsonProperty("enable") @JsonProperty("enable")
private Integer enable; private Integer enable;
/** /**
* 创建时间 * 创建时间
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEDATE) @DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createdate; private Timestamp createdate;
/** /**
* 最后修改时间 * 最后修改时间
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEDATE) @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate") @JsonProperty("updatedate")
private Timestamp updatedate; private Timestamp updatedate;
/** /**
* *
*/ */
@JsonIgnore @JSONField(name = "parentorg")
@JSONField(serialize = false) @JsonProperty("parentorg")
@TableField(exist = false)
private cn.ibizlab.core.ou.domain.IBZOrganization parentorg; private cn.ibizlab.core.ou.domain.IBZOrganization parentorg;
/** /**
* 部门 * 部门
*/ */
@JsonIgnore @JSONField(name = "depts")
@JSONField(serialize = false) @JsonProperty("depts")
@TableField(exist = false)
private List<cn.ibizlab.core.ou.domain.IBZDepartment> depts; private List<cn.ibizlab.core.ou.domain.IBZDepartment> depts;
/** /**
* 设置 [单位代码] * 设置 [单位代码]
*/ */
......
...@@ -17,92 +17,33 @@ import org.springframework.util.ObjectUtils; ...@@ -17,92 +17,33 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.ou.domain.IBZDepartment;
/** /**
* 关系型数据实体[IBZDepartment] 查询条件对象 * ServiceApi数据实体[IBZDepartment] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class IBZDepartmentSearchContext extends QueryWrapperContext<IBZDepartment> { public class IBZDepartmentSearchContext extends SearchContextBase {
private String n_deptcode_like;//[部门代码] private String n_deptcode_like;//[部门代码]
public void setN_deptcode_like(String n_deptcode_like) {
this.n_deptcode_like = n_deptcode_like;
if(!ObjectUtils.isEmpty(this.n_deptcode_like)){
this.getSelectCond().like("deptcode", n_deptcode_like);
}
}
private String n_deptname_like;//[部门名称] private String n_deptname_like;//[部门名称]
public void setN_deptname_like(String n_deptname_like) {
this.n_deptname_like = n_deptname_like;
if(!ObjectUtils.isEmpty(this.n_deptname_like)){
this.getSelectCond().like("deptname", n_deptname_like);
}
}
private String n_orgid_eq;//[单位] private String n_orgid_eq;//[单位]
public void setN_orgid_eq(String n_orgid_eq) {
this.n_orgid_eq = n_orgid_eq;
if(!ObjectUtils.isEmpty(this.n_orgid_eq)){
this.getSelectCond().eq("orgid", n_orgid_eq);
}
}
private String n_pdeptid_eq;//[上级部门] private String n_pdeptid_eq;//[上级部门]
public void setN_pdeptid_eq(String n_pdeptid_eq) {
this.n_pdeptid_eq = n_pdeptid_eq;
if(!ObjectUtils.isEmpty(this.n_pdeptid_eq)){
this.getSelectCond().eq("pdeptid", n_pdeptid_eq);
}
}
private String n_bcode_like;//[业务编码] private String n_bcode_like;//[业务编码]
public void setN_bcode_like(String n_bcode_like) {
this.n_bcode_like = n_bcode_like;
if(!ObjectUtils.isEmpty(this.n_bcode_like)){
this.getSelectCond().like("bcode", n_bcode_like);
}
}
private String n_orgname_eq;//[单位] private String n_orgname_eq;//[单位]
public void setN_orgname_eq(String n_orgname_eq) {
this.n_orgname_eq = n_orgname_eq;
if(!ObjectUtils.isEmpty(this.n_orgname_eq)){
this.getSelectCond().eq("orgname", n_orgname_eq);
}
}
private String n_orgname_like;//[单位] private String n_orgname_like;//[单位]
public void setN_orgname_like(String n_orgname_like) {
this.n_orgname_like = n_orgname_like;
if(!ObjectUtils.isEmpty(this.n_orgname_like)){
this.getSelectCond().like("orgname", n_orgname_like);
}
}
private String n_pdeptname_eq;//[上级部门] private String n_pdeptname_eq;//[上级部门]
public void setN_pdeptname_eq(String n_pdeptname_eq) {
this.n_pdeptname_eq = n_pdeptname_eq;
if(!ObjectUtils.isEmpty(this.n_pdeptname_eq)){
this.getSelectCond().eq("pdeptname", n_pdeptname_eq);
}
}
private String n_pdeptname_like;//[上级部门] private String n_pdeptname_like;//[上级部门]
public void setN_pdeptname_like(String n_pdeptname_like) {
this.n_pdeptname_like = n_pdeptname_like;
if(!ObjectUtils.isEmpty(this.n_pdeptname_like)){
this.getSelectCond().like("pdeptname", n_pdeptname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("deptname",query);
}
}
}
}
...@@ -17,71 +17,27 @@ import org.springframework.util.ObjectUtils; ...@@ -17,71 +17,27 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.ou.domain.IBZDeptMember;
/** /**
* 关系型数据实体[IBZDeptMember] 查询条件对象 * ServiceApi数据实体[IBZDeptMember] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class IBZDeptMemberSearchContext extends QueryWrapperContext<IBZDeptMember> { public class IBZDeptMemberSearchContext extends SearchContextBase {
private String n_deptid_eq;//[部门标识] private String n_deptid_eq;//[部门标识]
public void setN_deptid_eq(String n_deptid_eq) {
this.n_deptid_eq = n_deptid_eq;
if(!ObjectUtils.isEmpty(this.n_deptid_eq)){
this.getSelectCond().eq("deptid", n_deptid_eq);
}
}
private String n_deptname_eq;//[部门名称] private String n_deptname_eq;//[部门名称]
public void setN_deptname_eq(String n_deptname_eq) {
this.n_deptname_eq = n_deptname_eq;
if(!ObjectUtils.isEmpty(this.n_deptname_eq)){
this.getSelectCond().eq("deptname", n_deptname_eq);
}
}
private String n_deptname_like;//[部门名称] private String n_deptname_like;//[部门名称]
public void setN_deptname_like(String n_deptname_like) {
this.n_deptname_like = n_deptname_like;
if(!ObjectUtils.isEmpty(this.n_deptname_like)){
this.getSelectCond().like("deptname", n_deptname_like);
}
}
private String n_userid_eq;//[用户标识] private String n_userid_eq;//[用户标识]
public void setN_userid_eq(String n_userid_eq) {
this.n_userid_eq = n_userid_eq;
if(!ObjectUtils.isEmpty(this.n_userid_eq)){
this.getSelectCond().eq("userid", n_userid_eq);
}
}
private String n_personname_eq;//[成员] private String n_personname_eq;//[成员]
public void setN_personname_eq(String n_personname_eq) {
this.n_personname_eq = n_personname_eq;
if(!ObjectUtils.isEmpty(this.n_personname_eq)){
this.getSelectCond().eq("personname", n_personname_eq);
}
}
private String n_personname_like;//[成员] private String n_personname_like;//[成员]
public void setN_personname_like(String n_personname_like) {
this.n_personname_like = n_personname_like;
if(!ObjectUtils.isEmpty(this.n_personname_like)){
this.getSelectCond().like("personname", n_personname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("personname",query);
}
}
} }
...@@ -17,85 +17,31 @@ import org.springframework.util.ObjectUtils; ...@@ -17,85 +17,31 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.ou.domain.IBZEmployee;
/** /**
* 关系型数据实体[IBZEmployee] 查询条件对象 * ServiceApi数据实体[IBZEmployee] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class IBZEmployeeSearchContext extends QueryWrapperContext<IBZEmployee> { public class IBZEmployeeSearchContext extends SearchContextBase {
private String n_personname_like;//[姓名] private String n_personname_like;//[姓名]
public void setN_personname_like(String n_personname_like) {
this.n_personname_like = n_personname_like;
if(!ObjectUtils.isEmpty(this.n_personname_like)){
this.getSelectCond().like("personname", n_personname_like);
}
}
private String n_usercode_like;//[用户工号] private String n_usercode_like;//[用户工号]
public void setN_usercode_like(String n_usercode_like) {
this.n_usercode_like = n_usercode_like;
if(!ObjectUtils.isEmpty(this.n_usercode_like)){
this.getSelectCond().like("usercode", n_usercode_like);
}
}
private String n_mdeptid_eq;//[主部门] private String n_mdeptid_eq;//[主部门]
public void setN_mdeptid_eq(String n_mdeptid_eq) {
this.n_mdeptid_eq = n_mdeptid_eq;
if(!ObjectUtils.isEmpty(this.n_mdeptid_eq)){
this.getSelectCond().eq("mdeptid", n_mdeptid_eq);
}
}
private String n_mdeptname_like;//[主部门名称] private String n_mdeptname_like;//[主部门名称]
public void setN_mdeptname_like(String n_mdeptname_like) {
this.n_mdeptname_like = n_mdeptname_like;
if(!ObjectUtils.isEmpty(this.n_mdeptname_like)){
this.getSelectCond().like("mdeptname", n_mdeptname_like);
}
}
private String n_bcode_like;//[业务编码] private String n_bcode_like;//[业务编码]
public void setN_bcode_like(String n_bcode_like) {
this.n_bcode_like = n_bcode_like;
if(!ObjectUtils.isEmpty(this.n_bcode_like)){
this.getSelectCond().like("bcode", n_bcode_like);
}
}
private String n_orgid_eq;//[单位] private String n_orgid_eq;//[单位]
public void setN_orgid_eq(String n_orgid_eq) {
this.n_orgid_eq = n_orgid_eq;
if(!ObjectUtils.isEmpty(this.n_orgid_eq)){
this.getSelectCond().eq("orgid", n_orgid_eq);
}
}
private String n_orgcode_leftlike;//[单位代码] private String n_orgcode_leftlike;//[单位代码]
public void setN_orgcode_leftlike(String n_orgcode_leftlike) {
this.n_orgcode_leftlike = n_orgcode_leftlike;
if(!ObjectUtils.isEmpty(this.n_orgcode_leftlike)){
this.getSelectCond().likeRight("orgcode", n_orgcode_leftlike);
}
}
private String n_sex_eq;//[性别] private String n_sex_eq;//[性别]
public void setN_sex_eq(String n_sex_eq) {
this.n_sex_eq = n_sex_eq;
if(!ObjectUtils.isEmpty(this.n_sex_eq)){
this.getSelectCond().eq("sex", n_sex_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("personname",query);
}
}
}
}
...@@ -17,92 +17,33 @@ import org.springframework.util.ObjectUtils; ...@@ -17,92 +17,33 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.ou.domain.IBZOrganization;
/** /**
* 关系型数据实体[IBZOrganization] 查询条件对象 * ServiceApi数据实体[IBZOrganization] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class IBZOrganizationSearchContext extends QueryWrapperContext<IBZOrganization> { public class IBZOrganizationSearchContext extends SearchContextBase {
private String n_orgid_like;//[单位标识] private String n_orgid_like;//[单位标识]
public void setN_orgid_like(String n_orgid_like) {
this.n_orgid_like = n_orgid_like;
if(!ObjectUtils.isEmpty(this.n_orgid_like)){
this.getSelectCond().like("orgid", n_orgid_like);
}
}
private String n_orgcode_leftlike;//[单位代码] private String n_orgcode_leftlike;//[单位代码]
public void setN_orgcode_leftlike(String n_orgcode_leftlike) {
this.n_orgcode_leftlike = n_orgcode_leftlike;
if(!ObjectUtils.isEmpty(this.n_orgcode_leftlike)){
this.getSelectCond().likeRight("orgcode", n_orgcode_leftlike);
}
}
private String n_orgname_like;//[名称] private String n_orgname_like;//[名称]
public void setN_orgname_like(String n_orgname_like) {
this.n_orgname_like = n_orgname_like;
if(!ObjectUtils.isEmpty(this.n_orgname_like)){
this.getSelectCond().like("orgname", n_orgname_like);
}
}
private String n_porgid_eq;//[上级单位] private String n_porgid_eq;//[上级单位]
public void setN_porgid_eq(String n_porgid_eq) {
this.n_porgid_eq = n_porgid_eq;
if(!ObjectUtils.isEmpty(this.n_porgid_eq)){
this.getSelectCond().eq("porgid", n_porgid_eq);
}
}
private String n_shortname_like;//[单位简称] private String n_shortname_like;//[单位简称]
public void setN_shortname_like(String n_shortname_like) {
this.n_shortname_like = n_shortname_like;
if(!ObjectUtils.isEmpty(this.n_shortname_like)){
this.getSelectCond().like("shortname", n_shortname_like);
}
}
private Integer n_orglevel_gtandeq;//[单位级别] private Integer n_orglevel_gtandeq;//[单位级别]
public void setN_orglevel_gtandeq(Integer n_orglevel_gtandeq) {
this.n_orglevel_gtandeq = n_orglevel_gtandeq;
if(!ObjectUtils.isEmpty(this.n_orglevel_gtandeq)){
this.getSelectCond().ge("orglevel", n_orglevel_gtandeq);
}
}
private Integer n_orglevel_ltandeq;//[单位级别] private Integer n_orglevel_ltandeq;//[单位级别]
public void setN_orglevel_ltandeq(Integer n_orglevel_ltandeq) {
this.n_orglevel_ltandeq = n_orglevel_ltandeq;
if(!ObjectUtils.isEmpty(this.n_orglevel_ltandeq)){
this.getSelectCond().le("orglevel", n_orglevel_ltandeq);
}
}
private String n_porgname_eq;//[上级单位] private String n_porgname_eq;//[上级单位]
public void setN_porgname_eq(String n_porgname_eq) {
this.n_porgname_eq = n_porgname_eq;
if(!ObjectUtils.isEmpty(this.n_porgname_eq)){
this.getSelectCond().eq("porgname", n_porgname_eq);
}
}
private String n_porgname_like;//[上级单位] private String n_porgname_like;//[上级单位]
public void setN_porgname_like(String n_porgname_like) {
this.n_porgname_like = n_porgname_like;
if(!ObjectUtils.isEmpty(this.n_porgname_like)){
this.getSelectCond().like("porgname", n_porgname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("orgname",query);
}
}
}
}
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.ou.domain.IBZDepartment; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.ou.domain.IBZDepartment;
import cn.ibizlab.core.ou.filter.IBZDepartmentSearchContext; import cn.ibizlab.core.ou.filter.IBZDepartmentSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[IBZDepartment] 服务对象接口 * 实体[IBZDepartment] 服务对象接口
*/ */
public interface IIBZDepartmentService extends IService<IBZDepartment>{ public interface IIBZDepartmentService{
boolean save(IBZDepartment et) ; boolean save(IBZDepartment et) ;
@CacheEvict(value="ibzdepartment",allEntries=true) @CacheEvict(value="ibzdepartment",allEntries=true)
...@@ -50,24 +48,8 @@ public interface IIBZDepartmentService extends IService<IBZDepartment>{ ...@@ -50,24 +48,8 @@ public interface IIBZDepartmentService extends IService<IBZDepartment>{
void removeByOrgid(String orgid) ; void removeByOrgid(String orgid) ;
@CacheEvict(value="ibzdepartment",allEntries=true) @CacheEvict(value="ibzdepartment",allEntries=true)
void saveByOrgid(String orgid,List<IBZDepartment> list) ; void saveByOrgid(String orgid,List<IBZDepartment> list) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<IBZDepartment> getIbzdepartmentByIds(List<String> ids) ;
List<IBZDepartment> getIbzdepartmentByEntities(List<IBZDepartment> entities) ;
} }
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.ou.domain.IBZDeptMember; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.ou.domain.IBZDeptMember;
import cn.ibizlab.core.ou.filter.IBZDeptMemberSearchContext; import cn.ibizlab.core.ou.filter.IBZDeptMemberSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[IBZDeptMember] 服务对象接口 * 实体[IBZDeptMember] 服务对象接口
*/ */
public interface IIBZDeptMemberService extends IService<IBZDeptMember>{ public interface IIBZDeptMemberService{
boolean update(IBZDeptMember et) ; boolean update(IBZDeptMember et) ;
void updateBatch(List<IBZDeptMember> list) ; void updateBatch(List<IBZDeptMember> list) ;
...@@ -41,22 +39,8 @@ public interface IIBZDeptMemberService extends IService<IBZDeptMember>{ ...@@ -41,22 +39,8 @@ public interface IIBZDeptMemberService extends IService<IBZDeptMember>{
void removeByDeptid(String deptid) ; void removeByDeptid(String deptid) ;
List<IBZDeptMember> selectByUserid(String userid) ; List<IBZDeptMember> selectByUserid(String userid) ;
void removeByUserid(String userid) ; void removeByUserid(String userid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
} }
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.ou.domain.IBZEmployee; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.ou.domain.IBZEmployee;
import cn.ibizlab.core.ou.filter.IBZEmployeeSearchContext; import cn.ibizlab.core.ou.filter.IBZEmployeeSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[IBZEmployee] 服务对象接口 * 实体[IBZEmployee] 服务对象接口
*/ */
public interface IIBZEmployeeService extends IService<IBZEmployee>{ public interface IIBZEmployeeService{
boolean remove(String key) ; boolean remove(String key) ;
@CacheEvict(value="ibzemployee",allEntries=true) @CacheEvict(value="ibzemployee",allEntries=true)
...@@ -48,24 +46,8 @@ public interface IIBZEmployeeService extends IService<IBZEmployee>{ ...@@ -48,24 +46,8 @@ public interface IIBZEmployeeService extends IService<IBZEmployee>{
List<IBZEmployee> selectByOrgid(String orgid) ; List<IBZEmployee> selectByOrgid(String orgid) ;
@CacheEvict(value="ibzemployee",allEntries=true) @CacheEvict(value="ibzemployee",allEntries=true)
void removeByOrgid(String orgid) ; void removeByOrgid(String orgid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<IBZEmployee> getIbzemployeeByIds(List<String> ids) ;
List<IBZEmployee> getIbzemployeeByEntities(List<IBZEmployee> entities) ;
} }
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.ou.domain.IBZOrganization; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.ou.domain.IBZOrganization;
import cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext; import cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[IBZOrganization] 服务对象接口 * 实体[IBZOrganization] 服务对象接口
*/ */
public interface IIBZOrganizationService extends IService<IBZOrganization>{ public interface IIBZOrganizationService{
boolean save(IBZOrganization et) ; boolean save(IBZOrganization et) ;
@CacheEvict(value="ibzorganization",allEntries=true) @CacheEvict(value="ibzorganization",allEntries=true)
...@@ -46,24 +44,8 @@ public interface IIBZOrganizationService extends IService<IBZOrganization>{ ...@@ -46,24 +44,8 @@ public interface IIBZOrganizationService extends IService<IBZOrganization>{
List<IBZOrganization> selectByParentorgid(String orgid) ; List<IBZOrganization> selectByParentorgid(String orgid) ;
@CacheEvict(value="ibzorganization",allEntries=true) @CacheEvict(value="ibzorganization",allEntries=true)
void removeByParentorgid(String orgid) ; void removeByParentorgid(String orgid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<IBZOrganization> getIbzorganizationByIds(List<String> ids) ;
List<IBZOrganization> getIbzorganizationByEntities(List<IBZOrganization> entities) ;
} }
...@@ -30,74 +30,39 @@ import cn.ibizlab.core.ou.service.IIBZDepartmentService; ...@@ -30,74 +30,39 @@ import cn.ibizlab.core.ou.service.IIBZDepartmentService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.ou.client.IBZDepartmentFeignClient;
import cn.ibizlab.core.ou.mapper.IBZDepartmentMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[部门] 服务对象接口实现 * 实体[部门] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("IBZDepartmentServiceImpl") @Service
public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, IBZDepartment> implements IIBZDepartmentService { public class IBZDepartmentServiceImpl implements IIBZDepartmentService {
@Autowired @Autowired
@Lazy IBZDepartmentFeignClient iBZDepartmentFeignClient;
private cn.ibizlab.core.ou.service.IIBZDeptMemberService ibzdeptmemberService;
private cn.ibizlab.core.ou.service.IIBZDepartmentService ibzdepartmentService = this;
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZEmployeeService ibzemployeeService;
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZOrganizationService ibzorganizationService;
private int batchSize = 500;
@Override @Override
@Transactional @Transactional
public boolean save(IBZDepartment et) { public boolean save(IBZDepartment et) {
if(!saveOrUpdate(et)) if(et.getDeptid()==null) et.setDeptid((String)et.getDefaultKey(true));
if(!iBZDepartmentFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(IBZDepartment et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<IBZDepartment> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<IBZDepartment> list) { public void saveBatch(List<IBZDepartment> list) {
list.forEach(item->fillParentData(item)); iBZDepartmentFeignClient.saveBatch(list) ;
saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
@Transactional public IBZDepartment get(String deptid) {
public IBZDepartment get(String key) { IBZDepartment et=iBZDepartmentFeignClient.get(deptid);
IBZDepartment et = getById(key);
if(et==null){ if(et==null){
et=new IBZDepartment(); et=new IBZDepartment();
et.setDeptid(key); et.setDeptid(deptid);
} }
else{ else{
} }
...@@ -105,79 +70,88 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I ...@@ -105,79 +70,88 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
} }
@Override @Override
@Transactional public boolean remove(String deptid) {
public boolean remove(String key) { boolean result=iBZDepartmentFeignClient.remove(deptid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { iBZDepartmentFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
public boolean checkKey(IBZDepartment et) { public boolean checkKey(IBZDepartment et) {
return (!ObjectUtils.isEmpty(et.getDeptid()))&&(!Objects.isNull(this.getById(et.getDeptid()))); return iBZDepartmentFeignClient.checkKey(et);
} }
@Override @Override
@Transactional
public boolean update(IBZDepartment et) { public boolean update(IBZDepartment et) {
fillParentData(et); IBZDepartment rt = iBZDepartmentFeignClient.update(et.getDeptid(),et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("deptid",et.getDeptid()))) if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getDeptid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<IBZDepartment> list){
public void updateBatch(List<IBZDepartment> list) { iBZDepartmentFeignClient.updateBatch(list) ;
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
} }
@Override @Override
@Transactional
public boolean create(IBZDepartment et) { public boolean create(IBZDepartment et) {
fillParentData(et); IBZDepartment rt = iBZDepartmentFeignClient.create(et);
if(!this.retBool(this.baseMapper.insert(et))) if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getDeptid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<IBZDepartment> list){
public void createBatch(List<IBZDepartment> list) { iBZDepartmentFeignClient.createBatch(list) ;
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
} }
@Override @Override
public IBZDepartment getDraft(IBZDepartment et) { public IBZDepartment getDraft(IBZDepartment et) {
fillParentData(et); et=iBZDepartmentFeignClient.getDraft();
return et; return et;
} }
@Override @Override
public List<IBZDepartment> selectByParentdeptid(String deptid) { public List<IBZDepartment> selectByParentdeptid(String deptid) {
return baseMapper.selectByParentdeptid(deptid); IBZDepartmentSearchContext context=new IBZDepartmentSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_pdeptid_eq(deptid);
return iBZDepartmentFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByParentdeptid(String deptid) { public void removeByParentdeptid(String deptid) {
this.remove(new QueryWrapper<IBZDepartment>().eq("pdeptid",deptid)); Set<String> delIds=new HashSet<String>();
for(IBZDepartment before:selectByParentdeptid(deptid)){
delIds.add(before.getDeptid());
}
if(delIds.size()>0)
this.removeBatch(delIds);
} }
@Override @Override
public List<IBZDepartment> selectByOrgid(String orgid) { public List<IBZDepartment> selectByOrgid(String orgid) {
return baseMapper.selectByOrgid(orgid); IBZDepartmentSearchContext context=new IBZDepartmentSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_orgid_eq(orgid);
return iBZDepartmentFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByOrgid(String orgid) { public void removeByOrgid(String orgid) {
this.remove(new QueryWrapper<IBZDepartment>().eq("orgid",orgid)); Set<String> delIds=new HashSet<String>();
for(IBZDepartment before:selectByOrgid(orgid)){
delIds.add(before.getDeptid());
}
if(delIds.size()>0)
this.removeBatch(delIds);
} }
@Override @Override
...@@ -210,13 +184,14 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I ...@@ -210,13 +184,14 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
} }
/** /**
* 查询集合 CurDept * 查询集合 CurDept
*/ */
@Override @Override
public Page<IBZDepartment> searchCurDept(IBZDepartmentSearchContext context) { public Page<IBZDepartment> searchCurDept(IBZDepartmentSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZDepartment> pages=baseMapper.searchCurDept(context.getPages(),context,context.getSelectCond()); Page<IBZDepartment> iBZDepartments=iBZDepartmentFeignClient.searchCurDept(context);
return new PageImpl<IBZDepartment>(pages.getRecords(), context.getPageable(), pages.getTotal()); return iBZDepartments;
} }
/** /**
...@@ -224,82 +199,10 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I ...@@ -224,82 +199,10 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
*/ */
@Override @Override
public Page<IBZDepartment> searchDefault(IBZDepartmentSearchContext context) { public Page<IBZDepartment> searchDefault(IBZDepartmentSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZDepartment> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<IBZDepartment> iBZDepartments=iBZDepartmentFeignClient.searchDefault(context);
return new PageImpl<IBZDepartment>(pages.getRecords(), context.getPageable(), pages.getTotal()); return iBZDepartments;
}
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(IBZDepartment et){
//实体关系[DER1N_IBZDEPT_IBZDEPT_PDEPTID]
if(!ObjectUtils.isEmpty(et.getParentdeptid())){
cn.ibizlab.core.ou.domain.IBZDepartment parentdept=et.getParentdept();
if(ObjectUtils.isEmpty(parentdept)){
cn.ibizlab.core.ou.domain.IBZDepartment majorEntity=ibzdepartmentService.get(et.getParentdeptid());
et.setParentdept(majorEntity);
parentdept=majorEntity;
}
et.setParentdeptname(parentdept.getDeptname());
}
//实体关系[DER1N_IBZDEPT_IBZORG_ORGID]
if(!ObjectUtils.isEmpty(et.getOrgid())){
cn.ibizlab.core.ou.domain.IBZOrganization org=et.getOrg();
if(ObjectUtils.isEmpty(org)){
cn.ibizlab.core.ou.domain.IBZOrganization majorEntity=ibzorganizationService.get(et.getOrgid());
et.setOrg(majorEntity);
org=majorEntity;
}
et.setOrgname(org.getOrgname());
}
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
} }
@Override
public List<IBZDepartment> getIbzdepartmentByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<IBZDepartment> getIbzdepartmentByEntities(List<IBZDepartment> entities) {
List ids =new ArrayList();
for(IBZDepartment entity : entities){
Serializable id=entity.getDeptid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
} }
......
...@@ -30,52 +30,39 @@ import cn.ibizlab.core.ou.service.IIBZDeptMemberService; ...@@ -30,52 +30,39 @@ import cn.ibizlab.core.ou.service.IIBZDeptMemberService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.ou.client.IBZDeptMemberFeignClient;
import cn.ibizlab.core.ou.mapper.IBZDeptMemberMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[部门成员] 服务对象接口实现 * 实体[部门成员] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("IBZDeptMemberServiceImpl") @Service
public class IBZDeptMemberServiceImpl extends ServiceImpl<IBZDeptMemberMapper, IBZDeptMember> implements IIBZDeptMemberService { public class IBZDeptMemberServiceImpl implements IIBZDeptMemberService {
@Autowired @Autowired
@Lazy IBZDeptMemberFeignClient iBZDeptMemberFeignClient;
private cn.ibizlab.core.ou.service.IIBZDepartmentService ibzdepartmentService;
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZEmployeeService ibzemployeeService;
private int batchSize = 500;
@Override @Override
@Transactional
public boolean update(IBZDeptMember et) { public boolean update(IBZDeptMember et) {
fillParentData(et); IBZDeptMember rt = iBZDeptMemberFeignClient.update(et.getMemberid(),et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("memberid",et.getMemberid()))) if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getMemberid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<IBZDeptMember> list){
public void updateBatch(List<IBZDeptMember> list) { iBZDeptMemberFeignClient.updateBatch(list) ;
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
} }
@Override @Override
@Transactional public IBZDeptMember get(String memberid) {
public IBZDeptMember get(String key) { IBZDeptMember et=iBZDeptMemberFeignClient.get(memberid);
IBZDeptMember et = getById(key);
if(et==null){ if(et==null){
et=new IBZDeptMember(); et=new IBZDeptMember();
et.setMemberid(key); et.setMemberid(memberid);
} }
else{ else{
} }
...@@ -84,158 +71,98 @@ public class IBZDeptMemberServiceImpl extends ServiceImpl<IBZDeptMemberMapper, I ...@@ -84,158 +71,98 @@ public class IBZDeptMemberServiceImpl extends ServiceImpl<IBZDeptMemberMapper, I
@Override @Override
public boolean checkKey(IBZDeptMember et) { public boolean checkKey(IBZDeptMember et) {
return (!ObjectUtils.isEmpty(et.getMemberid()))&&(!Objects.isNull(this.getById(et.getMemberid()))); return iBZDeptMemberFeignClient.checkKey(et);
} }
@Override @Override
@Transactional public boolean remove(String memberid) {
public boolean remove(String key) { boolean result=iBZDeptMemberFeignClient.remove(memberid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { iBZDeptMemberFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
@Transactional
public boolean create(IBZDeptMember et) { public boolean create(IBZDeptMember et) {
fillParentData(et); IBZDeptMember rt = iBZDeptMemberFeignClient.create(et);
if(!this.retBool(this.baseMapper.insert(et))) if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getMemberid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<IBZDeptMember> list){
public void createBatch(List<IBZDeptMember> list) { iBZDeptMemberFeignClient.createBatch(list) ;
list.forEach(item->fillParentData(item));
this.saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
public IBZDeptMember getDraft(IBZDeptMember et) { public IBZDeptMember getDraft(IBZDeptMember et) {
fillParentData(et); et=iBZDeptMemberFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional @Transactional
public boolean save(IBZDeptMember et) { public boolean save(IBZDeptMember et) {
if(!saveOrUpdate(et)) if(et.getMemberid()==null) et.setMemberid((String)et.getDefaultKey(true));
if(!iBZDeptMemberFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(IBZDeptMember et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<IBZDeptMember> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<IBZDeptMember> list) { public void saveBatch(List<IBZDeptMember> list) {
list.forEach(item->fillParentData(item)); iBZDeptMemberFeignClient.saveBatch(list) ;
saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
public List<IBZDeptMember> selectByDeptid(String deptid) { public List<IBZDeptMember> selectByDeptid(String deptid) {
return baseMapper.selectByDeptid(deptid); IBZDeptMemberSearchContext context=new IBZDeptMemberSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_deptid_eq(deptid);
return iBZDeptMemberFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByDeptid(String deptid) { public void removeByDeptid(String deptid) {
this.remove(new QueryWrapper<IBZDeptMember>().eq("deptid",deptid)); Set<String> delIds=new HashSet<String>();
for(IBZDeptMember before:selectByDeptid(deptid)){
delIds.add(before.getMemberid());
}
if(delIds.size()>0)
this.removeBatch(delIds);
} }
@Override @Override
public List<IBZDeptMember> selectByUserid(String userid) { public List<IBZDeptMember> selectByUserid(String userid) {
return baseMapper.selectByUserid(userid); IBZDeptMemberSearchContext context=new IBZDeptMemberSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_userid_eq(userid);
return iBZDeptMemberFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByUserid(String userid) { public void removeByUserid(String userid) {
this.remove(new QueryWrapper<IBZDeptMember>().eq("userid",userid)); Set<String> delIds=new HashSet<String>();
for(IBZDeptMember before:selectByUserid(userid)){
delIds.add(before.getMemberid());
} }
if(delIds.size()>0)
this.removeBatch(delIds);
/**
* 查询集合 DEFAULT
*/
@Override
public Page<IBZDeptMember> searchDefault(IBZDeptMemberSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZDeptMember> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<IBZDeptMember>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
/** /**
* 为当前实体填充父数据(外键值文本、外键值附加数据) * 查询集合 DEFAULT
* @param et
*/ */
private void fillParentData(IBZDeptMember et){
//实体关系[DER1N_IBZDEPTMEMBER_IBZDEPT_DEPTID]
if(!ObjectUtils.isEmpty(et.getDeptid())){
cn.ibizlab.core.ou.domain.IBZDepartment dept=et.getDept();
if(ObjectUtils.isEmpty(dept)){
cn.ibizlab.core.ou.domain.IBZDepartment majorEntity=ibzdepartmentService.get(et.getDeptid());
et.setDept(majorEntity);
dept=majorEntity;
}
et.setDeptname(dept.getDeptname());
}
//实体关系[DER1N_IBZDEPTMEMBER_IBZEMP_USERID]
if(!ObjectUtils.isEmpty(et.getUserid())){
cn.ibizlab.core.ou.domain.IBZEmployee emp=et.getEmp();
if(ObjectUtils.isEmpty(emp)){
cn.ibizlab.core.ou.domain.IBZEmployee majorEntity=ibzemployeeService.get(et.getUserid());
et.setEmp(majorEntity);
emp=majorEntity;
}
et.setPersonname(emp.getPersonname());
}
}
@Override @Override
public List<JSONObject> select(String sql, Map param){ public Page<IBZDeptMember> searchDefault(IBZDeptMemberSearchContext context) {
return this.baseMapper.selectBySQL(sql,param); Page<IBZDeptMember> iBZDeptMembers=iBZDeptMemberFeignClient.searchDefault(context);
} return iBZDeptMembers;
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
} }
......
...@@ -30,77 +30,54 @@ import cn.ibizlab.core.ou.service.IIBZEmployeeService; ...@@ -30,77 +30,54 @@ import cn.ibizlab.core.ou.service.IIBZEmployeeService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.ou.client.IBZEmployeeFeignClient;
import cn.ibizlab.core.ou.mapper.IBZEmployeeMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[人员] 服务对象接口实现 * 实体[人员] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("IBZEmployeeServiceImpl") @Service
public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEmployee> implements IIBZEmployeeService { public class IBZEmployeeServiceImpl implements IIBZEmployeeService {
@Autowired @Autowired
@Lazy IBZEmployeeFeignClient iBZEmployeeFeignClient;
private cn.ibizlab.core.ou.service.IIBZDeptMemberService ibzdeptmemberService;
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZDepartmentService ibzdepartmentService;
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZOrganizationService ibzorganizationService;
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.logic.IIBZEmployeesaveDeptMemberLogic savedeptmemberLogic;
private int batchSize = 500;
@Override @Override
@Transactional public boolean remove(String userid) {
public boolean remove(String key) { boolean result=iBZEmployeeFeignClient.remove(userid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { iBZEmployeeFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
@Transactional
public boolean update(IBZEmployee et) { public boolean update(IBZEmployee et) {
fillParentData(et); IBZEmployee rt = iBZEmployeeFeignClient.update(et.getUserid(),et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("userid",et.getUserid()))) if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getUserid()),et); CachedBeanCopier.copy(rt,et);
savedeptmemberLogic.execute(et); savedeptmemberLogic.execute(et);
return true; return true;
} }
@Override public void updateBatch(List<IBZEmployee> list){
public void updateBatch(List<IBZEmployee> list) { iBZEmployeeFeignClient.updateBatch(list) ;
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
} }
@Override @Override
public boolean checkKey(IBZEmployee et) { public boolean checkKey(IBZEmployee et) {
return (!ObjectUtils.isEmpty(et.getUserid()))&&(!Objects.isNull(this.getById(et.getUserid()))); return iBZEmployeeFeignClient.checkKey(et);
} }
@Override @Override
@Transactional public IBZEmployee get(String userid) {
public IBZEmployee get(String key) { IBZEmployee et=iBZEmployeeFeignClient.get(userid);
IBZEmployee et = getById(key);
if(et==null){ if(et==null){
et=new IBZEmployee(); et=new IBZEmployee();
et.setUserid(key); et.setUserid(userid);
} }
else{ else{
} }
...@@ -110,34 +87,15 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm ...@@ -110,34 +87,15 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
@Override @Override
@Transactional @Transactional
public boolean save(IBZEmployee et) { public boolean save(IBZEmployee et) {
if(!saveOrUpdate(et)) if(et.getUserid()==null) et.setUserid((String)et.getDefaultKey(true));
return false; if(!iBZEmployeeFeignClient.save(et))
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(IBZEmployee et) {
if (null == et) {
return false; return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<IBZEmployee> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true; return true;
} }
@Override @Override
public void saveBatch(List<IBZEmployee> list) { public void saveBatch(List<IBZEmployee> list) {
list.forEach(item->fillParentData(item)); iBZEmployeeFeignClient.saveBatch(list) ;
saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
...@@ -149,132 +107,73 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm ...@@ -149,132 +107,73 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
@Override @Override
public IBZEmployee getDraft(IBZEmployee et) { public IBZEmployee getDraft(IBZEmployee et) {
fillParentData(et); et=iBZEmployeeFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional
public boolean create(IBZEmployee et) { public boolean create(IBZEmployee et) {
fillParentData(et); IBZEmployee rt = iBZEmployeeFeignClient.create(et);
if(!this.retBool(this.baseMapper.insert(et))) if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getUserid()),et); CachedBeanCopier.copy(rt,et);
savedeptmemberLogic.execute(et); savedeptmemberLogic.execute(et);
return true; return true;
} }
@Override public void createBatch(List<IBZEmployee> list){
public void createBatch(List<IBZEmployee> list) { iBZEmployeeFeignClient.createBatch(list) ;
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
} }
@Override @Override
public List<IBZEmployee> selectByMdeptid(String deptid) { public List<IBZEmployee> selectByMdeptid(String deptid) {
return baseMapper.selectByMdeptid(deptid); IBZEmployeeSearchContext context=new IBZEmployeeSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_mdeptid_eq(deptid);
return iBZEmployeeFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByMdeptid(String deptid) { public void removeByMdeptid(String deptid) {
this.remove(new QueryWrapper<IBZEmployee>().eq("mdeptid",deptid)); Set<String> delIds=new HashSet<String>();
for(IBZEmployee before:selectByMdeptid(deptid)){
delIds.add(before.getUserid());
}
if(delIds.size()>0)
this.removeBatch(delIds);
} }
@Override @Override
public List<IBZEmployee> selectByOrgid(String orgid) { public List<IBZEmployee> selectByOrgid(String orgid) {
return baseMapper.selectByOrgid(orgid); IBZEmployeeSearchContext context=new IBZEmployeeSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_orgid_eq(orgid);
return iBZEmployeeFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByOrgid(String orgid) { public void removeByOrgid(String orgid) {
this.remove(new QueryWrapper<IBZEmployee>().eq("orgid",orgid)); Set<String> delIds=new HashSet<String>();
for(IBZEmployee before:selectByOrgid(orgid)){
delIds.add(before.getUserid());
} }
if(delIds.size()>0)
this.removeBatch(delIds);
/**
* 查询集合 DEFAULT
*/
@Override
public Page<IBZEmployee> searchDefault(IBZEmployeeSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZEmployee> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<IBZEmployee>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
/** /**
* 为当前实体填充父数据(外键值文本、外键值附加数据) * 查询集合 DEFAULT
* @param et
*/ */
private void fillParentData(IBZEmployee et){
//实体关系[DER1N_IBZEMP_IBZDEPT_MDEPTID]
if(!ObjectUtils.isEmpty(et.getMdeptid())){
cn.ibizlab.core.ou.domain.IBZDepartment maindept=et.getMaindept();
if(ObjectUtils.isEmpty(maindept)){
cn.ibizlab.core.ou.domain.IBZDepartment majorEntity=ibzdepartmentService.get(et.getMdeptid());
et.setMaindept(majorEntity);
maindept=majorEntity;
}
et.setMdeptcode(maindept.getDeptcode());
et.setMdeptname(maindept.getDeptname());
}
//实体关系[DER1N_IBZEMP_IBZORG_ORGID]
if(!ObjectUtils.isEmpty(et.getOrgid())){
cn.ibizlab.core.ou.domain.IBZOrganization org=et.getOrg();
if(ObjectUtils.isEmpty(org)){
cn.ibizlab.core.ou.domain.IBZOrganization majorEntity=ibzorganizationService.get(et.getOrgid());
et.setOrg(majorEntity);
org=majorEntity;
}
et.setOrgcode(org.getOrgcode());
et.setOrgname(org.getOrgname());
}
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override @Override
public List<IBZEmployee> getIbzemployeeByIds(List<String> ids) { public Page<IBZEmployee> searchDefault(IBZEmployeeSearchContext context) {
return this.listByIds(ids); Page<IBZEmployee> iBZEmployees=iBZEmployeeFeignClient.searchDefault(context);
return iBZEmployees;
} }
@Override
public List<IBZEmployee> getIbzemployeeByEntities(List<IBZEmployee> entities) {
List ids =new ArrayList();
for(IBZEmployee entity : entities){
Serializable id=entity.getUserid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
} }
......
...@@ -30,155 +30,121 @@ import cn.ibizlab.core.ou.service.IIBZOrganizationService; ...@@ -30,155 +30,121 @@ import cn.ibizlab.core.ou.service.IIBZOrganizationService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.ou.client.IBZOrganizationFeignClient;
import cn.ibizlab.core.ou.mapper.IBZOrganizationMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[单位机构] 服务对象接口实现 * 实体[单位机构] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("IBZOrganizationServiceImpl") @Service
public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMapper, IBZOrganization> implements IIBZOrganizationService { public class IBZOrganizationServiceImpl implements IIBZOrganizationService {
@Autowired @Autowired
@Lazy IBZOrganizationFeignClient iBZOrganizationFeignClient;
private cn.ibizlab.core.ou.service.IIBZDepartmentService ibzdepartmentService;
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZEmployeeService ibzemployeeService;
private cn.ibizlab.core.ou.service.IIBZOrganizationService ibzorganizationService = this;
private int batchSize = 500;
@Override @Override
@Transactional @Transactional
public boolean save(IBZOrganization et) { public boolean save(IBZOrganization et) {
if(!saveOrUpdate(et)) if(et.getOrgid()==null) et.setOrgid((String)et.getDefaultKey(true));
if(!iBZOrganizationFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(IBZOrganization et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<IBZOrganization> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<IBZOrganization> list) { public void saveBatch(List<IBZOrganization> list) {
list.forEach(item->fillParentData(item)); iBZOrganizationFeignClient.saveBatch(list) ;
saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
public boolean checkKey(IBZOrganization et) { public boolean checkKey(IBZOrganization et) {
return (!ObjectUtils.isEmpty(et.getOrgid()))&&(!Objects.isNull(this.getById(et.getOrgid()))); return iBZOrganizationFeignClient.checkKey(et);
} }
@Override @Override
@Transactional public IBZOrganization get(String orgid) {
public IBZOrganization get(String key) { IBZOrganization et=iBZOrganizationFeignClient.get(orgid);
IBZOrganization et = getById(key);
if(et==null){ if(et==null){
et=new IBZOrganization(); et=new IBZOrganization();
et.setOrgid(key); et.setOrgid(orgid);
} }
else{ else{
et.setDepts(ibzdepartmentService.selectByOrgid(key));
} }
return et; return et;
} }
@Override @Override
@Transactional
public boolean create(IBZOrganization et) { public boolean create(IBZOrganization et) {
fillParentData(et); IBZOrganization rt = iBZOrganizationFeignClient.create(et);
if(!this.retBool(this.baseMapper.insert(et))) if(rt==null)
return false; return false;
ibzdepartmentService.saveByOrgid(et.getOrgid(),et.getDepts()); CachedBeanCopier.copy(rt,et);
CachedBeanCopier.copy(get(et.getOrgid()),et);
return true; return true;
} }
@Override public void createBatch(List<IBZOrganization> list){
public void createBatch(List<IBZOrganization> list) { iBZOrganizationFeignClient.createBatch(list) ;
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
} }
@Override @Override
@Transactional public boolean remove(String orgid) {
public boolean remove(String key) { boolean result=iBZOrganizationFeignClient.remove(orgid) ;
ibzdepartmentService.removeByOrgid(key) ; return result;
boolean result=removeById(key);
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { iBZOrganizationFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
public IBZOrganization getDraft(IBZOrganization et) { public IBZOrganization getDraft(IBZOrganization et) {
fillParentData(et); et=iBZOrganizationFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional
public boolean update(IBZOrganization et) { public boolean update(IBZOrganization et) {
fillParentData(et); IBZOrganization rt = iBZOrganizationFeignClient.update(et.getOrgid(),et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("orgid",et.getOrgid()))) if(rt==null)
return false; return false;
ibzdepartmentService.saveByOrgid(et.getOrgid(),et.getDepts()); CachedBeanCopier.copy(rt,et);
CachedBeanCopier.copy(get(et.getOrgid()),et);
return true; return true;
} }
@Override public void updateBatch(List<IBZOrganization> list){
public void updateBatch(List<IBZOrganization> list) { iBZOrganizationFeignClient.updateBatch(list) ;
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
} }
@Override @Override
public List<IBZOrganization> selectByParentorgid(String orgid) { public List<IBZOrganization> selectByParentorgid(String orgid) {
return baseMapper.selectByParentorgid(orgid); IBZOrganizationSearchContext context=new IBZOrganizationSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_porgid_eq(orgid);
return iBZOrganizationFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByParentorgid(String orgid) { public void removeByParentorgid(String orgid) {
this.remove(new QueryWrapper<IBZOrganization>().eq("porgid",orgid)); Set<String> delIds=new HashSet<String>();
for(IBZOrganization before:selectByParentorgid(orgid)){
delIds.add(before.getOrgid());
}
if(delIds.size()>0)
this.removeBatch(delIds);
} }
/** /**
* 查询集合 DEFAULT * 查询集合 DEFAULT
*/ */
@Override @Override
public Page<IBZOrganization> searchDefault(IBZOrganizationSearchContext context) { public Page<IBZOrganization> searchDefault(IBZOrganizationSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZOrganization> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<IBZOrganization> iBZOrganizations=iBZOrganizationFeignClient.searchDefault(context);
return new PageImpl<IBZOrganization>(pages.getRecords(), context.getPageable(), pages.getTotal()); return iBZOrganizations;
} }
/** /**
...@@ -186,8 +152,8 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe ...@@ -186,8 +152,8 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
*/ */
@Override @Override
public Page<IBZOrganization> searchSelectPOrg(IBZOrganizationSearchContext context) { public Page<IBZOrganization> searchSelectPOrg(IBZOrganizationSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZOrganization> pages=baseMapper.searchSelectPOrg(context.getPages(),context,context.getSelectCond()); Page<IBZOrganization> iBZOrganizations=iBZOrganizationFeignClient.searchSelectPOrg(context);
return new PageImpl<IBZOrganization>(pages.getRecords(), context.getPageable(), pages.getTotal()); return iBZOrganizations;
} }
/** /**
...@@ -195,73 +161,11 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe ...@@ -195,73 +161,11 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
*/ */
@Override @Override
public Page<IBZOrganization> searchSelectSOrg(IBZOrganizationSearchContext context) { public Page<IBZOrganization> searchSelectSOrg(IBZOrganizationSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZOrganization> pages=baseMapper.searchSelectSOrg(context.getPages(),context,context.getSelectCond()); Page<IBZOrganization> iBZOrganizations=iBZOrganizationFeignClient.searchSelectSOrg(context);
return new PageImpl<IBZOrganization>(pages.getRecords(), context.getPageable(), pages.getTotal()); return iBZOrganizations;
} }
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(IBZOrganization et){
//实体关系[DER1N_IBZORG_IBZORG_PORGID]
if(!ObjectUtils.isEmpty(et.getParentorgid())){
cn.ibizlab.core.ou.domain.IBZOrganization parentorg=et.getParentorg();
if(ObjectUtils.isEmpty(parentorg)){
cn.ibizlab.core.ou.domain.IBZOrganization majorEntity=ibzorganizationService.get(et.getParentorgid());
et.setParentorg(majorEntity);
parentorg=majorEntity;
}
et.setParentorgname(parentorg.getOrgname());
}
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<IBZOrganization> getIbzorganizationByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<IBZOrganization> getIbzorganizationByEntities(List<IBZOrganization> entities) {
List ids =new ArrayList();
for(IBZOrganization entity : entities){
Serializable id=entity.getOrgid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
} }
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysAuthLog;
import cn.ibizlab.core.uaa.filter.SysAuthLogSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[SysAuthLog] 服务对象接口
*/
@Component
public class SysAuthLogFallback implements SysAuthLogFeignClient{
public Page<SysAuthLog> select(){
return null;
}
public Boolean checkKey(SysAuthLog sysauthlog){
return false;
}
public Boolean remove(String logid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public SysAuthLog getDraft(){
return null;
}
public SysAuthLog update(String logid, SysAuthLog sysauthlog){
return null;
}
public Boolean updateBatch(List<SysAuthLog> sysauthlogs){
return false;
}
public Boolean save(SysAuthLog sysauthlog){
return false;
}
public Boolean saveBatch(List<SysAuthLog> sysauthlogs){
return false;
}
public SysAuthLog create(SysAuthLog sysauthlog){
return null;
}
public Boolean createBatch(List<SysAuthLog> sysauthlogs){
return false;
}
public SysAuthLog get(String logid){
return null;
}
public Page<SysAuthLog> searchDefault(SysAuthLogSearchContext context){
return null;
}
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysAuthLog;
import cn.ibizlab.core.uaa.filter.SysAuthLogSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[SysAuthLog] 服务对象接口
*/
@FeignClient(value = "ibzuaa-api", contextId = "SysAuthLog", fallback = SysAuthLogFallback.class)
public interface SysAuthLogFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/sysauthlogs/select")
Page<SysAuthLog> select();
@RequestMapping(method = RequestMethod.POST, value = "/sysauthlogs/checkkey")
Boolean checkKey(@RequestBody SysAuthLog sysauthlog);
@RequestMapping(method = RequestMethod.DELETE, value = "/sysauthlogs/{logid}")
Boolean remove(@PathVariable("logid") String logid);
@RequestMapping(method = RequestMethod.DELETE, value = "/sysauthlogs/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.GET, value = "/sysauthlogs/getdraft")
SysAuthLog getDraft();
@RequestMapping(method = RequestMethod.PUT, value = "/sysauthlogs/{logid}")
SysAuthLog update(@PathVariable("logid") String logid,@RequestBody SysAuthLog sysauthlog);
@RequestMapping(method = RequestMethod.PUT, value = "/sysauthlogs/batch")
Boolean updateBatch(@RequestBody List<SysAuthLog> sysauthlogs);
@RequestMapping(method = RequestMethod.POST, value = "/sysauthlogs/save")
Boolean save(@RequestBody SysAuthLog sysauthlog);
@RequestMapping(method = RequestMethod.POST, value = "/sysauthlogs/save")
Boolean saveBatch(@RequestBody List<SysAuthLog> sysauthlogs);
@RequestMapping(method = RequestMethod.POST, value = "/sysauthlogs")
SysAuthLog create(@RequestBody SysAuthLog sysauthlog);
@RequestMapping(method = RequestMethod.POST, value = "/sysauthlogs/batch")
Boolean createBatch(@RequestBody List<SysAuthLog> sysauthlogs);
@RequestMapping(method = RequestMethod.GET, value = "/sysauthlogs/{logid}")
SysAuthLog get(@PathVariable("logid") String logid);
@RequestMapping(method = RequestMethod.POST, value = "/sysauthlogs/searchdefault")
Page<SysAuthLog> searchDefault(@RequestBody SysAuthLogSearchContext context);
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysPSSystem;
import cn.ibizlab.core.uaa.filter.SysPSSystemSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[SysPSSystem] 服务对象接口
*/
@Component
public class SysPSSystemFallback implements SysPSSystemFeignClient{
public Page<SysPSSystem> select(){
return null;
}
public SysPSSystem get(String pssystemid){
return null;
}
public SysPSSystem update(String pssystemid, SysPSSystem syspssystem){
return null;
}
public Boolean updateBatch(List<SysPSSystem> syspssystems){
return false;
}
public Boolean checkKey(SysPSSystem syspssystem){
return false;
}
public Boolean remove(String pssystemid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public SysPSSystem create(SysPSSystem syspssystem){
return null;
}
public Boolean createBatch(List<SysPSSystem> syspssystems){
return false;
}
public SysPSSystem getDraft(){
return null;
}
public Boolean save(SysPSSystem syspssystem){
return false;
}
public Boolean saveBatch(List<SysPSSystem> syspssystems){
return false;
}
public Page<SysPSSystem> searchDefault(SysPSSystemSearchContext context){
return null;
}
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysPSSystem;
import cn.ibizlab.core.uaa.filter.SysPSSystemSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[SysPSSystem] 服务对象接口
*/
@FeignClient(value = "ibzuaa-api", contextId = "SysPSSystem", fallback = SysPSSystemFallback.class)
public interface SysPSSystemFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/syspssystems/select")
Page<SysPSSystem> select();
@RequestMapping(method = RequestMethod.GET, value = "/syspssystems/{pssystemid}")
SysPSSystem get(@PathVariable("pssystemid") String pssystemid);
@RequestMapping(method = RequestMethod.PUT, value = "/syspssystems/{pssystemid}")
SysPSSystem update(@PathVariable("pssystemid") String pssystemid,@RequestBody SysPSSystem syspssystem);
@RequestMapping(method = RequestMethod.PUT, value = "/syspssystems/batch")
Boolean updateBatch(@RequestBody List<SysPSSystem> syspssystems);
@RequestMapping(method = RequestMethod.POST, value = "/syspssystems/checkkey")
Boolean checkKey(@RequestBody SysPSSystem syspssystem);
@RequestMapping(method = RequestMethod.DELETE, value = "/syspssystems/{pssystemid}")
Boolean remove(@PathVariable("pssystemid") String pssystemid);
@RequestMapping(method = RequestMethod.DELETE, value = "/syspssystems/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.POST, value = "/syspssystems")
SysPSSystem create(@RequestBody SysPSSystem syspssystem);
@RequestMapping(method = RequestMethod.POST, value = "/syspssystems/batch")
Boolean createBatch(@RequestBody List<SysPSSystem> syspssystems);
@RequestMapping(method = RequestMethod.GET, value = "/syspssystems/getdraft")
SysPSSystem getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/syspssystems/save")
Boolean save(@RequestBody SysPSSystem syspssystem);
@RequestMapping(method = RequestMethod.POST, value = "/syspssystems/save")
Boolean saveBatch(@RequestBody List<SysPSSystem> syspssystems);
@RequestMapping(method = RequestMethod.POST, value = "/syspssystems/searchdefault")
Page<SysPSSystem> searchDefault(@RequestBody SysPSSystemSearchContext context);
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysPermission;
import cn.ibizlab.core.uaa.filter.SysPermissionSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[SysPermission] 服务对象接口
*/
@Component
public class SysPermissionFallback implements SysPermissionFeignClient{
public Page<SysPermission> select(){
return null;
}
public Boolean save(SysPermission syspermission){
return false;
}
public Boolean saveBatch(List<SysPermission> syspermissions){
return false;
}
public SysPermission getDraft(){
return null;
}
public Boolean remove(String permissionid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public SysPermission update(String permissionid, SysPermission syspermission){
return null;
}
public Boolean updateBatch(List<SysPermission> syspermissions){
return false;
}
public SysPermission create(SysPermission syspermission){
return null;
}
public Boolean createBatch(List<SysPermission> syspermissions){
return false;
}
public Boolean checkKey(SysPermission syspermission){
return false;
}
public SysPermission get(String permissionid){
return null;
}
public Page<SysPermission> searchDefault(SysPermissionSearchContext context){
return null;
}
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysPermission;
import cn.ibizlab.core.uaa.filter.SysPermissionSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[SysPermission] 服务对象接口
*/
@FeignClient(value = "ibzuaa-api", contextId = "SysPermission", fallback = SysPermissionFallback.class)
public interface SysPermissionFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/syspermissions/select")
Page<SysPermission> select();
@RequestMapping(method = RequestMethod.POST, value = "/syspermissions/save")
Boolean save(@RequestBody SysPermission syspermission);
@RequestMapping(method = RequestMethod.POST, value = "/syspermissions/save")
Boolean saveBatch(@RequestBody List<SysPermission> syspermissions);
@RequestMapping(method = RequestMethod.GET, value = "/syspermissions/getdraft")
SysPermission getDraft();
@RequestMapping(method = RequestMethod.DELETE, value = "/syspermissions/{permissionid}")
Boolean remove(@PathVariable("permissionid") String permissionid);
@RequestMapping(method = RequestMethod.DELETE, value = "/syspermissions/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.PUT, value = "/syspermissions/{permissionid}")
SysPermission update(@PathVariable("permissionid") String permissionid,@RequestBody SysPermission syspermission);
@RequestMapping(method = RequestMethod.PUT, value = "/syspermissions/batch")
Boolean updateBatch(@RequestBody List<SysPermission> syspermissions);
@RequestMapping(method = RequestMethod.POST, value = "/syspermissions")
SysPermission create(@RequestBody SysPermission syspermission);
@RequestMapping(method = RequestMethod.POST, value = "/syspermissions/batch")
Boolean createBatch(@RequestBody List<SysPermission> syspermissions);
@RequestMapping(method = RequestMethod.POST, value = "/syspermissions/checkkey")
Boolean checkKey(@RequestBody SysPermission syspermission);
@RequestMapping(method = RequestMethod.GET, value = "/syspermissions/{permissionid}")
SysPermission get(@PathVariable("permissionid") String permissionid);
@RequestMapping(method = RequestMethod.POST, value = "/syspermissions/searchdefault")
Page<SysPermission> searchDefault(@RequestBody SysPermissionSearchContext context);
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysRole;
import cn.ibizlab.core.uaa.filter.SysRoleSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[SysRole] 服务对象接口
*/
@Component
public class SysRoleFallback implements SysRoleFeignClient{
public Page<SysRole> select(){
return null;
}
public Boolean save(SysRole sysrole){
return false;
}
public Boolean saveBatch(List<SysRole> sysroles){
return false;
}
public SysRole update(String roleid, SysRole sysrole){
return null;
}
public Boolean updateBatch(List<SysRole> sysroles){
return false;
}
public SysRole create(SysRole sysrole){
return null;
}
public Boolean createBatch(List<SysRole> sysroles){
return false;
}
public SysRole get(String roleid){
return null;
}
public Boolean remove(String roleid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public SysRole getDraft(){
return null;
}
public Boolean checkKey(SysRole sysrole){
return false;
}
public Page<SysRole> searchDefault(SysRoleSearchContext context){
return null;
}
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysRole;
import cn.ibizlab.core.uaa.filter.SysRoleSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[SysRole] 服务对象接口
*/
@FeignClient(value = "ibzuaa-api", contextId = "SysRole", fallback = SysRoleFallback.class)
public interface SysRoleFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/sysroles/select")
Page<SysRole> select();
@RequestMapping(method = RequestMethod.POST, value = "/sysroles/save")
Boolean save(@RequestBody SysRole sysrole);
@RequestMapping(method = RequestMethod.POST, value = "/sysroles/save")
Boolean saveBatch(@RequestBody List<SysRole> sysroles);
@RequestMapping(method = RequestMethod.PUT, value = "/sysroles/{roleid}")
SysRole update(@PathVariable("roleid") String roleid,@RequestBody SysRole sysrole);
@RequestMapping(method = RequestMethod.PUT, value = "/sysroles/batch")
Boolean updateBatch(@RequestBody List<SysRole> sysroles);
@RequestMapping(method = RequestMethod.POST, value = "/sysroles")
SysRole create(@RequestBody SysRole sysrole);
@RequestMapping(method = RequestMethod.POST, value = "/sysroles/batch")
Boolean createBatch(@RequestBody List<SysRole> sysroles);
@RequestMapping(method = RequestMethod.GET, value = "/sysroles/{roleid}")
SysRole get(@PathVariable("roleid") String roleid);
@RequestMapping(method = RequestMethod.DELETE, value = "/sysroles/{roleid}")
Boolean remove(@PathVariable("roleid") String roleid);
@RequestMapping(method = RequestMethod.DELETE, value = "/sysroles/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.GET, value = "/sysroles/getdraft")
SysRole getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/sysroles/checkkey")
Boolean checkKey(@RequestBody SysRole sysrole);
@RequestMapping(method = RequestMethod.POST, value = "/sysroles/searchdefault")
Page<SysRole> searchDefault(@RequestBody SysRoleSearchContext context);
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysRolePermission;
import cn.ibizlab.core.uaa.filter.SysRolePermissionSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[SysRolePermission] 服务对象接口
*/
@Component
public class SysRolePermissionFallback implements SysRolePermissionFeignClient{
public Page<SysRolePermission> select(){
return null;
}
public SysRolePermission get(String rolepermissionid){
return null;
}
public Boolean remove(String rolepermissionid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public SysRolePermission getDraft(){
return null;
}
public SysRolePermission create(SysRolePermission sysrolepermission){
return null;
}
public Boolean createBatch(List<SysRolePermission> sysrolepermissions){
return false;
}
public Boolean checkKey(SysRolePermission sysrolepermission){
return false;
}
public Boolean save(SysRolePermission sysrolepermission){
return false;
}
public Boolean saveBatch(List<SysRolePermission> sysrolepermissions){
return false;
}
public SysRolePermission update(String rolepermissionid, SysRolePermission sysrolepermission){
return null;
}
public Boolean updateBatch(List<SysRolePermission> sysrolepermissions){
return false;
}
public Page<SysRolePermission> searchDefault(SysRolePermissionSearchContext context){
return null;
}
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysRolePermission;
import cn.ibizlab.core.uaa.filter.SysRolePermissionSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[SysRolePermission] 服务对象接口
*/
@FeignClient(value = "ibzuaa-api", contextId = "SysRolePermission", fallback = SysRolePermissionFallback.class)
public interface SysRolePermissionFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/sysrolepermissions/select")
Page<SysRolePermission> select();
@RequestMapping(method = RequestMethod.GET, value = "/sysrolepermissions/{rolepermissionid}")
SysRolePermission get(@PathVariable("rolepermissionid") String rolepermissionid);
@RequestMapping(method = RequestMethod.DELETE, value = "/sysrolepermissions/{rolepermissionid}")
Boolean remove(@PathVariable("rolepermissionid") String rolepermissionid);
@RequestMapping(method = RequestMethod.DELETE, value = "/sysrolepermissions/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.GET, value = "/sysrolepermissions/getdraft")
SysRolePermission getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions")
SysRolePermission create(@RequestBody SysRolePermission sysrolepermission);
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/batch")
Boolean createBatch(@RequestBody List<SysRolePermission> sysrolepermissions);
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/checkkey")
Boolean checkKey(@RequestBody SysRolePermission sysrolepermission);
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/save")
Boolean save(@RequestBody SysRolePermission sysrolepermission);
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/save")
Boolean saveBatch(@RequestBody List<SysRolePermission> sysrolepermissions);
@RequestMapping(method = RequestMethod.PUT, value = "/sysrolepermissions/{rolepermissionid}")
SysRolePermission update(@PathVariable("rolepermissionid") String rolepermissionid,@RequestBody SysRolePermission sysrolepermission);
@RequestMapping(method = RequestMethod.PUT, value = "/sysrolepermissions/batch")
Boolean updateBatch(@RequestBody List<SysRolePermission> sysrolepermissions);
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/searchdefault")
Page<SysRolePermission> searchDefault(@RequestBody SysRolePermissionSearchContext context);
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysUser;
import cn.ibizlab.core.uaa.filter.SysUserSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[SysUser] 服务对象接口
*/
@Component
public class SysUserFallback implements SysUserFeignClient{
public Page<SysUser> select(){
return null;
}
public Boolean remove(String userid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public SysUser update(String userid, SysUser sysuser){
return null;
}
public Boolean updateBatch(List<SysUser> sysusers){
return false;
}
public Boolean checkKey(SysUser sysuser){
return false;
}
public SysUser get(String userid){
return null;
}
public Boolean save(SysUser sysuser){
return false;
}
public Boolean saveBatch(List<SysUser> sysusers){
return false;
}
public SysUser getDraft(){
return null;
}
public SysUser create(SysUser sysuser){
return null;
}
public Boolean createBatch(List<SysUser> sysusers){
return false;
}
public Page<SysUser> searchDefault(SysUserSearchContext context){
return null;
}
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysUser;
import cn.ibizlab.core.uaa.filter.SysUserSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[SysUser] 服务对象接口
*/
@FeignClient(value = "ibzuaa-api", contextId = "SysUser", fallback = SysUserFallback.class)
public interface SysUserFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/sysusers/select")
Page<SysUser> select();
@RequestMapping(method = RequestMethod.DELETE, value = "/sysusers/{userid}")
Boolean remove(@PathVariable("userid") String userid);
@RequestMapping(method = RequestMethod.DELETE, value = "/sysusers/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.PUT, value = "/sysusers/{userid}")
SysUser update(@PathVariable("userid") String userid,@RequestBody SysUser sysuser);
@RequestMapping(method = RequestMethod.PUT, value = "/sysusers/batch")
Boolean updateBatch(@RequestBody List<SysUser> sysusers);
@RequestMapping(method = RequestMethod.POST, value = "/sysusers/checkkey")
Boolean checkKey(@RequestBody SysUser sysuser);
@RequestMapping(method = RequestMethod.GET, value = "/sysusers/{userid}")
SysUser get(@PathVariable("userid") String userid);
@RequestMapping(method = RequestMethod.POST, value = "/sysusers/save")
Boolean save(@RequestBody SysUser sysuser);
@RequestMapping(method = RequestMethod.POST, value = "/sysusers/save")
Boolean saveBatch(@RequestBody List<SysUser> sysusers);
@RequestMapping(method = RequestMethod.GET, value = "/sysusers/getdraft")
SysUser getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/sysusers")
SysUser create(@RequestBody SysUser sysuser);
@RequestMapping(method = RequestMethod.POST, value = "/sysusers/batch")
Boolean createBatch(@RequestBody List<SysUser> sysusers);
@RequestMapping(method = RequestMethod.POST, value = "/sysusers/searchdefault")
Page<SysUser> searchDefault(@RequestBody SysUserSearchContext context);
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysUserRole;
import cn.ibizlab.core.uaa.filter.SysUserRoleSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[SysUserRole] 服务对象接口
*/
@Component
public class SysUserRoleFallback implements SysUserRoleFeignClient{
public Page<SysUserRole> select(){
return null;
}
public Boolean checkKey(SysUserRole sysuserrole){
return false;
}
public SysUserRole getDraft(){
return null;
}
public SysUserRole update(String userroleid, SysUserRole sysuserrole){
return null;
}
public Boolean updateBatch(List<SysUserRole> sysuserroles){
return false;
}
public Boolean remove(String userroleid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public SysUserRole create(SysUserRole sysuserrole){
return null;
}
public Boolean createBatch(List<SysUserRole> sysuserroles){
return false;
}
public SysUserRole get(String userroleid){
return null;
}
public Boolean save(SysUserRole sysuserrole){
return false;
}
public Boolean saveBatch(List<SysUserRole> sysuserroles){
return false;
}
public Page<SysUserRole> searchDefault(SysUserRoleSearchContext context){
return null;
}
}
package cn.ibizlab.core.uaa.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.core.uaa.domain.SysUserRole;
import cn.ibizlab.core.uaa.filter.SysUserRoleSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[SysUserRole] 服务对象接口
*/
@FeignClient(value = "ibzuaa-api", contextId = "SysUserRole", fallback = SysUserRoleFallback.class)
public interface SysUserRoleFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/sysuserroles/select")
Page<SysUserRole> select();
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/checkkey")
Boolean checkKey(@RequestBody SysUserRole sysuserrole);
@RequestMapping(method = RequestMethod.GET, value = "/sysuserroles/getdraft")
SysUserRole getDraft();
@RequestMapping(method = RequestMethod.PUT, value = "/sysuserroles/{userroleid}")
SysUserRole update(@PathVariable("userroleid") String userroleid,@RequestBody SysUserRole sysuserrole);
@RequestMapping(method = RequestMethod.PUT, value = "/sysuserroles/batch")
Boolean updateBatch(@RequestBody List<SysUserRole> sysuserroles);
@RequestMapping(method = RequestMethod.DELETE, value = "/sysuserroles/{userroleid}")
Boolean remove(@PathVariable("userroleid") String userroleid);
@RequestMapping(method = RequestMethod.DELETE, value = "/sysuserroles/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles")
SysUserRole create(@RequestBody SysUserRole sysuserrole);
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/batch")
Boolean createBatch(@RequestBody List<SysUserRole> sysuserroles);
@RequestMapping(method = RequestMethod.GET, value = "/sysuserroles/{userroleid}")
SysUserRole get(@PathVariable("userroleid") String userroleid);
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/save")
Boolean save(@RequestBody SysUserRole sysuserrole);
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/save")
Boolean saveBatch(@RequestBody List<SysUserRole> sysuserroles);
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/searchdefault")
Page<SysUserRole> searchDefault(@RequestBody SysUserRoleSearchContext context);
}
...@@ -21,89 +21,84 @@ import java.io.Serializable; ...@@ -21,89 +21,84 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[认证日志] * ServiceApi [认证日志] 对象
*/ */
@Data @Data
@TableName(value = "IBZAUTHLOG",resultMap = "SysAuthLogResultMap") public class SysAuthLog extends EntityClient implements Serializable {
public class SysAuthLog extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 标识 * 标识
*/ */
@DEField(isKeyField=true) @DEField(isKeyField=true)
@TableId(value= "logid",type=IdType.UUID)
@JSONField(name = "logid") @JSONField(name = "logid")
@JsonProperty("logid") @JsonProperty("logid")
private String logid; private String logid;
/** /**
* 用户全局名 * 用户全局名
*/ */
@TableField(value = "username")
@JSONField(name = "username") @JSONField(name = "username")
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
/** /**
* 用户名称 * 用户名称
*/ */
@TableField(value = "personname")
@JSONField(name = "personname") @JSONField(name = "personname")
@JsonProperty("personname") @JsonProperty("personname")
private String personname; private String personname;
/** /**
* 域 * 域
*/ */
@TableField(value = "domain")
@JSONField(name = "domain") @JSONField(name = "domain")
@JsonProperty("domain") @JsonProperty("domain")
private String domain; private String domain;
/** /**
* 认证时间 * 认证时间
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEDATE) @DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "authtime" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "authtime" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "authtime" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("authtime") @JsonProperty("authtime")
private Timestamp authtime; private Timestamp authtime;
/** /**
* IP地址 * IP地址
*/ */
@TableField(value = "ipaddr")
@JSONField(name = "ipaddr") @JSONField(name = "ipaddr")
@JsonProperty("ipaddr") @JsonProperty("ipaddr")
private String ipaddr; private String ipaddr;
/** /**
* MAC地址 * MAC地址
*/ */
@TableField(value = "macaddr")
@JSONField(name = "macaddr") @JSONField(name = "macaddr")
@JsonProperty("macaddr") @JsonProperty("macaddr")
private String macaddr; private String macaddr;
/** /**
* 客户端 * 客户端
*/ */
@TableField(value = "useragent")
@JSONField(name = "useragent") @JSONField(name = "useragent")
@JsonProperty("useragent") @JsonProperty("useragent")
private String useragent; private String useragent;
/** /**
* 认证结果 * 认证结果
*/ */
@TableField(value = "authcode")
@JSONField(name = "authcode") @JSONField(name = "authcode")
@JsonProperty("authcode") @JsonProperty("authcode")
private String authcode; private String authcode;
/** /**
* 设置 [用户全局名] * 设置 [用户全局名]
*/ */
......
...@@ -21,45 +21,40 @@ import java.io.Serializable; ...@@ -21,45 +21,40 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[实体] * ServiceApi [实体] 对象
*/ */
@Data @Data
@TableName(value = "IBZPSSYSTEM",resultMap = "SysPSSystemResultMap") public class SysPSSystem extends EntityClient implements Serializable {
public class SysPSSystem extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 系统标识 * 系统标识
*/ */
@DEField(isKeyField=true) @DEField(isKeyField=true)
@TableId(value= "pssystemid",type=IdType.UUID)
@JSONField(name = "pssystemid") @JSONField(name = "pssystemid")
@JsonProperty("pssystemid") @JsonProperty("pssystemid")
private String pssystemid; private String pssystemid;
/** /**
* 系统名称 * 系统名称
*/ */
@TableField(value = "pssystemname")
@JSONField(name = "pssystemname") @JSONField(name = "pssystemname")
@JsonProperty("pssystemname") @JsonProperty("pssystemname")
private String pssystemname; private String pssystemname;
/** /**
* 结构 * 结构
*/ */
@TableField(value = "sysstructure")
@JSONField(name = "sysstructure") @JSONField(name = "sysstructure")
@JsonProperty("sysstructure") @JsonProperty("sysstructure")
private String sysstructure; private String sysstructure;
/** /**
* 设置 [系统名称] * 设置 [系统名称]
*/ */
......
...@@ -21,73 +21,65 @@ import java.io.Serializable; ...@@ -21,73 +21,65 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[权限/资源] * ServiceApi [权限/资源] 对象
*/ */
@Data @Data
@TableName(value = "IBZPERMISSION",resultMap = "SysPermissionResultMap") public class SysPermission extends EntityClient implements Serializable {
public class SysPermission extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 资源标识 * 资源标识
*/ */
@DEField(name = "sys_permissionid" , isKeyField=true) @DEField(name = "sys_permissionid" , isKeyField=true)
@TableId(value= "sys_permissionid",type=IdType.UUID)
@JSONField(name = "permissionid") @JSONField(name = "permissionid")
@JsonProperty("permissionid") @JsonProperty("permissionid")
private String permissionid; private String permissionid;
/** /**
* 资源名称 * 资源名称
*/ */
@DEField(name = "sys_permissionname") @DEField(name = "sys_permissionname")
@TableField(value = "sys_permissionname")
@JSONField(name = "permissionname") @JSONField(name = "permissionname")
@JsonProperty("permissionname") @JsonProperty("permissionname")
private String permissionname; private String permissionname;
/** /**
* 资源类别 * 资源类别
*/ */
@TableField(value = "permissiontype")
@JSONField(name = "permissiontype") @JSONField(name = "permissiontype")
@JsonProperty("permissiontype") @JsonProperty("permissiontype")
private String permissiontype; private String permissiontype;
/** /**
* 系统 * 系统
*/ */
@TableField(value = "pssystemid")
@JSONField(name = "pssystemid") @JSONField(name = "pssystemid")
@JsonProperty("pssystemid") @JsonProperty("pssystemid")
private String pssystemid; private String pssystemid;
/** /**
* 逻辑有效 * 逻辑有效
*/ */
@DEField(preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0") @DEField(preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0")
@TableLogic(value= "1",delval="0")
@TableField(value = "enable")
@JSONField(name = "enable") @JSONField(name = "enable")
@JsonProperty("enable") @JsonProperty("enable")
private Integer enable; private Integer enable;
/** /**
* 建立时间 * 建立时间
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEDATE) @DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createdate; private Timestamp createdate;
/** /**
* 更新时间 * 更新时间
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEDATE) @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate") @JsonProperty("updatedate")
...@@ -95,6 +87,8 @@ public class SysPermission extends EntityMP implements Serializable { ...@@ -95,6 +87,8 @@ public class SysPermission extends EntityMP implements Serializable {
/** /**
* 设置 [资源名称] * 设置 [资源名称]
*/ */
......
...@@ -21,57 +21,50 @@ import java.io.Serializable; ...@@ -21,57 +21,50 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[系统角色] * ServiceApi [系统角色] 对象
*/ */
@Data @Data
@TableName(value = "IBZROLE",resultMap = "SysRoleResultMap") public class SysRole extends EntityClient implements Serializable {
public class SysRole extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 角色表标识 * 角色表标识
*/ */
@DEField(name = "sys_roleid" , isKeyField=true) @DEField(name = "sys_roleid" , isKeyField=true)
@TableId(value= "sys_roleid",type=IdType.UUID)
@JSONField(name = "roleid") @JSONField(name = "roleid")
@JsonProperty("roleid") @JsonProperty("roleid")
private String roleid; private String roleid;
/** /**
* 角色表名称 * 角色表名称
*/ */
@DEField(name = "sys_rolename") @DEField(name = "sys_rolename")
@TableField(value = "sys_rolename")
@JSONField(name = "rolename") @JSONField(name = "rolename")
@JsonProperty("rolename") @JsonProperty("rolename")
private String rolename; private String rolename;
/** /**
* 备注 * 备注
*/ */
@TableField(value = "memo")
@JSONField(name = "memo") @JSONField(name = "memo")
@JsonProperty("memo") @JsonProperty("memo")
private String memo; private String memo;
/** /**
* 建立时间 * 建立时间
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEDATE) @DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createdate; private Timestamp createdate;
/** /**
* 更新时间 * 更新时间
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEDATE) @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate") @JsonProperty("updatedate")
...@@ -79,6 +72,8 @@ public class SysRole extends EntityMP implements Serializable { ...@@ -79,6 +72,8 @@ public class SysRole extends EntityMP implements Serializable {
/** /**
* 设置 [角色表名称] * 设置 [角色表名称]
*/ */
......
...@@ -21,109 +21,102 @@ import java.io.Serializable; ...@@ -21,109 +21,102 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[角色权限关系] * ServiceApi [角色权限关系] 对象
*/ */
@Data @Data
@TableName(value = "IBZROLE_PERMISSION",resultMap = "SysRolePermissionResultMap") public class SysRolePermission extends EntityClient implements Serializable {
public class SysRolePermission extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 角色权限关系表标识 * 角色权限关系表标识
*/ */
@DEField(name = "sys_role_permissionid" , isKeyField=true) @DEField(name = "sys_role_permissionid" , isKeyField=true)
@TableId(value= "sys_role_permissionid",type=IdType.UUID)
@JSONField(name = "rolepermissionid") @JSONField(name = "rolepermissionid")
@JsonProperty("rolepermissionid") @JsonProperty("rolepermissionid")
private String rolepermissionid; private String rolepermissionid;
/** /**
* 角色表标识 * 角色表标识
*/ */
@DEField(name = "sys_roleid") @DEField(name = "sys_roleid")
@TableField(value = "sys_roleid")
@JSONField(name = "roleid") @JSONField(name = "roleid")
@JsonProperty("roleid") @JsonProperty("roleid")
private String roleid; private String roleid;
/** /**
* 角色名称 * 角色名称
*/ */
@TableField(exist = false)
@JSONField(name = "rolename") @JSONField(name = "rolename")
@JsonProperty("rolename") @JsonProperty("rolename")
private String rolename; private String rolename;
/** /**
* 权限表标识 * 权限表标识
*/ */
@DEField(name = "sys_permissionid") @DEField(name = "sys_permissionid")
@TableField(value = "sys_permissionid")
@JSONField(name = "permissionid") @JSONField(name = "permissionid")
@JsonProperty("permissionid") @JsonProperty("permissionid")
private String permissionid; private String permissionid;
/** /**
* 权限名称 * 权限名称
*/ */
@TableField(exist = false)
@JSONField(name = "permissionname") @JSONField(name = "permissionname")
@JsonProperty("permissionname") @JsonProperty("permissionname")
private String permissionname; private String permissionname;
/** /**
* 权限类型 * 权限类型
*/ */
@TableField(exist = false)
@JSONField(name = "permissiontype") @JSONField(name = "permissiontype")
@JsonProperty("permissiontype") @JsonProperty("permissiontype")
private String permissiontype; private String permissiontype;
/** /**
* 权限类型 * 权限类型
*/ */
@TableField(exist = false)
@JSONField(name = "permissionenable") @JSONField(name = "permissionenable")
@JsonProperty("permissionenable") @JsonProperty("permissionenable")
private Integer permissionenable; private Integer permissionenable;
/** /**
* 建立时间 * 建立时间
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEDATE) @DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createdate; private Timestamp createdate;
/** /**
* 更新时间 * 更新时间
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEDATE) @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate") @JsonProperty("updatedate")
private Timestamp updatedate; private Timestamp updatedate;
/** /**
* 资源 * 资源
*/ */
@JsonIgnore @JSONField(name = "permission")
@JSONField(serialize = false) @JsonProperty("permission")
@TableField(exist = false)
private cn.ibizlab.core.uaa.domain.SysPermission permission; private cn.ibizlab.core.uaa.domain.SysPermission permission;
/** /**
* 角色 * 角色
*/ */
@JsonIgnore @JSONField(name = "role")
@JSONField(serialize = false) @JsonProperty("role")
@TableField(exist = false)
private cn.ibizlab.core.uaa.domain.SysRole role; private cn.ibizlab.core.uaa.domain.SysRole role;
/** /**
* 设置 [角色表标识] * 设置 [角色表标识]
*/ */
...@@ -139,22 +132,6 @@ public class SysRolePermission extends EntityMP implements Serializable { ...@@ -139,22 +132,6 @@ public class SysRolePermission extends EntityMP implements Serializable {
this.modify("sys_permissionid",permissionid); this.modify("sys_permissionid",permissionid);
} }
/**
* 获取 [角色权限关系表标识]
*/
public String getRolepermissionid(){
if(ObjectUtils.isEmpty(rolepermissionid)){
rolepermissionid=(String)getDefaultKey(true);
}
return rolepermissionid;
}
@Override
public Serializable getDefaultKey(boolean gen) {
if((!ObjectUtils.isEmpty(this.getRoleid()))&&(!ObjectUtils.isEmpty(this.getPermissionid())))
return DigestUtils.md5DigestAsHex(String.format("%s||%s" ,this.getRoleid(),this.getPermissionid()).getBytes());
return null;
}
} }
...@@ -21,52 +21,47 @@ import java.io.Serializable; ...@@ -21,52 +21,47 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[系统用户] * ServiceApi [系统用户] 对象
*/ */
@Data @Data
@TableName(value = "IBZUSER",resultMap = "SysUserResultMap") public class SysUser extends EntityClient implements Serializable {
public class SysUser extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 用户标识 * 用户标识
*/ */
@DEField(isKeyField=true) @DEField(isKeyField=true)
@TableId(value= "userid",type=IdType.UUID)
@JSONField(name = "userid") @JSONField(name = "userid")
@JsonProperty("userid") @JsonProperty("userid")
private String userid; private String userid;
/** /**
* 用户全局名 * 用户全局名
*/ */
@TableField(value = "username")
@JSONField(name = "username") @JSONField(name = "username")
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
/** /**
* 用户姓名 * 用户姓名
*/ */
@TableField(value = "personname")
@JSONField(name = "personname") @JSONField(name = "personname")
@JsonProperty("personname") @JsonProperty("personname")
private String personname; private String personname;
/** /**
* 密码 * 密码
*/ */
@TableField(value = "password")
@JSONField(name = "password") @JSONField(name = "password")
@JsonProperty("password") @JsonProperty("password")
private String password; private String password;
/** /**
* 设置 [用户全局名] * 设置 [用户全局名]
*/ */
......
...@@ -21,95 +21,88 @@ import java.io.Serializable; ...@@ -21,95 +21,88 @@ import java.io.Serializable;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.domain.EntityClient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[用户角色关系] * ServiceApi [用户角色关系] 对象
*/ */
@Data @Data
@TableName(value = "IBZUSER_ROLE",resultMap = "SysUserRoleResultMap") public class SysUserRole extends EntityClient implements Serializable {
public class SysUserRole extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 用户角色关系表标识 * 用户角色关系表标识
*/ */
@DEField(name = "sys_user_roleid" , isKeyField=true) @DEField(name = "sys_user_roleid" , isKeyField=true)
@TableId(value= "sys_user_roleid",type=IdType.UUID)
@JSONField(name = "userroleid") @JSONField(name = "userroleid")
@JsonProperty("userroleid") @JsonProperty("userroleid")
private String userroleid; private String userroleid;
/** /**
* 角色表标识 * 角色表标识
*/ */
@DEField(name = "sys_roleid") @DEField(name = "sys_roleid")
@TableField(value = "sys_roleid")
@JSONField(name = "roleid") @JSONField(name = "roleid")
@JsonProperty("roleid") @JsonProperty("roleid")
private String roleid; private String roleid;
/** /**
* 角色名称 * 角色名称
*/ */
@TableField(exist = false)
@JSONField(name = "rolename") @JSONField(name = "rolename")
@JsonProperty("rolename") @JsonProperty("rolename")
private String rolename; private String rolename;
/** /**
* 用户标识 * 用户标识
*/ */
@DEField(name = "sys_userid") @DEField(name = "sys_userid")
@TableField(value = "sys_userid")
@JSONField(name = "userid") @JSONField(name = "userid")
@JsonProperty("userid") @JsonProperty("userid")
private String userid; private String userid;
/** /**
* 用户名称 * 用户名称
*/ */
@TableField(exist = false)
@JSONField(name = "personname") @JSONField(name = "personname")
@JsonProperty("personname") @JsonProperty("personname")
private String personname; private String personname;
/** /**
* 建立时间 * 建立时间
*/ */
@DEField(preType = DEPredefinedFieldType.CREATEDATE) @DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate") @JsonProperty("createdate")
private Timestamp createdate; private Timestamp createdate;
/** /**
* 更新时间 * 更新时间
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEDATE) @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate") @JsonProperty("updatedate")
private Timestamp updatedate; private Timestamp updatedate;
/** /**
* 角色 * 角色
*/ */
@JsonIgnore @JSONField(name = "role")
@JSONField(serialize = false) @JsonProperty("role")
@TableField(exist = false)
private cn.ibizlab.core.uaa.domain.SysRole role; private cn.ibizlab.core.uaa.domain.SysRole role;
/** /**
* 用户 * 用户
*/ */
@JsonIgnore @JSONField(name = "user")
@JSONField(serialize = false) @JsonProperty("user")
@TableField(exist = false)
private cn.ibizlab.core.uaa.domain.SysUser user; private cn.ibizlab.core.uaa.domain.SysUser user;
/** /**
* 设置 [角色表标识] * 设置 [角色表标识]
*/ */
...@@ -125,22 +118,6 @@ public class SysUserRole extends EntityMP implements Serializable { ...@@ -125,22 +118,6 @@ public class SysUserRole extends EntityMP implements Serializable {
this.modify("sys_userid",userid); this.modify("sys_userid",userid);
} }
/**
* 获取 [用户角色关系表标识]
*/
public String getUserroleid(){
if(ObjectUtils.isEmpty(userroleid)){
userroleid=(String)getDefaultKey(true);
}
return userroleid;
}
@Override
public Serializable getDefaultKey(boolean gen) {
if((!ObjectUtils.isEmpty(this.getRoleid()))&&(!ObjectUtils.isEmpty(this.getUserid())))
return DigestUtils.md5DigestAsHex(String.format("%s||%s" ,this.getRoleid(),this.getUserid()).getBytes());
return null;
}
} }
...@@ -17,82 +17,33 @@ import org.springframework.util.ObjectUtils; ...@@ -17,82 +17,33 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.uaa.domain.SysAuthLog;
/** /**
* 关系型数据实体[SysAuthLog] 查询条件对象 * ServiceApi数据实体[SysAuthLog] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class SysAuthLogSearchContext extends QueryWrapperContext<SysAuthLog> { public class SysAuthLogSearchContext extends SearchContextBase {
private String n_username_like;//[用户全局名] private String n_username_like;//[用户全局名]
public void setN_username_like(String n_username_like) {
this.n_username_like = n_username_like;
if(!ObjectUtils.isEmpty(this.n_username_like)){
this.getSelectCond().like("username", n_username_like);
}
}
private String n_personname_like;//[用户名称] private String n_personname_like;//[用户名称]
public void setN_personname_like(String n_personname_like) {
this.n_personname_like = n_personname_like;
if(!ObjectUtils.isEmpty(this.n_personname_like)){
this.getSelectCond().like("personname", n_personname_like);
}
}
private String n_domain_like;//[域] private String n_domain_like;//[域]
public void setN_domain_like(String n_domain_like) {
this.n_domain_like = n_domain_like;
if(!ObjectUtils.isEmpty(this.n_domain_like)){
this.getSelectCond().like("domain", n_domain_like);
}
}
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
@JSONField(format="yyyy-MM-dd HH:mm:ss") @JSONField(format="yyyy-MM-dd HH:mm:ss")
private Timestamp n_authtime_gtandeq;//[认证时间] private Timestamp n_authtime_gtandeq;//[认证时间]
public void setN_authtime_gtandeq(Timestamp n_authtime_gtandeq) {
this.n_authtime_gtandeq = n_authtime_gtandeq;
if(!ObjectUtils.isEmpty(this.n_authtime_gtandeq)){
this.getSelectCond().ge("authtime", n_authtime_gtandeq);
}
}
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
@JSONField(format="yyyy-MM-dd HH:mm:ss") @JSONField(format="yyyy-MM-dd HH:mm:ss")
private Timestamp n_authtime_ltandeq;//[认证时间] private Timestamp n_authtime_ltandeq;//[认证时间]
public void setN_authtime_ltandeq(Timestamp n_authtime_ltandeq) {
this.n_authtime_ltandeq = n_authtime_ltandeq;
if(!ObjectUtils.isEmpty(this.n_authtime_ltandeq)){
this.getSelectCond().le("authtime", n_authtime_ltandeq);
}
}
private String n_ipaddr_like;//[IP地址] private String n_ipaddr_like;//[IP地址]
public void setN_ipaddr_like(String n_ipaddr_like) {
this.n_ipaddr_like = n_ipaddr_like;
if(!ObjectUtils.isEmpty(this.n_ipaddr_like)){
this.getSelectCond().like("ipaddr", n_ipaddr_like);
}
}
private String n_authcode_eq;//[认证结果] private String n_authcode_eq;//[认证结果]
public void setN_authcode_eq(String n_authcode_eq) {
this.n_authcode_eq = n_authcode_eq;
if(!ObjectUtils.isEmpty(this.n_authcode_eq)){
this.getSelectCond().eq("authcode", n_authcode_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("username",query);
}
}
}
}
...@@ -17,36 +17,17 @@ import org.springframework.util.ObjectUtils; ...@@ -17,36 +17,17 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.uaa.domain.SysPSSystem;
/** /**
* 关系型数据实体[SysPSSystem] 查询条件对象 * ServiceApi数据实体[SysPSSystem] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class SysPSSystemSearchContext extends QueryWrapperContext<SysPSSystem> { public class SysPSSystemSearchContext extends SearchContextBase {
private String n_pssystemname_like;//[系统名称] private String n_pssystemname_like;//[系统名称]
public void setN_pssystemname_like(String n_pssystemname_like) {
this.n_pssystemname_like = n_pssystemname_like;
if(!ObjectUtils.isEmpty(this.n_pssystemname_like)){
this.getSelectCond().like("pssystemname", n_pssystemname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("pssystemname",query);
}
}
}
}
...@@ -17,57 +17,23 @@ import org.springframework.util.ObjectUtils; ...@@ -17,57 +17,23 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.uaa.domain.SysPermission;
/** /**
* 关系型数据实体[SysPermission] 查询条件对象 * ServiceApi数据实体[SysPermission] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class SysPermissionSearchContext extends QueryWrapperContext<SysPermission> { public class SysPermissionSearchContext extends SearchContextBase {
private String n_sys_permissionid_like;//[资源标识] private String n_sys_permissionid_like;//[资源标识]
public void setN_sys_permissionid_like(String n_sys_permissionid_like) {
this.n_sys_permissionid_like = n_sys_permissionid_like;
if(!ObjectUtils.isEmpty(this.n_sys_permissionid_like)){
this.getSelectCond().like("sys_permissionid", n_sys_permissionid_like);
}
}
private String n_sys_permissionname_like;//[资源名称] private String n_sys_permissionname_like;//[资源名称]
public void setN_sys_permissionname_like(String n_sys_permissionname_like) {
this.n_sys_permissionname_like = n_sys_permissionname_like;
if(!ObjectUtils.isEmpty(this.n_sys_permissionname_like)){
this.getSelectCond().like("sys_permissionname", n_sys_permissionname_like);
}
}
private String n_permissiontype_eq;//[资源类别] private String n_permissiontype_eq;//[资源类别]
public void setN_permissiontype_eq(String n_permissiontype_eq) {
this.n_permissiontype_eq = n_permissiontype_eq;
if(!ObjectUtils.isEmpty(this.n_permissiontype_eq)){
this.getSelectCond().eq("permissiontype", n_permissiontype_eq);
}
}
private Integer n_enable_eq;//[逻辑有效] private Integer n_enable_eq;//[逻辑有效]
public void setN_enable_eq(Integer n_enable_eq) {
this.n_enable_eq = n_enable_eq;
if(!ObjectUtils.isEmpty(this.n_enable_eq)){
this.getSelectCond().eq("enable", n_enable_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("sys_permissionname",query);
}
}
} }
...@@ -17,71 +17,27 @@ import org.springframework.util.ObjectUtils; ...@@ -17,71 +17,27 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.uaa.domain.SysRolePermission;
/** /**
* 关系型数据实体[SysRolePermission] 查询条件对象 * ServiceApi数据实体[SysRolePermission] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class SysRolePermissionSearchContext extends QueryWrapperContext<SysRolePermission> { public class SysRolePermissionSearchContext extends SearchContextBase {
private String n_sys_roleid_eq;//[角色表标识] private String n_sys_roleid_eq;//[角色表标识]
public void setN_sys_roleid_eq(String n_sys_roleid_eq) {
this.n_sys_roleid_eq = n_sys_roleid_eq;
if(!ObjectUtils.isEmpty(this.n_sys_roleid_eq)){
this.getSelectCond().eq("sys_roleid", n_sys_roleid_eq);
}
}
private String n_sys_rolename_eq;//[角色名称] private String n_sys_rolename_eq;//[角色名称]
public void setN_sys_rolename_eq(String n_sys_rolename_eq) {
this.n_sys_rolename_eq = n_sys_rolename_eq;
if(!ObjectUtils.isEmpty(this.n_sys_rolename_eq)){
this.getSelectCond().eq("sys_rolename", n_sys_rolename_eq);
}
}
private String n_sys_rolename_like;//[角色名称] private String n_sys_rolename_like;//[角色名称]
public void setN_sys_rolename_like(String n_sys_rolename_like) {
this.n_sys_rolename_like = n_sys_rolename_like;
if(!ObjectUtils.isEmpty(this.n_sys_rolename_like)){
this.getSelectCond().like("sys_rolename", n_sys_rolename_like);
}
}
private String n_sys_permissionid_eq;//[权限表标识] private String n_sys_permissionid_eq;//[权限表标识]
public void setN_sys_permissionid_eq(String n_sys_permissionid_eq) {
this.n_sys_permissionid_eq = n_sys_permissionid_eq;
if(!ObjectUtils.isEmpty(this.n_sys_permissionid_eq)){
this.getSelectCond().eq("sys_permissionid", n_sys_permissionid_eq);
}
}
private String n_sys_permissionname_eq;//[权限名称] private String n_sys_permissionname_eq;//[权限名称]
public void setN_sys_permissionname_eq(String n_sys_permissionname_eq) {
this.n_sys_permissionname_eq = n_sys_permissionname_eq;
if(!ObjectUtils.isEmpty(this.n_sys_permissionname_eq)){
this.getSelectCond().eq("sys_permissionname", n_sys_permissionname_eq);
}
}
private String n_sys_permissionname_like;//[权限名称] private String n_sys_permissionname_like;//[权限名称]
public void setN_sys_permissionname_like(String n_sys_permissionname_like) {
this.n_sys_permissionname_like = n_sys_permissionname_like;
if(!ObjectUtils.isEmpty(this.n_sys_permissionname_like)){
this.getSelectCond().like("sys_permissionname", n_sys_permissionname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("sys_permissionid",query);
}
}
} }
...@@ -17,54 +17,21 @@ import org.springframework.util.ObjectUtils; ...@@ -17,54 +17,21 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.uaa.domain.SysRole;
/** /**
* 关系型数据实体[SysRole] 查询条件对象 * ServiceApi数据实体[SysRole] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class SysRoleSearchContext extends QueryWrapperContext<SysRole> { public class SysRoleSearchContext extends SearchContextBase {
private String n_sys_rolename_isnotnull;//[角色表名称] private String n_sys_rolename_isnotnull;//[角色表名称]
public void setN_sys_rolename_isnotnull(String n_sys_rolename_isnotnull) {
this.n_sys_rolename_isnotnull = n_sys_rolename_isnotnull;
if(!ObjectUtils.isEmpty(this.n_sys_rolename_isnotnull)){
if(this.n_sys_rolename_isnotnull.toString().equals("1")){
this.getSelectCond().isNotNull("sys_rolename");
}
}
}
private String n_sys_rolename_isnull;//[角色表名称] private String n_sys_rolename_isnull;//[角色表名称]
public void setN_sys_rolename_isnull(String n_sys_rolename_isnull) {
this.n_sys_rolename_isnull = n_sys_rolename_isnull;
if(!ObjectUtils.isEmpty(this.n_sys_rolename_isnull)){
if(this.n_sys_rolename_isnull.toString().equals("1")){
this.getSelectCond().isNull("sys_rolename");
}
}
}
private String n_sys_rolename_like;//[角色表名称] private String n_sys_rolename_like;//[角色表名称]
public void setN_sys_rolename_like(String n_sys_rolename_like) {
this.n_sys_rolename_like = n_sys_rolename_like;
if(!ObjectUtils.isEmpty(this.n_sys_rolename_like)){
this.getSelectCond().like("sys_rolename", n_sys_rolename_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("sys_rolename",query);
}
}
} }
...@@ -17,57 +17,23 @@ import org.springframework.util.ObjectUtils; ...@@ -17,57 +17,23 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.uaa.domain.SysUserRole;
/** /**
* 关系型数据实体[SysUserRole] 查询条件对象 * ServiceApi数据实体[SysUserRole] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class SysUserRoleSearchContext extends QueryWrapperContext<SysUserRole> { public class SysUserRoleSearchContext extends SearchContextBase {
private String n_sys_roleid_eq;//[角色表标识] private String n_sys_roleid_eq;//[角色表标识]
public void setN_sys_roleid_eq(String n_sys_roleid_eq) {
this.n_sys_roleid_eq = n_sys_roleid_eq;
if(!ObjectUtils.isEmpty(this.n_sys_roleid_eq)){
this.getSelectCond().eq("sys_roleid", n_sys_roleid_eq);
}
}
private String n_sys_userid_eq;//[用户标识] private String n_sys_userid_eq;//[用户标识]
public void setN_sys_userid_eq(String n_sys_userid_eq) {
this.n_sys_userid_eq = n_sys_userid_eq;
if(!ObjectUtils.isEmpty(this.n_sys_userid_eq)){
this.getSelectCond().eq("sys_userid", n_sys_userid_eq);
}
}
private String n_sys_username_eq;//[用户名称] private String n_sys_username_eq;//[用户名称]
public void setN_sys_username_eq(String n_sys_username_eq) {
this.n_sys_username_eq = n_sys_username_eq;
if(!ObjectUtils.isEmpty(this.n_sys_username_eq)){
this.getSelectCond().eq("sys_username", n_sys_username_eq);
}
}
private String n_sys_username_like;//[用户名称] private String n_sys_username_like;//[用户名称]
public void setN_sys_username_like(String n_sys_username_like) {
this.n_sys_username_like = n_sys_username_like;
if(!ObjectUtils.isEmpty(this.n_sys_username_like)){
this.getSelectCond().like("sys_username", n_sys_username_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("sys_userid",query);
}
}
} }
...@@ -17,43 +17,19 @@ import org.springframework.util.ObjectUtils; ...@@ -17,43 +17,19 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext; import cn.ibizlab.util.filter.SearchContextBase;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.uaa.domain.SysUser;
/** /**
* 关系型数据实体[SysUser] 查询条件对象 * ServiceApi数据实体[SysUser] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class SysUserSearchContext extends QueryWrapperContext<SysUser> { public class SysUserSearchContext extends SearchContextBase {
private String n_username_like;//[用户全局名] private String n_username_like;//[用户全局名]
public void setN_username_like(String n_username_like) {
this.n_username_like = n_username_like;
if(!ObjectUtils.isEmpty(this.n_username_like)){
this.getSelectCond().like("username", n_username_like);
}
}
private String n_personname_like;//[用户姓名] private String n_personname_like;//[用户姓名]
public void setN_personname_like(String n_personname_like) {
this.n_personname_like = n_personname_like;
if(!ObjectUtils.isEmpty(this.n_personname_like)){
this.getSelectCond().like("personname", n_personname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("personname",query);
}
}
}
}
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysAuthLog; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysAuthLog;
import cn.ibizlab.core.uaa.filter.SysAuthLogSearchContext; import cn.ibizlab.core.uaa.filter.SysAuthLogSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[SysAuthLog] 服务对象接口 * 实体[SysAuthLog] 服务对象接口
*/ */
public interface ISysAuthLogService extends IService<SysAuthLog>{ public interface ISysAuthLogService{
boolean checkKey(SysAuthLog et) ; boolean checkKey(SysAuthLog et) ;
boolean remove(String key) ; boolean remove(String key) ;
...@@ -37,22 +35,8 @@ public interface ISysAuthLogService extends IService<SysAuthLog>{ ...@@ -37,22 +35,8 @@ public interface ISysAuthLogService extends IService<SysAuthLog>{
void createBatch(List<SysAuthLog> list) ; void createBatch(List<SysAuthLog> list) ;
SysAuthLog get(String key) ; SysAuthLog get(String key) ;
Page<SysAuthLog> searchDefault(SysAuthLogSearchContext context) ; Page<SysAuthLog> searchDefault(SysAuthLogSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
} }
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysPSSystem; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysPSSystem;
import cn.ibizlab.core.uaa.filter.SysPSSystemSearchContext; import cn.ibizlab.core.uaa.filter.SysPSSystemSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[SysPSSystem] 服务对象接口 * 实体[SysPSSystem] 服务对象接口
*/ */
public interface ISysPSSystemService extends IService<SysPSSystem>{ public interface ISysPSSystemService{
SysPSSystem get(String key) ; SysPSSystem get(String key) ;
boolean update(SysPSSystem et) ; boolean update(SysPSSystem et) ;
...@@ -37,22 +35,8 @@ public interface ISysPSSystemService extends IService<SysPSSystem>{ ...@@ -37,22 +35,8 @@ public interface ISysPSSystemService extends IService<SysPSSystem>{
boolean save(SysPSSystem et) ; boolean save(SysPSSystem et) ;
void saveBatch(List<SysPSSystem> list) ; void saveBatch(List<SysPSSystem> list) ;
Page<SysPSSystem> searchDefault(SysPSSystemSearchContext context) ; Page<SysPSSystem> searchDefault(SysPSSystemSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
} }
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysPermission; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysPermission;
import cn.ibizlab.core.uaa.filter.SysPermissionSearchContext; import cn.ibizlab.core.uaa.filter.SysPermissionSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[SysPermission] 服务对象接口 * 实体[SysPermission] 服务对象接口
*/ */
public interface ISysPermissionService extends IService<SysPermission>{ public interface ISysPermissionService{
boolean save(SysPermission et) ; boolean save(SysPermission et) ;
void saveBatch(List<SysPermission> list) ; void saveBatch(List<SysPermission> list) ;
...@@ -37,22 +35,8 @@ public interface ISysPermissionService extends IService<SysPermission>{ ...@@ -37,22 +35,8 @@ public interface ISysPermissionService extends IService<SysPermission>{
boolean checkKey(SysPermission et) ; boolean checkKey(SysPermission et) ;
SysPermission get(String key) ; SysPermission get(String key) ;
Page<SysPermission> searchDefault(SysPermissionSearchContext context) ; Page<SysPermission> searchDefault(SysPermissionSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
} }
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysRolePermission; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysRolePermission;
import cn.ibizlab.core.uaa.filter.SysRolePermissionSearchContext; import cn.ibizlab.core.uaa.filter.SysRolePermissionSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[SysRolePermission] 服务对象接口 * 实体[SysRolePermission] 服务对象接口
*/ */
public interface ISysRolePermissionService extends IService<SysRolePermission>{ public interface ISysRolePermissionService{
SysRolePermission get(String key) ; SysRolePermission get(String key) ;
boolean remove(String key) ; boolean remove(String key) ;
...@@ -41,22 +39,8 @@ public interface ISysRolePermissionService extends IService<SysRolePermission>{ ...@@ -41,22 +39,8 @@ public interface ISysRolePermissionService extends IService<SysRolePermission>{
void removeByPermissionid(String permissionid) ; void removeByPermissionid(String permissionid) ;
List<SysRolePermission> selectByRoleid(String roleid) ; List<SysRolePermission> selectByRoleid(String roleid) ;
void removeByRoleid(String roleid) ; void removeByRoleid(String roleid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
} }
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysRole; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysRole;
import cn.ibizlab.core.uaa.filter.SysRoleSearchContext; import cn.ibizlab.core.uaa.filter.SysRoleSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[SysRole] 服务对象接口 * 实体[SysRole] 服务对象接口
*/ */
public interface ISysRoleService extends IService<SysRole>{ public interface ISysRoleService{
boolean save(SysRole et) ; boolean save(SysRole et) ;
@CacheEvict(value="sysrole",allEntries=true) @CacheEvict(value="sysrole",allEntries=true)
...@@ -41,22 +39,8 @@ public interface ISysRoleService extends IService<SysRole>{ ...@@ -41,22 +39,8 @@ public interface ISysRoleService extends IService<SysRole>{
SysRole getDraft(SysRole et) ; SysRole getDraft(SysRole et) ;
boolean checkKey(SysRole et) ; boolean checkKey(SysRole et) ;
Page<SysRole> searchDefault(SysRoleSearchContext context) ; Page<SysRole> searchDefault(SysRoleSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
} }
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysUserRole; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysUserRole;
import cn.ibizlab.core.uaa.filter.SysUserRoleSearchContext; import cn.ibizlab.core.uaa.filter.SysUserRoleSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[SysUserRole] 服务对象接口 * 实体[SysUserRole] 服务对象接口
*/ */
public interface ISysUserRoleService extends IService<SysUserRole>{ public interface ISysUserRoleService{
boolean checkKey(SysUserRole et) ; boolean checkKey(SysUserRole et) ;
SysUserRole getDraft(SysUserRole et) ; SysUserRole getDraft(SysUserRole et) ;
...@@ -41,22 +39,8 @@ public interface ISysUserRoleService extends IService<SysUserRole>{ ...@@ -41,22 +39,8 @@ public interface ISysUserRoleService extends IService<SysUserRole>{
void removeByRoleid(String roleid) ; void removeByRoleid(String roleid) ;
List<SysUserRole> selectByUserid(String userid) ; List<SysUserRole> selectByUserid(String userid) ;
void removeByUserid(String userid) ; void removeByUserid(String userid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
} }
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysUser; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.uaa.domain.SysUser;
import cn.ibizlab.core.uaa.filter.SysUserSearchContext; import cn.ibizlab.core.uaa.filter.SysUserSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[SysUser] 服务对象接口 * 实体[SysUser] 服务对象接口
*/ */
public interface ISysUserService extends IService<SysUser>{ public interface ISysUserService{
boolean remove(String key) ; boolean remove(String key) ;
@CacheEvict(value="sysuser",allEntries=true) @CacheEvict(value="sysuser",allEntries=true)
...@@ -41,22 +39,8 @@ public interface ISysUserService extends IService<SysUser>{ ...@@ -41,22 +39,8 @@ public interface ISysUserService extends IService<SysUser>{
@CacheEvict(value="sysuser",allEntries=true) @CacheEvict(value="sysuser",allEntries=true)
void createBatch(List<SysUser> list) ; void createBatch(List<SysUser> list) ;
Page<SysUser> searchDefault(SysUserSearchContext context) ; Page<SysUser> searchDefault(SysUserSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
} }
...@@ -30,111 +30,86 @@ import cn.ibizlab.core.uaa.service.ISysAuthLogService; ...@@ -30,111 +30,86 @@ import cn.ibizlab.core.uaa.service.ISysAuthLogService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.uaa.client.SysAuthLogFeignClient;
import cn.ibizlab.core.uaa.mapper.SysAuthLogMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[认证日志] 服务对象接口实现 * 实体[认证日志] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("SysAuthLogServiceImpl") @Service
public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuthLog> implements ISysAuthLogService { public class SysAuthLogServiceImpl implements ISysAuthLogService {
@Autowired
SysAuthLogFeignClient sysAuthLogFeignClient;
private int batchSize = 500;
@Override @Override
public boolean checkKey(SysAuthLog et) { public boolean checkKey(SysAuthLog et) {
return (!ObjectUtils.isEmpty(et.getLogid()))&&(!Objects.isNull(this.getById(et.getLogid()))); return sysAuthLogFeignClient.checkKey(et);
} }
@Override @Override
@Transactional public boolean remove(String logid) {
public boolean remove(String key) { boolean result=sysAuthLogFeignClient.remove(logid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { sysAuthLogFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
public SysAuthLog getDraft(SysAuthLog et) { public SysAuthLog getDraft(SysAuthLog et) {
et=sysAuthLogFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional
public boolean update(SysAuthLog et) { public boolean update(SysAuthLog et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("logid",et.getLogid()))) SysAuthLog rt = sysAuthLogFeignClient.update(et.getLogid(),et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getLogid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<SysAuthLog> list){
public void updateBatch(List<SysAuthLog> list) { sysAuthLogFeignClient.updateBatch(list) ;
updateBatchById(list,batchSize);
} }
@Override @Override
@Transactional @Transactional
public boolean save(SysAuthLog et) { public boolean save(SysAuthLog et) {
if(!saveOrUpdate(et)) if(et.getLogid()==null) et.setLogid((String)et.getDefaultKey(true));
return false; if(!sysAuthLogFeignClient.save(et))
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(SysAuthLog et) {
if (null == et) {
return false; return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<SysAuthLog> list) {
saveOrUpdateBatch(list,batchSize);
return true; return true;
} }
@Override @Override
public void saveBatch(List<SysAuthLog> list) { public void saveBatch(List<SysAuthLog> list) {
saveOrUpdateBatch(list,batchSize); sysAuthLogFeignClient.saveBatch(list) ;
} }
@Override @Override
@Transactional
public boolean create(SysAuthLog et) { public boolean create(SysAuthLog et) {
if(!this.retBool(this.baseMapper.insert(et))) SysAuthLog rt = sysAuthLogFeignClient.create(et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getLogid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<SysAuthLog> list){
public void createBatch(List<SysAuthLog> list) { sysAuthLogFeignClient.createBatch(list) ;
this.saveBatch(list,batchSize);
} }
@Override @Override
@Transactional public SysAuthLog get(String logid) {
public SysAuthLog get(String key) { SysAuthLog et=sysAuthLogFeignClient.get(logid);
SysAuthLog et = getById(key);
if(et==null){ if(et==null){
et=new SysAuthLog(); et=new SysAuthLog();
et.setLogid(key); et.setLogid(logid);
} }
else{ else{
} }
...@@ -143,40 +118,15 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth ...@@ -143,40 +118,15 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth
/** /**
* 查询集合 DEFAULT * 查询集合 DEFAULT
*/ */
@Override @Override
public Page<SysAuthLog> searchDefault(SysAuthLogSearchContext context) { public Page<SysAuthLog> searchDefault(SysAuthLogSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SysAuthLog> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<SysAuthLog> sysAuthLogs=sysAuthLogFeignClient.searchDefault(context);
return new PageImpl<SysAuthLog>(pages.getRecords(), context.getPageable(), pages.getTotal()); return sysAuthLogs;
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
} }
......
...@@ -30,30 +30,25 @@ import cn.ibizlab.core.uaa.service.ISysPSSystemService; ...@@ -30,30 +30,25 @@ import cn.ibizlab.core.uaa.service.ISysPSSystemService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.uaa.client.SysPSSystemFeignClient;
import cn.ibizlab.core.uaa.mapper.SysPSSystemMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[实体] 服务对象接口实现 * 实体[实体] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("SysPSSystemServiceImpl") @Service
public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPSSystem> implements ISysPSSystemService { public class SysPSSystemServiceImpl implements ISysPSSystemService {
@Autowired
SysPSSystemFeignClient sysPSSystemFeignClient;
private int batchSize = 500;
@Override @Override
@Transactional public SysPSSystem get(String pssystemid) {
public SysPSSystem get(String key) { SysPSSystem et=sysPSSystemFeignClient.get(pssystemid);
SysPSSystem et = getById(key);
if(et==null){ if(et==null){
et=new SysPSSystem(); et=new SysPSSystem();
et.setPssystemid(key); et.setPssystemid(pssystemid);
} }
else{ else{
} }
...@@ -61,85 +56,67 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS ...@@ -61,85 +56,67 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
} }
@Override @Override
@Transactional
public boolean update(SysPSSystem et) { public boolean update(SysPSSystem et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("pssystemid",et.getPssystemid()))) SysPSSystem rt = sysPSSystemFeignClient.update(et.getPssystemid(),et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getPssystemid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<SysPSSystem> list){
public void updateBatch(List<SysPSSystem> list) { sysPSSystemFeignClient.updateBatch(list) ;
updateBatchById(list,batchSize);
} }
@Override @Override
public boolean checkKey(SysPSSystem et) { public boolean checkKey(SysPSSystem et) {
return (!ObjectUtils.isEmpty(et.getPssystemid()))&&(!Objects.isNull(this.getById(et.getPssystemid()))); return sysPSSystemFeignClient.checkKey(et);
} }
@Override @Override
@Transactional public boolean remove(String pssystemid) {
public boolean remove(String key) { boolean result=sysPSSystemFeignClient.remove(pssystemid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { sysPSSystemFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
@Transactional
public boolean create(SysPSSystem et) { public boolean create(SysPSSystem et) {
if(!this.retBool(this.baseMapper.insert(et))) SysPSSystem rt = sysPSSystemFeignClient.create(et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getPssystemid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<SysPSSystem> list){
public void createBatch(List<SysPSSystem> list) { sysPSSystemFeignClient.createBatch(list) ;
this.saveBatch(list,batchSize);
} }
@Override @Override
public SysPSSystem getDraft(SysPSSystem et) { public SysPSSystem getDraft(SysPSSystem et) {
et=sysPSSystemFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional @Transactional
public boolean save(SysPSSystem et) { public boolean save(SysPSSystem et) {
if(!saveOrUpdate(et)) if(et.getPssystemid()==null) et.setPssystemid((String)et.getDefaultKey(true));
if(!sysPSSystemFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override @Override
@Transactional( public void saveBatch(List<SysPSSystem> list) {
rollbackFor = {Exception.class} sysPSSystemFeignClient.saveBatch(list) ;
)
public boolean saveOrUpdate(SysPSSystem et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
} }
@Override
public boolean saveBatch(Collection<SysPSSystem> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<SysPSSystem> list) {
saveOrUpdateBatch(list,batchSize);
}
...@@ -148,35 +125,8 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS ...@@ -148,35 +125,8 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
*/ */
@Override @Override
public Page<SysPSSystem> searchDefault(SysPSSystemSearchContext context) { public Page<SysPSSystem> searchDefault(SysPSSystemSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SysPSSystem> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<SysPSSystem> sysPSSystems=sysPSSystemFeignClient.searchDefault(context);
return new PageImpl<SysPSSystem>(pages.getRecords(), context.getPageable(), pages.getTotal()); return sysPSSystems;
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
} }
......
...@@ -30,114 +30,86 @@ import cn.ibizlab.core.uaa.service.ISysPermissionService; ...@@ -30,114 +30,86 @@ import cn.ibizlab.core.uaa.service.ISysPermissionService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.uaa.client.SysPermissionFeignClient;
import cn.ibizlab.core.uaa.mapper.SysPermissionMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[权限/资源] 服务对象接口实现 * 实体[权限/资源] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("SysPermissionServiceImpl") @Service
public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, SysPermission> implements ISysPermissionService { public class SysPermissionServiceImpl implements ISysPermissionService {
@Autowired @Autowired
@Lazy SysPermissionFeignClient sysPermissionFeignClient;
private cn.ibizlab.core.uaa.service.ISysRolePermissionService sysrolepermissionService;
private int batchSize = 500;
@Override @Override
@Transactional @Transactional
public boolean save(SysPermission et) { public boolean save(SysPermission et) {
if(!saveOrUpdate(et)) if(et.getPermissionid()==null) et.setPermissionid((String)et.getDefaultKey(true));
if(!sysPermissionFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(SysPermission et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<SysPermission> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<SysPermission> list) { public void saveBatch(List<SysPermission> list) {
saveOrUpdateBatch(list,batchSize); sysPermissionFeignClient.saveBatch(list) ;
} }
@Override @Override
public SysPermission getDraft(SysPermission et) { public SysPermission getDraft(SysPermission et) {
et=sysPermissionFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional public boolean remove(String permissionid) {
public boolean remove(String key) { boolean result=sysPermissionFeignClient.remove(permissionid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { sysPermissionFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
@Transactional
public boolean update(SysPermission et) { public boolean update(SysPermission et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("sys_permissionid",et.getPermissionid()))) SysPermission rt = sysPermissionFeignClient.update(et.getPermissionid(),et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getPermissionid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<SysPermission> list){
public void updateBatch(List<SysPermission> list) { sysPermissionFeignClient.updateBatch(list) ;
updateBatchById(list,batchSize);
} }
@Override @Override
@Transactional
public boolean create(SysPermission et) { public boolean create(SysPermission et) {
if(!this.retBool(this.baseMapper.insert(et))) SysPermission rt = sysPermissionFeignClient.create(et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getPermissionid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<SysPermission> list){
public void createBatch(List<SysPermission> list) { sysPermissionFeignClient.createBatch(list) ;
this.saveBatch(list,batchSize);
} }
@Override @Override
public boolean checkKey(SysPermission et) { public boolean checkKey(SysPermission et) {
return (!ObjectUtils.isEmpty(et.getPermissionid()))&&(!Objects.isNull(this.getById(et.getPermissionid()))); return sysPermissionFeignClient.checkKey(et);
} }
@Override @Override
@Transactional public SysPermission get(String permissionid) {
public SysPermission get(String key) { SysPermission et=sysPermissionFeignClient.get(permissionid);
SysPermission et = getById(key);
if(et==null){ if(et==null){
et=new SysPermission(); et=new SysPermission();
et.setPermissionid(key); et.setPermissionid(permissionid);
} }
else{ else{
} }
...@@ -146,40 +118,15 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S ...@@ -146,40 +118,15 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
/** /**
* 查询集合 DEFAULT * 查询集合 DEFAULT
*/ */
@Override @Override
public Page<SysPermission> searchDefault(SysPermissionSearchContext context) { public Page<SysPermission> searchDefault(SysPermissionSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SysPermission> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<SysPermission> sysPermissions=sysPermissionFeignClient.searchDefault(context);
return new PageImpl<SysPermission>(pages.getRecords(), context.getPageable(), pages.getTotal()); return sysPermissions;
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
} }
......
...@@ -30,36 +30,25 @@ import cn.ibizlab.core.uaa.service.ISysRolePermissionService; ...@@ -30,36 +30,25 @@ import cn.ibizlab.core.uaa.service.ISysRolePermissionService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.uaa.client.SysRolePermissionFeignClient;
import cn.ibizlab.core.uaa.mapper.SysRolePermissionMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[角色权限关系] 服务对象接口实现 * 实体[角色权限关系] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("SysRolePermissionServiceImpl") @Service
public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionMapper, SysRolePermission> implements ISysRolePermissionService { public class SysRolePermissionServiceImpl implements ISysRolePermissionService {
@Autowired @Autowired
@Lazy SysRolePermissionFeignClient sysRolePermissionFeignClient;
private cn.ibizlab.core.uaa.service.ISysPermissionService syspermissionService;
@Autowired
@Lazy
private cn.ibizlab.core.uaa.service.ISysRoleService sysroleService;
private int batchSize = 500;
@Override @Override
@Transactional public SysRolePermission get(String rolepermissionid) {
public SysRolePermission get(String key) { SysRolePermission et=sysRolePermissionFeignClient.get(rolepermissionid);
SysRolePermission et = getById(key);
if(et==null){ if(et==null){
et=new SysRolePermission(); et=new SysRolePermission();
et.setRolepermissionid(key); et.setRolepermissionid(rolepermissionid);
} }
else{ else{
} }
...@@ -67,177 +56,113 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM ...@@ -67,177 +56,113 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
} }
@Override @Override
@Transactional public boolean remove(String rolepermissionid) {
public boolean remove(String key) { boolean result=sysRolePermissionFeignClient.remove(rolepermissionid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { sysRolePermissionFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
public SysRolePermission getDraft(SysRolePermission et) { public SysRolePermission getDraft(SysRolePermission et) {
fillParentData(et); et=sysRolePermissionFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional
public boolean create(SysRolePermission et) { public boolean create(SysRolePermission et) {
fillParentData(et); SysRolePermission rt = sysRolePermissionFeignClient.create(et);
if(!this.retBool(this.baseMapper.insert(et))) if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getRolepermissionid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<SysRolePermission> list){
public void createBatch(List<SysRolePermission> list) { sysRolePermissionFeignClient.createBatch(list) ;
list.forEach(item->fillParentData(item));
this.saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
public boolean checkKey(SysRolePermission et) { public boolean checkKey(SysRolePermission et) {
return (!ObjectUtils.isEmpty(et.getRolepermissionid()))&&(!Objects.isNull(this.getById(et.getRolepermissionid()))); return sysRolePermissionFeignClient.checkKey(et);
} }
@Override @Override
@Transactional @Transactional
public boolean save(SysRolePermission et) { public boolean save(SysRolePermission et) {
if(!saveOrUpdate(et)) if(et.getRolepermissionid()==null) et.setRolepermissionid((String)et.getDefaultKey(true));
if(!sysRolePermissionFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(SysRolePermission et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<SysRolePermission> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<SysRolePermission> list) { public void saveBatch(List<SysRolePermission> list) {
list.forEach(item->fillParentData(item)); sysRolePermissionFeignClient.saveBatch(list) ;
saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
@Transactional
public boolean update(SysRolePermission et) { public boolean update(SysRolePermission et) {
fillParentData(et); SysRolePermission rt = sysRolePermissionFeignClient.update(et.getRolepermissionid(),et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("sys_role_permissionid",et.getRolepermissionid()))) if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getRolepermissionid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<SysRolePermission> list){
public void updateBatch(List<SysRolePermission> list) { sysRolePermissionFeignClient.updateBatch(list) ;
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
} }
@Override @Override
public List<SysRolePermission> selectByPermissionid(String permissionid) { public List<SysRolePermission> selectByPermissionid(String permissionid) {
return baseMapper.selectByPermissionid(permissionid); SysRolePermissionSearchContext context=new SysRolePermissionSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_sys_permissionid_eq(permissionid);
return sysRolePermissionFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByPermissionid(String permissionid) { public void removeByPermissionid(String permissionid) {
this.remove(new QueryWrapper<SysRolePermission>().eq("sys_permissionid",permissionid)); Set<String> delIds=new HashSet<String>();
for(SysRolePermission before:selectByPermissionid(permissionid)){
delIds.add(before.getRolepermissionid());
}
if(delIds.size()>0)
this.removeBatch(delIds);
} }
@Override @Override
public List<SysRolePermission> selectByRoleid(String roleid) { public List<SysRolePermission> selectByRoleid(String roleid) {
return baseMapper.selectByRoleid(roleid); SysRolePermissionSearchContext context=new SysRolePermissionSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_sys_roleid_eq(roleid);
return sysRolePermissionFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByRoleid(String roleid) { public void removeByRoleid(String roleid) {
this.remove(new QueryWrapper<SysRolePermission>().eq("sys_roleid",roleid)); Set<String> delIds=new HashSet<String>();
for(SysRolePermission before:selectByRoleid(roleid)){
delIds.add(before.getRolepermissionid());
} }
if(delIds.size()>0)
this.removeBatch(delIds);
/**
* 查询集合 DEFAULT
*/
@Override
public Page<SysRolePermission> searchDefault(SysRolePermissionSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SysRolePermission> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<SysRolePermission>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
/** /**
* 为当前实体填充父数据(外键值文本、外键值附加数据) * 查询集合 DEFAULT
* @param et
*/ */
private void fillParentData(SysRolePermission et){
//实体关系[DER1N_SYS_ROLE_PERMISSION_SYS_PERMISSION_SYS_PERMISSIONID]
if(!ObjectUtils.isEmpty(et.getPermissionid())){
cn.ibizlab.core.uaa.domain.SysPermission permission=et.getPermission();
if(ObjectUtils.isEmpty(permission)){
cn.ibizlab.core.uaa.domain.SysPermission majorEntity=syspermissionService.get(et.getPermissionid());
et.setPermission(majorEntity);
permission=majorEntity;
}
et.setPermissionname(permission.getPermissionname());
et.setPermissiontype(permission.getPermissiontype());
et.setPermissionenable(permission.getEnable());
}
//实体关系[DER1N_SYS_ROLE_PERMISSION_SYS_ROLE_SYS_ROLEID]
if(!ObjectUtils.isEmpty(et.getRoleid())){
cn.ibizlab.core.uaa.domain.SysRole role=et.getRole();
if(ObjectUtils.isEmpty(role)){
cn.ibizlab.core.uaa.domain.SysRole majorEntity=sysroleService.get(et.getRoleid());
et.setRole(majorEntity);
role=majorEntity;
}
et.setRolename(role.getRolename());
}
}
@Override @Override
public List<JSONObject> select(String sql, Map param){ public Page<SysRolePermission> searchDefault(SysRolePermissionSearchContext context) {
return this.baseMapper.selectBySQL(sql,param); Page<SysRolePermission> sysRolePermissions=sysRolePermissionFeignClient.searchDefault(context);
} return sysRolePermissions;
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
} }
......
...@@ -30,95 +30,66 @@ import cn.ibizlab.core.uaa.service.ISysRoleService; ...@@ -30,95 +30,66 @@ import cn.ibizlab.core.uaa.service.ISysRoleService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.uaa.client.SysRoleFeignClient;
import cn.ibizlab.core.uaa.mapper.SysRoleMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[系统角色] 服务对象接口实现 * 实体[系统角色] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("SysRoleServiceImpl") @Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService { public class SysRoleServiceImpl implements ISysRoleService {
@Autowired @Autowired
@Lazy SysRoleFeignClient sysRoleFeignClient;
private cn.ibizlab.core.uaa.service.ISysRolePermissionService sysrolepermissionService;
@Autowired
@Lazy
private cn.ibizlab.core.uaa.service.ISysUserRoleService sysuserroleService;
private int batchSize = 500;
@Override @Override
@Transactional @Transactional
public boolean save(SysRole et) { public boolean save(SysRole et) {
if(!saveOrUpdate(et)) if(et.getRoleid()==null) et.setRoleid((String)et.getDefaultKey(true));
if(!sysRoleFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(SysRole et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<SysRole> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<SysRole> list) { public void saveBatch(List<SysRole> list) {
saveOrUpdateBatch(list,batchSize); sysRoleFeignClient.saveBatch(list) ;
} }
@Override @Override
@Transactional
public boolean update(SysRole et) { public boolean update(SysRole et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("sys_roleid",et.getRoleid()))) SysRole rt = sysRoleFeignClient.update(et.getRoleid(),et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getRoleid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<SysRole> list){
public void updateBatch(List<SysRole> list) { sysRoleFeignClient.updateBatch(list) ;
updateBatchById(list,batchSize);
} }
@Override @Override
@Transactional
public boolean create(SysRole et) { public boolean create(SysRole et) {
if(!this.retBool(this.baseMapper.insert(et))) SysRole rt = sysRoleFeignClient.create(et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getRoleid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<SysRole> list){
public void createBatch(List<SysRole> list) { sysRoleFeignClient.createBatch(list) ;
this.saveBatch(list,batchSize);
} }
@Override @Override
@Transactional public SysRole get(String roleid) {
public SysRole get(String key) { SysRole et=sysRoleFeignClient.get(roleid);
SysRole et = getById(key);
if(et==null){ if(et==null){
et=new SysRole(); et=new SysRole();
et.setRoleid(key); et.setRoleid(roleid);
} }
else{ else{
} }
...@@ -126,63 +97,36 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl ...@@ -126,63 +97,36 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
} }
@Override @Override
@Transactional public boolean remove(String roleid) {
public boolean remove(String key) { boolean result=sysRoleFeignClient.remove(roleid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { sysRoleFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
public SysRole getDraft(SysRole et) { public SysRole getDraft(SysRole et) {
et=sysRoleFeignClient.getDraft();
return et; return et;
} }
@Override @Override
public boolean checkKey(SysRole et) { public boolean checkKey(SysRole et) {
return (!ObjectUtils.isEmpty(et.getRoleid()))&&(!Objects.isNull(this.getById(et.getRoleid()))); return sysRoleFeignClient.checkKey(et);
} }
/** /**
* 查询集合 DEFAULT * 查询集合 DEFAULT
*/ */
@Override @Override
public Page<SysRole> searchDefault(SysRoleSearchContext context) { public Page<SysRole> searchDefault(SysRoleSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SysRole> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<SysRole> sysRoles=sysRoleFeignClient.searchDefault(context);
return new PageImpl<SysRole>(pages.getRecords(), context.getPageable(), pages.getTotal()); return sysRoles;
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
} }
......
...@@ -30,91 +30,72 @@ import cn.ibizlab.core.uaa.service.ISysUserRoleService; ...@@ -30,91 +30,72 @@ import cn.ibizlab.core.uaa.service.ISysUserRoleService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.uaa.client.SysUserRoleFeignClient;
import cn.ibizlab.core.uaa.mapper.SysUserRoleMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[用户角色关系] 服务对象接口实现 * 实体[用户角色关系] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("SysUserRoleServiceImpl") @Service
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements ISysUserRoleService { public class SysUserRoleServiceImpl implements ISysUserRoleService {
@Autowired @Autowired
@Lazy SysUserRoleFeignClient sysUserRoleFeignClient;
private cn.ibizlab.core.uaa.service.ISysRoleService sysroleService;
@Autowired
@Lazy
private cn.ibizlab.core.uaa.service.ISysUserService sysuserService;
private int batchSize = 500;
@Override @Override
public boolean checkKey(SysUserRole et) { public boolean checkKey(SysUserRole et) {
return (!ObjectUtils.isEmpty(et.getUserroleid()))&&(!Objects.isNull(this.getById(et.getUserroleid()))); return sysUserRoleFeignClient.checkKey(et);
} }
@Override @Override
public SysUserRole getDraft(SysUserRole et) { public SysUserRole getDraft(SysUserRole et) {
fillParentData(et); et=sysUserRoleFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional
public boolean update(SysUserRole et) { public boolean update(SysUserRole et) {
fillParentData(et); SysUserRole rt = sysUserRoleFeignClient.update(et.getUserroleid(),et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("sys_user_roleid",et.getUserroleid()))) if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getUserroleid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<SysUserRole> list){
public void updateBatch(List<SysUserRole> list) { sysUserRoleFeignClient.updateBatch(list) ;
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
} }
@Override @Override
@Transactional public boolean remove(String userroleid) {
public boolean remove(String key) { boolean result=sysUserRoleFeignClient.remove(userroleid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { sysUserRoleFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
@Transactional
public boolean create(SysUserRole et) { public boolean create(SysUserRole et) {
fillParentData(et); SysUserRole rt = sysUserRoleFeignClient.create(et);
if(!this.retBool(this.baseMapper.insert(et))) if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getUserroleid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<SysUserRole> list){
public void createBatch(List<SysUserRole> list) { sysUserRoleFeignClient.createBatch(list) ;
list.forEach(item->fillParentData(item));
this.saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
@Transactional public SysUserRole get(String userroleid) {
public SysUserRole get(String key) { SysUserRole et=sysUserRoleFeignClient.get(userroleid);
SysUserRole et = getById(key);
if(et==null){ if(et==null){
et=new SysUserRole(); et=new SysUserRole();
et.setUserroleid(key); et.setUserroleid(userroleid);
} }
else{ else{
} }
...@@ -124,118 +105,64 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs ...@@ -124,118 +105,64 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
@Override @Override
@Transactional @Transactional
public boolean save(SysUserRole et) { public boolean save(SysUserRole et) {
if(!saveOrUpdate(et)) if(et.getUserroleid()==null) et.setUserroleid((String)et.getDefaultKey(true));
if(!sysUserRoleFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(SysUserRole et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<SysUserRole> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<SysUserRole> list) { public void saveBatch(List<SysUserRole> list) {
list.forEach(item->fillParentData(item)); sysUserRoleFeignClient.saveBatch(list) ;
saveOrUpdateBatch(list,batchSize);
} }
@Override @Override
public List<SysUserRole> selectByRoleid(String roleid) { public List<SysUserRole> selectByRoleid(String roleid) {
return baseMapper.selectByRoleid(roleid); SysUserRoleSearchContext context=new SysUserRoleSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_sys_roleid_eq(roleid);
return sysUserRoleFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByRoleid(String roleid) { public void removeByRoleid(String roleid) {
this.remove(new QueryWrapper<SysUserRole>().eq("sys_roleid",roleid)); Set<String> delIds=new HashSet<String>();
for(SysUserRole before:selectByRoleid(roleid)){
delIds.add(before.getUserroleid());
}
if(delIds.size()>0)
this.removeBatch(delIds);
} }
@Override @Override
public List<SysUserRole> selectByUserid(String userid) { public List<SysUserRole> selectByUserid(String userid) {
return baseMapper.selectByUserid(userid); SysUserRoleSearchContext context=new SysUserRoleSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_sys_userid_eq(userid);
return sysUserRoleFeignClient.searchDefault(context).getContent();
} }
@Override @Override
public void removeByUserid(String userid) { public void removeByUserid(String userid) {
this.remove(new QueryWrapper<SysUserRole>().eq("sys_userid",userid)); Set<String> delIds=new HashSet<String>();
for(SysUserRole before:selectByUserid(userid)){
delIds.add(before.getUserroleid());
} }
if(delIds.size()>0)
this.removeBatch(delIds);
/**
* 查询集合 DEFAULT
*/
@Override
public Page<SysUserRole> searchDefault(SysUserRoleSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SysUserRole> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<SysUserRole>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
/** /**
* 为当前实体填充父数据(外键值文本、外键值附加数据) * 查询集合 DEFAULT
* @param et
*/ */
private void fillParentData(SysUserRole et){
//实体关系[DER1N_SYS_USER_ROLE_SYS_ROLE_SYS_ROLEID]
if(!ObjectUtils.isEmpty(et.getRoleid())){
cn.ibizlab.core.uaa.domain.SysRole role=et.getRole();
if(ObjectUtils.isEmpty(role)){
cn.ibizlab.core.uaa.domain.SysRole majorEntity=sysroleService.get(et.getRoleid());
et.setRole(majorEntity);
role=majorEntity;
}
et.setRolename(role.getRolename());
}
//实体关系[DER1N_SYS_USER_ROLE_SYS_USER_SYS_USERID]
if(!ObjectUtils.isEmpty(et.getUserid())){
cn.ibizlab.core.uaa.domain.SysUser user=et.getUser();
if(ObjectUtils.isEmpty(user)){
cn.ibizlab.core.uaa.domain.SysUser majorEntity=sysuserService.get(et.getUserid());
et.setUser(majorEntity);
user=majorEntity;
}
et.setPersonname(user.getPersonname());
}
}
@Override @Override
public List<JSONObject> select(String sql, Map param){ public Page<SysUserRole> searchDefault(SysUserRoleSearchContext context) {
return this.baseMapper.selectBySQL(sql,param); Page<SysUserRole> sysUserRoles=sysUserRoleFeignClient.searchDefault(context);
} return sysUserRoles;
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
} }
......
...@@ -30,64 +30,53 @@ import cn.ibizlab.core.uaa.service.ISysUserService; ...@@ -30,64 +30,53 @@ import cn.ibizlab.core.uaa.service.ISysUserService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.uaa.client.SysUserFeignClient;
import cn.ibizlab.core.uaa.mapper.SysUserMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/** /**
* 实体[系统用户] 服务对象接口实现 * 实体[系统用户] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("SysUserServiceImpl") @Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService { public class SysUserServiceImpl implements ISysUserService {
@Autowired @Autowired
@Lazy SysUserFeignClient sysUserFeignClient;
private cn.ibizlab.core.uaa.service.ISysUserRoleService sysuserroleService;
private int batchSize = 500;
@Override @Override
@Transactional public boolean remove(String userid) {
public boolean remove(String key) { boolean result=sysUserFeignClient.remove(userid) ;
boolean result=removeById(key); return result;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { sysUserFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
@Transactional
public boolean update(SysUser et) { public boolean update(SysUser et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("userid",et.getUserid()))) SysUser rt = sysUserFeignClient.update(et.getUserid(),et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getUserid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<SysUser> list){
public void updateBatch(List<SysUser> list) { sysUserFeignClient.updateBatch(list) ;
updateBatchById(list,batchSize);
} }
@Override @Override
public boolean checkKey(SysUser et) { public boolean checkKey(SysUser et) {
return (!ObjectUtils.isEmpty(et.getUserid()))&&(!Objects.isNull(this.getById(et.getUserid()))); return sysUserFeignClient.checkKey(et);
} }
@Override @Override
@Transactional public SysUser get(String userid) {
public SysUser get(String key) { SysUser et=sysUserFeignClient.get(userid);
SysUser et = getById(key);
if(et==null){ if(et==null){
et=new SysUser(); et=new SysUser();
et.setUserid(key); et.setUserid(userid);
} }
else{ else{
} }
...@@ -97,89 +86,47 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -97,89 +86,47 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Override @Override
@Transactional @Transactional
public boolean save(SysUser et) { public boolean save(SysUser et) {
if(!saveOrUpdate(et)) if(et.getUserid()==null) et.setUserid((String)et.getDefaultKey(true));
return false; if(!sysUserFeignClient.save(et))
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(SysUser et) {
if (null == et) {
return false; return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<SysUser> list) {
saveOrUpdateBatch(list,batchSize);
return true; return true;
} }
@Override @Override
public void saveBatch(List<SysUser> list) { public void saveBatch(List<SysUser> list) {
saveOrUpdateBatch(list,batchSize); sysUserFeignClient.saveBatch(list) ;
} }
@Override @Override
public SysUser getDraft(SysUser et) { public SysUser getDraft(SysUser et) {
et=sysUserFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional
public boolean create(SysUser et) { public boolean create(SysUser et) {
if(!this.retBool(this.baseMapper.insert(et))) SysUser rt = sysUserFeignClient.create(et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getUserid()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<SysUser> list){
public void createBatch(List<SysUser> list) { sysUserFeignClient.createBatch(list) ;
this.saveBatch(list,batchSize);
} }
/** /**
* 查询集合 DEFAULT * 查询集合 DEFAULT
*/ */
@Override @Override
public Page<SysUser> searchDefault(SysUserSearchContext context) { public Page<SysUser> searchDefault(SysUserSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SysUser> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<SysUser> sysUsers=sysUserFeignClient.searchDefault(context);
return new PageImpl<SysUser>(pages.getRecords(), context.getPageable(), pages.getTotal()); return sysUsers;
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
} }
......
...@@ -3,88 +3,10 @@ ...@@ -3,88 +3,10 @@
<!--输出实体[SYS_PSDEOPPRIV]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_psdeoppriv-1-1">
<createTable tableName="IBZPSDEOPPRIV">
<column name="SYS_PSDEOPPRIVID" remarks="" type="VARCHAR(200)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PSDEOPPRIV_SYS_PSDEOPPR"/>
</column>
<column name="SYS_PSDEOPPRIVNAME" remarks="" type="VARCHAR(200)">
</column>
<column name="PSDATAENTITYID" remarks="" type="VARCHAR(100)">
</column>
<column name="PSDATAENTITYNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="PSDEDATARANGEID" remarks="" type="VARCHAR(100)">
</column>
<column name="PSDEDATARANGENAME" remarks="" type="VARCHAR(100)">
</column>
<column name="PSSYSMODULEID" remarks="" type="VARCHAR(100)">
</column>
<column name="PSSYSMODULENAME" remarks="" type="VARCHAR(100)">
</column>
<column name="PSSOURCETYPE" remarks="" type="VARCHAR(100)">
</column>
<column name="PSSOURCEID" remarks="" type="VARCHAR(100)">
</column>
<column name="PSSOURCENAME" remarks="" type="VARCHAR(100)">
</column>
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[IBZORG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzorg-5-2">
<createTable tableName="IBZORG">
<column name="ORGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZORG_ORGID"/>
</column>
<column name="ORGCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="ORGNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="PORGID" remarks="" type="VARCHAR(100)">
</column>
<column name="SHORTNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="ORGLEVEL" remarks="" type="INT">
</column>
<column name="SHOWORDER" remarks="" type="INT">
</column>
<column name="ENABLE" remarks="" type="INT">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[SYS_PSSYSUNIRES]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_pssysunires-1-3">
<createTable tableName="IBZPSSYSUNIRES">
<column name="SYS_PSSYSUNIRESID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PSSYSUNIRES_SYS_PSSYSUN"/>
</column>
<column name="SYS_PSSYSUNIRESNAME" remarks="" type="VARCHAR(200)">
</column>
<column name="UNIRESCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
...@@ -95,92 +17,20 @@ ...@@ -95,92 +17,20 @@
<!--输出实体[SYS_PSAPPMENUITEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_psappmenuitem-1-4">
<createTable tableName="IBZPSAPPMENUITEM">
<column name="SYS_PSAPPMENUITEMID" remarks="" type="VARCHAR(200)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PSAPPMENUITEM_SYS_PSAPP"/>
</column>
<column name="SYS_PSAPPMENUITEMNAME" remarks="" type="VARCHAR(200)">
</column>
<column name="PSAPPID" remarks="" type="VARCHAR(100)">
</column>
<column name="PSAPPNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="PSAPPMENUID" remarks="" type="VARCHAR(100)">
</column>
<column name="PSAPPMENUNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="PSAPPMENUITEMID" remarks="" type="VARCHAR(100)">
</column>
<column name="PSAPPPMENUITEMID" remarks="" type="VARCHAR(100)">
</column>
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[SYS_AUTHLOG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_authlog-1-5">
<createTable tableName="IBZAUTHLOG">
<column name="LOGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_AUTHLOG_LOGID"/>
</column>
<column name="USERNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="PERSONNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="DOMAIN" remarks="" type="VARCHAR(100)">
</column>
<column name="AUTHTIME" remarks="" type="DATETIME">
</column>
<column name="IPADDR" remarks="" type="VARCHAR(100)">
</column>
<column name="MACADDR" remarks="" type="VARCHAR(100)">
</column>
<column name="USERAGENT" remarks="" type="VARCHAR(100)">
</column>
<column name="AUTHCODE" remarks="" type="VARCHAR(15)">
</column>
</createTable>
</changeSet>
<!--输出实体[IBZDICT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzdict-1-6">
<createTable tableName="IBZDICT">
<column name="IBZDICTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDICT_IBZDICTID"/>
</column>
<column name="IBZDICTNAME" remarks="" type="VARCHAR(200)">
</column>
<column name="ENABLE" remarks="" type="INT">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
<column name="UPDATEMAN" remarks="" type="VARCHAR(60)">
</column>
<column name="CFG" remarks="" type="TEXT(1048576)">
</column>
</createTable>
</changeSet>
<!--输出实体[WF_GROUP]数据结构 --> <!--输出实体[WF_GROUP]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-wf_group-2-7"> <changeSet author="a_A_5d9d78509" id="tab-wf_group-2-1">
<createTable tableName="IBZWFGROUP"> <createTable tableName="IBZWFGROUP">
<column name="GROUPID" remarks="" type="VARCHAR(100)"> <column name="GROUPID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_WF_GROUP_GROUPID"/> <constraints primaryKey="true" primaryKeyName="PK_WF_GROUP_GROUPID"/>
...@@ -193,312 +43,23 @@ ...@@ -193,312 +43,23 @@
</changeSet> </changeSet>
<!--输出实体[IBZEMP]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzemp-5-8">
<createTable tableName="IBZEMP">
<column name="USERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZEMP_USERID"/>
</column>
<column name="USERNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="PERSONNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="USERCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="LOGINNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="PASSWORD" remarks="" type="VARCHAR(100)">
</column>
<column name="DOMAINS" remarks="" type="VARCHAR(100)">
</column>
<column name="MDEPTID" remarks="" type="VARCHAR(100)">
</column>
<column name="MDEPTCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="MDEPTNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="BCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="POSTID" remarks="" type="VARCHAR(100)">
</column>
<column name="POSTCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="POSTNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="ORGID" remarks="" type="VARCHAR(100)">
</column>
<column name="ORGCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="ORGNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="NICKNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="SEX" remarks="" type="VARCHAR(20)">
</column>
<column name="CERTCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="PHONE" remarks="" type="VARCHAR(100)">
</column>
<column name="BIRTHDAY" remarks="" type="DATETIME">
</column>
<column name="EMAIL" remarks="" type="VARCHAR(100)">
</column>
<column name="AVATAR" remarks="" type="VARCHAR(100)">
</column>
<column name="ADDR" remarks="" type="VARCHAR(255)">
</column>
<column name="USERICON" remarks="" type="VARCHAR(255)">
</column>
<column name="IPADDR" remarks="" type="VARCHAR(100)">
</column>
<column name="THEME" remarks="" type="VARCHAR(100)">
</column>
<column name="LANG" remarks="" type="VARCHAR(100)">
</column>
<column name="FONTSIZE" remarks="" type="VARCHAR(10)">
</column>
<column name="MEMO" remarks="" type="VARCHAR(255)">
</column>
<column name="RESERVER" remarks="" type="VARCHAR(255)">
</column>
<column name="SHOWORDER" remarks="" type="INT">
</column>
<column name="ENABLE" remarks="" type="INT">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[SYS_PSSYSTEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_pssystem-1-9">
<createTable tableName="IBZPSSYSTEM">
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PSSYSTEM_PSSYSTEMID"/>
</column>
<column name="PSSYSTEMNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="SYSSTRUCTURE" remarks="" type="TEXT(1048576)">
</column>
</createTable>
</changeSet>
<!--输出实体[IBZDEPTMEMBER]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzdeptmember-4-10">
<createTable tableName="IBZDEPTMEMBER">
<column name="MEMBERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDEPTMEMBER_MEMBERID"/>
</column>
<column name="DEPTID" remarks="" type="VARCHAR(100)">
</column>
<column name="USERID" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
<!--输出实体[SYS_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role-4-11">
<createTable tableName="IBZROLE">
<column name="SYS_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_SYS_ROLEID"/>
</column>
<column name="SYS_ROLENAME" remarks="" type="VARCHAR(200)">
</column>
<column name="MEMO" remarks="" type="VARCHAR(100)">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[IBZDEPT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzdept-5-12">
<createTable tableName="IBZDEPT">
<column name="DEPTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDEPT_DEPTID"/>
</column>
<column name="DEPTCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="DEPTNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="ORGID" remarks="" type="VARCHAR(100)">
</column>
<column name="PDEPTID" remarks="" type="VARCHAR(100)">
</column>
<column name="SHORTNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="DEPTLEVEL" remarks="" type="INT">
</column>
<column name="SHOWORDER" remarks="" type="INT">
</column>
<column name="BCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="LEADERID" remarks="" type="VARCHAR(100)">
</column>
<column name="LEADERNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="ENABLE" remarks="" type="INT">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[IBZDICTITEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzdictitem-1-13">
<createTable tableName="IBZDICTITEM">
<column name="IBZDICTITEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDICTITEM_IBZDICTITEMID"/>
</column>
<column name="IBZDICTITEMNAME" remarks="" type="VARCHAR(200)">
</column>
<column name="DICTITEMVAL" remarks="" type="VARCHAR(30)">
</column>
<column name="DICTID" remarks="" type="VARCHAR(100)">
</column>
<column name="PITEMVAL" remarks="" type="VARCHAR(100)">
</column>
<column name="ITEMFILTER" remarks="" type="VARCHAR(500)">
</column>
<column name="ITEMCLS" remarks="" type="VARCHAR(100)">
</column>
<column name="ITEMICON" remarks="" type="VARCHAR(100)">
</column>
<column name="SHOWORDER" remarks="" type="INT">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEMAN" remarks="" type="VARCHAR(60)">
</column>
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
</createTable>
</changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-3-14">
<createTable tableName="IBZROLE_PERMISSION">
<column name="SYS_ROLE_PERMISSIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_PERMISSION_SYS_ROL"/>
</column>
<column name="SYS_ROLEID" remarks="" type="VARCHAR(100)">
</column>
<column name="SYS_PERMISSIONID" remarks="" type="VARCHAR(200)">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[SYS_USER_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_user_role-4-15">
<createTable tableName="IBZUSER_ROLE">
<column name="SYS_USER_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_USER_ROLE_SYS_USER_ROLE"/>
</column>
<column name="SYS_ROLEID" remarks="" type="VARCHAR(100)">
</column>
<column name="SYS_USERID" remarks="" type="VARCHAR(100)">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-1-16">
<createTable tableName="IBZPERMISSION">
<column name="SYS_PERMISSIONID" remarks="" type="VARCHAR(200)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PERMISSION_SYS_PERMISSI"/>
</column>
<column name="SYS_PERMISSIONNAME" remarks="" type="VARCHAR(200)">
</column>
<column name="PERMISSIONTYPE" remarks="" type="VARCHAR(60)">
</column>
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
</column>
<column name="ENABLE" remarks="" type="INT">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
</createTable>
</changeSet>
<!--输出实体[SYS_PSDEOPPRIV]外键关系 -->
<!--输出实体[IBZORG]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzorg-5-17">
<addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_IBZORG_IBZORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet>
<!--输出实体[SYS_PSSYSUNIRES]外键关系 -->
<!--输出实体[SYS_PSAPPMENUITEM]外键关系 -->
<!--输出实体[SYS_AUTHLOG]外键关系 -->
<!--输出实体[IBZDICT]外键关系 -->
<!--输出实体[WF_GROUP]外键关系 --> <!--输出实体[WF_GROUP]外键关系 -->
<!--输出实体[IBZEMP]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzemp-5-18">
<addForeignKeyConstraint baseColumnNames="MDEPTID" baseTableName="IBZEMP" constraintName="DER1N_IBZEMP_IBZDEPT_MDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzemp-5-19">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZEMP" constraintName="DER1N_IBZEMP_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet>
<!--输出实体[SYS_PSSYSTEM]外键关系 -->
<!--输出实体[IBZDEPTMEMBER]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzdeptmember-4-20">
<addForeignKeyConstraint baseColumnNames="DEPTID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_IBZDEPTMEMBER_IBZDEPT_DE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzdeptmember-4-21">
<addForeignKeyConstraint baseColumnNames="USERID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_IBZDEPTMEMBER_IBZEMP_USE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZEMP" validate="true"/>
</changeSet>
<!--输出实体[SYS_ROLE]外键关系 -->
<!--输出实体[IBZDEPT]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-5-22">
<addForeignKeyConstraint baseColumnNames="PDEPTID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZDEPT_PDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-5-23">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet>
<!--输出实体[IBZDICTITEM]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzdictitem-1-24">
<addForeignKeyConstraint baseColumnNames="DICTID" baseTableName="IBZDICTITEM" constraintName="DER1N_IBZDICTITEM_IBZDICT_DICT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBZDICTID" referencedTableName="IBZDICT" validate="true"/>
</changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_role_permission-3-25">
<addForeignKeyConstraint baseColumnNames="SYS_PERMISSIONID" baseTableName="IBZROLE_PERMISSION" constraintName="DER1N_SYS_ROLE_PERMISSION_SYS_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_PERMISSIONID" referencedTableName="IBZPERMISSION" validate="true"/>
</changeSet>
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_user_role-4-27">
<addForeignKeyConstraint baseColumnNames="SYS_ROLEID" baseTableName="IBZUSER_ROLE" constraintName="DER1N_SYS_USER_ROLE_SYS_ROLE_S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/>
</changeSet>
<!--输出实体[SYS_PERMISSION]外键关系 -->
</databaseChangeLog> </databaseChangeLog>
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="ibzemployeesavedeptmemberdeaction1" id="9c1c19bacf602767e76375b11255b4ec" implementation="http://www.jboss.org/drools/rule" name="保存成员"/> <businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="ibzemployeesavedeptmemberdeaction1" id="9c1c19bacf602767e76375b11255b4ec" implementation="http://www.jboss.org/drools/rule" name="保存成员"/>
<endEvent id="9c1c19bacf602767e76375b11255b4ec_End" name="End"/> <endEvent id="9c1c19bacf602767e76375b11255b4ec_End" name="End"/>
<sequenceFlow id="9c1c19bacf602767e76375b11255b4ec_End_Line" sourceRef="9c1c19bacf602767e76375b11255b4ec" targetRef="9c1c19bacf602767e76375b11255b4ec_End"/> <sequenceFlow id="9c1c19bacf602767e76375b11255b4ec_End_Line" sourceRef="9c1c19bacf602767e76375b11255b4ec" targetRef="9c1c19bacf602767e76375b11255b4ec_End"/>
<sequenceFlow id="0b057ff7e1abde2175b8c51ec4c2ac4a" sourceRef="185d3d9e0375d4a0bc23e2b5e0c5d6b0" targetRef="4ce2ddabe497161f1eafae705330da51"> <sequenceFlow id="971ab2847fdbdbdc4db12c939a1b971f" sourceRef="185d3d9e0375d4a0bc23e2b5e0c5d6b0" targetRef="4ce2ddabe497161f1eafae705330da51">
</sequenceFlow> </sequenceFlow>
<sequenceFlow id="f6db416cc2fdd6c6dfe512fac95e5a88" sourceRef="4ce2ddabe497161f1eafae705330da51" targetRef="9c1c19bacf602767e76375b11255b4ec"> <sequenceFlow id="ae783381200010e818d657ead98d3a00" sourceRef="4ce2ddabe497161f1eafae705330da51" targetRef="9c1c19bacf602767e76375b11255b4ec">
</sequenceFlow> </sequenceFlow>
</process> </process>
</definitions> </definitions>
......
...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier; import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -46,14 +46,12 @@ public class IBZDepartmentResource { ...@@ -46,14 +46,12 @@ public class IBZDepartmentResource {
@Lazy @Lazy
public IBZDepartmentMapping ibzdepartmentMapping; public IBZDepartmentMapping ibzdepartmentMapping;
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzrt-IBZDepartment-Save')")
@ApiOperation(value = "Save", tags = {"IBZDepartment" }, notes = "Save") @ApiOperation(value = "Save", tags = {"IBZDepartment" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/save")
public ResponseEntity<Boolean> save(@RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<Boolean> save(@RequestBody IBZDepartmentDTO ibzdepartmentdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.save(ibzdepartmentMapping.toDomain(ibzdepartmentdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.save(ibzdepartmentMapping.toDomain(ibzdepartmentdto)));
} }
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos),'ibzrt-IBZDepartment-Save')")
@ApiOperation(value = "SaveBatch", tags = {"IBZDepartment" }, notes = "SaveBatch") @ApiOperation(value = "SaveBatch", tags = {"IBZDepartment" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
...@@ -61,7 +59,6 @@ public class IBZDepartmentResource { ...@@ -61,7 +59,6 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PostAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(returnObject.body),'ibzrt-IBZDepartment-Get')")
@ApiOperation(value = "Get", tags = {"IBZDepartment" }, notes = "Get") @ApiOperation(value = "Get", tags = {"IBZDepartment" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}")
public ResponseEntity<IBZDepartmentDTO> get(@PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<IBZDepartmentDTO> get(@PathVariable("ibzdepartment_id") String ibzdepartment_id) {
...@@ -70,15 +67,13 @@ public class IBZDepartmentResource { ...@@ -70,15 +67,13 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzrt-IBZDepartment-Remove')")
@ApiOperation(value = "Remove", tags = {"IBZDepartment" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"IBZDepartment" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<Boolean> remove(@PathVariable("ibzdepartment_id") String ibzdepartment_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.remove(ibzdepartment_id)); return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.remove(ibzdepartment_id));
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.getIbzdepartmentByIds(#ids),'ibzrt-IBZDepartment-Remove')")
@ApiOperation(value = "RemoveBatch", tags = {"IBZDepartment" }, notes = "RemoveBatch") @ApiOperation(value = "RemoveBatch", tags = {"IBZDepartment" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -92,10 +87,9 @@ public class IBZDepartmentResource { ...@@ -92,10 +87,9 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.checkKey(ibzdepartmentMapping.toDomain(ibzdepartmentdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.checkKey(ibzdepartmentMapping.toDomain(ibzdepartmentdto)));
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzrt-IBZDepartment-Update')")
@ApiOperation(value = "Update", tags = {"IBZDepartment" }, notes = "Update") @ApiOperation(value = "Update", tags = {"IBZDepartment" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}")
@Transactional
public ResponseEntity<IBZDepartmentDTO> update(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<IBZDepartmentDTO> update(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) {
IBZDepartment domain = ibzdepartmentMapping.toDomain(ibzdepartmentdto); IBZDepartment domain = ibzdepartmentMapping.toDomain(ibzdepartmentdto);
domain .setDeptid(ibzdepartment_id); domain .setDeptid(ibzdepartment_id);
...@@ -104,7 +98,6 @@ public class IBZDepartmentResource { ...@@ -104,7 +98,6 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.getIbzdepartmentByEntities(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos)),'ibzrt-IBZDepartment-Update')")
@ApiOperation(value = "UpdateBatch", tags = {"IBZDepartment" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"IBZDepartment" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
...@@ -112,10 +105,9 @@ public class IBZDepartmentResource { ...@@ -112,10 +105,9 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzrt-IBZDepartment-Create')")
@ApiOperation(value = "Create", tags = {"IBZDepartment" }, notes = "Create") @ApiOperation(value = "Create", tags = {"IBZDepartment" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments")
@Transactional
public ResponseEntity<IBZDepartmentDTO> create(@RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<IBZDepartmentDTO> create(@RequestBody IBZDepartmentDTO ibzdepartmentdto) {
IBZDepartment domain = ibzdepartmentMapping.toDomain(ibzdepartmentdto); IBZDepartment domain = ibzdepartmentMapping.toDomain(ibzdepartmentdto);
ibzdepartmentService.create(domain); ibzdepartmentService.create(domain);
...@@ -123,7 +115,6 @@ public class IBZDepartmentResource { ...@@ -123,7 +115,6 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos),'ibzrt-IBZDepartment-Create')")
@ApiOperation(value = "createBatch", tags = {"IBZDepartment" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"IBZDepartment" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
...@@ -137,7 +128,6 @@ public class IBZDepartmentResource { ...@@ -137,7 +128,6 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentMapping.toDto(ibzdepartmentService.getDraft(new IBZDepartment()))); return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentMapping.toDto(ibzdepartmentService.getDraft(new IBZDepartment())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDepartment-CurDept-all')")
@ApiOperation(value = "fetchCurDept", tags = {"IBZDepartment" } ,notes = "fetchCurDept") @ApiOperation(value = "fetchCurDept", tags = {"IBZDepartment" } ,notes = "fetchCurDept")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchcurdept") @RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchcurdept")
public ResponseEntity<List<IBZDepartmentDTO>> fetchCurDept(IBZDepartmentSearchContext context) { public ResponseEntity<List<IBZDepartmentDTO>> fetchCurDept(IBZDepartmentSearchContext context) {
...@@ -150,7 +140,6 @@ public class IBZDepartmentResource { ...@@ -150,7 +140,6 @@ public class IBZDepartmentResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDepartment-CurDept-all')")
@ApiOperation(value = "searchCurDept", tags = {"IBZDepartment" } ,notes = "searchCurDept") @ApiOperation(value = "searchCurDept", tags = {"IBZDepartment" } ,notes = "searchCurDept")
@RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/searchcurdept") @RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/searchcurdept")
public ResponseEntity<Page<IBZDepartmentDTO>> searchCurDept(@RequestBody IBZDepartmentSearchContext context) { public ResponseEntity<Page<IBZDepartmentDTO>> searchCurDept(@RequestBody IBZDepartmentSearchContext context) {
...@@ -158,7 +147,6 @@ public class IBZDepartmentResource { ...@@ -158,7 +147,6 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK) return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibzdepartmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzdepartmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDepartment-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZDepartment" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"IBZDepartment" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchdefault")
public ResponseEntity<List<IBZDepartmentDTO>> fetchDefault(IBZDepartmentSearchContext context) { public ResponseEntity<List<IBZDepartmentDTO>> fetchDefault(IBZDepartmentSearchContext context) {
...@@ -171,7 +159,6 @@ public class IBZDepartmentResource { ...@@ -171,7 +159,6 @@ public class IBZDepartmentResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDepartment-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZDepartment" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"IBZDepartment" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/searchdefault")
public ResponseEntity<Page<IBZDepartmentDTO>> searchDefault(@RequestBody IBZDepartmentSearchContext context) { public ResponseEntity<Page<IBZDepartmentDTO>> searchDefault(@RequestBody IBZDepartmentSearchContext context) {
......
...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier; import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -46,10 +46,9 @@ public class IBZDeptMemberResource { ...@@ -46,10 +46,9 @@ public class IBZDeptMemberResource {
@Lazy @Lazy
public IBZDeptMemberMapping ibzdeptmemberMapping; public IBZDeptMemberMapping ibzdeptmemberMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Update-all')")
@ApiOperation(value = "Update", tags = {"IBZDeptMember" }, notes = "Update") @ApiOperation(value = "Update", tags = {"IBZDeptMember" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> update(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> update(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto); IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
domain .setMemberid(ibzdeptmember_id); domain .setMemberid(ibzdeptmember_id);
...@@ -58,7 +57,6 @@ public class IBZDeptMemberResource { ...@@ -58,7 +57,6 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"IBZDeptMember" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"IBZDeptMember" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
...@@ -66,7 +64,6 @@ public class IBZDeptMemberResource { ...@@ -66,7 +64,6 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Get-all')")
@ApiOperation(value = "Get", tags = {"IBZDeptMember" }, notes = "Get") @ApiOperation(value = "Get", tags = {"IBZDeptMember" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzdeptmembers/{ibzdeptmember_id}")
public ResponseEntity<IBZDeptMemberDTO> get(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<IBZDeptMemberDTO> get(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
...@@ -81,15 +78,13 @@ public class IBZDeptMemberResource { ...@@ -81,15 +78,13 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Remove-all')")
@ApiOperation(value = "Remove", tags = {"IBZDeptMember" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"IBZDeptMember" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<Boolean> remove(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.remove(ibzdeptmember_id)); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.remove(ibzdeptmember_id));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"IBZDeptMember" }, notes = "RemoveBatch") @ApiOperation(value = "RemoveBatch", tags = {"IBZDeptMember" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -97,10 +92,9 @@ public class IBZDeptMemberResource { ...@@ -97,10 +92,9 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Create-all')")
@ApiOperation(value = "Create", tags = {"IBZDeptMember" }, notes = "Create") @ApiOperation(value = "Create", tags = {"IBZDeptMember" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers") @RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers")
@Transactional
public ResponseEntity<IBZDeptMemberDTO> create(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> create(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto); IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
ibzdeptmemberService.create(domain); ibzdeptmemberService.create(domain);
...@@ -108,7 +102,6 @@ public class IBZDeptMemberResource { ...@@ -108,7 +102,6 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Create-all')")
@ApiOperation(value = "createBatch", tags = {"IBZDeptMember" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"IBZDeptMember" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
...@@ -122,14 +115,12 @@ public class IBZDeptMemberResource { ...@@ -122,14 +115,12 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberMapping.toDto(ibzdeptmemberService.getDraft(new IBZDeptMember()))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberMapping.toDto(ibzdeptmemberService.getDraft(new IBZDeptMember())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Save-all')")
@ApiOperation(value = "Save", tags = {"IBZDeptMember" }, notes = "Save") @ApiOperation(value = "Save", tags = {"IBZDeptMember" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/save")
public ResponseEntity<Boolean> save(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> save(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.save(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.save(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"IBZDeptMember" }, notes = "SaveBatch") @ApiOperation(value = "SaveBatch", tags = {"IBZDeptMember" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
...@@ -137,7 +128,6 @@ public class IBZDeptMemberResource { ...@@ -137,7 +128,6 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZDeptMember" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"IBZDeptMember" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzdeptmembers/fetchdefault")
public ResponseEntity<List<IBZDeptMemberDTO>> fetchDefault(IBZDeptMemberSearchContext context) { public ResponseEntity<List<IBZDeptMemberDTO>> fetchDefault(IBZDeptMemberSearchContext context) {
...@@ -150,7 +140,6 @@ public class IBZDeptMemberResource { ...@@ -150,7 +140,6 @@ public class IBZDeptMemberResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZDeptMember-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZDeptMember" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"IBZDeptMember" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzdeptmembers/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzdeptmembers/searchdefault")
public ResponseEntity<Page<IBZDeptMemberDTO>> searchDefault(@RequestBody IBZDeptMemberSearchContext context) { public ResponseEntity<Page<IBZDeptMemberDTO>> searchDefault(@RequestBody IBZDeptMemberSearchContext context) {
......
...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier; import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -46,15 +46,13 @@ public class IBZEmployeeResource { ...@@ -46,15 +46,13 @@ public class IBZEmployeeResource {
@Lazy @Lazy
public IBZEmployeeMapping ibzemployeeMapping; public IBZEmployeeMapping ibzemployeeMapping;
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzrt-IBZEmployee-Remove')")
@ApiOperation(value = "Remove", tags = {"IBZEmployee" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"IBZEmployee" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<Boolean> remove(@PathVariable("ibzemployee_id") String ibzemployee_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.remove(ibzemployee_id)); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.remove(ibzemployee_id));
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByIds(#ids),'ibzrt-IBZEmployee-Remove')")
@ApiOperation(value = "RemoveBatch", tags = {"IBZEmployee" }, notes = "RemoveBatch") @ApiOperation(value = "RemoveBatch", tags = {"IBZEmployee" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -62,10 +60,9 @@ public class IBZEmployeeResource { ...@@ -62,10 +60,9 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzrt-IBZEmployee-Update')")
@ApiOperation(value = "Update", tags = {"IBZEmployee" }, notes = "Update") @ApiOperation(value = "Update", tags = {"IBZEmployee" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}")
@Transactional
public ResponseEntity<IBZEmployeeDTO> update(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> update(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto); IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
domain .setUserid(ibzemployee_id); domain .setUserid(ibzemployee_id);
...@@ -74,7 +71,6 @@ public class IBZEmployeeResource { ...@@ -74,7 +71,6 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByEntities(this.ibzemployeeMapping.toDomain(#ibzemployeedtos)),'ibzrt-IBZEmployee-Update')")
@ApiOperation(value = "UpdateBatch", tags = {"IBZEmployee" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"IBZEmployee" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
...@@ -88,7 +84,6 @@ public class IBZEmployeeResource { ...@@ -88,7 +84,6 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.checkKey(ibzemployeeMapping.toDomain(ibzemployeedto))); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.checkKey(ibzemployeeMapping.toDomain(ibzemployeedto)));
} }
@PostAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(returnObject.body),'ibzrt-IBZEmployee-Get')")
@ApiOperation(value = "Get", tags = {"IBZEmployee" }, notes = "Get") @ApiOperation(value = "Get", tags = {"IBZEmployee" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}")
public ResponseEntity<IBZEmployeeDTO> get(@PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<IBZEmployeeDTO> get(@PathVariable("ibzemployee_id") String ibzemployee_id) {
...@@ -97,14 +92,12 @@ public class IBZEmployeeResource { ...@@ -97,14 +92,12 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzrt-IBZEmployee-Save')")
@ApiOperation(value = "Save", tags = {"IBZEmployee" }, notes = "Save") @ApiOperation(value = "Save", tags = {"IBZEmployee" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/save")
public ResponseEntity<Boolean> save(@RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<Boolean> save(@RequestBody IBZEmployeeDTO ibzemployeedto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.save(ibzemployeeMapping.toDomain(ibzemployeedto))); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.save(ibzemployeeMapping.toDomain(ibzemployeedto)));
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzrt-IBZEmployee-Save')")
@ApiOperation(value = "SaveBatch", tags = {"IBZEmployee" }, notes = "SaveBatch") @ApiOperation(value = "SaveBatch", tags = {"IBZEmployee" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
...@@ -112,10 +105,9 @@ public class IBZEmployeeResource { ...@@ -112,10 +105,9 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "初始化密码", tags = {"IBZEmployee" }, notes = "初始化密码") @ApiOperation(value = "初始化密码", tags = {"IBZEmployee" }, notes = "初始化密码")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/initpwd") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional
public ResponseEntity<IBZEmployeeDTO> initPwd(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> initPwd(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee ibzemployee = ibzemployeeMapping.toDomain(ibzemployeedto); IBZEmployee ibzemployee = ibzemployeeMapping.toDomain(ibzemployeedto);
ibzemployee.setUserid(ibzemployee_id); ibzemployee.setUserid(ibzemployee_id);
...@@ -130,10 +122,9 @@ public class IBZEmployeeResource { ...@@ -130,10 +122,9 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeMapping.toDto(ibzemployeeService.getDraft(new IBZEmployee()))); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeMapping.toDto(ibzemployeeService.getDraft(new IBZEmployee())));
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzrt-IBZEmployee-Create')")
@ApiOperation(value = "Create", tags = {"IBZEmployee" }, notes = "Create") @ApiOperation(value = "Create", tags = {"IBZEmployee" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees")
@Transactional
public ResponseEntity<IBZEmployeeDTO> create(@RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> create(@RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto); IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
ibzemployeeService.create(domain); ibzemployeeService.create(domain);
...@@ -141,7 +132,6 @@ public class IBZEmployeeResource { ...@@ -141,7 +132,6 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzrt-IBZEmployee-Create')")
@ApiOperation(value = "createBatch", tags = {"IBZEmployee" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"IBZEmployee" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
...@@ -149,7 +139,6 @@ public class IBZEmployeeResource { ...@@ -149,7 +139,6 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZEmployee-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZEmployee" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"IBZEmployee" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzemployees/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzemployees/fetchdefault")
public ResponseEntity<List<IBZEmployeeDTO>> fetchDefault(IBZEmployeeSearchContext context) { public ResponseEntity<List<IBZEmployeeDTO>> fetchDefault(IBZEmployeeSearchContext context) {
...@@ -162,7 +151,6 @@ public class IBZEmployeeResource { ...@@ -162,7 +151,6 @@ public class IBZEmployeeResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZEmployee-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZEmployee" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"IBZEmployee" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzemployees/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzemployees/searchdefault")
public ResponseEntity<Page<IBZEmployeeDTO>> searchDefault(@RequestBody IBZEmployeeSearchContext context) { public ResponseEntity<Page<IBZEmployeeDTO>> searchDefault(@RequestBody IBZEmployeeSearchContext context) {
......
...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier; import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -46,14 +46,12 @@ public class IBZOrganizationResource { ...@@ -46,14 +46,12 @@ public class IBZOrganizationResource {
@Lazy @Lazy
public IBZOrganizationMapping ibzorganizationMapping; public IBZOrganizationMapping ibzorganizationMapping;
@PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdto),'ibzrt-IBZOrganization-Save')")
@ApiOperation(value = "Save", tags = {"IBZOrganization" }, notes = "Save") @ApiOperation(value = "Save", tags = {"IBZOrganization" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/save")
public ResponseEntity<Boolean> save(@RequestBody IBZOrganizationDTO ibzorganizationdto) { public ResponseEntity<Boolean> save(@RequestBody IBZOrganizationDTO ibzorganizationdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.save(ibzorganizationMapping.toDomain(ibzorganizationdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.save(ibzorganizationMapping.toDomain(ibzorganizationdto)));
} }
@PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdtos),'ibzrt-IBZOrganization-Save')")
@ApiOperation(value = "SaveBatch", tags = {"IBZOrganization" }, notes = "SaveBatch") @ApiOperation(value = "SaveBatch", tags = {"IBZOrganization" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
...@@ -67,7 +65,6 @@ public class IBZOrganizationResource { ...@@ -67,7 +65,6 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.checkKey(ibzorganizationMapping.toDomain(ibzorganizationdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.checkKey(ibzorganizationMapping.toDomain(ibzorganizationdto)));
} }
@PostAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(returnObject.body),'ibzrt-IBZOrganization-Get')")
@ApiOperation(value = "Get", tags = {"IBZOrganization" }, notes = "Get") @ApiOperation(value = "Get", tags = {"IBZOrganization" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}")
public ResponseEntity<IBZOrganizationDTO> get(@PathVariable("ibzorganization_id") String ibzorganization_id) { public ResponseEntity<IBZOrganizationDTO> get(@PathVariable("ibzorganization_id") String ibzorganization_id) {
...@@ -76,10 +73,9 @@ public class IBZOrganizationResource { ...@@ -76,10 +73,9 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdto),'ibzrt-IBZOrganization-Create')")
@ApiOperation(value = "Create", tags = {"IBZOrganization" }, notes = "Create") @ApiOperation(value = "Create", tags = {"IBZOrganization" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations")
@Transactional
public ResponseEntity<IBZOrganizationDTO> create(@RequestBody IBZOrganizationDTO ibzorganizationdto) { public ResponseEntity<IBZOrganizationDTO> create(@RequestBody IBZOrganizationDTO ibzorganizationdto) {
IBZOrganization domain = ibzorganizationMapping.toDomain(ibzorganizationdto); IBZOrganization domain = ibzorganizationMapping.toDomain(ibzorganizationdto);
ibzorganizationService.create(domain); ibzorganizationService.create(domain);
...@@ -87,7 +83,6 @@ public class IBZOrganizationResource { ...@@ -87,7 +83,6 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdtos),'ibzrt-IBZOrganization-Create')")
@ApiOperation(value = "createBatch", tags = {"IBZOrganization" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"IBZOrganization" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
...@@ -95,15 +90,13 @@ public class IBZOrganizationResource { ...@@ -95,15 +90,13 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasPermission(this.ibzorganizationService.get(#ibzorganization_id),'ibzrt-IBZOrganization-Remove')")
@ApiOperation(value = "Remove", tags = {"IBZOrganization" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"IBZOrganization" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzorganization_id") String ibzorganization_id) { public ResponseEntity<Boolean> remove(@PathVariable("ibzorganization_id") String ibzorganization_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.remove(ibzorganization_id)); return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.remove(ibzorganization_id));
} }
@PreAuthorize("hasPermission(this.ibzorganizationService.getIbzorganizationByIds(#ids),'ibzrt-IBZOrganization-Remove')")
@ApiOperation(value = "RemoveBatch", tags = {"IBZOrganization" }, notes = "RemoveBatch") @ApiOperation(value = "RemoveBatch", tags = {"IBZOrganization" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -117,10 +110,9 @@ public class IBZOrganizationResource { ...@@ -117,10 +110,9 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationMapping.toDto(ibzorganizationService.getDraft(new IBZOrganization()))); return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationMapping.toDto(ibzorganizationService.getDraft(new IBZOrganization())));
} }
@PreAuthorize("hasPermission(this.ibzorganizationService.get(#ibzorganization_id),'ibzrt-IBZOrganization-Update')")
@ApiOperation(value = "Update", tags = {"IBZOrganization" }, notes = "Update") @ApiOperation(value = "Update", tags = {"IBZOrganization" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}")
@Transactional
public ResponseEntity<IBZOrganizationDTO> update(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZOrganizationDTO ibzorganizationdto) { public ResponseEntity<IBZOrganizationDTO> update(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZOrganizationDTO ibzorganizationdto) {
IBZOrganization domain = ibzorganizationMapping.toDomain(ibzorganizationdto); IBZOrganization domain = ibzorganizationMapping.toDomain(ibzorganizationdto);
domain .setOrgid(ibzorganization_id); domain .setOrgid(ibzorganization_id);
...@@ -129,7 +121,6 @@ public class IBZOrganizationResource { ...@@ -129,7 +121,6 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(this.ibzorganizationService.getIbzorganizationByEntities(this.ibzorganizationMapping.toDomain(#ibzorganizationdtos)),'ibzrt-IBZOrganization-Update')")
@ApiOperation(value = "UpdateBatch", tags = {"IBZOrganization" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"IBZOrganization" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
...@@ -137,7 +128,6 @@ public class IBZOrganizationResource { ...@@ -137,7 +128,6 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZOrganization-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZOrganization" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"IBZOrganization" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchdefault")
public ResponseEntity<List<IBZOrganizationDTO>> fetchDefault(IBZOrganizationSearchContext context) { public ResponseEntity<List<IBZOrganizationDTO>> fetchDefault(IBZOrganizationSearchContext context) {
...@@ -150,7 +140,6 @@ public class IBZOrganizationResource { ...@@ -150,7 +140,6 @@ public class IBZOrganizationResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZOrganization-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZOrganization" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"IBZOrganization" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchdefault")
public ResponseEntity<Page<IBZOrganizationDTO>> searchDefault(@RequestBody IBZOrganizationSearchContext context) { public ResponseEntity<Page<IBZOrganizationDTO>> searchDefault(@RequestBody IBZOrganizationSearchContext context) {
...@@ -158,7 +147,6 @@ public class IBZOrganizationResource { ...@@ -158,7 +147,6 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK) return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZOrganization-SelectPOrg-all')")
@ApiOperation(value = "fetch查询上级单位", tags = {"IBZOrganization" } ,notes = "fetch查询上级单位") @ApiOperation(value = "fetch查询上级单位", tags = {"IBZOrganization" } ,notes = "fetch查询上级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectporg") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectporg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectPOrg(IBZOrganizationSearchContext context) { public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectPOrg(IBZOrganizationSearchContext context) {
...@@ -171,7 +159,6 @@ public class IBZOrganizationResource { ...@@ -171,7 +159,6 @@ public class IBZOrganizationResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZOrganization-SelectPOrg-all')")
@ApiOperation(value = "search查询上级单位", tags = {"IBZOrganization" } ,notes = "search查询上级单位") @ApiOperation(value = "search查询上级单位", tags = {"IBZOrganization" } ,notes = "search查询上级单位")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectporg") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectporg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectPOrg(@RequestBody IBZOrganizationSearchContext context) { public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectPOrg(@RequestBody IBZOrganizationSearchContext context) {
...@@ -179,7 +166,6 @@ public class IBZOrganizationResource { ...@@ -179,7 +166,6 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK) return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZOrganization-SelectSOrg-all')")
@ApiOperation(value = "fetch查询下级单位", tags = {"IBZOrganization" } ,notes = "fetch查询下级单位") @ApiOperation(value = "fetch查询下级单位", tags = {"IBZOrganization" } ,notes = "fetch查询下级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectsorg") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectsorg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectSOrg(IBZOrganizationSearchContext context) { public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectSOrg(IBZOrganizationSearchContext context) {
...@@ -192,7 +178,6 @@ public class IBZOrganizationResource { ...@@ -192,7 +178,6 @@ public class IBZOrganizationResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-IBZOrganization-SelectSOrg-all')")
@ApiOperation(value = "search查询下级单位", tags = {"IBZOrganization" } ,notes = "search查询下级单位") @ApiOperation(value = "search查询下级单位", tags = {"IBZOrganization" } ,notes = "search查询下级单位")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectsorg") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectsorg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectSOrg(@RequestBody IBZOrganizationSearchContext context) { public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectSOrg(@RequestBody IBZOrganizationSearchContext context) {
......
...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier; import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -46,7 +46,6 @@ public class SysRolePermissionResource { ...@@ -46,7 +46,6 @@ public class SysRolePermissionResource {
@Lazy @Lazy
public SysRolePermissionMapping sysrolepermissionMapping; public SysRolePermissionMapping sysrolepermissionMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Get-all')")
@ApiOperation(value = "Get", tags = {"SysRolePermission" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SysRolePermission" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sysrolepermissions/{sysrolepermission_id}") @RequestMapping(method = RequestMethod.GET, value = "/sysrolepermissions/{sysrolepermission_id}")
public ResponseEntity<SysRolePermissionDTO> get(@PathVariable("sysrolepermission_id") String sysrolepermission_id) { public ResponseEntity<SysRolePermissionDTO> get(@PathVariable("sysrolepermission_id") String sysrolepermission_id) {
...@@ -55,15 +54,13 @@ public class SysRolePermissionResource { ...@@ -55,15 +54,13 @@ public class SysRolePermissionResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SysRolePermission" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SysRolePermission" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysrolepermissions/{sysrolepermission_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sysrolepermissions/{sysrolepermission_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysrolepermission_id") String sysrolepermission_id) { public ResponseEntity<Boolean> remove(@PathVariable("sysrolepermission_id") String sysrolepermission_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionService.remove(sysrolepermission_id)); return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionService.remove(sysrolepermission_id));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"SysRolePermission" }, notes = "RemoveBatch") @ApiOperation(value = "RemoveBatch", tags = {"SysRolePermission" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysrolepermissions/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/sysrolepermissions/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -77,10 +74,9 @@ public class SysRolePermissionResource { ...@@ -77,10 +74,9 @@ public class SysRolePermissionResource {
return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionMapping.toDto(sysrolepermissionService.getDraft(new SysRolePermission()))); return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionMapping.toDto(sysrolepermissionService.getDraft(new SysRolePermission())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Create-all')")
@ApiOperation(value = "Create", tags = {"SysRolePermission" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SysRolePermission" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions") @RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions")
@Transactional
public ResponseEntity<SysRolePermissionDTO> create(@RequestBody SysRolePermissionDTO sysrolepermissiondto) { public ResponseEntity<SysRolePermissionDTO> create(@RequestBody SysRolePermissionDTO sysrolepermissiondto) {
SysRolePermission domain = sysrolepermissionMapping.toDomain(sysrolepermissiondto); SysRolePermission domain = sysrolepermissionMapping.toDomain(sysrolepermissiondto);
sysrolepermissionService.create(domain); sysrolepermissionService.create(domain);
...@@ -88,7 +84,6 @@ public class SysRolePermissionResource { ...@@ -88,7 +84,6 @@ public class SysRolePermissionResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Create-all')")
@ApiOperation(value = "createBatch", tags = {"SysRolePermission" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SysRolePermission" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/batch") @RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SysRolePermissionDTO> sysrolepermissiondtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SysRolePermissionDTO> sysrolepermissiondtos) {
...@@ -102,14 +97,12 @@ public class SysRolePermissionResource { ...@@ -102,14 +97,12 @@ public class SysRolePermissionResource {
return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionService.checkKey(sysrolepermissionMapping.toDomain(sysrolepermissiondto))); return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionService.checkKey(sysrolepermissionMapping.toDomain(sysrolepermissiondto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Save-all')")
@ApiOperation(value = "Save", tags = {"SysRolePermission" }, notes = "Save") @ApiOperation(value = "Save", tags = {"SysRolePermission" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/save") @RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/save")
public ResponseEntity<Boolean> save(@RequestBody SysRolePermissionDTO sysrolepermissiondto) { public ResponseEntity<Boolean> save(@RequestBody SysRolePermissionDTO sysrolepermissiondto) {
return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionService.save(sysrolepermissionMapping.toDomain(sysrolepermissiondto))); return ResponseEntity.status(HttpStatus.OK).body(sysrolepermissionService.save(sysrolepermissionMapping.toDomain(sysrolepermissiondto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"SysRolePermission" }, notes = "SaveBatch") @ApiOperation(value = "SaveBatch", tags = {"SysRolePermission" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/sysrolepermissions/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<SysRolePermissionDTO> sysrolepermissiondtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<SysRolePermissionDTO> sysrolepermissiondtos) {
...@@ -117,10 +110,9 @@ public class SysRolePermissionResource { ...@@ -117,10 +110,9 @@ public class SysRolePermissionResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Update-all')")
@ApiOperation(value = "Update", tags = {"SysRolePermission" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SysRolePermission" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sysrolepermissions/{sysrolepermission_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sysrolepermissions/{sysrolepermission_id}")
@Transactional
public ResponseEntity<SysRolePermissionDTO> update(@PathVariable("sysrolepermission_id") String sysrolepermission_id, @RequestBody SysRolePermissionDTO sysrolepermissiondto) { public ResponseEntity<SysRolePermissionDTO> update(@PathVariable("sysrolepermission_id") String sysrolepermission_id, @RequestBody SysRolePermissionDTO sysrolepermissiondto) {
SysRolePermission domain = sysrolepermissionMapping.toDomain(sysrolepermissiondto); SysRolePermission domain = sysrolepermissionMapping.toDomain(sysrolepermissiondto);
domain .setRolepermissionid(sysrolepermission_id); domain .setRolepermissionid(sysrolepermission_id);
...@@ -129,7 +121,6 @@ public class SysRolePermissionResource { ...@@ -129,7 +121,6 @@ public class SysRolePermissionResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SysRolePermission" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SysRolePermission" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sysrolepermissions/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sysrolepermissions/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysRolePermissionDTO> sysrolepermissiondtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysRolePermissionDTO> sysrolepermissiondtos) {
...@@ -137,7 +128,6 @@ public class SysRolePermissionResource { ...@@ -137,7 +128,6 @@ public class SysRolePermissionResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SysRolePermission" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SysRolePermission" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysrolepermissions/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sysrolepermissions/fetchdefault")
public ResponseEntity<List<SysRolePermissionDTO>> fetchDefault(SysRolePermissionSearchContext context) { public ResponseEntity<List<SysRolePermissionDTO>> fetchDefault(SysRolePermissionSearchContext context) {
...@@ -150,7 +140,6 @@ public class SysRolePermissionResource { ...@@ -150,7 +140,6 @@ public class SysRolePermissionResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRolePermission-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SysRolePermission" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SysRolePermission" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sysrolepermissions/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sysrolepermissions/searchdefault")
public ResponseEntity<Page<SysRolePermissionDTO>> searchDefault(@RequestBody SysRolePermissionSearchContext context) { public ResponseEntity<Page<SysRolePermissionDTO>> searchDefault(@RequestBody SysRolePermissionSearchContext context) {
......
...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier; import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -46,14 +46,12 @@ public class SysRoleResource { ...@@ -46,14 +46,12 @@ public class SysRoleResource {
@Lazy @Lazy
public SysRoleMapping sysroleMapping; public SysRoleMapping sysroleMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Save-all')")
@ApiOperation(value = "Save", tags = {"SysRole" }, notes = "Save") @ApiOperation(value = "Save", tags = {"SysRole" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/sysroles/save") @RequestMapping(method = RequestMethod.POST, value = "/sysroles/save")
public ResponseEntity<Boolean> save(@RequestBody SysRoleDTO sysroledto) { public ResponseEntity<Boolean> save(@RequestBody SysRoleDTO sysroledto) {
return ResponseEntity.status(HttpStatus.OK).body(sysroleService.save(sysroleMapping.toDomain(sysroledto))); return ResponseEntity.status(HttpStatus.OK).body(sysroleService.save(sysroleMapping.toDomain(sysroledto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"SysRole" }, notes = "SaveBatch") @ApiOperation(value = "SaveBatch", tags = {"SysRole" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sysroles/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/sysroles/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<SysRoleDTO> sysroledtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<SysRoleDTO> sysroledtos) {
...@@ -61,10 +59,9 @@ public class SysRoleResource { ...@@ -61,10 +59,9 @@ public class SysRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Update-all')")
@ApiOperation(value = "Update", tags = {"SysRole" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SysRole" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sysroles/{sysrole_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sysroles/{sysrole_id}")
@Transactional
public ResponseEntity<SysRoleDTO> update(@PathVariable("sysrole_id") String sysrole_id, @RequestBody SysRoleDTO sysroledto) { public ResponseEntity<SysRoleDTO> update(@PathVariable("sysrole_id") String sysrole_id, @RequestBody SysRoleDTO sysroledto) {
SysRole domain = sysroleMapping.toDomain(sysroledto); SysRole domain = sysroleMapping.toDomain(sysroledto);
domain .setRoleid(sysrole_id); domain .setRoleid(sysrole_id);
...@@ -73,7 +70,6 @@ public class SysRoleResource { ...@@ -73,7 +70,6 @@ public class SysRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SysRole" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SysRole" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sysroles/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sysroles/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysRoleDTO> sysroledtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysRoleDTO> sysroledtos) {
...@@ -81,10 +77,9 @@ public class SysRoleResource { ...@@ -81,10 +77,9 @@ public class SysRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Create-all')")
@ApiOperation(value = "Create", tags = {"SysRole" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SysRole" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sysroles") @RequestMapping(method = RequestMethod.POST, value = "/sysroles")
@Transactional
public ResponseEntity<SysRoleDTO> create(@RequestBody SysRoleDTO sysroledto) { public ResponseEntity<SysRoleDTO> create(@RequestBody SysRoleDTO sysroledto) {
SysRole domain = sysroleMapping.toDomain(sysroledto); SysRole domain = sysroleMapping.toDomain(sysroledto);
sysroleService.create(domain); sysroleService.create(domain);
...@@ -92,7 +87,6 @@ public class SysRoleResource { ...@@ -92,7 +87,6 @@ public class SysRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Create-all')")
@ApiOperation(value = "createBatch", tags = {"SysRole" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SysRole" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sysroles/batch") @RequestMapping(method = RequestMethod.POST, value = "/sysroles/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SysRoleDTO> sysroledtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SysRoleDTO> sysroledtos) {
...@@ -100,7 +94,6 @@ public class SysRoleResource { ...@@ -100,7 +94,6 @@ public class SysRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Get-all')")
@ApiOperation(value = "Get", tags = {"SysRole" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SysRole" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sysroles/{sysrole_id}") @RequestMapping(method = RequestMethod.GET, value = "/sysroles/{sysrole_id}")
public ResponseEntity<SysRoleDTO> get(@PathVariable("sysrole_id") String sysrole_id) { public ResponseEntity<SysRoleDTO> get(@PathVariable("sysrole_id") String sysrole_id) {
...@@ -109,15 +102,13 @@ public class SysRoleResource { ...@@ -109,15 +102,13 @@ public class SysRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SysRole" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SysRole" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysroles/{sysrole_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sysroles/{sysrole_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysrole_id") String sysrole_id) { public ResponseEntity<Boolean> remove(@PathVariable("sysrole_id") String sysrole_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysroleService.remove(sysrole_id)); return ResponseEntity.status(HttpStatus.OK).body(sysroleService.remove(sysrole_id));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"SysRole" }, notes = "RemoveBatch") @ApiOperation(value = "RemoveBatch", tags = {"SysRole" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysroles/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/sysroles/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -137,7 +128,6 @@ public class SysRoleResource { ...@@ -137,7 +128,6 @@ public class SysRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(sysroleService.checkKey(sysroleMapping.toDomain(sysroledto))); return ResponseEntity.status(HttpStatus.OK).body(sysroleService.checkKey(sysroleMapping.toDomain(sysroledto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SysRole" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SysRole" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysroles/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sysroles/fetchdefault")
public ResponseEntity<List<SysRoleDTO>> fetchDefault(SysRoleSearchContext context) { public ResponseEntity<List<SysRoleDTO>> fetchDefault(SysRoleSearchContext context) {
...@@ -150,7 +140,6 @@ public class SysRoleResource { ...@@ -150,7 +140,6 @@ public class SysRoleResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysRole-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SysRole" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SysRole" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sysroles/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sysroles/searchdefault")
public ResponseEntity<Page<SysRoleDTO>> searchDefault(@RequestBody SysRoleSearchContext context) { public ResponseEntity<Page<SysRoleDTO>> searchDefault(@RequestBody SysRoleSearchContext context) {
......
...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier; import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -46,15 +46,13 @@ public class SysUserResource { ...@@ -46,15 +46,13 @@ public class SysUserResource {
@Lazy @Lazy
public SysUserMapping sysuserMapping; public SysUserMapping sysuserMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SysUser" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SysUser" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysusers/{sysuser_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sysusers/{sysuser_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysuser_id") String sysuser_id) { public ResponseEntity<Boolean> remove(@PathVariable("sysuser_id") String sysuser_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserService.remove(sysuser_id)); return ResponseEntity.status(HttpStatus.OK).body(sysuserService.remove(sysuser_id));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"SysUser" }, notes = "RemoveBatch") @ApiOperation(value = "RemoveBatch", tags = {"SysUser" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysusers/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/sysusers/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -62,10 +60,9 @@ public class SysUserResource { ...@@ -62,10 +60,9 @@ public class SysUserResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Update-all')")
@ApiOperation(value = "Update", tags = {"SysUser" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SysUser" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sysusers/{sysuser_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sysusers/{sysuser_id}")
@Transactional
public ResponseEntity<SysUserDTO> update(@PathVariable("sysuser_id") String sysuser_id, @RequestBody SysUserDTO sysuserdto) { public ResponseEntity<SysUserDTO> update(@PathVariable("sysuser_id") String sysuser_id, @RequestBody SysUserDTO sysuserdto) {
SysUser domain = sysuserMapping.toDomain(sysuserdto); SysUser domain = sysuserMapping.toDomain(sysuserdto);
domain .setUserid(sysuser_id); domain .setUserid(sysuser_id);
...@@ -74,7 +71,6 @@ public class SysUserResource { ...@@ -74,7 +71,6 @@ public class SysUserResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SysUser" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SysUser" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sysusers/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sysusers/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysUserDTO> sysuserdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysUserDTO> sysuserdtos) {
...@@ -88,7 +84,6 @@ public class SysUserResource { ...@@ -88,7 +84,6 @@ public class SysUserResource {
return ResponseEntity.status(HttpStatus.OK).body(sysuserService.checkKey(sysuserMapping.toDomain(sysuserdto))); return ResponseEntity.status(HttpStatus.OK).body(sysuserService.checkKey(sysuserMapping.toDomain(sysuserdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Get-all')")
@ApiOperation(value = "Get", tags = {"SysUser" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SysUser" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sysusers/{sysuser_id}") @RequestMapping(method = RequestMethod.GET, value = "/sysusers/{sysuser_id}")
public ResponseEntity<SysUserDTO> get(@PathVariable("sysuser_id") String sysuser_id) { public ResponseEntity<SysUserDTO> get(@PathVariable("sysuser_id") String sysuser_id) {
...@@ -97,14 +92,12 @@ public class SysUserResource { ...@@ -97,14 +92,12 @@ public class SysUserResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Save-all')")
@ApiOperation(value = "Save", tags = {"SysUser" }, notes = "Save") @ApiOperation(value = "Save", tags = {"SysUser" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/sysusers/save") @RequestMapping(method = RequestMethod.POST, value = "/sysusers/save")
public ResponseEntity<Boolean> save(@RequestBody SysUserDTO sysuserdto) { public ResponseEntity<Boolean> save(@RequestBody SysUserDTO sysuserdto) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserService.save(sysuserMapping.toDomain(sysuserdto))); return ResponseEntity.status(HttpStatus.OK).body(sysuserService.save(sysuserMapping.toDomain(sysuserdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"SysUser" }, notes = "SaveBatch") @ApiOperation(value = "SaveBatch", tags = {"SysUser" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sysusers/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/sysusers/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<SysUserDTO> sysuserdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<SysUserDTO> sysuserdtos) {
...@@ -118,10 +111,9 @@ public class SysUserResource { ...@@ -118,10 +111,9 @@ public class SysUserResource {
return ResponseEntity.status(HttpStatus.OK).body(sysuserMapping.toDto(sysuserService.getDraft(new SysUser()))); return ResponseEntity.status(HttpStatus.OK).body(sysuserMapping.toDto(sysuserService.getDraft(new SysUser())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Create-all')")
@ApiOperation(value = "Create", tags = {"SysUser" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SysUser" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sysusers") @RequestMapping(method = RequestMethod.POST, value = "/sysusers")
@Transactional
public ResponseEntity<SysUserDTO> create(@RequestBody SysUserDTO sysuserdto) { public ResponseEntity<SysUserDTO> create(@RequestBody SysUserDTO sysuserdto) {
SysUser domain = sysuserMapping.toDomain(sysuserdto); SysUser domain = sysuserMapping.toDomain(sysuserdto);
sysuserService.create(domain); sysuserService.create(domain);
...@@ -129,7 +121,6 @@ public class SysUserResource { ...@@ -129,7 +121,6 @@ public class SysUserResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Create-all')")
@ApiOperation(value = "createBatch", tags = {"SysUser" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SysUser" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sysusers/batch") @RequestMapping(method = RequestMethod.POST, value = "/sysusers/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SysUserDTO> sysuserdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SysUserDTO> sysuserdtos) {
...@@ -137,7 +128,6 @@ public class SysUserResource { ...@@ -137,7 +128,6 @@ public class SysUserResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SysUser" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SysUser" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysusers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sysusers/fetchdefault")
public ResponseEntity<List<SysUserDTO>> fetchDefault(SysUserSearchContext context) { public ResponseEntity<List<SysUserDTO>> fetchDefault(SysUserSearchContext context) {
...@@ -150,7 +140,6 @@ public class SysUserResource { ...@@ -150,7 +140,6 @@ public class SysUserResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUser-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SysUser" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SysUser" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sysusers/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sysusers/searchdefault")
public ResponseEntity<Page<SysUserDTO>> searchDefault(@RequestBody SysUserSearchContext context) { public ResponseEntity<Page<SysUserDTO>> searchDefault(@RequestBody SysUserSearchContext context) {
......
...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier; import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -58,10 +58,9 @@ public class SysUserRoleResource { ...@@ -58,10 +58,9 @@ public class SysUserRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(sysuserroleMapping.toDto(sysuserroleService.getDraft(new SysUserRole()))); return ResponseEntity.status(HttpStatus.OK).body(sysuserroleMapping.toDto(sysuserroleService.getDraft(new SysUserRole())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Update-all')")
@ApiOperation(value = "Update", tags = {"SysUserRole" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SysUserRole" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sysuserroles/{sysuserrole_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sysuserroles/{sysuserrole_id}")
@Transactional
public ResponseEntity<SysUserRoleDTO> update(@PathVariable("sysuserrole_id") String sysuserrole_id, @RequestBody SysUserRoleDTO sysuserroledto) { public ResponseEntity<SysUserRoleDTO> update(@PathVariable("sysuserrole_id") String sysuserrole_id, @RequestBody SysUserRoleDTO sysuserroledto) {
SysUserRole domain = sysuserroleMapping.toDomain(sysuserroledto); SysUserRole domain = sysuserroleMapping.toDomain(sysuserroledto);
domain .setUserroleid(sysuserrole_id); domain .setUserroleid(sysuserrole_id);
...@@ -70,7 +69,6 @@ public class SysUserRoleResource { ...@@ -70,7 +69,6 @@ public class SysUserRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SysUserRole" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SysUserRole" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sysuserroles/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sysuserroles/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysUserRoleDTO> sysuserroledtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysUserRoleDTO> sysuserroledtos) {
...@@ -78,15 +76,13 @@ public class SysUserRoleResource { ...@@ -78,15 +76,13 @@ public class SysUserRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SysUserRole" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SysUserRole" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysuserroles/{sysuserrole_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sysuserroles/{sysuserrole_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("sysuserrole_id") String sysuserrole_id) { public ResponseEntity<Boolean> remove(@PathVariable("sysuserrole_id") String sysuserrole_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserroleService.remove(sysuserrole_id)); return ResponseEntity.status(HttpStatus.OK).body(sysuserroleService.remove(sysuserrole_id));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"SysUserRole" }, notes = "RemoveBatch") @ApiOperation(value = "RemoveBatch", tags = {"SysUserRole" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysuserroles/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/sysuserroles/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -94,10 +90,9 @@ public class SysUserRoleResource { ...@@ -94,10 +90,9 @@ public class SysUserRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Create-all')")
@ApiOperation(value = "Create", tags = {"SysUserRole" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SysUserRole" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles") @RequestMapping(method = RequestMethod.POST, value = "/sysuserroles")
@Transactional
public ResponseEntity<SysUserRoleDTO> create(@RequestBody SysUserRoleDTO sysuserroledto) { public ResponseEntity<SysUserRoleDTO> create(@RequestBody SysUserRoleDTO sysuserroledto) {
SysUserRole domain = sysuserroleMapping.toDomain(sysuserroledto); SysUserRole domain = sysuserroleMapping.toDomain(sysuserroledto);
sysuserroleService.create(domain); sysuserroleService.create(domain);
...@@ -105,7 +100,6 @@ public class SysUserRoleResource { ...@@ -105,7 +100,6 @@ public class SysUserRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Create-all')")
@ApiOperation(value = "createBatch", tags = {"SysUserRole" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SysUserRole" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/batch") @RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SysUserRoleDTO> sysuserroledtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SysUserRoleDTO> sysuserroledtos) {
...@@ -113,7 +107,6 @@ public class SysUserRoleResource { ...@@ -113,7 +107,6 @@ public class SysUserRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Get-all')")
@ApiOperation(value = "Get", tags = {"SysUserRole" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SysUserRole" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sysuserroles/{sysuserrole_id}") @RequestMapping(method = RequestMethod.GET, value = "/sysuserroles/{sysuserrole_id}")
public ResponseEntity<SysUserRoleDTO> get(@PathVariable("sysuserrole_id") String sysuserrole_id) { public ResponseEntity<SysUserRoleDTO> get(@PathVariable("sysuserrole_id") String sysuserrole_id) {
...@@ -122,14 +115,12 @@ public class SysUserRoleResource { ...@@ -122,14 +115,12 @@ public class SysUserRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Save-all')")
@ApiOperation(value = "Save", tags = {"SysUserRole" }, notes = "Save") @ApiOperation(value = "Save", tags = {"SysUserRole" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/save") @RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/save")
public ResponseEntity<Boolean> save(@RequestBody SysUserRoleDTO sysuserroledto) { public ResponseEntity<Boolean> save(@RequestBody SysUserRoleDTO sysuserroledto) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserroleService.save(sysuserroleMapping.toDomain(sysuserroledto))); return ResponseEntity.status(HttpStatus.OK).body(sysuserroleService.save(sysuserroleMapping.toDomain(sysuserroledto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"SysUserRole" }, notes = "SaveBatch") @ApiOperation(value = "SaveBatch", tags = {"SysUserRole" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/sysuserroles/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<SysUserRoleDTO> sysuserroledtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<SysUserRoleDTO> sysuserroledtos) {
...@@ -137,7 +128,6 @@ public class SysUserRoleResource { ...@@ -137,7 +128,6 @@ public class SysUserRoleResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SysUserRole" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SysUserRole" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysuserroles/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sysuserroles/fetchdefault")
public ResponseEntity<List<SysUserRoleDTO>> fetchDefault(SysUserRoleSearchContext context) { public ResponseEntity<List<SysUserRoleDTO>> fetchDefault(SysUserRoleSearchContext context) {
...@@ -150,7 +140,6 @@ public class SysUserRoleResource { ...@@ -150,7 +140,6 @@ public class SysUserRoleResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-SysUserRole-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SysUserRole" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SysUserRole" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sysuserroles/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sysuserroles/searchdefault")
public ResponseEntity<Page<SysUserRoleDTO>> searchDefault(@RequestBody SysUserRoleSearchContext context) { public ResponseEntity<Page<SysUserRoleDTO>> searchDefault(@RequestBody SysUserRoleSearchContext context) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册