Explorar o código

fix(app):修复教练查询条件匹配问题

- 将教练ID精确匹配调整为模糊匹配
- 统一使用CONCAT函数处理SQL LIKE语句- 确保查询条件能正确匹配教练相关信息
-优化课程查询中教练ID的匹配逻辑
-修复可能因匹配方式导致的数据查询异常
SheepHy hai 1 semana
pai
achega
6a636053e7

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppCoursesMapper.xml

@@ -97,7 +97,7 @@
         LEFT JOIN nm_site e on e.id = b.address_site_id
         where 1=1 and b.racking_status=0 and b.del_flag =0 and b.end_time > #{date}
         <if test="courseRequestVo.instructorId != null and courseRequestVo.instructorId !=''">
-            and  b.user_id=#{courseRequestVo.instructorId}
+            and  b.user_id LIKE CONCAT('%', #{courseRequestVo.instructorId}, '%')
         </if>
         <if test="courseRequestVo.siteId != null and courseRequestVo.siteId !=''">
             and  b.address_site_id=#{courseRequestVo.siteId}

+ 1 - 2
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppInstructorMapper.xml

@@ -95,8 +95,7 @@
     <select id="findById" resultType="org.jeecg.modules.app.vo.coach.AppCoachDetailsVO">
         select a.id,a.user_id,b.realname,a.training_programs,a.good_rate,a.teaching_philosophy,a.excel_msg,b.avatar,a.background_img,
                b.certificate_innocence,b.healthy,b.honor
-        from nm_instructor a left join  sys_user b on a.user_id = b.id
-        where a.user_id LIKE CONCAT('', #{id}, '%'))
+        from nm_instructor a left join  sys_user b on a.user_id = b.id where a.user_id LIKE CONCAT('%', #{id}, '%')
 
     </select>
     <select id="findPage" resultType="org.jeecg.modules.system.app.vo.staff.StaffResponseVO">