新增历史任务操作
parent
1dad2813f8
commit
32be5e61d1
@ -0,0 +1,16 @@
|
||||
package com.glxp.api.dao.trace;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.glxp.api.entity.trace.TraceTaskHistoryEntity;
|
||||
import com.glxp.api.req.trace.TraceTaskDetailRequest;
|
||||
import com.glxp.api.res.trace.TraceTaskDlResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TraceTaskHistoryMapper extends BaseMapper<TraceTaskHistoryEntity> {
|
||||
|
||||
|
||||
List<TraceTaskDlResponse> queryTraceTaskList(TraceTaskDetailRequest traceTaskDetailRequest);
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.glxp.api.service.trace;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.trace.TraceTaskNoticeMapper;
|
||||
import com.glxp.api.req.trace.TraceTaskDetailRequest;
|
||||
import com.glxp.api.res.trace.TraceTaskDlResponse;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.glxp.api.dao.trace.TraceTaskHistoryMapper;
|
||||
import com.glxp.api.entity.trace.TraceTaskHistoryEntity;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TraceTaskHistoryService extends ServiceImpl<TraceTaskHistoryMapper, TraceTaskHistoryEntity> {
|
||||
@Resource
|
||||
TraceTaskHistoryMapper traceTaskHistoryMapper;
|
||||
|
||||
public List<TraceTaskDlResponse> queryTraceTaskList(TraceTaskDetailRequest traceTaskDetailRequest) {
|
||||
if (traceTaskDetailRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (traceTaskDetailRequest.getPage() != null) {
|
||||
int offset = (traceTaskDetailRequest.getPage() - 1) * traceTaskDetailRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, traceTaskDetailRequest.getLimit());
|
||||
}
|
||||
return traceTaskHistoryMapper.queryTraceTaskList(traceTaskDetailRequest);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.glxp.api.dao.trace.TraceTaskHistoryMapper">
|
||||
<select id="queryTraceTaskList" parameterType="com.glxp.api.req.trace.TraceTaskDetailRequest"
|
||||
resultType="com.glxp.api.res.trace.TraceTaskDlResponse">
|
||||
SELECT *
|
||||
FROM trace_task_history
|
||||
<where>
|
||||
<if test="taskType != '' and taskType != null">
|
||||
and taskType = #{taskType}
|
||||
</if>
|
||||
<if test="status != '' and status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="cpmctymc != '' and cpmctymc != null">
|
||||
and cpmctymc LIKE CONCAT('%', #{cpmctymc}, '%')
|
||||
</if>
|
||||
<if test="ggxh != '' and ggxh != null">
|
||||
and ggxh LIKE CONCAT('%', #{ggxh}, '%')
|
||||
</if>
|
||||
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
|
||||
and ylqxzcrbarmc = #{ylqxzcrbarmc}
|
||||
</if>
|
||||
<if test="batchNo != '' and batchNo != null">
|
||||
and batchNo = #{batchNo}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue