|
@@ -1,57 +0,0 @@
|
|
|
-package com.ruoyi.web.controller.common;
|
|
|
-
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
-import com.fjhx.flow.core.FlowDelegate;
|
|
|
-import com.ruoyi.system.domain.SysConfig;
|
|
|
-import com.ruoyi.system.service.ISysConfigService;
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
-@Slf4j
|
|
|
-@Service
|
|
|
-public class TestFlow extends FlowDelegate {
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ISysConfigService sysConfigService;
|
|
|
-
|
|
|
- @Override
|
|
|
- public String getFlowKey() {
|
|
|
- return "test_flow";
|
|
|
- }
|
|
|
-
|
|
|
- @DS("iot")
|
|
|
- @Override
|
|
|
- public Long start(Long flowId, JSONObject data) {
|
|
|
-
|
|
|
- SysConfig sysConfig = new SysConfig();
|
|
|
- sysConfig.setRemark("备注");
|
|
|
- sysConfigService.save(sysConfig);
|
|
|
-
|
|
|
- return sysConfig.getConfigId();
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void end() {
|
|
|
- log.error("默认结束方法");
|
|
|
- }
|
|
|
-
|
|
|
- public void testEnd() {
|
|
|
- log.error("测试结束方法");
|
|
|
- // int i = 0 / 0;
|
|
|
- }
|
|
|
-
|
|
|
- public void type1() {
|
|
|
- log.error("type1");
|
|
|
- }
|
|
|
-
|
|
|
- public void type2() {
|
|
|
- log.error("type2");
|
|
|
- }
|
|
|
-
|
|
|
- public void type3() {
|
|
|
- log.error("type2");
|
|
|
- }
|
|
|
-
|
|
|
-}
|