Commit 96e00330 by 穆龙飞

modify:增加子工单列表

parent 029bf125
Pipeline #85353 passed with stages
in 1 minute 39 seconds
......@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
import javax.validation.Valid;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
......@@ -65,4 +66,8 @@ public class ChangeSubFlowBiz {
flowCreateReqDTO.setFlowName(flowName);
return flowCreateReqDTO;
}
public List<ChangeExecRecord> list(Integer page, Integer pageSize) {
return changeSubFlowService.query((page - 1) * pageSize, pageSize);
}
}
......@@ -2,6 +2,8 @@ package com.netease.mail.yanxuan.change.biz.service;
import com.netease.mail.yanxuan.change.dal.entity.ChangeExecRecord;
import java.util.List;
public interface ChangeSubFlowService {
/**
......@@ -9,4 +11,11 @@ public interface ChangeSubFlowService {
*/
void createSubFlow(ChangeExecRecord execRecord);
/**
* 查询子工单
* @param limit
* @param offset
* @return
*/
List<ChangeExecRecord> query(int limit, Integer offset);
}
......@@ -6,6 +6,8 @@ import com.netease.mail.yanxuan.change.dal.mapper.ChangeExecRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ChangeSubFlowServiceImpl implements ChangeSubFlowService {
......@@ -16,4 +18,9 @@ public class ChangeSubFlowServiceImpl implements ChangeSubFlowService {
public void createSubFlow(ChangeExecRecord execRecord) {
changeExecRecordMapper.insertSelective(execRecord);
}
@Override
public List<ChangeExecRecord> query(int limit, Integer offset) {
return changeExecRecordMapper.queryList(limit, offset);
}
}
......@@ -39,4 +39,7 @@ public interface ChangeExecRecordMapper extends tk.mybatis.mapper.common.Mapper<
@Select("SELECT DISTINCT(change_record_id) FROM TB_YX_QC_CHANGE_EXEC_RECORD WHERE change_exec_user_email LIKE #{changeExecUser}")
List<Long> queryByUser(@Param("changeExecUser") String changeExecUser);
@Select("SELECT * FROM TB_YX_QC_CHANGE_EXEC_RECORD ORDER BY id DESC LIMIT #{limit},#{offset}")
List<ChangeExecRecord> queryList(@Param("limit") int limit, @Param("offset") Integer offset);
}
......@@ -8,15 +8,14 @@ package com.netease.mail.yanxuan.change.web.controller;
import com.netease.mail.yanxuan.change.biz.biz.ChangeSubFlowBiz;
import com.netease.mail.yanxuan.change.common.bean.AjaxResult;
import com.netease.mail.yanxuan.change.dal.entity.ChangeExecRecord;
import com.netease.mail.yanxuan.change.dal.meta.model.req.ChangeSubFlowCreateReq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
/**
* @Author zcwang
......@@ -40,4 +39,14 @@ public class ChangeSubFlowController {
return AjaxResult.success(changeSubFlowBiz.createAndSubmit(changeSubFlowCreateReq));
}
/**
* 发起变更执行工单
*
* @return
*/
@GetMapping("/list")
public AjaxResult<List<ChangeExecRecord>> list(@RequestParam(name = "page", defaultValue = "1") Integer page,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
return AjaxResult.success(changeSubFlowBiz.list(page, pageSize));
}
}
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