forked from gzzfw/backEnd/gz-dyh

xusd
2024-10-22 f33bb23ebe6ea8e805c84fa3020a9cc307a29a00
feature:本地环境能提交到亿迅环境兼容
1 files modified
19 ■■■■ changed files
dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridToDoService.java 19 ●●●● patch | view | raw | blame | history
dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridToDoService.java
@@ -3,6 +3,7 @@
import cn.huge.base.common.bo.R;
import cn.huge.base.common.utils.HttpClientUtils;
import cn.huge.base.common.utils.ObjectUtils;
import cn.huge.base.common.utils.SpringContextUtil;
import cn.huge.module.grid.domain.po.GridCaseTask;
import cn.huge.module.sys.vo.*;
import cn.huge.module.grid.domain.vo.*;
@@ -30,7 +31,7 @@
    private String userName;
    @Value("${grid.password}")
    private String passWord;
    private String testUrl = "http://183.2.142.21:9007";
    @Autowired
    private GridCaseTaskService gridCaseTaskService;
    @Autowired
@@ -69,7 +70,12 @@
        log.info("xsd:{}", gridUrl + "/sysUserTodo/saveBatch");
        String s = null;
        try {
            if (SpringContextUtil.checkDev()) {
                log.info("xsdurl:{}", testUrl + "/api/thrid/grid/todo/batch-create-todo");
                s = HttpClientUtils.httpPostRaw(testUrl + "/api/thrid/grid/todo/batch-create-todo", JSON.toJSONString(requestVo), new HashMap<>(), "utf-8");
            } else {
            s = HttpClientUtils.httpPostRaw(gridUrl + "/sysUserTodo/saveBatch", JSON.toJSONString(requestVo), new HashMap<>(), "utf-8");
            }
        } catch (Exception e) {
            log.info("xsderror:{}", e);
            throw new RuntimeException(e);
@@ -84,7 +90,6 @@
            return R.fail("获取失败");
        }
    }
    public R<GridToDoVo> updateToDo(GridToDoVo gridToDoVo) {
@@ -120,7 +125,12 @@
        log.info("xsd:{}", JSON.toJSONString(requestVo));
        log.info("xsd:{}", gridUrl + "/sysUserTodo/updateBatch");
        try {
            if (SpringContextUtil.checkDev()) {
                log.info("xsdurl:{}", testUrl + "/api/thrid/grid/todo/batch-update-todo");
                s = HttpClientUtils.httpPostRaw(testUrl + "/api/thrid/grid/todo/batch-update-todo", JSON.toJSONString(requestVo), new HashMap<>(), "utf-8");
            } else {
            s = HttpClientUtils.httpPostRaw(gridUrl + "/sysUserTodo/updateBatch", JSON.toJSONString(requestVo), new HashMap<>(), "utf-8");
            }
        } catch (Exception e) {
            log.info("xsderror:{}", e);
            throw new RuntimeException(e);
@@ -145,7 +155,12 @@
        log.info("xsd:{}", gridUrl + "/sysUserTodo/batchDel");
        String s = null;
        try {
            if (SpringContextUtil.checkDev()) {
                log.info("xsdurl:{}", testUrl + "/api/thrid/grid/todo/delete-todo");
                s = HttpClientUtils.httpPostRaw(testUrl + "/api/thrid/grid/todo/delete-todo", JSON.toJSONString(requestVo), new HashMap<>(), "utf-8");
            } else {
            s = HttpClientUtils.httpPostRaw(gridUrl + "/sysUserTodo/batchDel", JSON.toJSONString(requestVo), new HashMap<>(), "utf-8");
            }
        } catch (Exception e) {
            log.info("xsderror:{}", e);
            throw new RuntimeException(e);