提交 094e0704 authored 作者: 吕本才's avatar 吕本才

1、修改查询参数category字段

上级 071a1c3f
......@@ -12,6 +12,7 @@ import com.link.report.domain.wq.JimuReportListWq;
import com.link.report.pojo.response.JimuReportListDto;
import com.sfa.common.core.web.domain.PageInfo;
import com.sfa.common.core.web.page.TableSupport;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -55,7 +56,7 @@ public class JimuReportDaoImpl implements JimuReportDao {
public PageInfo<JimuReportListDto> selectListAll(JimuReportListWq wq) {
LambdaQueryWrapper<JimuReport> qw = new LambdaQueryWrapper<JimuReport>()
.eq(ObjectUtil.isNotEmpty(wq.getCategory()),JimuReport::getType,wq.getCategory())
.eq(ObjectUtil.isNotEmpty(wq.getCategory()) && !StringUtils.equals(wq.getCategory(),"0"),JimuReport::getType,wq.getCategory())
.like(ObjectUtil.isNotEmpty(wq.getName()),JimuReport::getName,wq.getName());
IPage<JimuReport> jimuReportPage = jimuReportMapper.selectPage(TableSupport.pageI(), qw);
......
......@@ -14,11 +14,15 @@
<where>
jr.del_flag =0
<if test="userName != null and userName != ''">
and jr.create_by = #{userName}
and jr.create_by = #{userName}
</if>
<if test="categoryName != null and categoryName != ''">
jrc.name = #{categoryName}
and jrc.name = #{categoryName}
</if>
<if test="category != null and category != '0'">
and jr.type = #{category}
</if>
<if test="name != null and name != ''">
and jr.name like concat('%', #{name}, '%')
</if>
......@@ -38,10 +42,10 @@
<!-- 分配给当前登录人的数据 -->
jr.del_flag =0 and jra.user_id = #{userId}
<if test="categoryName != null and categoryName != ''">
jrc.name = #{categoryName}
and jrc.name = #{categoryName}
</if>
<if test="category != null and category != ''">
jr.type = #{category}
<if test="category != null and category != '0'">
and jr.type = #{category}
</if>
<if test="name != null and name != ''">
and jr.name like concat('%', #{name}, '%')
......@@ -65,11 +69,14 @@
left join jimu_report_category jrc on jr.type = jrc.id
<where>
jr.del_flag =0
<if test="categoryName != null and categoryName != ''">
and jr.create_by = #{userName}
<if test="userName != null and userName != ''">
and jr.create_by = #{userName}
</if>
<if test="categoryName != null and categoryName != ''">
jrc.name = #{categoryName}
and jrc.name = #{categoryName}
</if>
<if test="category != null and category != '0'">
and jr.type = #{category}
</if>
<if test="name != null and name != ''">
and jr.name like concat('%', #{name}, '%')
......@@ -91,10 +98,9 @@
inner join jimu_report_auth jra on jr.id = jra.report_id
<where>
<!-- 分配给当前登录人的数据 -->
jr.del_flag =0
and jra.user_id = #{userId}
jr.del_flag =0 and jra.user_id = #{userId}
<if test="categoryName != null and categoryName != ''">
jrc.name = #{categoryName}
and jrc.name = #{categoryName}
</if>
<if test="name != null and name != ''">
and jr.name like concat('%', #{name}, '%')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论