zouxuan 5 lat temu
rodzic
commit
b15eb49869

+ 3 - 3
mec-auth/mec-auth-server/src/main/resources/config/mybatis/SysUserMapper.xml

@@ -165,11 +165,11 @@
     </select>
 
     <select id="queryByUsername" resultMap="SysUser">
-		select * from sys_user where username_ = #{username} OR phone_ = #{username}
+		select * from sys_user where username_ = #{username} OR phone_ = #{username} LIMIT 1
 	</select>
 
     <select id="queryByPhone" resultMap="SysUser">
-		select * from sys_user where phone_ = #{phone} OR username_ = #{phone}
+		select * from sys_user where phone_ = #{phone} OR username_ = #{phone} LIMIT 1
 	</select>
     <resultMap id="ImUserModel" type="com.ym.mec.common.entity.ImUserModel">
         <result column="id_" property="id"/>
@@ -177,7 +177,7 @@
         <result property="portrait" column="avatar_"/>
     </resultMap>
     <select id="getBasic" resultMap="ImUserModel">
-        select * from sys_user where id_ = #{userId}
+        select * from sys_user where id_ = #{userId} LIMIT 1
     </select>
     
     <select id="queryByStatus" resultMap="SysUser">

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -308,9 +308,10 @@
         <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
     </resultMap>
     <select id="queryStudentPayLog" resultMap="StudentPayInfoDto">
-        SELECT spo.actual_amount_,spo.status_,spo.type_,mg.name_,spo.create_time_
+        SELECT spo.actual_amount_,spo.status_,spo.type_,IF(mg.name_ IS NULL,vg.name_,mg.name_) name_,spo.create_time_
         FROM student_payment_order spo
         LEFT JOIN music_group mg ON spo.music_group_id_=mg.id_
+        LEFT JOIN vip_group vg ON spo.music_group_id_ = vg.id_
         <where>
             spo.status_ = 'SUCCESS'
             <if test="date != null and date != ''">

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml

@@ -190,7 +190,7 @@
         LEFT JOIN sys_user_role sur ON sur.user_id_ = ue.user_id_
         LEFT JOIN sys_role sr ON sr.id_ = sur.role_id_
         LEFT JOIN organization o ON FIND_IN_SET(o.id_,ue.organ_id_)
-        WHERE ue.user_type_ LIKE '%SYSTEM%'
+        WHERE ue.user_type_ = 'SYSTEM'
         <if test="search != null">
             AND (ue.real_name_ LIKE CONCAT('%',#{search},'%') OR ue.phone_ LIKE CONCAT('%',#{search},'%'))
         </if>

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -243,7 +243,7 @@
 
     <!-- 根据证件号查询老师 -->
     <select id="findByCertificateNum" resultMap="Teacher">
-        SELECT * FROM teacher WHERE certificate_num_ = #{certificateNum}
+        SELECT * FROM teacher WHERE certificate_num_ = #{certificateNum} LIMIT 1
     </select>
     <select id="queryGroupStudents" resultMap="com.ym.mec.biz.dal.dao.MusicGroupDao.BasicUserDto">
         SELECT su.username_,su.id_ user_id_,su.avatar_ head_url_,su.gender_,s.name_ subject_name_