流程步骤配置
This commit is contained in:
parent
17887cc8db
commit
011f3e2a84
|
@ -1,7 +1,10 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
package com.hzya.frame.sys.flow.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity;
|
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity;
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 映射信息主表(SysFlowStepConfig)表服务接口
|
* 映射信息主表(SysFlowStepConfig)表服务接口
|
||||||
*
|
*
|
||||||
|
@ -9,4 +12,11 @@ import com.hzya.frame.basedao.service.IBaseService;
|
||||||
* @since 2025-04-29 10:16:28
|
* @since 2025-04-29 10:16:28
|
||||||
*/
|
*/
|
||||||
public interface ISysFlowStepConfigService extends IBaseService<SysFlowStepConfigEntity, String>{
|
public interface ISysFlowStepConfigService extends IBaseService<SysFlowStepConfigEntity, String>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试sql
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity testSql(JSONObject object);
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,5 +242,4 @@ public class SysFlowStepAccountServiceImpl extends BaseService<SysFlowStepAccoun
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
package com.hzya.frame.sys.flow.service.impl;
|
package com.hzya.frame.sys.flow.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity;
|
import com.hzya.frame.sys.flow.entity.SysFlowStepConfigEntity;
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowStepConfigDao;
|
import com.hzya.frame.sys.flow.dao.ISysFlowStepConfigDao;
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowStepConfigService;
|
import com.hzya.frame.sys.flow.service.ISysFlowStepConfigService;
|
||||||
import org.springframework.stereotype.Service;
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
@ -15,7 +21,8 @@ import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
*/
|
*/
|
||||||
@Service(value = "sysFlowStepConfigService")
|
@Service(value = "sysFlowStepConfigService")
|
||||||
public class SysFlowStepConfigServiceImpl extends BaseService<SysFlowStepConfigEntity, String> implements ISysFlowStepConfigService {
|
public class SysFlowStepConfigServiceImpl extends BaseService<SysFlowStepConfigEntity, String> implements ISysFlowStepConfigService {
|
||||||
|
|
||||||
|
Logger logger = LoggerFactory.getLogger(ISysFlowStepConfigService.class);
|
||||||
private ISysFlowStepConfigDao sysFlowStepConfigDao;
|
private ISysFlowStepConfigDao sysFlowStepConfigDao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -23,4 +30,31 @@ public class SysFlowStepConfigServiceImpl extends BaseService<SysFlowStepConfigE
|
||||||
this.sysFlowStepConfigDao = dao;
|
this.sysFlowStepConfigDao = dao;
|
||||||
this.dao = dao;
|
this.dao = dao;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试sql
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity testSql(JSONObject object) {
|
||||||
|
SysFlowStepConfigEntity config = getData("jsonStr",object,SysFlowStepConfigEntity.class);
|
||||||
|
try {
|
||||||
|
checkParams(config,"type");
|
||||||
|
}catch (Exception e){
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证数据
|
||||||
|
* @param entity
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
private void checkParams(SysFlowStepConfigEntity entity, String type) {
|
||||||
|
Assert.notNull(entity,"参数不能为空");
|
||||||
|
Assert.notEmpty(entity.getTableName(),"tabName不能为空");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue