问答查询 标准号字段 查询修复
This commit is contained in:
+19
@@ -2,8 +2,13 @@ package com.adc.da.slrs.StandardQA.service.Impl;
|
|||||||
|
|
||||||
import com.adc.da.slrs.StandardQA.dao.ReplyDao;
|
import com.adc.da.slrs.StandardQA.dao.ReplyDao;
|
||||||
import com.adc.da.slrs.StandardQA.entity.Reply;
|
import com.adc.da.slrs.StandardQA.entity.Reply;
|
||||||
|
import com.adc.da.slrs.StandardQA.entity.ReplyPage;
|
||||||
import com.adc.da.slrs.StandardQA.service.ReplyService;
|
import com.adc.da.slrs.StandardQA.service.ReplyService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -16,4 +21,18 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@Service
|
@Service
|
||||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||||
public class ReplyServiceImpl extends ServiceImpl<ReplyDao, Reply> implements ReplyService {
|
public class ReplyServiceImpl extends ServiceImpl<ReplyDao, Reply> implements ReplyService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<Reply> listByPage(ReplyPage reply) {
|
||||||
|
Page page=new Page();
|
||||||
|
page.setSize(reply.getPageSize());
|
||||||
|
page.setCurrent(reply.getPage());
|
||||||
|
QueryWrapper<Reply> wrapper=new QueryWrapper<>();
|
||||||
|
wrapper.eq(StringUtils.isNotBlank(reply.getAskId()),"ASK_ID",reply.getAskId());
|
||||||
|
wrapper.eq(StringUtils.isNotBlank(reply.getAnswerer()),"ANSWERER",reply.getAnswerer());
|
||||||
|
wrapper.like(StringUtils.isNotBlank(reply.getAppendixName()),"APPENDIX_NAME",reply.getAppendixName());
|
||||||
|
wrapper.eq("STATE","yes");
|
||||||
|
wrapper.orderByDesc("REPLY_TIME");
|
||||||
|
return this.page(page,wrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user