From a99684a9a4ecbdd71d1c93ef824f7741ff52c5d9 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期六, 16 九月 2023 11:06:13 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai

---
 cloud-server-account/src/main/resources/mapper/TStudentMapper.xml |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/cloud-server-account/src/main/resources/mapper/TStudentMapper.xml b/cloud-server-account/src/main/resources/mapper/TStudentMapper.xml
index ea3639f..09bab21 100644
--- a/cloud-server-account/src/main/resources/mapper/TStudentMapper.xml
+++ b/cloud-server-account/src/main/resources/mapper/TStudentMapper.xml
@@ -3,7 +3,7 @@
 <mapper namespace="com.dsh.account.mapper.TStudentMapper">
 
     <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.dsh.account.entity.TStudent">
+    <resultMap id="BaseResultMap" type="com.dsh.account.dto.TStudentDto">
         <id column="id" property="id" />
         <result column="appUserId" property="appUserId" />
         <result column="name" property="name" />
@@ -19,6 +19,46 @@
         <result column="insertTime" property="insertTime" />
         <result column="headImg" property="headImg" />
         <result column="isDefault" property="isDefault" />
+
     </resultMap>
 
+    <select id="selectAll" resultType="com.dsh.account.dto.TStudentDto">
+        SELECT * FROM (
+        SELECT
+        st.* ,us.`name` AS userName,us.province,us.city
+        FROM
+        t_student st
+        LEFT JOIN t_app_user us on st.appUserId = us.id) o
+        <where>
+
+            <if test="item.province != null and item.province != ''">
+                and o.province  LIKE CONCAT('%',#{item.province},'%')
+            </if>
+            <if test="item.city != null and item.city != ''">
+                and o.city  LIKE CONCAT('%',#{item.city},'%')
+            </if>
+            <if test="item.name != null and item.name != ''">
+                and o.name  LIKE CONCAT('%',#{item.name},'%')
+            </if>
+            <if test="item.userName != null and item.userName != ''">
+                and o.userName  LIKE CONCAT('%',#{item.userName},'%')
+            </if>
+            <if test="item.phone != null and item.phone != ''">
+                and o.phone  LIKE CONCAT('%',#{item.phone},'%')
+            </if>
+        </where>
+
+    </select>
+    <select id="selectWebOne" resultType="com.dsh.account.dto.TStudentDto">
+        SELECT * FROM (
+                          SELECT
+                              st.* ,us.`name` AS userName,us.province,us.city
+                          FROM
+                              t_student st
+                                  LEFT JOIN t_app_user us on st.appUserId = us.id
+                        ) o
+        where o.id = #{id}
+
+    </select>
+
 </mapper>

--
Gitblit v1.7.1