Browse Source

新增我的学员接口

小么熊🐻 1 year ago
parent
commit
a3b37f88e2

+ 17 - 0
jsjp-admin/src/main/java/com/miaxis/app/controller/tms/TmsStudentInfoController.java

@@ -106,6 +106,23 @@ public class TmsStudentInfoController extends BaseController {
         return toResponsePageInfo(stuInfoList);
     }
 
+
+    /**
+     * 查询我的学员信息列表
+     */
+    @GetMapping("/myList")
+    @ApiOperation("查询我的学员信息列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<TmsStudentInfoVo> myList(@ModelAttribute TmsStudentInfoDTO studentInfoDTO) {
+        startPage();
+        List<TmsStudentInfoVo> stuInfoList = studentInfoService.getTmsMyStudentInfoList(studentInfoDTO);
+        return toResponsePageInfo(stuInfoList);
+    }
+
+
     /**
      * 查询学员预报名列表
      */

+ 2 - 0
jsjp-service/src/main/java/com/miaxis/tms/mapper/TmsStudentInfoMapper.java

@@ -55,4 +55,6 @@ public interface TmsStudentInfoMapper extends BaseMapper<TmsStudentInfoVo> {
     List<TmsStudentTeachLogVo> getTmsStudentTeachLogById(TmsStudentInfoIdDTO studentInfoIdDTO);
 
     List<TmsStudentPhotoVo> getTmsStudentPhotoById(TmsStudentInfoPhotoDTO studentInfoPhotoDTO);
+
+    List<TmsStudentInfoVo> getTmsMyStudentInfoList(TmsStudentInfoDTO studentInfoDto);
 }

+ 2 - 0
jsjp-service/src/main/java/com/miaxis/tms/service/ITmsStudentInfoService.java

@@ -22,6 +22,8 @@ public interface ITmsStudentInfoService extends IService<TmsStudentInfoVo> {
 
     List<TmsStudentInfoVo> getTmsStudentInfoList(TmsStudentInfoDTO studentInfoDTO);
 
+    List<TmsStudentInfoVo> getTmsMyStudentInfoList(TmsStudentInfoDTO studentInfoDTO);
+
     List<TmsStudentInfoTempVo> getTmsStudentInfoTempList(TmsStudentInfoTempDTO studentInfoTempDTO);
 
     TmsStudentInfoIdVo getTmsStudentInfoById(TmsStudentInfoIdDTO stuIdDTO);

+ 8 - 0
jsjp-service/src/main/java/com/miaxis/tms/service/impl/TmsStudentInfoServiceImpl.java

@@ -45,6 +45,14 @@ public class TmsStudentInfoServiceImpl extends ServiceImpl<TmsStudentInfoMapper,
         return list;
     }
 
+    @Override
+    public List<TmsStudentInfoVo> getTmsMyStudentInfoList(TmsStudentInfoDTO studentInfoDto) {
+        List<TmsStudentInfoVo> list =  mapper.getTmsMyStudentInfoList(studentInfoDto);
+        return list;
+    }
+
+
+
     @Override
     public List<TmsStudentInfoTempVo> getTmsStudentInfoTempList(TmsStudentInfoTempDTO studentInfoTempDto) {
         List<TmsStudentInfoTempVo> list =  mapper.getTmsStudentInfoTempList(studentInfoTempDto);

+ 2 - 9
jsjp-service/src/main/resources/mapper/tms/TmsStudentInfoMapper.xml

@@ -116,7 +116,7 @@
 
 
 
-    <select id="getTmsStudentInfoList"  parameterType="com.miaxis.tms.dto.TmsStudentInfoDTO" resultMap="TmsStudentInfoResultMap">
+    <select id="getTmsMyStudentInfoList"  parameterType="com.miaxis.tms.dto.TmsStudentInfoDTO" resultMap="TmsStudentInfoResultMap">
         select t1.TSO_ID, t1.TSO_IDCARD, t1.TSO_NAME,t1.TSO_SEX,t1.Tso_Phone,t1.TSO_APPLYDATE, t1.TSO_STATE , t1.TSO_TRAINTYPE, t1.tso_photo_path, t1.TSO_REMARK,
                t2.Sri_Train_One_Exam_Status,t2.Sri_Train_One_Exam_Time,t2.Sri_Train_TWO_Exam_Status,t2.Sri_Train_Two_Exam_Time,
                t2.Sri_Train_Three_Exam_Status,t2.Sri_Train_Three_Exam_Time,t2.Sri_Train_Four_Exam_Status,t2.Sri_Train_Four_Exam_Time,'2' as bm_type
@@ -128,14 +128,7 @@
             AND t1.TSO_LOGOUT = 0
             <if test="appCoachId!=null" > AND t1.TSO_APP_COACH_ID = #{appCoachId,jdbcType=NUMERIC } </if>
             <if test="field != null  and field != ''"> AND (t1.Tso_Name like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.Tso_Phone like '%' || #{field,jdbcType=VARCHAR} || '%') </if>
-            <!--<if test="schoolId != null "> and t1.TSO_SCHOOL_ID = #{schoolId,jdbcType=NUMERIC} </if>-->
-
-            <if test="schoolId != null and schoolId !='' "> and t1.TSO_SCHOOL_ID in
-                <foreach item="sid" index="index" collection="schoolId.split(',')" open="(" separator="," close=")">
-                    #{sid}
-                </foreach>
-            </if>
-
+            <if test="schoolId != null "> and t1.TSO_SCHOOL_ID = #{schoolId,jdbcType=NUMERIC} </if>
             <if test="state != null  and state != ''"> AND t1.TSO_STATE = #{state,jdbcType=VARCHAR }</if>
             <if test="coachId!=null" >  AND ( t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC }
                                         or t1.TSO_COACH_LEADER = #{coachId,jdbcType=NUMERIC } ) </if>