Commit d8b06dd8 authored by mcb's avatar mcb

commit

parent 2c761923
...@@ -28,4 +28,13 @@ public interface ExecutionFlowsMapper { ...@@ -28,4 +28,13 @@ public interface ExecutionFlowsMapper {
* @since 2021-01-14 * @since 2021-01-14
*/ */
List<DataDevExamplesListDto> queryDevExamplesListPage(Map saveParams) throws Exception; List<DataDevExamplesListDto> queryDevExamplesListPage(Map saveParams) throws Exception;
/**
* 获取执行实例的日志详情
*
* @return
* @author Bellamy
* @since 2021-02-03
*/
List<Map> queryExamplesLogByExecId(String execId) throws Exception;
} }
...@@ -58,5 +58,29 @@ public class DmpDevExamplesController { ...@@ -58,5 +58,29 @@ public class DmpDevExamplesController {
return pageInfo; return pageInfo;
} }
/**
* 获取执行实例的日志详情
*
* @return
* @author Bellamy
* @since 2021-02-03
*/
@ApiOperation(value = "执行实例日志详情", notes = "执行实例日志详情")
@GetMapping(value = "/log")
@ApiImplicitParam(name = "execId", value = "执行实例ID", required = true)
public JsonResult getExamplesLog(@RequestParam String execId) {
if (StringUtils.isEmpty(execId)) {
return JsonResult.error(ResultCode.PARAMS_ERROR, "执行实例ID不能为空!");
}
JsonResult result = new JsonResult();
try {
result = dmpDevelopTaskService.queryExamplesLogByExecId(execId);
} catch (Exception e) {
result.setCode(ResultCode.INTERNAL_SERVER_ERROR);
result.setMessage("查询失败!");
e.printStackTrace();
}
return result;
}
} }
...@@ -52,55 +52,66 @@ public interface DmpDevelopTaskService { ...@@ -52,55 +52,66 @@ public interface DmpDevelopTaskService {
*/ */
PageInfoResponse<DataDevExamplesListDto> queryDevExamplesListPage(DataDevExamplesListReq req) throws Exception; PageInfoResponse<DataDevExamplesListDto> queryDevExamplesListPage(DataDevExamplesListReq req) throws Exception;
/**条件分頁查询所有任务开发 /**
* @param dmpDevelopTaskRequest * 条件分頁查询所有任务开发
* @param httpRequest *
* @return * @param dmpDevelopTaskRequest
* @throws Exception * @param httpRequest
*/ * @return
public com.jz.common.bean.PageInfoResponse<DmpDevelopTaskDto> findListWithPage(DmpDevelopTaskRequest dmpDevelopTaskRequest, HttpServletRequest httpRequest)throws Exception; * @throws Exception
*/
/** public com.jz.common.bean.PageInfoResponse<DmpDevelopTaskDto> findListWithPage(DmpDevelopTaskRequest dmpDevelopTaskRequest, HttpServletRequest httpRequest) throws Exception;
* @Title: getConfigFileNameNotSuffix4Published
* @Description: TODO(根据treeId取得最新版提交的同步脚本文件名(不含后缀)及版本信息) /**
* @param @param treeId * @param @param treeId
* @param @return * @param @return
* @param @throws Exception 参数 * @param @throws Exception 参数
* @return String 返回类型 * @return String 返回类型
* @throws * @throws
*/ * @Title: getConfigFileNameNotSuffix4Published
public String getConfigFileNameNotSuffix4Published(Long treeId)throws Exception; * @Description: TODO(根据treeId取得最新版提交的同步脚本文件名 ( 不含后缀 ) 及版本信息)
*/
/**新增开发任务 public String getConfigFileNameNotSuffix4Published(Long treeId) throws Exception;
* @param dmpDevelopTask
* @param httpRequest
* @return
* @throws Exception
*/
public BaseBeanResponse<DmpDevelopTask> add(DmpDevelopTask dmpDevelopTask, HttpServletRequest httpRequest)throws Exception;
/** /**
* @Title: flowSubmit * 新增开发任务
* @Description: TODO(工作任务流保存提交) *
* @param @param flowPro * @param dmpDevelopTask
* @param @param httpRequest * @param httpRequest
* @param @return * @return
* @param @throws Exception 参数 * @throws Exception
* @return BaseResponse 返回类型 */
* @throws public BaseBeanResponse<DmpDevelopTask> add(DmpDevelopTask dmpDevelopTask, HttpServletRequest httpRequest) throws Exception;
*/
public BaseResponse flowSubmit(DmpDevelopTask dmpDevelopTask, HttpServletRequest httpRequest)throws Exception;
/** /**
* @Title: getExecXmlFileName * @param @param flowPro
* @Description: TODO(根据任务treeId获取xmlFileName) * @param @param httpRequest
* @param @param syncTaskTreeId * @param @return
* @param @return * @param @throws Exception 参数
* @param @throws Exception 参数 * @return BaseResponse 返回类型
* @return String 返回类型 * @throws
* @throws * @Title: flowSubmit
*/ * @Description: TODO(工作任务流保存提交)
public String getExecXmlFileName(Long syncTaskTreeId)throws Exception; */
public BaseResponse flowSubmit(DmpDevelopTask dmpDevelopTask, HttpServletRequest httpRequest) throws Exception;
/**
* @param @param syncTaskTreeId
* @param @return
* @param @throws Exception 参数
* @return String 返回类型
* @throws
* @Title: getExecXmlFileName
* @Description: TODO(根据任务treeId获取xmlFileName)
*/
public String getExecXmlFileName(Long syncTaskTreeId) throws Exception;
/**
* 获取执行实例的日志详情
*
* @return
* @author Bellamy
* @since 2021-02-03
*/
JsonResult queryExamplesLogByExecId(String execId) throws Exception;
} }
\ No newline at end of file
...@@ -12,6 +12,9 @@ import java.util.regex.Pattern; ...@@ -12,6 +12,9 @@ import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.alibaba.fastjson.JSONObject;
import com.mysql.jdbc.Blob;
import org.apache.tomcat.jni.Mmap;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.aop.ThrowsAdvice; import org.springframework.aop.ThrowsAdvice;
...@@ -1232,4 +1235,22 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop ...@@ -1232,4 +1235,22 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
return xmlFileName; return xmlFileName;
} }
/**
* 获取执行实例的日志详情
*
* @return
* @author Bellamy
* @since 2021-02-03
*/
@Override
public JsonResult queryExamplesLogByExecId(String execId) throws Exception {
List<Map> list = executionFlowsMapper.queryExamplesLogByExecId(execId);
if(list.size() > 0 && list != null) {
list.forEach(map -> {
map.put("log", map.get("log"));
});
}
return JsonResult.ok(list);
}
} }
\ No newline at end of file
...@@ -192,4 +192,15 @@ ...@@ -192,4 +192,15 @@
<if test="endTime != null and endTime != ''">#{endTime} >= and from_unixtime(submit_time/1000,'%Y-%m-%d %H:%i:%s')</if> <if test="endTime != null and endTime != ''">#{endTime} >= and from_unixtime(submit_time/1000,'%Y-%m-%d %H:%i:%s')</if>
</select> </select>
<!--获取执行实例的日志详情-->
<select id="queryExamplesLogByExecId" parameterType="string" resultType="java.util.Map">
select
exec_id as execId,
name,
log,
from_unixtime(upload_time/1000, '%Y-%m-%d %H:%i:%s') as uploadTime
from execution_logs
where 1=1 and exec_id=#{execId}
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment