提交 1d3bc849 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 408b2cfe
...@@ -1070,7 +1070,7 @@ export default class IBZDeptMemberGridViewBase extends Vue { ...@@ -1070,7 +1070,7 @@ export default class IBZDeptMemberGridViewBase extends Vue {
'resAppKey':'userid'}, 'resAppKey':'userid'},
{view:{viewname:'ibzdepartment-mpickup-view',height: 0,width: 0,title: '部门数据多项选择视图'}, {view:{viewname:'ibzdepartment-mpickup-view',height: 0,width: 0,title: '部门数据多项选择视图'},
res:['IBZDepartment'], res:['IBZDepartment'],
'resAppKey':''} 'resAppKey':'userid'}
]; ];
if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){ if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' }); this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
...@@ -1128,9 +1128,9 @@ export default class IBZDeptMemberGridViewBase extends Vue { ...@@ -1128,9 +1128,9 @@ export default class IBZDeptMemberGridViewBase extends Vue {
Object.assign(curViewParam,args[0]); Object.assign(curViewParam,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(curViewParam.ibzemployee && true){ if(curViewParam.ibzdepartment && true){
deResParameters = [ deResParameters = [
{ pathName: 'ibzemployees', parameterName: 'ibzemployee' }, { pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
......
...@@ -449,6 +449,21 @@ const router = new Router({ ...@@ -449,6 +449,21 @@ const router = new Router({
}, },
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'), component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
}, },
{
path: 'ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
caption: 'entities.ibzdeptmember.views.gridview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{ {
path: 'ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?', path: 'ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: { meta: {
...@@ -478,6 +493,20 @@ const router = new Router({ ...@@ -478,6 +493,20 @@ const router = new Router({
}, },
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'), component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
}, },
{
path: 'ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
caption: 'entities.ibzdeptmember.views.gridview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{ {
path: 'ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?', path: 'ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: { meta: {
...@@ -1049,6 +1078,21 @@ const router = new Router({ ...@@ -1049,6 +1078,21 @@ const router = new Router({
}, },
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'), component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
}, },
{
path: 'ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
caption: 'entities.ibzdeptmember.views.editview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ 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?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?', path: 'ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: { meta: {
...@@ -1078,6 +1122,20 @@ const router = new Router({ ...@@ -1078,6 +1122,20 @@ const router = new Router({
}, },
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'), component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
}, },
{
path: 'ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
caption: 'entities.ibzdeptmember.views.editview.caption',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{ {
path: 'ibzdeptmembers/:ibzdeptmember?/editview/:editview?', path: 'ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: { meta: {
...@@ -1529,6 +1587,20 @@ const router = new Router({ ...@@ -1529,6 +1587,20 @@ const router = new Router({
}, },
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'), component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
}, },
{
path: '/ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
caption: 'entities.ibzdeptmember.views.gridview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{ {
path: '/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?', path: '/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: { meta: {
...@@ -1556,6 +1628,19 @@ const router = new Router({ ...@@ -1556,6 +1628,19 @@ const router = new Router({
}, },
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'), component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
}, },
{
path: '/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: {
caption: 'entities.ibzdeptmember.views.gridview.caption',
parameters: [
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'),
},
{ {
path: '/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?', path: '/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?',
meta: { meta: {
...@@ -2047,6 +2132,20 @@ const router = new Router({ ...@@ -2047,6 +2132,20 @@ const router = new Router({
}, },
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'), component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
}, },
{
path: '/ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
caption: 'entities.ibzdeptmember.views.editview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ 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?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?', path: '/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: { meta: {
...@@ -2074,6 +2173,19 @@ const router = new Router({ ...@@ -2074,6 +2173,19 @@ const router = new Router({
}, },
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'), component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
}, },
{
path: '/ibzdepartments/:ibzdepartment?/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: {
caption: 'entities.ibzdeptmember.views.editview.caption',
parameters: [
{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
{ pathName: 'ibzdeptmembers', parameterName: 'ibzdeptmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'),
},
{ {
path: '/ibzdeptmembers/:ibzdeptmember?/editview/:editview?', path: '/ibzdeptmembers/:ibzdeptmember?/editview/:editview?',
meta: { meta: {
......
...@@ -83,9 +83,25 @@ export default class IBZDepartmentServiceBase extends EntityService { ...@@ -83,9 +83,25 @@ export default class IBZDepartmentServiceBase extends EntityService {
} }
} }
masterData.ibzemployees = ibzemployeesData; masterData.ibzemployees = ibzemployeesData;
let ibzdeptmembersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers'),'undefined')){
ibzdeptmembersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers') as any);
if(ibzdeptmembersData && ibzdeptmembersData.length && ibzdeptmembersData.length > 0){
ibzdeptmembersData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.memberid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.ibzdeptmembers = ibzdeptmembersData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibzdepartments/${context.ibzdepartment}/save`,data,isloading); let res:any = await Http.getInstance().post(`/ibzdepartments/${context.ibzdepartment}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees)); this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees));
this.tempStorage.setItem(context.srfsessionkey+'_ibzdeptmembers',JSON.stringify(res.data.ibzdeptmembers));
return res; return res;
} }
...@@ -104,6 +120,7 @@ export default class IBZDepartmentServiceBase extends EntityService { ...@@ -104,6 +120,7 @@ export default class IBZDepartmentServiceBase extends EntityService {
} }
let res:any = await Http.getInstance().get(`/ibzdepartments/${context.ibzdepartment}`,isloading); let res:any = await Http.getInstance().get(`/ibzdepartments/${context.ibzdepartment}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees)); this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees));
this.tempStorage.setItem(context.srfsessionkey+'_ibzdeptmembers',JSON.stringify(res.data.ibzdeptmembers));
return res; return res;
} }
...@@ -170,9 +187,25 @@ export default class IBZDepartmentServiceBase extends EntityService { ...@@ -170,9 +187,25 @@ export default class IBZDepartmentServiceBase extends EntityService {
} }
} }
masterData.ibzemployees = ibzemployeesData; masterData.ibzemployees = ibzemployeesData;
let ibzdeptmembersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers'),'undefined')){
ibzdeptmembersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers') as any);
if(ibzdeptmembersData && ibzdeptmembersData.length && ibzdeptmembersData.length > 0){
ibzdeptmembersData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.memberid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.ibzdeptmembers = ibzdeptmembersData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/ibzdepartments/${context.ibzdepartment}`,data,isloading); let res:any = await Http.getInstance().put(`/ibzdepartments/${context.ibzdepartment}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees)); this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees));
this.tempStorage.setItem(context.srfsessionkey+'_ibzdeptmembers',JSON.stringify(res.data.ibzdeptmembers));
return res; return res;
} }
...@@ -211,6 +244,21 @@ export default class IBZDepartmentServiceBase extends EntityService { ...@@ -211,6 +244,21 @@ export default class IBZDepartmentServiceBase extends EntityService {
} }
} }
masterData.ibzemployees = ibzemployeesData; masterData.ibzemployees = ibzemployeesData;
let ibzdeptmembersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers'),'undefined')){
ibzdeptmembersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_ibzdeptmembers') as any);
if(ibzdeptmembersData && ibzdeptmembersData.length && ibzdeptmembersData.length > 0){
ibzdeptmembersData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.memberid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.ibzdeptmembers = ibzdeptmembersData;
Object.assign(data,masterData); Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){ if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null; data[this.APPDEKEY] = null;
...@@ -221,6 +269,7 @@ export default class IBZDepartmentServiceBase extends EntityService { ...@@ -221,6 +269,7 @@ export default class IBZDepartmentServiceBase extends EntityService {
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/ibzdepartments`,data,isloading); let res:any = await Http.getInstance().post(`/ibzdepartments`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees)); this.tempStorage.setItem(tempContext.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees));
this.tempStorage.setItem(tempContext.srfsessionkey+'_ibzdeptmembers',JSON.stringify(res.data.ibzdeptmembers));
return res; return res;
} }
...@@ -240,6 +289,7 @@ export default class IBZDepartmentServiceBase extends EntityService { ...@@ -240,6 +289,7 @@ export default class IBZDepartmentServiceBase extends EntityService {
let res:any = await Http.getInstance().get(`/ibzdepartments/getdraft`,isloading); let res:any = await Http.getInstance().get(`/ibzdepartments/getdraft`,isloading);
res.data.ibzdepartment = data.ibzdepartment; res.data.ibzdepartment = data.ibzdepartment;
this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees)); this.tempStorage.setItem(context.srfsessionkey+'_ibzemployees',JSON.stringify(res.data.ibzemployees));
this.tempStorage.setItem(context.srfsessionkey+'_ibzdeptmembers',JSON.stringify(res.data.ibzdeptmembers));
return res; return res;
} }
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
paramItem='ibzemployee' paramItem='ibzemployee'
:parentdata='{"srfparentdefname":"USERID","srfparentdename":"IBZEMP","SRFPARENTTYPE":"DER1N","srfparentmode":"DER1N_IBZDEPTMEMBER_IBZEMP_USERID","SRFDER1NID":"DER1N_IBZDEPTMEMBER_IBZEMP_USERID"}' :parentdata='{"srfparentdefname":"USERID","srfparentdename":"IBZEMP","SRFPARENTTYPE":"DER1N","srfparentmode":"DER1N_IBZDEPTMEMBER_IBZEMP_USERID","SRFDER1NID":"DER1N_IBZDEPTMEMBER_IBZEMP_USERID"}'
:parameters="[ :parameters="[
{ pathName: 'ibzemployees', parameterName: 'ibzemployee' }, { pathName: 'ibzdepartments', parameterName: 'ibzdepartment' },
]" ]"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
......
...@@ -21,7 +21,7 @@ zuul: ...@@ -21,7 +21,7 @@ zuul:
stripPrefix: false stripPrefix: false
wf_user: wf_user:
path: /wfusers/** path: /wfusers/**
serviceId: ibzrt-api serviceId: ibzwf-api
stripPrefix: false stripPrefix: false
ibzorg: ibzorg:
path: /ibzorganizations/** path: /ibzorganizations/**
...@@ -29,7 +29,7 @@ zuul: ...@@ -29,7 +29,7 @@ zuul:
stripPrefix: false stripPrefix: false
wf_group: wf_group:
path: /wfgroups/** path: /wfgroups/**
serviceId: ibzrt-api serviceId: ibzwf-api
stripPrefix: false stripPrefix: false
wf_model: wf_model:
path: /wfremodels/** path: /wfremodels/**
......
...@@ -52,6 +52,14 @@ zuul: ...@@ -52,6 +52,14 @@ zuul:
path: /sys_users/** path: /sys_users/**
serviceId: ibzuaa-api serviceId: ibzuaa-api
stripPrefix: false stripPrefix: false
wf_user:
path: /wf_users/**
serviceId: ibzwf-api
stripPrefix: false
wf_group:
path: /wf_groups/**
serviceId: ibzwf-api
stripPrefix: false
ibzdict: ibzdict:
path: /ibzdicts/** path: /ibzdicts/**
serviceId: ibzdict-api serviceId: ibzdict-api
......
package cn.ibizlab.core.workflow.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.workflow.domain.WFGroup;
import cn.ibizlab.core.workflow.filter.WFGroupSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[WFGroup] 服务对象接口
*/
@Component
public class WFGroupFallback implements WFGroupFeignClient{
public Page<WFGroup> select(){
return null;
}
public Boolean remove(String id){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public Boolean save(WFGroup wfgroup){
return false;
}
public Boolean saveBatch(List<WFGroup> wfgroups){
return false;
}
public WFGroup get(String id){
return null;
}
public WFGroup create(WFGroup wfgroup){
return null;
}
public Boolean createBatch(List<WFGroup> wfgroups){
return false;
}
public WFGroup getDraft(){
return null;
}
public Boolean checkKey(WFGroup wfgroup){
return false;
}
public WFGroup update(String id, WFGroup wfgroup){
return null;
}
public Boolean updateBatch(List<WFGroup> wfgroups){
return false;
}
public Page<WFGroup> searchDefault(WFGroupSearchContext context){
return null;
}
}
package cn.ibizlab.core.workflow.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.workflow.domain.WFGroup;
import cn.ibizlab.core.workflow.filter.WFGroupSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[WFGroup] 服务对象接口
*/
@FeignClient(value = "ibzwf-api", contextId = "WFGroup", fallback = WFGroupFallback.class)
public interface WFGroupFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/select")
Page<WFGroup> select();
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/{id}")
Boolean remove(@PathVariable("id") String id);
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/save")
Boolean save(@RequestBody WFGroup wfgroup);
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/save")
Boolean saveBatch(@RequestBody List<WFGroup> wfgroups);
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/{id}")
WFGroup get(@PathVariable("id") String id);
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups")
WFGroup create(@RequestBody WFGroup wfgroup);
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/batch")
Boolean createBatch(@RequestBody List<WFGroup> wfgroups);
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/getdraft")
WFGroup getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/checkkey")
Boolean checkKey(@RequestBody WFGroup wfgroup);
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/{id}")
WFGroup update(@PathVariable("id") String id,@RequestBody WFGroup wfgroup);
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/batch")
Boolean updateBatch(@RequestBody List<WFGroup> wfgroups);
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/searchdefault")
Page<WFGroup> searchDefault(@RequestBody WFGroupSearchContext context);
}
package cn.ibizlab.core.workflow.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.workflow.domain.WFUser;
import cn.ibizlab.core.workflow.filter.WFUserSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[WFUser] 服务对象接口
*/
@Component
public class WFUserFallback implements WFUserFeignClient{
public Page<WFUser> select(){
return null;
}
public WFUser update(String id, WFUser wfuser){
return null;
}
public Boolean updateBatch(List<WFUser> wfusers){
return false;
}
public WFUser getDraft(){
return null;
}
public WFUser get(String id){
return null;
}
public WFUser create(WFUser wfuser){
return null;
}
public Boolean createBatch(List<WFUser> wfusers){
return false;
}
public Boolean checkKey(WFUser wfuser){
return false;
}
public Boolean save(WFUser wfuser){
return false;
}
public Boolean saveBatch(List<WFUser> wfusers){
return false;
}
public Boolean remove(String id){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public Page<WFUser> searchDefault(WFUserSearchContext context){
return null;
}
}
package cn.ibizlab.core.workflow.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.workflow.domain.WFUser;
import cn.ibizlab.core.workflow.filter.WFUserSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[WFUser] 服务对象接口
*/
@FeignClient(value = "ibzwf-api", contextId = "WFUser", fallback = WFUserFallback.class)
public interface WFUserFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/select")
Page<WFUser> select();
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/{id}")
WFUser update(@PathVariable("id") String id,@RequestBody WFUser wfuser);
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/batch")
Boolean updateBatch(@RequestBody List<WFUser> wfusers);
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/getdraft")
WFUser getDraft();
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/{id}")
WFUser get(@PathVariable("id") String id);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers")
WFUser create(@RequestBody WFUser wfuser);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/batch")
Boolean createBatch(@RequestBody List<WFUser> wfusers);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/checkkey")
Boolean checkKey(@RequestBody WFUser wfuser);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/save")
Boolean save(@RequestBody WFUser wfuser);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/save")
Boolean saveBatch(@RequestBody List<WFUser> wfusers);
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{id}")
Boolean remove(@PathVariable("id") String id);
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/searchdefault")
Page<WFUser> searchDefault(@RequestBody WFUserSearchContext context);
}
...@@ -21,54 +21,48 @@ import java.io.Serializable; ...@@ -21,54 +21,48 @@ 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 = "IBZWFGROUP",resultMap = "WFGroupResultMap") public class WFGroup extends EntityClient implements Serializable {
public class WFGroup extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 组标识 * 组标识
*/ */
@DEField(name = "groupid" , isKeyField=true) @DEField(name = "groupid" , isKeyField=true)
@TableId(value= "groupid",type=IdType.UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
/** /**
* 组名称 * 组名称
*/ */
@DEField(name = "groupname") @DEField(name = "groupname")
@TableField(value = "groupname")
@JSONField(name = "name") @JSONField(name = "name")
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
/** /**
* 范围 * 范围
*/ */
@TableField(value = "groupscope")
@JSONField(name = "groupscope") @JSONField(name = "groupscope")
@JsonProperty("groupscope") @JsonProperty("groupscope")
private String groupscope; private String groupscope;
/** /**
* 成员 * 成员
*/ */
@JsonIgnore @JSONField(name = "wfmembers")
@JSONField(serialize = false) @JsonProperty("wfmembers")
@TableField(exist = false)
private List<cn.ibizlab.core.workflow.domain.WFMember> wfmember; private List<cn.ibizlab.core.workflow.domain.WFMember> wfmember;
/** /**
* 设置 [组名称] * 设置 [组名称]
*/ */
......
...@@ -21,47 +21,42 @@ import java.io.Serializable; ...@@ -21,47 +21,42 @@ 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 = "WFUserResultMap") public class WFUser extends EntityClient implements Serializable {
public class WFUser extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 用户标识 * 用户标识
*/ */
@DEField(name = "userid" , isKeyField=true) @DEField(name = "userid" , isKeyField=true)
@TableId(value= "userid",type=IdType.UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
/** /**
* 用户全局名 * 用户全局名
*/ */
@DEField(name = "username") @DEField(name = "username")
@TableField(value = "username")
@JSONField(name = "firstname") @JSONField(name = "firstname")
@JsonProperty("firstname") @JsonProperty("firstname")
private String firstname; private String firstname;
/** /**
* 用户名称 * 用户名称
*/ */
@DEField(name = "personname") @DEField(name = "personname")
@TableField(value = "personname")
@JSONField(name = "displayname") @JSONField(name = "displayname")
@JsonProperty("displayname") @JsonProperty("displayname")
private String displayname; private String displayname;
/** /**
* 设置 [用户全局名] * 设置 [用户全局名]
*/ */
......
...@@ -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.workflow.domain.WFGroup;
/** /**
* 关系型数据实体[WFGroup] 查询条件对象 * ServiceApi数据实体[WFGroup] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class WFGroupSearchContext extends QueryWrapperContext<WFGroup> { public class WFGroupSearchContext extends SearchContextBase {
private String n_groupname_like;//[组名称] private String n_groupname_like;//[组名称]
public void setN_groupname_like(String n_groupname_like) {
this.n_groupname_like = n_groupname_like;
if(!ObjectUtils.isEmpty(this.n_groupname_like)){
this.getSelectCond().like("groupname", n_groupname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().or().like("groupname",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.workflow.domain.WFUser;
/** /**
* 关系型数据实体[WFUser] 查询条件对象 * ServiceApi数据实体[WFUser] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class WFUserSearchContext extends QueryWrapperContext<WFUser> { public class WFUserSearchContext 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);
}
}
/**
* 启用快速搜索
*/
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.workflow.domain.WFGroup; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.workflow.domain.WFGroup;
import cn.ibizlab.core.workflow.filter.WFGroupSearchContext; import cn.ibizlab.core.workflow.filter.WFGroupSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[WFGroup] 服务对象接口 * 实体[WFGroup] 服务对象接口
*/ */
public interface IWFGroupService extends IService<WFGroup>{ public interface IWFGroupService{
boolean remove(String key) ; boolean remove(String key) ;
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList) ;
...@@ -37,22 +35,8 @@ public interface IWFGroupService extends IService<WFGroup>{ ...@@ -37,22 +35,8 @@ public interface IWFGroupService extends IService<WFGroup>{
boolean update(WFGroup et) ; boolean update(WFGroup et) ;
void updateBatch(List<WFGroup> list) ; void updateBatch(List<WFGroup> list) ;
Page<WFGroup> searchDefault(WFGroupSearchContext context) ; Page<WFGroup> searchDefault(WFGroupSearchContext 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.workflow.domain.WFUser; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.workflow.domain.WFUser;
import cn.ibizlab.core.workflow.filter.WFUserSearchContext; import cn.ibizlab.core.workflow.filter.WFUserSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[WFUser] 服务对象接口 * 实体[WFUser] 服务对象接口
*/ */
public interface IWFUserService extends IService<WFUser>{ public interface IWFUserService{
boolean update(WFUser et) ; boolean update(WFUser et) ;
void updateBatch(List<WFUser> list) ; void updateBatch(List<WFUser> list) ;
...@@ -37,22 +35,8 @@ public interface IWFUserService extends IService<WFUser>{ ...@@ -37,22 +35,8 @@ public interface IWFUserService extends IService<WFUser>{
boolean remove(String key) ; boolean remove(String key) ;
void removeBatch(Collection<String> idList) ; void removeBatch(Collection<String> idList) ;
Page<WFUser> searchDefault(WFUserSearchContext context) ; Page<WFUser> searchDefault(WFUserSearchContext 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,160 +30,103 @@ import cn.ibizlab.core.workflow.service.IWFGroupService; ...@@ -30,160 +30,103 @@ import cn.ibizlab.core.workflow.service.IWFGroupService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.workflow.client.WFGroupFeignClient;
import cn.ibizlab.core.workflow.mapper.WFGroupMapper;
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("WFGroupServiceImpl") @Service
public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> implements IWFGroupService { public class WFGroupServiceImpl implements IWFGroupService {
@Autowired @Autowired
@Lazy WFGroupFeignClient wFGroupFeignClient;
private cn.ibizlab.core.workflow.service.IWFMemberService wfmemberService;
private int batchSize = 500;
@Override @Override
@Transactional public boolean remove(String id) {
public boolean remove(String key) { boolean result=wFGroupFeignClient.remove(id) ;
wfmemberService.removeByGroupid(key) ; return result;
boolean result=removeById(key);
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) { wFGroupFeignClient.removeBatch(idList);
removeByIds(idList);
} }
@Override @Override
@Transactional @Transactional
public boolean save(WFGroup et) { public boolean save(WFGroup et) {
if(!saveOrUpdate(et)) if(et.getId()==null) et.setId((String)et.getDefaultKey(true));
if(!wFGroupFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(WFGroup et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<WFGroup> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override @Override
public void saveBatch(List<WFGroup> list) { public void saveBatch(List<WFGroup> list) {
saveOrUpdateBatch(list,batchSize); wFGroupFeignClient.saveBatch(list) ;
} }
@Override @Override
@Transactional public WFGroup get(String id) {
public WFGroup get(String key) { WFGroup et=wFGroupFeignClient.get(id);
WFGroup et = getById(key);
if(et==null){ if(et==null){
et=new WFGroup(); et=new WFGroup();
et.setId(key); et.setId(id);
} }
else{ else{
et.setWfmember(wfmemberService.selectByGroupid(key));
} }
return et; return et;
} }
@Override @Override
@Transactional
public boolean create(WFGroup et) { public boolean create(WFGroup et) {
if(!this.retBool(this.baseMapper.insert(et))) WFGroup rt = wFGroupFeignClient.create(et);
if(rt==null)
return false; return false;
wfmemberService.saveByGroupid(et.getId(),et.getWfmember()); CachedBeanCopier.copy(rt,et);
CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
@Override public void createBatch(List<WFGroup> list){
public void createBatch(List<WFGroup> list) { wFGroupFeignClient.createBatch(list) ;
this.saveBatch(list,batchSize);
} }
@Override @Override
public WFGroup getDraft(WFGroup et) { public WFGroup getDraft(WFGroup et) {
et=wFGroupFeignClient.getDraft();
return et; return et;
} }
@Override @Override
public boolean checkKey(WFGroup et) { public boolean checkKey(WFGroup et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return wFGroupFeignClient.checkKey(et);
} }
@Override @Override
@Transactional
public boolean update(WFGroup et) { public boolean update(WFGroup et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("groupid",et.getId()))) WFGroup rt = wFGroupFeignClient.update(et.getId(),et);
if(rt==null)
return false; return false;
wfmemberService.saveByGroupid(et.getId(),et.getWfmember()); CachedBeanCopier.copy(rt,et);
CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
@Override public void updateBatch(List<WFGroup> list){
public void updateBatch(List<WFGroup> list) { wFGroupFeignClient.updateBatch(list) ;
updateBatchById(list,batchSize);
} }
/** /**
* 查询集合 DEFAULT * 查询集合 DEFAULT
*/ */
@Override @Override
public Page<WFGroup> searchDefault(WFGroupSearchContext context) { public Page<WFGroup> searchDefault(WFGroupSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFGroup> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<WFGroup> wFGroups=wFGroupFeignClient.searchDefault(context);
return new PageImpl<WFGroup>(pages.getRecords(), context.getPageable(), pages.getTotal()); return wFGroups;
}
@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,119 +30,93 @@ import cn.ibizlab.core.workflow.service.IWFUserService; ...@@ -30,119 +30,93 @@ import cn.ibizlab.core.workflow.service.IWFUserService;
import cn.ibizlab.util.helper.CachedBeanCopier; import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.ibizlab.core.workflow.client.WFUserFeignClient;
import cn.ibizlab.core.workflow.mapper.WFUserMapper;
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("WFUserServiceImpl") @Service
public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> implements IWFUserService { public class WFUserServiceImpl implements IWFUserService {
@Autowired @Autowired
@Lazy WFUserFeignClient wFUserFeignClient;
private cn.ibizlab.core.workflow.service.IWFMemberService wfmemberService;
private int batchSize = 500;
@Override @Override
@Transactional
public boolean update(WFUser et) { public boolean update(WFUser et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("userid",et.getId()))) WFUser rt = wFUserFeignClient.update(et.getId(),et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void updateBatch(List<WFUser> list){
public void updateBatch(List<WFUser> list) { wFUserFeignClient.updateBatch(list) ;
updateBatchById(list,batchSize);
} }
@Override @Override
public WFUser getDraft(WFUser et) { public WFUser getDraft(WFUser et) {
et=wFUserFeignClient.getDraft();
return et; return et;
} }
@Override @Override
@Transactional public WFUser get(String id) {
public WFUser get(String key) { WFUser et=wFUserFeignClient.get(id);
WFUser et = getById(key);
if(et==null){ if(et==null){
et=new WFUser(); et=new WFUser();
et.setId(key); et.setId(id);
} }
else{ else{
} }
return et; return et;
} }
@Override @Override
@Transactional
public boolean create(WFUser et) { public boolean create(WFUser et) {
if(!this.retBool(this.baseMapper.insert(et))) WFUser rt = wFUserFeignClient.create(et);
if(rt==null)
return false; return false;
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(rt,et);
return true; return true;
} }
@Override public void createBatch(List<WFUser> list){
public void createBatch(List<WFUser> list) { wFUserFeignClient.createBatch(list) ;
this.saveBatch(list,batchSize);
} }
@Override @Override
public boolean checkKey(WFUser et) { public boolean checkKey(WFUser et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return wFUserFeignClient.checkKey(et);
} }
@Override @Override
@Transactional @Transactional
public boolean save(WFUser et) { public boolean save(WFUser et) {
if(!saveOrUpdate(et)) if(et.getId()==null) et.setId((String)et.getDefaultKey(true));
if(!wFUserFeignClient.save(et))
return false; return false;
return true; return true;
} }
@Override @Override
@Transactional( public void saveBatch(List<WFUser> list) {
rollbackFor = {Exception.class} wFUserFeignClient.saveBatch(list) ;
)
public boolean saveOrUpdate(WFUser et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
} }
@Override @Override
public boolean saveBatch(Collection<WFUser> list) { public boolean remove(String id) {
saveOrUpdateBatch(list,batchSize); boolean result=wFUserFeignClient.remove(id) ;
return true; return result;
} }
@Override public void removeBatch(Collection<String> idList){
public void saveBatch(List<WFUser> list) { wFUserFeignClient.removeBatch(idList);
saveOrUpdateBatch(list,batchSize);
} }
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
...@@ -151,35 +125,8 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme ...@@ -151,35 +125,8 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
*/ */
@Override @Override
public Page<WFUser> searchDefault(WFUserSearchContext context) { public Page<WFUser> searchDefault(WFUserSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFUser> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); Page<WFUser> wFUsers=wFUserFeignClient.searchDefault(context);
return new PageImpl<WFUser>(pages.getRecords(), context.getPageable(), pages.getTotal()); return wFUsers;
}
@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;
} }
......
...@@ -29,18 +29,6 @@ ...@@ -29,18 +29,6 @@
<!--输出实体[WF_GROUP]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-wf_group-3-1">
<createTable tableName="IBZWFGROUP">
<column name="GROUPID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_WF_GROUP_GROUPID"/>
</column>
<column name="GROUPNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="GROUPSCOPE" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
...@@ -60,6 +48,5 @@ ...@@ -60,6 +48,5 @@
<!--输出实体[WF_GROUP]外键关系 -->
</databaseChangeLog> </databaseChangeLog>
...@@ -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 WFGroupResource { ...@@ -46,15 +46,13 @@ public class WFGroupResource {
@Lazy @Lazy
public WFGroupMapping wfgroupMapping; public WFGroupMapping wfgroupMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFGroup" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"WFGroup" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/{wfgroup_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/{wfgroup_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfgroup_id") String wfgroup_id) { public ResponseEntity<Boolean> remove(@PathVariable("wfgroup_id") String wfgroup_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.remove(wfgroup_id)); return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.remove(wfgroup_id));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"WFGroup" }, notes = "RemoveBatch") @ApiOperation(value = "RemoveBatch", tags = {"WFGroup" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/wfgroups/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -62,14 +60,12 @@ public class WFGroupResource { ...@@ -62,14 +60,12 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Save-all')")
@ApiOperation(value = "Save", tags = {"WFGroup" }, notes = "Save") @ApiOperation(value = "Save", tags = {"WFGroup" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/save") @RequestMapping(method = RequestMethod.POST, value = "/wfgroups/save")
public ResponseEntity<Boolean> save(@RequestBody WFGroupDTO wfgroupdto) { public ResponseEntity<Boolean> save(@RequestBody WFGroupDTO wfgroupdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.save(wfgroupMapping.toDomain(wfgroupdto))); return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.save(wfgroupMapping.toDomain(wfgroupdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"WFGroup" }, notes = "SaveBatch") @ApiOperation(value = "SaveBatch", tags = {"WFGroup" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/wfgroups/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
...@@ -77,7 +73,6 @@ public class WFGroupResource { ...@@ -77,7 +73,6 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Get-all')")
@ApiOperation(value = "Get", tags = {"WFGroup" }, notes = "Get") @ApiOperation(value = "Get", tags = {"WFGroup" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/wfgroups/{wfgroup_id}") @RequestMapping(method = RequestMethod.GET, value = "/wfgroups/{wfgroup_id}")
public ResponseEntity<WFGroupDTO> get(@PathVariable("wfgroup_id") String wfgroup_id) { public ResponseEntity<WFGroupDTO> get(@PathVariable("wfgroup_id") String wfgroup_id) {
...@@ -86,10 +81,9 @@ public class WFGroupResource { ...@@ -86,10 +81,9 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Create-all')")
@ApiOperation(value = "Create", tags = {"WFGroup" }, notes = "Create") @ApiOperation(value = "Create", tags = {"WFGroup" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups") @RequestMapping(method = RequestMethod.POST, value = "/wfgroups")
@Transactional
public ResponseEntity<WFGroupDTO> create(@RequestBody WFGroupDTO wfgroupdto) { public ResponseEntity<WFGroupDTO> create(@RequestBody WFGroupDTO wfgroupdto) {
WFGroup domain = wfgroupMapping.toDomain(wfgroupdto); WFGroup domain = wfgroupMapping.toDomain(wfgroupdto);
wfgroupService.create(domain); wfgroupService.create(domain);
...@@ -97,7 +91,6 @@ public class WFGroupResource { ...@@ -97,7 +91,6 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFGroup" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"WFGroup" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfgroups/batch") @RequestMapping(method = RequestMethod.POST, value = "/wfgroups/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
...@@ -117,10 +110,9 @@ public class WFGroupResource { ...@@ -117,10 +110,9 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.checkKey(wfgroupMapping.toDomain(wfgroupdto))); return ResponseEntity.status(HttpStatus.OK).body(wfgroupService.checkKey(wfgroupMapping.toDomain(wfgroupdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Update-all')")
@ApiOperation(value = "Update", tags = {"WFGroup" }, notes = "Update") @ApiOperation(value = "Update", tags = {"WFGroup" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/{wfgroup_id}") @RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/{wfgroup_id}")
@Transactional
public ResponseEntity<WFGroupDTO> update(@PathVariable("wfgroup_id") String wfgroup_id, @RequestBody WFGroupDTO wfgroupdto) { public ResponseEntity<WFGroupDTO> update(@PathVariable("wfgroup_id") String wfgroup_id, @RequestBody WFGroupDTO wfgroupdto) {
WFGroup domain = wfgroupMapping.toDomain(wfgroupdto); WFGroup domain = wfgroupMapping.toDomain(wfgroupdto);
domain .setId(wfgroup_id); domain .setId(wfgroup_id);
...@@ -129,7 +121,6 @@ public class WFGroupResource { ...@@ -129,7 +121,6 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFGroup" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"WFGroup" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/batch") @RequestMapping(method = RequestMethod.PUT, value = "/wfgroups/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFGroupDTO> wfgroupdtos) {
...@@ -137,7 +128,6 @@ public class WFGroupResource { ...@@ -137,7 +128,6 @@ public class WFGroupResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFGroup" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"WFGroup" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfgroups/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/wfgroups/fetchdefault")
public ResponseEntity<List<WFGroupDTO>> fetchDefault(WFGroupSearchContext context) { public ResponseEntity<List<WFGroupDTO>> fetchDefault(WFGroupSearchContext context) {
...@@ -150,7 +140,6 @@ public class WFGroupResource { ...@@ -150,7 +140,6 @@ public class WFGroupResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFGroup-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFGroup" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"WFGroup" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/wfgroups/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/wfgroups/searchdefault")
public ResponseEntity<Page<WFGroupDTO>> searchDefault(@RequestBody WFGroupSearchContext context) { public ResponseEntity<Page<WFGroupDTO>> searchDefault(@RequestBody WFGroupSearchContext 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 WFUserResource { ...@@ -46,10 +46,9 @@ public class WFUserResource {
@Lazy @Lazy
public WFUserMapping wfuserMapping; public WFUserMapping wfuserMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Update-all')")
@ApiOperation(value = "Update", tags = {"WFUser" }, notes = "Update") @ApiOperation(value = "Update", tags = {"WFUser" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/{wfuser_id}") @RequestMapping(method = RequestMethod.PUT, value = "/wfusers/{wfuser_id}")
@Transactional
public ResponseEntity<WFUserDTO> update(@PathVariable("wfuser_id") String wfuser_id, @RequestBody WFUserDTO wfuserdto) { public ResponseEntity<WFUserDTO> update(@PathVariable("wfuser_id") String wfuser_id, @RequestBody WFUserDTO wfuserdto) {
WFUser domain = wfuserMapping.toDomain(wfuserdto); WFUser domain = wfuserMapping.toDomain(wfuserdto);
domain .setId(wfuser_id); domain .setId(wfuser_id);
...@@ -58,7 +57,6 @@ public class WFUserResource { ...@@ -58,7 +57,6 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"WFUser" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"WFUser" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/batch") @RequestMapping(method = RequestMethod.PUT, value = "/wfusers/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFUserDTO> wfuserdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
...@@ -72,7 +70,6 @@ public class WFUserResource { ...@@ -72,7 +70,6 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(wfuserMapping.toDto(wfuserService.getDraft(new WFUser()))); return ResponseEntity.status(HttpStatus.OK).body(wfuserMapping.toDto(wfuserService.getDraft(new WFUser())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Get-all')")
@ApiOperation(value = "Get", tags = {"WFUser" }, notes = "Get") @ApiOperation(value = "Get", tags = {"WFUser" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/{wfuser_id}") @RequestMapping(method = RequestMethod.GET, value = "/wfusers/{wfuser_id}")
public ResponseEntity<WFUserDTO> get(@PathVariable("wfuser_id") String wfuser_id) { public ResponseEntity<WFUserDTO> get(@PathVariable("wfuser_id") String wfuser_id) {
...@@ -81,10 +78,9 @@ public class WFUserResource { ...@@ -81,10 +78,9 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Create-all')")
@ApiOperation(value = "Create", tags = {"WFUser" }, notes = "Create") @ApiOperation(value = "Create", tags = {"WFUser" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers") @RequestMapping(method = RequestMethod.POST, value = "/wfusers")
@Transactional
public ResponseEntity<WFUserDTO> create(@RequestBody WFUserDTO wfuserdto) { public ResponseEntity<WFUserDTO> create(@RequestBody WFUserDTO wfuserdto) {
WFUser domain = wfuserMapping.toDomain(wfuserdto); WFUser domain = wfuserMapping.toDomain(wfuserdto);
wfuserService.create(domain); wfuserService.create(domain);
...@@ -92,7 +88,6 @@ public class WFUserResource { ...@@ -92,7 +88,6 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Create-all')")
@ApiOperation(value = "createBatch", tags = {"WFUser" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"WFUser" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/batch") @RequestMapping(method = RequestMethod.POST, value = "/wfusers/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFUserDTO> wfuserdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
...@@ -106,14 +101,12 @@ public class WFUserResource { ...@@ -106,14 +101,12 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(wfuserService.checkKey(wfuserMapping.toDomain(wfuserdto))); return ResponseEntity.status(HttpStatus.OK).body(wfuserService.checkKey(wfuserMapping.toDomain(wfuserdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Save-all')")
@ApiOperation(value = "Save", tags = {"WFUser" }, notes = "Save") @ApiOperation(value = "Save", tags = {"WFUser" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/save") @RequestMapping(method = RequestMethod.POST, value = "/wfusers/save")
public ResponseEntity<Boolean> save(@RequestBody WFUserDTO wfuserdto) { public ResponseEntity<Boolean> save(@RequestBody WFUserDTO wfuserdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfuserService.save(wfuserMapping.toDomain(wfuserdto))); return ResponseEntity.status(HttpStatus.OK).body(wfuserService.save(wfuserMapping.toDomain(wfuserdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"WFUser" }, notes = "SaveBatch") @ApiOperation(value = "SaveBatch", tags = {"WFUser" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/wfusers/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFUserDTO> wfuserdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFUserDTO> wfuserdtos) {
...@@ -121,15 +114,13 @@ public class WFUserResource { ...@@ -121,15 +114,13 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Remove-all')")
@ApiOperation(value = "Remove", tags = {"WFUser" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"WFUser" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{wfuser_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{wfuser_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("wfuser_id") String wfuser_id) { public ResponseEntity<Boolean> remove(@PathVariable("wfuser_id") String wfuser_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfuserService.remove(wfuser_id)); return ResponseEntity.status(HttpStatus.OK).body(wfuserService.remove(wfuser_id));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"WFUser" }, notes = "RemoveBatch") @ApiOperation(value = "RemoveBatch", tags = {"WFUser" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -137,7 +128,6 @@ public class WFUserResource { ...@@ -137,7 +128,6 @@ public class WFUserResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"WFUser" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"WFUser" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wfusers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/wfusers/fetchdefault")
public ResponseEntity<List<WFUserDTO>> fetchDefault(WFUserSearchContext context) { public ResponseEntity<List<WFUserDTO>> fetchDefault(WFUserSearchContext context) {
...@@ -150,7 +140,6 @@ public class WFUserResource { ...@@ -150,7 +140,6 @@ public class WFUserResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzrt-WFUser-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"WFUser" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"WFUser" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/wfusers/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/wfusers/searchdefault")
public ResponseEntity<Page<WFUserDTO>> searchDefault(@RequestBody WFUserSearchContext context) { public ResponseEntity<Page<WFUserDTO>> searchDefault(@RequestBody WFUserSearchContext context) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册