From 5d7b65670282a4fad015e37d567cfa171b162052 Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期二, 20 五月 2025 12:25:19 +0800 Subject: [PATCH] 基础代码 --- pt-errand/target/classes/mapper/CommunityMapper.xml | 68 ++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/pt-errand/target/classes/mapper/CommunityMapper.xml b/pt-errand/target/classes/mapper/CommunityMapper.xml new file mode 100644 index 0000000..4b9dfda --- /dev/null +++ b/pt-errand/target/classes/mapper/CommunityMapper.xml @@ -0,0 +1,68 @@ +<?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.errand.mapper.CommunityMapper"> + + <resultMap id="communityListVO" type="com.ruoyi.errand.object.vo.app.CommunityListVO"> + <id column="id" property="id"/> + <result column="name" property="name"/> + </resultMap> + + <select id="selectListByRegionId" resultMap="communityListVO"> + select id ,name + from t_community where region_id = #{regionId} + and del_flag=0 + and status = 0 + </select> + <select id="getTotalCommunityList" resultType="com.ruoyi.errand.object.vo.app.CommunityListVO"> + select id ,name + from t_community where del_flag=0 + </select> + <select id="getAllCommunityList" resultType="com.ruoyi.errand.object.vo.sys.AllCommunityListVO"> + select + id as communityId, + name as name + from + t_community + where + del_flag=0 + and + id not in + <foreach collection="list" item="item" index="index" open="(" close=")" separator=","> + #{item} + </foreach> + </select> + <select id="getCommunityPageList" resultType="com.ruoyi.errand.object.vo.sys.CommunityPageListVO"> + select + tc.id, + tc.name as name, + tr.name as regionName, + tc.admin_name as adminName, + tc.admin_phone as adminPhone, + tco.name as courierName, + tc.status as status + 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 + where + del_flag=0 + <if test="dto.name !=null and ''!= dto.name"> + and tc.name like concat('%',#{dto.name},'%') + </if> + <if test="dto.regionId!=null"> + and tc.region_id =#{dto.regionId} + </if> + <if test="dto.adminName !=null and ''!= dto.adminName"> + and tc.admin_name like concat('%',#{dto.adminName},'%') + </if> + <if test="dto.adminPhone !=null and ''!= dto.adminPhone"> + and tc.admin_phone like concat('%',#{dto.adminPhone},'%') + </if> + <if test="dto.courierName !=null and ''!= dto.courierName"> + and tco.name like concat('%',#{dto.courierName},'%') + </if> + <if test="dto.status!=null"> + and tc.status =#{dto.status} + </if> + </select> +</mapper> \ No newline at end of file -- Gitblit v1.7.1