Bläddra i källkod

学员成绩查询

小么熊🐻 2 år sedan
förälder
incheckning
40a454a071

+ 17 - 9
jsjp-admin/src/main/java/com/miaxis/app/controller/gzpt/GzptUserInfoController.java

@@ -7,29 +7,22 @@ import com.miaxis.common.core.domain.Response;
 import com.miaxis.common.core.domain.entity.UserInfo;
 import com.miaxis.common.exception.CustomException;
 import com.miaxis.common.utils.SecurityUtils;
-import com.miaxis.newgzpt.domain.GzptSchActivation;
-import com.miaxis.newgzpt.domain.GzptSchPayConfig;
 import com.miaxis.newgzpt.domain.GzptUserInfo;
-import com.miaxis.newgzpt.domain.GzptVideoVip;
 import com.miaxis.newgzpt.dto.GzptUserInfoDTO;
 import com.miaxis.newgzpt.dto.GzptVideoVipDTO;
 import com.miaxis.newgzpt.service.IGzptSchActivationService;
 import com.miaxis.newgzpt.service.IGzptSchPayConfigService;
 import com.miaxis.newgzpt.service.IGzptSchPayLogService;
 import com.miaxis.newgzpt.service.IGzptUserInfoService;
+import com.miaxis.newgzpt.vo.GzptExamInfoVO;
 import com.miaxis.newgzpt.vo.GzptSchActivationVO;
-import com.miaxis.newgzpt.vo.GzptVideoVipVO;
-import com.miaxis.userInfo.domain.UserVip;
 import com.miaxis.userInfo.service.IUserVipService;
-import com.miaxis.wx.domain.WxJsOrder;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
@@ -96,6 +89,21 @@ public class GzptUserInfoController extends BaseController {
 
     }
 
+
+    /**
+     * 根据学员stuOutId获取学员考试信息
+     */
+    @GetMapping("/getUserScoreByOutId")
+    @ApiOperation("根据学员stuOutId获取学员考试信息")
+    public Response<List<GzptExamInfoVO>> getUserScoreByOutId(Long stuOutId)   {
+        List<GzptExamInfoVO> scoreList = userInfoService.getUserScoreByOutId(stuOutId);
+        return Response.success(scoreList);
+
+    }
+
+
+
+
     /**
      * (测试专用)清除学员激活状态与会员信息接口
      */

+ 2 - 2
jsjp-admin/src/main/java/com/miaxis/app/controller/tms/CoachInfoController.java

