提交 399d6cf7 authored 作者: douxy's avatar douxy

cp稽核接口改造:新增稽核查询接口信息

上级 aeccac80
......@@ -2,6 +2,7 @@ package com.wangxiaolu.promotion.controller.activity.examine;
import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto;
import com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto;
import com.wangxiaolu.promotion.result.basedata.R;
import com.wangxiaolu.promotion.service.activity.examine.ExaPlanQueryService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -21,15 +22,20 @@ public class ExaPlanQueryController {
@Autowired
private ExaPlanQueryService exaPlanQueryService;
@GetMapping("/{id}")
public R selectById(@PathVariable @PathParam("id") Long id) {
ActivityExamineDto examineDto = exaPlanQueryService.selectById(id);
if (examineDto != null) {
return R.success(examineDto);
}
InspectionInfoDto inspectionInfoDto =exaPlanQueryService.selectNewByID(id);
return R.success(inspectionInfoDto);
}
@PostMapping("/page")
public R page(@RequestBody PageInfo pageInfo){
exaPlanQueryService.page(pageInfo);
exaPlanQueryService.pageV2(pageInfo);
return R.success(pageInfo);
}
......
......@@ -2,6 +2,7 @@ package com.wangxiaolu.promotion.service.activity.examine;
import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto;
import com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto;
/**
* @author : liqiulin
......@@ -14,4 +15,8 @@ public interface ExaPlanQueryService {
ActivityExamineDto selectByPlanId(Long planId);
void page(PageInfo pageInfo);
InspectionInfoDto selectNewByID(Long id);
void pageV2(PageInfo pageInfo);
}
......@@ -3,8 +3,11 @@ package com.wangxiaolu.promotion.service.activity.examine.impl;
import com.alibaba.fastjson.JSONObject;
import com.wangxiaolu.promotion.domain.examine.dao.ActivityExamineDao;
import com.wangxiaolu.promotion.domain.examine.wrapperQo.ExamineWrapper;
import com.wangxiaolu.promotion.domain.inspection.dao.InspectionInfoDao;
import com.wangxiaolu.promotion.domain.inspection.wrapper.InspectionInfoWrapper;
import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto;
import com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto;
import com.wangxiaolu.promotion.service.activity.examine.ExaPlanQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -20,6 +23,9 @@ public class ExaPlanQueryServiceImpl implements ExaPlanQueryService {
@Autowired
private ActivityExamineDao activityExamineDao;
@Autowired
private InspectionInfoDao inspectionInfoDao;
@Override
public ActivityExamineDto selectById(Long id) {
return activityExamineDao.selectById(id);
......@@ -36,4 +42,14 @@ public class ExaPlanQueryServiceImpl implements ExaPlanQueryService {
activityExamineDao.page(pageInfo,wq);
}
@Override
public InspectionInfoDto selectNewByID(Long id) {
return inspectionInfoDao.selectById( id);
}
@Override
public void pageV2(PageInfo pageInfo) {
InspectionInfoWrapper wq = JSONObject.parseObject(JSONObject.toJSONString(pageInfo.getQueryParams()), InspectionInfoWrapper.class);
inspectionInfoDao.page(pageInfo,wq);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论