提交 00a0c75d 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 55d5fddd
......@@ -7,6 +7,7 @@ import * as mutations from './mutations';
import * as getters from './getters';
import viewaction from './modules/view-action'
import unifiedresource from './modules/unified-resource'
const state = {
...rootstate
......@@ -20,7 +21,8 @@ const store = new Vuex.Store({
mutations,
getters,
modules: {
viewaction
viewaction,
unifiedresource
},
});
......
/**
* 提交统一资源数据
*
* @param param0
* @param data
*/
export const commitResourceData = ({ commit, state }: { commit: any, state: any }, { unires, enablepermissionvalid }: { unires: Array<any>, enablepermissionvalid: boolean }) => {
if(unires && unires.length > 0){
commit('setResourceData', unires);
}
if(enablepermissionvalid){
commit('setEnablePermissionValid', enablepermissionvalid);
}
}
\ No newline at end of file
/**
* 判断指定统一资源是否存在
*
* @param state
*/
export const getResourceData = (state: any) => (resourcetag: string) => {
let itemIndex: any = state.resourceData.findIndex((obj: any, objIndex: any, objs: any) => {
return Object.is(obj.unirescode, resourcetag);
})
return itemIndex === -1 ? false : true;
}
/**
* 获取是否开启权限认证
*
* @param state
*/
export const getEnablePermissionValid = (state: any) => {
return state.enablePermissionValid;
}
\ No newline at end of file
import { resourcestate } from './state';
import * as actions from './actions';
import * as mutations from './mutations';
import * as getters from './getters';
const state = {
...resourcestate
}
export default {
namespaced: true,
state,
getters,
actions,
mutations
}
\ No newline at end of file
/**
* 设置统一资源数据
*
* @param state
* @param resourceArray
*/
export const setResourceData = (state: any, resourceArray:Array<any>) => {
if(resourceArray && resourceArray.length === 0){
return;
}
state.resourceData = resourceArray;
}
/**
* 设置是否开启权限认证
*
* @param state
* @param resourceArray
*/
export const setEnablePermissionValid = (state: any, enablepermissionvalid:boolean) => {
state.enablePermissionValid = enablepermissionvalid;
}
/**
* 所有资源状态
*/
export const resourcestate: any = {
// 统一资源数据
resourceData: [],
// 是否开启权限认证
enablePermissionValid: false
}
\ No newline at end of file
......@@ -56,6 +56,8 @@ export class AuthGuard {
const { data }: { data: any } = response;
if (data) {
router.app.$store.commit('addAppData', data);
// 提交统一资源数据
router.app.$store.dispatch('unifiedresource/commitResourceData', data);
}
}
resolve(true);
......
......@@ -449,7 +449,9 @@ export default class WFIndexViewBase extends Vue implements ControlInterface {
if (Object.keys(item).length === 0) {
return;
}
this.click(item);
if(!item.hidden){
this.click(item);
}
}
/**
......@@ -633,11 +635,41 @@ export default class WFIndexViewBase extends Vue implements ControlInterface {
* @memberof WFIndexView
*/
public load(data: any) {
this.handleMenusResource(this.menuMode.getAppMenuItems());
}
/**
* 通过统一资源标识计算菜单
*
* @param {*} data
* @memberof WFIndexView
*/
public handleMenusResource(inputMenus:Array<any>){
if(this.$store.getters['unifiedresource/getEnablePermissionValid']){
this.computedEffectiveMenus(inputMenus);
}
this.dataProcess(this.menuMode.getAppMenuItems());
this.menus = this.menuMode.getAppMenuItems();
this.doMenuSelect();
}
/**
* 计算有效菜单项
*
* @param {*} data
* @memberof WFIndexView
*/
public computedEffectiveMenus(inputMenus:Array<any>){
inputMenus.forEach((_item:any) =>{
if(_item.resourcetag && !this.$store.getters['unifiedresource/getResourceData'](_item.resourcetag)){
_item.hidden = true;
if (_item.items && _item.items.length > 0) {
this.computedEffectiveMenus(_item.items);
}
}
})
}
/**
* 数据处理
*
......
......@@ -2,6 +2,7 @@ package cn.ibizlab.core.workflow.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -33,7 +34,7 @@ public interface WFGroupMapper extends BaseMapper<WFGroup>{
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql);
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
......@@ -41,7 +42,7 @@ public interface WFGroupMapper extends BaseMapper<WFGroup>{
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql);
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
......@@ -49,7 +50,7 @@ public interface WFGroupMapper extends BaseMapper<WFGroup>{
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql);
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
......@@ -57,6 +58,6 @@ public interface WFGroupMapper extends BaseMapper<WFGroup>{
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql);
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
......@@ -2,6 +2,7 @@ package cn.ibizlab.core.workflow.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -33,7 +34,7 @@ public interface WFMemberMapper extends BaseMapper<WFMember>{
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql);
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
......@@ -41,7 +42,7 @@ public interface WFMemberMapper extends BaseMapper<WFMember>{
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql);
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
......@@ -49,7 +50,7 @@ public interface WFMemberMapper extends BaseMapper<WFMember>{
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql);
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
......@@ -57,7 +58,7 @@ public interface WFMemberMapper extends BaseMapper<WFMember>{
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql);
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<WFMember> selectByGroupid(@Param("id") Serializable id) ;
......
......@@ -2,6 +2,7 @@ package cn.ibizlab.core.workflow.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -33,7 +34,7 @@ public interface WFProcessDefinitionMapper extends BaseMapper<WFProcessDefinitio
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql);
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
......@@ -41,7 +42,7 @@ public interface WFProcessDefinitionMapper extends BaseMapper<WFProcessDefinitio
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql);
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
......@@ -49,7 +50,7 @@ public interface WFProcessDefinitionMapper extends BaseMapper<WFProcessDefinitio
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql);
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
......@@ -57,6 +58,6 @@ public interface WFProcessDefinitionMapper extends BaseMapper<WFProcessDefinitio
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql);
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
......@@ -2,6 +2,7 @@ package cn.ibizlab.core.workflow.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -33,7 +34,7 @@ public interface WFSystemMapper extends BaseMapper<WFSystem>{
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql);
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
......@@ -41,7 +42,7 @@ public interface WFSystemMapper extends BaseMapper<WFSystem>{
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql);
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
......@@ -49,7 +50,7 @@ public interface WFSystemMapper extends BaseMapper<WFSystem>{
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql);
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
......@@ -57,6 +58,6 @@ public interface WFSystemMapper extends BaseMapper<WFSystem>{
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql);
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
......@@ -2,6 +2,7 @@ package cn.ibizlab.core.workflow.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -33,7 +34,7 @@ public interface WFUserMapper extends BaseMapper<WFUser>{
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql);
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
......@@ -41,7 +42,7 @@ public interface WFUserMapper extends BaseMapper<WFUser>{
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql);
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
......@@ -49,7 +50,7 @@ public interface WFUserMapper extends BaseMapper<WFUser>{
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql);
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
......@@ -57,6 +58,6 @@ public interface WFUserMapper extends BaseMapper<WFUser>{
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql);
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
......@@ -36,11 +36,20 @@ public interface IWFGroupService extends IService<WFGroup>{
void removeBatch(Collection<String> idList) ;
WFGroup get(String key) ;
Page<WFGroup> searchDefault(WFGroupSearchContext context) ;
List<JSONObject> select(String sql);
boolean execute(String sql);
/**
*自定义查询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);
}
......
......@@ -36,18 +36,25 @@ public interface IWFMemberService extends IService<WFMember>{
void updateBatch(List<WFMember> list) ;
WFMember get(String key) ;
Page<WFMember> searchDefault(WFMemberSearchContext context) ;
List<WFMember> selectByGroupid(String id) ;
void removeByGroupid(String id) ;
void saveByGroupid(String id,List<WFMember> list) ;
List<WFMember> selectByUserid(String id) ;
void removeByUserid(String id) ;
List<JSONObject> select(String sql);
boolean execute(String sql);
/**
*自定义查询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);
}
......
......@@ -36,11 +36,20 @@ public interface IWFProcessDefinitionService extends IService<WFProcessDefinitio
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
Page<WFProcessDefinition> searchDefault(WFProcessDefinitionSearchContext context) ;
List<JSONObject> select(String sql);
boolean execute(String sql);
/**
*自定义查询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);
}
......
......@@ -35,8 +35,6 @@ public interface IWFProcessInstanceService{
void createBatch(List<WFProcessInstance> list) ;
Page<WFProcessInstance> searchDefault(WFProcessInstanceSearchContext context) ;
}
......
......@@ -35,8 +35,6 @@ public interface IWFProcessNodeService{
WFProcessNode getDraft(WFProcessNode et) ;
Page<WFProcessNode> searchDefault(WFProcessNodeSearchContext context) ;
}
......
......@@ -35,8 +35,6 @@ public interface IWFREModelService{
WFREModel getDraft(WFREModel et) ;
Page<WFREModel> searchDefault(WFREModelSearchContext context) ;
}
......
......@@ -36,11 +36,20 @@ public interface IWFSystemService extends IService<WFSystem>{
boolean checkKey(WFSystem et) ;
WFSystem get(String key) ;
Page<WFSystem> searchDefault(WFSystemSearchContext context) ;
List<JSONObject> select(String sql);
boolean execute(String sql);
/**
*自定义查询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);
}
......
......@@ -35,8 +35,6 @@ public interface IWFTaskService{
void saveBatch(List<WFTask> list) ;
Page<WFTask> searchDefault(WFTaskSearchContext context) ;
}
......
......@@ -35,8 +35,6 @@ public interface IWFTaskWayService{
void saveBatch(List<WFTaskWay> list) ;
Page<WFTaskWay> searchDefault(WFTaskWaySearchContext context) ;
}
......
......@@ -36,11 +36,20 @@ public interface IWFUserService extends IService<WFUser>{
void createBatch(List<WFUser> list) ;
boolean checkKey(WFUser et) ;
Page<WFUser> searchDefault(WFUserSearchContext context) ;
List<JSONObject> select(String sql);
boolean execute(String sql);
/**
*自定义查询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);
}
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
......@@ -29,7 +30,6 @@ import cn.ibizlab.core.workflow.service.IWFGroupService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.workflow.mapper.WFGroupMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -47,6 +47,8 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
@Autowired
@Lazy
private cn.ibizlab.core.workflow.service.IWFMemberService wfmemberService;
private int batchSize = 500;
@Override
......@@ -154,32 +156,26 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(WFGroup et){
}
@Override
public List<JSONObject> select(String sql){
return this.baseMapper.selectBySQL(sql);
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql){
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);
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql);
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql);
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
......@@ -29,7 +30,6 @@ import cn.ibizlab.core.workflow.service.IWFMemberService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.workflow.mapper.WFMemberMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -44,6 +44,14 @@ import org.springframework.util.StringUtils;
@Service("WFMemberServiceImpl")
public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> implements IWFMemberService {
@Autowired
@Lazy
private cn.ibizlab.core.workflow.service.IWFGroupService wfgroupService;
@Autowired
@Lazy
private cn.ibizlab.core.workflow.service.IWFUserService wfuserService;
private int batchSize = 500;
@Override
......@@ -59,6 +67,7 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Override
@Transactional
public boolean create(WFMember et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getMemberid()),et);
......@@ -110,6 +119,7 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Override
@Transactional
public boolean update(WFMember et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("memberid",et.getMemberid())))
return false;
CachedBeanCopier.copy(get(et.getMemberid()),et);
......@@ -201,41 +211,47 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
* @param et
*/
private void fillParentData(WFMember et){
//实体关系[用户组]
//实体关系[DER1N_WF_GROUP_MEMBER_WF_GROUP_GROUPID]
if(!ObjectUtils.isEmpty(et.getGroupid())){
cn.ibizlab.core.workflow.domain.WFGroup group=et.getGroup();
if(!ObjectUtils.isEmpty(group)){
et.setGroupname(group.getName());
if(ObjectUtils.isEmpty(group)){
cn.ibizlab.core.workflow.domain.WFGroup majorEntity=wfgroupService.get(et.getGroupid());
et.setGroup(majorEntity);
group=majorEntity;
}
et.setGroupname(group.getName());
}
//实体关系[用户]
//实体关系[DER1N_WF_GROUP_MEMBER_WF_USER_USERID]
if(!ObjectUtils.isEmpty(et.getUserid())){
cn.ibizlab.core.workflow.domain.WFUser user=et.getUser();
if(!ObjectUtils.isEmpty(user)){
et.setPersonname(user.getDisplayname());
if(ObjectUtils.isEmpty(user)){
cn.ibizlab.core.workflow.domain.WFUser majorEntity=wfuserService.get(et.getUserid());
et.setUser(majorEntity);
user=majorEntity;
}
et.setPersonname(user.getDisplayname());
}
}
@Override
public List<JSONObject> select(String sql){
return this.baseMapper.selectBySQL(sql);
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql){
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);
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql);
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql);
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
......@@ -29,7 +30,6 @@ import cn.ibizlab.core.workflow.service.IWFProcessDefinitionService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.workflow.mapper.WFProcessDefinitionMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -44,6 +44,8 @@ import org.springframework.util.StringUtils;
@Service("WFProcessDefinitionServiceImpl")
public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinitionMapper, WFProcessDefinition> implements IWFProcessDefinitionService {
private int batchSize = 500;
@Override
......@@ -147,32 +149,26 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(WFProcessDefinition et){
}
@Override
public List<JSONObject> select(String sql){
return this.baseMapper.selectBySQL(sql);
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql){
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);
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql);
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql);
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
......@@ -30,7 +31,6 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
/**
* 实体[流程实例] 无存储服务对象接口实现
*/
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
......@@ -30,7 +31,6 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
/**
* 实体[流程定义节点] 无存储服务对象接口实现
*/
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
......@@ -29,7 +30,6 @@ import cn.ibizlab.core.workflow.service.IWFSystemService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.workflow.mapper.WFSystemMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -44,6 +44,8 @@ import org.springframework.util.StringUtils;
@Service("WFSystemServiceImpl")
public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> implements IWFSystemService {
private int batchSize = 500;
@Override
......@@ -147,32 +149,26 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(WFSystem et){
}
@Override
public List<JSONObject> select(String sql){
return this.baseMapper.selectBySQL(sql);
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql){
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);
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql);
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql);
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
......@@ -30,7 +31,6 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
/**
* 实体[工作流任务] 无存储服务对象接口实现
*/
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
......@@ -30,7 +31,6 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
/**
* 实体[操作路径] 无存储服务对象接口实现
*/
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
......@@ -29,7 +30,6 @@ import cn.ibizlab.core.workflow.service.IWFUserService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.workflow.mapper.WFUserMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -47,6 +47,8 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
@Autowired
@Lazy
private cn.ibizlab.core.workflow.service.IWFMemberService wfmemberService;
private int batchSize = 500;
@Override
......@@ -150,32 +152,26 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(WFUser et){
}
@Override
public List<JSONObject> select(String sql){
return this.baseMapper.selectBySQL(sql);
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql){
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);
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql);
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql);
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
......
......@@ -21,7 +21,7 @@ import java.io.IOException;
/**
* 权限:向uaa同步当前系统菜单、权限资源任务类
*/
@Component //开启此类需要保证Main中开启了feign :EnableFeignClients
//@Component //开启此类需要保证Main中开启了feign :EnableFeignClients
public class PermissionSyncJob implements ApplicationRunner {
private Log log = LogFactory.getLog(PermissionSyncJob.class);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册