Преглед изворни кода

1、陪练课调整
2、付费陪练课

Joburgess пре 5 година
родитељ
комит
c72ddde794

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/PracticeGroupDao.java

@@ -74,6 +74,17 @@ public interface PracticeGroupDao extends com.ym.mec.common.dal.BaseDAO<Long, Pr
                                         @Param("groupId") Long groupId);
 
     /**
+     * @describe 获取学生指定的课程组
+     * @author Joburgess
+     * @date 2020/2/19
+     * @param userId:
+     * @param groupId:
+     * @return com.ym.mec.biz.dal.entity.PracticeGroup
+     */
+    PracticeGroupDto findUserPracticeGroup2(@Param("userId") Integer userId,
+                                        @Param("groupId") Long groupId);
+
+    /**
      * @describe 获取学生最后一次购买的陪练课组
      * @author Joburgess
      * @date 2020/2/17

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java

@@ -2089,7 +2089,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         if(Objects.isNull(groupId)){
             throw new BizException("请选择续费的课程");
         }
-        return practiceGroupDao.findUserPracticeGroup(userId, groupId);
+        return practiceGroupDao.findUserPracticeGroup2(userId, groupId);
     }
 
     @Override
@@ -2112,6 +2112,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         } else {
             userDefaultSubjectIds = new ArrayList<>();
         }
+        Collections.swap(subjects,6,7);
         PracticeGroupSellPrice practiceGroupSellPrice = practiceGroupSellPriceDao.get(organId);
         result.put("subjects", subjects);
         result.put("practiceApplyStartTime", practiceApplyStartTimeConfig.getParanValue());

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

@@ -126,9 +126,14 @@
 			student_id_=#{userId}
 			AND spo.status_="SUCCESS"
 	</select>
-    <select id="findUserPracticeGroup" resultMap="PracticeGroup">
+	<select id="findUserPracticeGroup" resultMap="PracticeGroup">
 		SELECT * FROM practice_group WHERE student_id_=#{userId} AND id_=#{groupId};
 	</select>
+	<select id="findUserPracticeGroup2" resultMap="PracticeGroupDto">
+		SELECT pg.*,su.real_name_ teacher_name_ FROM practice_group pg
+		LEFT JOIN sys_user su ON pg.user_id_ = su.id_
+		WHERE pg.student_id_=#{userId} AND pg.id_=#{groupId};
+	</select>
 
     <sql id="practiceGroupQueryCondition">
 		<where>