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

1、修改查询参数category字段

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