提交 967b2d95 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 87def190
...@@ -24,158 +24,96 @@ import org.springframework.data.annotation.Transient; ...@@ -24,158 +24,96 @@ import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit; import cn.ibizlab.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/** /**
* 实体[工作流任务] * [工作流任务] 对象
*/ */
@Builder
@Getter @Getter
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @AllArgsConstructor
@TableName(value = "IBZTASK",resultMap = "WFTaskResultMap") public class WFTask extends EntityBase implements Serializable {
public class WFTask extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 任务标识 * 任务标识
*/ */
@DEField(name = "taskid" , isKeyField=true) @DEField(name = "taskid" , isKeyField=true)
@TableId(value= "taskid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
/** /**
* 状态 * 状态
*/ */
@DEField(name = "taskname") @DEField(name = "taskname")
@TableField(value = "taskname")
@JSONField(name = "name") @JSONField(name = "name")
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
/** /**
* DefinitionId * DefinitionId
*/ */
@DEField(name = "definitionid") @DEField(name = "definitionid")
@TableField(value = "definitionid") @JSONField(name = "processDefinitionId")
@JSONField(name = "processdefinitionid") @JsonProperty("processDefinitionId")
@JsonProperty("processdefinitionid")
private String processdefinitionid; private String processdefinitionid;
/** /**
* DefinitionKey * DefinitionKey
*/ */
@DEField(name = "definitionkey") @DEField(name = "definitionkey")
@TableField(value = "definitionkey") @JSONField(name = "processDefinitionKey")
@JSONField(name = "processdefinitionkey") @JsonProperty("processDefinitionKey")
@JsonProperty("processdefinitionkey")
private String processdefinitionkey; private String processdefinitionkey;
/** /**
* 流程 * 流程
*/ */
@DEField(name = "definitionname") @DEField(name = "definitionname")
@TableField(value = "definitionname") @JSONField(name = "processDefinitionName")
@JSONField(name = "processdefinitionname") @JsonProperty("processDefinitionName")
@JsonProperty("processdefinitionname")
private String processdefinitionname; private String processdefinitionname;
/** /**
* TaskDefinitionKey * TaskDefinitionKey
*/ */
@TableField(value = "taskdefinitionkey") @JSONField(name = "taskDefinitionKey")
@JSONField(name = "taskdefinitionkey") @JsonProperty("taskDefinitionKey")
@JsonProperty("taskdefinitionkey")
private String taskdefinitionkey; private String taskdefinitionkey;
/** /**
* 待办事项 * 待办事项
*/ */
@TableField(value = "description")
@JSONField(name = "description") @JSONField(name = "description")
@JsonProperty("description") @JsonProperty("description")
private String description; private String description;
/** /**
* 发起时间 * 发起时间
*/ */
@TableField(value = "createtime")
@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 = "createtime" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createTime" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createtime") @JsonProperty("createTime")
private Timestamp createtime; private Timestamp createtime;
/** /**
* 实例标识 * 实例标识
*/ */
@DEField(name = "instanceid") @DEField(name = "instanceid")
@TableField(value = "instanceid") @JSONField(name = "processInstanceId")
@JSONField(name = "processinstanceid") @JsonProperty("processInstanceId")
@JsonProperty("processinstanceid")
private String processinstanceid; private String processinstanceid;
/** /**
* 业务键值 * 业务键值
*/ */
@DEField(name = "businesskey") @DEField(name = "businesskey")
@TableField(value = "businesskey") @JSONField(name = "processInstanceBusinessKey")
@JSONField(name = "processinstancebusinesskey") @JsonProperty("processInstanceBusinessKey")
@JsonProperty("processinstancebusinesskey")
private String processinstancebusinesskey; private String processinstancebusinesskey;
/**
* 设置 [状态]
*/
public void setName(String name){
this.name = name ;
this.modify("taskname",name);
}
/**
* 设置 [DefinitionId]
*/
public void setProcessdefinitionid(String processdefinitionid){
this.processdefinitionid = processdefinitionid ;
this.modify("definitionid",processdefinitionid);
}
/**
* 设置 [DefinitionKey]
*/
public void setProcessdefinitionkey(String processdefinitionkey){
this.processdefinitionkey = processdefinitionkey ;
this.modify("definitionkey",processdefinitionkey);
}
/**
* 设置 [流程]
*/
public void setProcessdefinitionname(String processdefinitionname){
this.processdefinitionname = processdefinitionname ;
this.modify("definitionname",processdefinitionname);
}
/**
* 设置 [TaskDefinitionKey]
*/
public void setTaskdefinitionkey(String taskdefinitionkey){
this.taskdefinitionkey = taskdefinitionkey ;
this.modify("taskdefinitionkey",taskdefinitionkey);
}
/**
* 设置 [待办事项]
*/
public void setDescription(String description){
this.description = description ;
this.modify("description",description);
}
/**
* 设置 [发起时间]
*/
public void setCreatetime(Timestamp createtime){
this.createtime = createtime ;
this.modify("createtime",createtime);
}
/** /**
* 格式化日期 [发起时间] * 格式化日期 [发起时间]
...@@ -187,23 +125,6 @@ public class WFTask extends EntityMP implements Serializable { ...@@ -187,23 +125,6 @@ public class WFTask extends EntityMP implements Serializable {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(createtime); return sdf.format(createtime);
} }
/**
* 设置 [实例标识]
*/
public void setProcessinstanceid(String processinstanceid){
this.processinstanceid = processinstanceid ;
this.modify("instanceid",processinstanceid);
}
/**
* 设置 [业务键值]
*/
public void setProcessinstancebusinesskey(String processinstancebusinesskey){
this.processinstancebusinesskey = processinstancebusinesskey ;
this.modify("businesskey",processinstancebusinesskey);
}
} }
...@@ -17,118 +17,42 @@ import org.springframework.util.ObjectUtils; ...@@ -17,118 +17,42 @@ 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.WFTask;
/** /**
* 关系型数据实体[WFTask] 查询条件对象 * ServiceApi数据实体[WFTask] 查询条件对象
*/ */
@Slf4j @Slf4j
@Data @Data
public class WFTaskSearchContext extends QueryWrapperContext<WFTask> { public class WFTaskSearchContext extends SearchContextBase {
private String n_taskname_like;//[状态] private String n_taskname_like;//[状态]
public void setN_taskname_like(String n_taskname_like) {
this.n_taskname_like = n_taskname_like;
if(!ObjectUtils.isEmpty(this.n_taskname_like)){
this.getSearchCond().like("taskname", n_taskname_like);
}
}
private String n_definitionid_eq;//[DefinitionId] private String n_definitionid_eq;//[DefinitionId]
public void setN_definitionid_eq(String n_definitionid_eq) {
this.n_definitionid_eq = n_definitionid_eq;
if(!ObjectUtils.isEmpty(this.n_definitionid_eq)){
this.getSearchCond().eq("definitionid", n_definitionid_eq);
}
}
private String n_definitionkey_eq;//[DefinitionKey] private String n_definitionkey_eq;//[DefinitionKey]
public void setN_definitionkey_eq(String n_definitionkey_eq) {
this.n_definitionkey_eq = n_definitionkey_eq;
if(!ObjectUtils.isEmpty(this.n_definitionkey_eq)){
this.getSearchCond().eq("definitionkey", n_definitionkey_eq);
}
}
private String n_definitionkey_leftlike;//[DefinitionKey] private String n_definitionkey_leftlike;//[DefinitionKey]
public void setN_definitionkey_leftlike(String n_definitionkey_leftlike) {
this.n_definitionkey_leftlike = n_definitionkey_leftlike;
if(!ObjectUtils.isEmpty(this.n_definitionkey_leftlike)){
this.getSearchCond().likeRight("definitionkey", n_definitionkey_leftlike);
}
}
private String n_definitionkey_like;//[DefinitionKey] private String n_definitionkey_like;//[DefinitionKey]
public void setN_definitionkey_like(String n_definitionkey_like) {
this.n_definitionkey_like = n_definitionkey_like;
if(!ObjectUtils.isEmpty(this.n_definitionkey_like)){
this.getSearchCond().like("definitionkey", n_definitionkey_like);
}
}
private String n_definitionname_like;//[流程] private String n_definitionname_like;//[流程]
public void setN_definitionname_like(String n_definitionname_like) {
this.n_definitionname_like = n_definitionname_like;
if(!ObjectUtils.isEmpty(this.n_definitionname_like)){
this.getSearchCond().like("definitionname", n_definitionname_like);
}
}
private String n_taskdefinitionkey_eq;//[TaskDefinitionKey] private String n_taskdefinitionkey_eq;//[TaskDefinitionKey]
public void setN_taskdefinitionkey_eq(String n_taskdefinitionkey_eq) {
this.n_taskdefinitionkey_eq = n_taskdefinitionkey_eq;
if(!ObjectUtils.isEmpty(this.n_taskdefinitionkey_eq)){
this.getSearchCond().eq("taskdefinitionkey", n_taskdefinitionkey_eq);
}
}
private String n_taskdefinitionkey_like;//[TaskDefinitionKey] private String n_taskdefinitionkey_like;//[TaskDefinitionKey]
public void setN_taskdefinitionkey_like(String n_taskdefinitionkey_like) {
this.n_taskdefinitionkey_like = n_taskdefinitionkey_like;
if(!ObjectUtils.isEmpty(this.n_taskdefinitionkey_like)){
this.getSearchCond().like("taskdefinitionkey", n_taskdefinitionkey_like);
}
}
private String n_description_like;//[待办事项] private String n_description_like;//[待办事项]
public void setN_description_like(String n_description_like) {
this.n_description_like = n_description_like;
if(!ObjectUtils.isEmpty(this.n_description_like)){
this.getSearchCond().like("description", n_description_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_createtime_gtandeq;//[发起时间] private Timestamp n_createtime_gtandeq;//[发起时间]
public void setN_createtime_gtandeq(Timestamp n_createtime_gtandeq) {
this.n_createtime_gtandeq = n_createtime_gtandeq;
if(!ObjectUtils.isEmpty(this.n_createtime_gtandeq)){
this.getSearchCond().ge("createtime", n_createtime_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_createtime_ltandeq;//[发起时间] private Timestamp n_createtime_ltandeq;//[发起时间]
public void setN_createtime_ltandeq(Timestamp n_createtime_ltandeq) {
this.n_createtime_ltandeq = n_createtime_ltandeq;
if(!ObjectUtils.isEmpty(this.n_createtime_ltandeq)){
this.getSearchCond().le("createtime", n_createtime_ltandeq);
}
}
private String n_businesskey_eq;//[业务键值] private String n_businesskey_eq;//[业务键值]
public void setN_businesskey_eq(String n_businesskey_eq) {
this.n_businesskey_eq = n_businesskey_eq;
if(!ObjectUtils.isEmpty(this.n_businesskey_eq)){
this.getSearchCond().eq("businesskey", n_businesskey_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("taskname", query)
);
}
}
}
}
...@@ -18,12 +18,10 @@ import cn.ibizlab.core.workflow.domain.WFTask; ...@@ -18,12 +18,10 @@ import cn.ibizlab.core.workflow.domain.WFTask;
import cn.ibizlab.core.workflow.filter.WFTaskSearchContext; import cn.ibizlab.core.workflow.filter.WFTaskSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* 实体[WFTask] 服务对象接口 * 实体[WFTask] 服务对象接口
*/ */
public interface IWFTaskService extends IService<WFTask>{ public interface IWFTaskService{
boolean create(WFTask et) ; boolean create(WFTask et) ;
void createBatch(List<WFTask> list) ; void createBatch(List<WFTask> list) ;
...@@ -37,21 +35,8 @@ public interface IWFTaskService extends IService<WFTask>{ ...@@ -37,21 +35,8 @@ public interface IWFTaskService extends IService<WFTask>{
boolean save(WFTask et) ; boolean save(WFTask et) ;
void saveBatch(List<WFTask> list) ; void saveBatch(List<WFTask> list) ;
Page<WFTask> searchDefault(WFTaskSearchContext context) ; Page<WFTask> searchDefault(WFTaskSearchContext 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);
} }
...@@ -31,73 +31,44 @@ import cn.ibizlab.util.helper.CachedBeanCopier; ...@@ -31,73 +31,44 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap; import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.workflow.mapper.WFTaskMapper;
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("WFTaskServiceImpl") @Service
public class WFTaskServiceImpl extends ServiceImpl<WFTaskMapper, WFTask> implements IWFTaskService { public class WFTaskServiceImpl implements IWFTaskService {
protected int batchSize = 500;
@Override @Override
@Transactional
public boolean create(WFTask et) { public boolean create(WFTask et) {
if(!this.retBool(this.baseMapper.insert(et))) //代码实现
return false;
CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
@Override public void createBatch(List<WFTask> list){
public void createBatch(List<WFTask> list) {
this.saveBatch(list,batchSize);
} }
@Override @Override
@Transactional
public boolean update(WFTask et) { public boolean update(WFTask et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("taskid",et.getId()))) //代码实现
return false;
CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
@Override public void updateBatch(List<WFTask> list){
public void updateBatch(List<WFTask> list) {
updateBatchById(list,batchSize);
} }
@Override @Override
@Transactional
public boolean remove(String key) { public boolean remove(String key) {
boolean result=removeById(key); return true;
return result ;
} }
@Override public void removeBatch(Collection<String> idList){
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
} }
@Override @Override
@Transactional
public WFTask get(String key) { public WFTask get(String key) {
WFTask et = getById(key); WFTask et = new WFTask();
if(et==null){
et=new WFTask();
et.setId(key); et.setId(key);
}
else{
}
return et; return et;
} }
...@@ -108,36 +79,20 @@ public class WFTaskServiceImpl extends ServiceImpl<WFTaskMapper, WFTask> impleme ...@@ -108,36 +79,20 @@ public class WFTaskServiceImpl extends ServiceImpl<WFTaskMapper, WFTask> impleme
@Override @Override
public boolean checkKey(WFTask et) { public boolean checkKey(WFTask et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return false;
} }
@Override @Override
@Transactional @Transactional
public boolean save(WFTask et) { public boolean save(WFTask et) {
if(!saveOrUpdate(et)) //代码实现
return false;
return true; return true;
} }
@Override @Override
@Transactional public void saveBatch(List<WFTask> list) {
public boolean saveOrUpdate(WFTask et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
} }
@Override
public boolean saveBatch(Collection<WFTask> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<WFTask> list) {
saveOrUpdateBatch(list,batchSize);
}
...@@ -146,42 +101,10 @@ public class WFTaskServiceImpl extends ServiceImpl<WFTaskMapper, WFTask> impleme ...@@ -146,42 +101,10 @@ public class WFTaskServiceImpl extends ServiceImpl<WFTaskMapper, WFTask> impleme
*/ */
@Override @Override
public Page<WFTask> searchDefault(WFTaskSearchContext context) { public Page<WFTask> searchDefault(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond()); return new PageImpl<WFTask>(new ArrayList(),context.getPageable(),0);
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@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;
} }
} }
...@@ -47,7 +47,6 @@ public class WFTaskResource { ...@@ -47,7 +47,6 @@ public class WFTaskResource {
@Lazy @Lazy
public WFTaskMapping wftaskMapping; public WFTaskMapping wftaskMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-Create-all')")
@ApiOperation(value = "新建工作流任务", tags = {"工作流任务" }, notes = "新建工作流任务") @ApiOperation(value = "新建工作流任务", tags = {"工作流任务" }, notes = "新建工作流任务")
@RequestMapping(method = RequestMethod.POST, value = "/wftasks") @RequestMapping(method = RequestMethod.POST, value = "/wftasks")
@Transactional @Transactional
...@@ -58,7 +57,6 @@ public class WFTaskResource { ...@@ -58,7 +57,6 @@ public class WFTaskResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-Create-all')")
@ApiOperation(value = "批量新建工作流任务", tags = {"工作流任务" }, notes = "批量新建工作流任务") @ApiOperation(value = "批量新建工作流任务", tags = {"工作流任务" }, notes = "批量新建工作流任务")
@RequestMapping(method = RequestMethod.POST, value = "/wftasks/batch") @RequestMapping(method = RequestMethod.POST, value = "/wftasks/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<WFTaskDTO> wftaskdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<WFTaskDTO> wftaskdtos) {
...@@ -66,7 +64,6 @@ public class WFTaskResource { ...@@ -66,7 +64,6 @@ public class WFTaskResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-Update-all')")
@ApiOperation(value = "更新工作流任务", tags = {"工作流任务" }, notes = "更新工作流任务") @ApiOperation(value = "更新工作流任务", tags = {"工作流任务" }, notes = "更新工作流任务")
@RequestMapping(method = RequestMethod.PUT, value = "/wftasks/{wftask_id}") @RequestMapping(method = RequestMethod.PUT, value = "/wftasks/{wftask_id}")
@Transactional @Transactional
...@@ -78,7 +75,6 @@ public class WFTaskResource { ...@@ -78,7 +75,6 @@ public class WFTaskResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-Update-all')")
@ApiOperation(value = "批量更新工作流任务", tags = {"工作流任务" }, notes = "批量更新工作流任务") @ApiOperation(value = "批量更新工作流任务", tags = {"工作流任务" }, notes = "批量更新工作流任务")
@RequestMapping(method = RequestMethod.PUT, value = "/wftasks/batch") @RequestMapping(method = RequestMethod.PUT, value = "/wftasks/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFTaskDTO> wftaskdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<WFTaskDTO> wftaskdtos) {
...@@ -86,7 +82,6 @@ public class WFTaskResource { ...@@ -86,7 +82,6 @@ public class WFTaskResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-Remove-all')")
@ApiOperation(value = "删除工作流任务", tags = {"工作流任务" }, notes = "删除工作流任务") @ApiOperation(value = "删除工作流任务", tags = {"工作流任务" }, notes = "删除工作流任务")
@RequestMapping(method = RequestMethod.DELETE, value = "/wftasks/{wftask_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/wftasks/{wftask_id}")
@Transactional @Transactional
...@@ -94,7 +89,6 @@ public class WFTaskResource { ...@@ -94,7 +89,6 @@ public class WFTaskResource {
return ResponseEntity.status(HttpStatus.OK).body(wftaskService.remove(wftask_id)); return ResponseEntity.status(HttpStatus.OK).body(wftaskService.remove(wftask_id));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-Remove-all')")
@ApiOperation(value = "批量删除工作流任务", tags = {"工作流任务" }, notes = "批量删除工作流任务") @ApiOperation(value = "批量删除工作流任务", tags = {"工作流任务" }, notes = "批量删除工作流任务")
@RequestMapping(method = RequestMethod.DELETE, value = "/wftasks/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/wftasks/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
...@@ -102,7 +96,6 @@ public class WFTaskResource { ...@@ -102,7 +96,6 @@ public class WFTaskResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-Get-all')")
@ApiOperation(value = "获取工作流任务", tags = {"工作流任务" }, notes = "获取工作流任务") @ApiOperation(value = "获取工作流任务", tags = {"工作流任务" }, notes = "获取工作流任务")
@RequestMapping(method = RequestMethod.GET, value = "/wftasks/{wftask_id}") @RequestMapping(method = RequestMethod.GET, value = "/wftasks/{wftask_id}")
public ResponseEntity<WFTaskDTO> get(@PathVariable("wftask_id") String wftask_id) { public ResponseEntity<WFTaskDTO> get(@PathVariable("wftask_id") String wftask_id) {
...@@ -123,14 +116,12 @@ public class WFTaskResource { ...@@ -123,14 +116,12 @@ public class WFTaskResource {
return ResponseEntity.status(HttpStatus.OK).body(wftaskService.checkKey(wftaskMapping.toDomain(wftaskdto))); return ResponseEntity.status(HttpStatus.OK).body(wftaskService.checkKey(wftaskMapping.toDomain(wftaskdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-Save-all')")
@ApiOperation(value = "保存工作流任务", tags = {"工作流任务" }, notes = "保存工作流任务") @ApiOperation(value = "保存工作流任务", tags = {"工作流任务" }, notes = "保存工作流任务")
@RequestMapping(method = RequestMethod.POST, value = "/wftasks/save") @RequestMapping(method = RequestMethod.POST, value = "/wftasks/save")
public ResponseEntity<Boolean> save(@RequestBody WFTaskDTO wftaskdto) { public ResponseEntity<Boolean> save(@RequestBody WFTaskDTO wftaskdto) {
return ResponseEntity.status(HttpStatus.OK).body(wftaskService.save(wftaskMapping.toDomain(wftaskdto))); return ResponseEntity.status(HttpStatus.OK).body(wftaskService.save(wftaskMapping.toDomain(wftaskdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-Save-all')")
@ApiOperation(value = "批量保存工作流任务", tags = {"工作流任务" }, notes = "批量保存工作流任务") @ApiOperation(value = "批量保存工作流任务", tags = {"工作流任务" }, notes = "批量保存工作流任务")
@RequestMapping(method = RequestMethod.POST, value = "/wftasks/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/wftasks/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFTaskDTO> wftaskdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<WFTaskDTO> wftaskdtos) {
...@@ -138,7 +129,6 @@ public class WFTaskResource { ...@@ -138,7 +129,6 @@ public class WFTaskResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-searchDefault-all')")
@ApiOperation(value = "获取DEFAULT", tags = {"工作流任务" } ,notes = "获取DEFAULT") @ApiOperation(value = "获取DEFAULT", tags = {"工作流任务" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/wftasks/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/wftasks/fetchdefault")
public ResponseEntity<List<WFTaskDTO>> fetchDefault(WFTaskSearchContext context) { public ResponseEntity<List<WFTaskDTO>> fetchDefault(WFTaskSearchContext context) {
...@@ -151,7 +141,6 @@ public class WFTaskResource { ...@@ -151,7 +141,6 @@ public class WFTaskResource {
.body(list); .body(list);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFTask-searchDefault-all')")
@ApiOperation(value = "查询DEFAULT", tags = {"工作流任务" } ,notes = "查询DEFAULT") @ApiOperation(value = "查询DEFAULT", tags = {"工作流任务" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/wftasks/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/wftasks/searchdefault")
public ResponseEntity<Page<WFTaskDTO>> searchDefault(@RequestBody WFTaskSearchContext context) { public ResponseEntity<Page<WFTaskDTO>> searchDefault(@RequestBody WFTaskSearchContext context) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册