Browse Source

add: 联调

master
ls 2 weeks ago
parent
commit
cd6e9baa89
  1. 1
      base-fast/src/main/java/com/boge/common/utils/R.java
  2. 2
      base-fast/src/main/java/com/boge/modules/flow/controller/FlwDeModelController.java
  3. 2
      base-fast/src/main/java/com/boge/modules/flow/controller/FlwDeployController.java
  4. 2
      base-fast/src/main/java/com/boge/modules/flow/controller/FlwInstanceController.java
  5. 13
      base-fast/src/main/java/com/boge/modules/flow/service/impl/FlwInstanceServiceImpl.java

1
base-fast/src/main/java/com/boge/common/utils/R.java

@ -44,7 +44,6 @@ public class R extends HashMap<String, Object> {
public static R ok(String msg) { public static R ok(String msg) {
R r = new R(); R r = new R();
r.put("msg", msg); r.put("msg", msg);
r.put("code", 200);
return r; return r;
} }

2
base-fast/src/main/java/com/boge/modules/flow/controller/FlwDeModelController.java

@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.boge.common.utils.ShiroUtils; import com.boge.common.utils.ShiroUtils;
import com.boge.modules.sys.entity.SysUserEntity; import com.boge.modules.sys.entity.SysUserEntity;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -34,6 +35,7 @@ import com.boge.common.utils.R;
@RequestMapping("flow/flwdemodel") @RequestMapping("flow/flwdemodel")
public class FlwDeModelController { public class FlwDeModelController {
@Autowired @Autowired
@Lazy
private FlwDeModelService flwDeModelService; private FlwDeModelService flwDeModelService;
/** /**

2
base-fast/src/main/java/com/boge/modules/flow/controller/FlwDeployController.java

@ -5,6 +5,7 @@ import com.boge.common.utils.PageUtils;
import com.boge.common.utils.R; import com.boge.common.utils.R;
import com.boge.modules.flow.service.FlwDeployService; import com.boge.modules.flow.service.FlwDeployService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -23,6 +24,7 @@ import java.util.Map;
public class FlwDeployController { public class FlwDeployController {
@Autowired @Autowired
@Lazy
private FlwDeployService deployService; private FlwDeployService deployService;
@RequestMapping("/list") @RequestMapping("/list")

2
base-fast/src/main/java/com/boge/modules/flow/controller/FlwInstanceController.java

@ -9,6 +9,7 @@ import com.boge.modules.flow.entity.FlwHiTaskEntity;
import com.boge.modules.flow.service.FlwInstanceService; import com.boge.modules.flow.service.FlwInstanceService;
import com.boge.modules.sys.entity.SysUserEntity; import com.boge.modules.sys.entity.SysUserEntity;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
@ -19,6 +20,7 @@ import java.util.Map;
public class FlwInstanceController { public class FlwInstanceController {
@Autowired @Autowired
@Lazy
private FlwInstanceService instanceService; private FlwInstanceService instanceService;
/** /**

13
base-fast/src/main/java/com/boge/modules/flow/service/impl/FlwInstanceServiceImpl.java

@ -148,15 +148,16 @@ public class FlwInstanceServiceImpl extends FlowServiceNoFactory implements FlwI
String url = CREATE_SESSION_URL + ACCESS_TOKEN; String url = CREATE_SESSION_URL + ACCESS_TOKEN;
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("touser", toUser); jsonObject.put("touser", toUser);
jsonObject.put("msgtype", "text"); jsonObject.put("msgtype", "textcard");
jsonObject.put("agentid", 1000006); jsonObject.put("agentid", 1000006);
JSONObject contentJSon = new JSONObject(); JSONObject contentJSon = new JSONObject();
contentJSon.put("content", content); contentJSon.put("title", "新审批待处理");
jsonObject.put("text", contentJSon); contentJSon.put("description", "点击查看详情");
jsonObject.put("safe", 0); contentJSon.put("url", "http://localhost:8001/#/tickets-tickets");
contentJSon.put("btntxt", "处理");
jsonObject.put("textcard", contentJSon);
jsonObject.put("safe", 0);
try { try {
URL postUrl = new URL(url); URL postUrl = new URL(url);
HttpURLConnection http = (HttpURLConnection) postUrl.openConnection(); HttpURLConnection http = (HttpURLConnection) postUrl.openConnection();

Loading…
Cancel
Save