From e3a2245265516fef78b4737d6fffc939e7c5e0af Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期四, 03 七月 2025 17:56:07 +0800 Subject: [PATCH] bug修改 --- pt-errand/src/main/resources/mapper/CommunityMapper.xml | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pt-errand/src/main/resources/mapper/CommunityMapper.xml b/pt-errand/src/main/resources/mapper/CommunityMapper.xml index 4b9dfda..c86d881 100644 --- a/pt-errand/src/main/resources/mapper/CommunityMapper.xml +++ b/pt-errand/src/main/resources/mapper/CommunityMapper.xml @@ -16,6 +16,9 @@ <select id="getTotalCommunityList" resultType="com.ruoyi.errand.object.vo.app.CommunityListVO"> select id ,name from t_community where del_flag=0 + <if test="name != null and '' != name"> + and name like concat('%',#{name},'%') + </if> </select> <select id="getAllCommunityList" resultType="com.ruoyi.errand.object.vo.sys.AllCommunityListVO"> select @@ -26,10 +29,14 @@ where del_flag=0 and - id not in - <foreach collection="list" item="item" index="index" open="(" close=")" separator=","> - #{item} - </foreach> + status = 0 + <if test="list!=null and list.size>0"> + and id not in + <foreach collection="list" item="item" index="index" open="(" close=")" separator=","> + #{item} + </foreach> + </if> + </select> <select id="getCommunityPageList" resultType="com.ruoyi.errand.object.vo.sys.CommunityPageListVO"> select @@ -43,9 +50,9 @@ from t_community tc left join t_region tr on tc.region_id = tr.id left join t_community_courier tcc on tc.id = tcc.community_id - left join t_courier tco on tcc.courier_id = toc.id + left join t_courier tco on tcc.courier_id = tco.id where - del_flag=0 + tc.del_flag=0 <if test="dto.name !=null and ''!= dto.name"> and tc.name like concat('%',#{dto.name},'%') </if> @@ -64,5 +71,6 @@ <if test="dto.status!=null"> and tc.status =#{dto.status} </if> + order by tc.create_time desc </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1