| | |
| | | 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.*; |
| | |
| | | private String userName; |
| | | @Value("${grid.password}") |
| | | private String passWord; |
| | | |
| | | private String testUrl = "http://183.2.142.21:9007"; |
| | | @Autowired |
| | | private GridCaseTaskService gridCaseTaskService; |
| | | @Autowired |
| | |
| | | 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); |
| | |
| | | return R.fail("获取失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public R<GridToDoVo> updateToDo(GridToDoVo gridToDoVo) { |
| | |
| | | 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); |
| | |
| | | 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); |