@@ -61,9 +61,9 @@ public class CoachInfoController extends BaseController {
     /**
      * 教练登录测试
      */
-    @GetMapping("/getCoachInfoLogin")
+    @GetMapping("/coachInfoLogin")
     @ApiOperation("教练登录")
-    public Response<CoachInfo> getCoachInfoLogin(CoachInfoDTO coaDto) {
+    public Response<CoachInfo> coachInfoLogin(CoachInfoDTO coaDto) {
         CoachInfo coachInfo = coachInfoService.getCoachBylogin(coaDto);
         if(coachInfo==null) {
             Response response = new Response(502,"用户不存在或用户密码错误");

+ 3 - 0
jsjp-service/src/main/java/com/miaxis/newgzpt/mapper/GzptUserInfoMapper.java

@@ -3,6 +3,7 @@ package com.miaxis.newgzpt.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.miaxis.newgzpt.domain.GzptUserInfo;
 import com.miaxis.newgzpt.dto.GzptUserInfoDTO;
+import com.miaxis.newgzpt.vo.GzptExamInfoVO;
 
 import java.util.List;
 
@@ -21,4 +22,6 @@ public interface GzptUserInfoMapper extends BaseMapper<GzptUserInfo> {
     GzptUserInfo getUserByWxlogin(GzptUserInfoDTO gzptUserInfoDTO);
 
     GzptUserInfo getInfoById(Long id);
+
+    List<GzptExamInfoVO> getUserScoreByOutId(Long stuOutId);
 }

+ 2 - 1
jsjp-service/src/main/java/com/miaxis/newgzpt/service/IGzptUserInfoService.java

@@ -3,6 +3,7 @@ package com.miaxis.newgzpt.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.miaxis.newgzpt.domain.GzptUserInfo;
 import com.miaxis.newgzpt.dto.GzptUserInfoDTO;
+import com.miaxis.newgzpt.vo.GzptExamInfoVO;
 
 import java.util.List;
 
@@ -23,5 +24,5 @@ public interface IGzptUserInfoService extends IService<GzptUserInfo> {
 
     GzptUserInfo getInfoById(Long id);
 
-
+    List<GzptExamInfoVO> getUserScoreByOutId(Long stuOutId);
 }

+ 6 - 0
jsjp-service/src/main/java/com/miaxis/newgzpt/service/impl/GzptUserInfoServiceImpl.java

@@ -7,6 +7,7 @@ import com.miaxis.newgzpt.domain.GzptUserInfo;
 import com.miaxis.newgzpt.dto.GzptUserInfoDTO;
 import com.miaxis.newgzpt.mapper.GzptUserInfoMapper;
 import com.miaxis.newgzpt.service.IGzptUserInfoService;
+import com.miaxis.newgzpt.vo.GzptExamInfoVO;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -43,4 +44,9 @@ public class GzptUserInfoServiceImpl extends ServiceImpl<GzptUserInfoMapper, Gzp
     public GzptUserInfo getInfoById(Long id) {
         return  mapper.getInfoById(id);
     }
+
+    @Override
+    public List<GzptExamInfoVO> getUserScoreByOutId(Long stuOutId) {
+        return mapper.getUserScoreByOutId(stuOutId);
+    }
 }

+ 54 - 0
jsjp-service/src/main/java/com/miaxis/newgzpt/vo/GzptExamInfoVO.java

@@ -0,0 +1,54 @@
+package com.miaxis.newgzpt.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 视频VIP表
+ * </p>
+ *
+ * @author ${author}
+ * @since 2022-01-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class GzptExamInfoVO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+
+    @ApiModelProperty(value = "用户ID")
+    private Long userId;
+
+    @ApiModelProperty(value = "用户ID")
+    private String userName;
+
+    @ApiModelProperty(value = "考试科目")
+    private String kskm;
+
+    @ApiModelProperty(value = "考试成绩")
+    private Integer score;
+
+    @ApiModelProperty(value = "考试成绩")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date crdate;
+
+    @ApiModelProperty(value = "开始时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date startDate;
+
+    @ApiModelProperty(value = "结束时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date endDate;
+
+
+
+
+}

+ 20 - 0
jsjp-service/src/main/resources/mapper/newgzpt/GzptUserInfoMapper.xml

@@ -2,6 +2,21 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.miaxis.newgzpt.mapper.GzptUserInfoMapper">
 
+
+
+    <!-- 定义结果映射 -->
+    <resultMap type="com.miaxis.newgzpt.vo.GzptExamInfoVO" id="GzptExamInfoVOResultMap">
+        <result property="userId" column="EI_USER_ID"/>
+        <result property="userName" column="EI_USERNAME"/>
+        <result property="kskm" column="EI_KSKM"/>
+        <result property="score" column="EI_SCORE"/>
+        <result property="crdate" column="EI_CRDATE"/>
+        <result property="startDate" column="EI_STARTDATE"/>
+        <result property="endDate" column="EI_ENDDATE"/>
+    </resultMap>
+
+
+
     <select id="getList"  resultType="com.miaxis.newgzpt.domain.GzptUserInfo">
         select * from GZPT_USER_INFO
     </select>
@@ -41,5 +56,10 @@
 
 
 
+    <select id="getUserScoreByOutId" resultMap="GzptExamInfoVOResultMap">
+        select ei_user_id,ei_username,ei_kskm,ei_score,ei_crdate,ei_startdate,ei_enddate from gzpt_exam_info g where ei_user_id = (select id from gzpt_user_info u where u.out_id =#{stuOutId})
+        order by ei_id desc
+    </select>
+
 
 </mapper>