任务列表后端代码
parent
c166838758
commit
d921b75894
@ -0,0 +1,20 @@
|
||||
package com.glxp.api.service.trace;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.glxp.api.entity.trace.TraceManuOrderEntity;
|
||||
import com.glxp.api.entity.trace.TraceTaskNoticeEntity;
|
||||
import com.glxp.api.req.trace.TraceManuOrderRequest;
|
||||
import com.glxp.api.req.trace.TraceTaskDetailRequest;
|
||||
import com.glxp.api.res.trace.TraceManuOrderResponse;
|
||||
import com.glxp.api.res.trace.TraceTaskDlResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TraceTaskService extends IService<TraceTaskNoticeEntity> {
|
||||
|
||||
List<TraceTaskDlResponse> queryTraceTaskList(TraceTaskDetailRequest traceTaskDetailRequest);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.glxp.api.service.trace.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.trace.TraceOrderMapper;
|
||||
import com.glxp.api.dao.trace.TraceTaskNoticeMapper;
|
||||
|
||||
import com.glxp.api.entity.trace.TraceTaskNoticeEntity;
|
||||
import com.glxp.api.req.trace.TraceTaskDetailRequest;
|
||||
import com.glxp.api.res.trace.TraceTaskDlResponse;
|
||||
import com.glxp.api.service.trace.TraceTaskService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TraceTaskServiceImpl extends ServiceImpl<TraceTaskNoticeMapper, TraceTaskNoticeEntity> implements TraceTaskService {
|
||||
@Resource
|
||||
TraceTaskNoticeMapper traceTaskNoticeMapper;
|
||||
|
||||
@Override
|
||||
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 traceTaskNoticeMapper.queryTraceTaskList(traceTaskDetailRequest);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue