master:投诉/反馈 列表 接口完善;
parent
cc3fc987a7
commit
19a0d961ef
|
|
@ -2,6 +2,7 @@ package com.ruoyi.web.controller.xkt.vo.feedback;
|
|||
|
||||
import com.ruoyi.web.controller.xkt.vo.BasePageVO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
@ -15,4 +16,9 @@ import lombok.EqualsAndHashCode;
|
|||
@ApiModel
|
||||
public class FeedbackPageVO extends BasePageVO {
|
||||
|
||||
@ApiModelProperty(value = "反馈内容")
|
||||
private String content;
|
||||
@ApiModelProperty(value = "联系方式")
|
||||
private String contact;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.ruoyi.xkt.dto.feedback;
|
|||
|
||||
import com.ruoyi.xkt.dto.BasePageDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
@ -15,4 +16,9 @@ import lombok.EqualsAndHashCode;
|
|||
@ApiModel
|
||||
public class FeedbackPageDTO extends BasePageDTO {
|
||||
|
||||
@ApiModelProperty(value = "反馈内容")
|
||||
private String content;
|
||||
@ApiModelProperty(value = "联系方式")
|
||||
private String contact;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@ package com.ruoyi.xkt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xkt.domain.Feedback;
|
||||
import com.ruoyi.xkt.dto.feedback.FeedbackPageDTO;
|
||||
import com.ruoyi.xkt.dto.feedback.FeedbackResDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 意见反馈 数据层
|
||||
|
|
@ -10,4 +14,12 @@ import com.ruoyi.xkt.domain.Feedback;
|
|||
*/
|
||||
public interface FeedbackMapper extends BaseMapper<Feedback> {
|
||||
|
||||
/**
|
||||
* PC查询意见反馈列表
|
||||
*
|
||||
* @param pageDTO 查询入参
|
||||
* @return List<FeedbackResDTO>
|
||||
*/
|
||||
List<FeedbackResDTO> selectPageList(FeedbackPageDTO pageDTO);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,10 +54,9 @@ public class FeedbackServiceImpl implements IFeedbackService {
|
|||
@Transactional(readOnly = true)
|
||||
public Page<FeedbackResDTO> page(FeedbackPageDTO pageDTO) {
|
||||
PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize());
|
||||
List<Feedback> feedbackList = this.feedbackMapper.selectList(new LambdaQueryWrapper<Feedback>()
|
||||
.eq(Feedback::getDelFlag, Constants.UNDELETED));
|
||||
List<FeedbackResDTO> feedbackList = this.feedbackMapper.selectPageList(pageDTO);
|
||||
return CollectionUtils.isEmpty(feedbackList) ? Page.empty(pageDTO.getPageSize(), pageDTO.getPageNum())
|
||||
: Page.convert(new PageInfo<>(feedbackList), BeanUtil.copyToList(feedbackList, FeedbackResDTO.class));
|
||||
: Page.convert(new PageInfo<>(feedbackList));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
<?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.ruoyi.xkt.mapper.FeedbackMapper">
|
||||
|
||||
<select id="selectPageList" resultType="com.ruoyi.xkt.dto.feedback.FeedbackResDTO">
|
||||
SELECT
|
||||
id,
|
||||
contact,
|
||||
content
|
||||
FROM
|
||||
feedback
|
||||
WHERE
|
||||
del_flag = 0
|
||||
<if test="content != null and content != ''">
|
||||
AND content LIKE concat('%', #{content}, '%')
|
||||
</if>
|
||||
<if test="contact != null and contact != ''">
|
||||
AND contact LIKE concat('%', #{contact}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue