Browse Source

增加 增加学员头像字段返回

hgw 2 years ago
parent
commit
f6f4d734bf

+ 4 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseGroupServiceImpl.java

@@ -1,5 +1,8 @@
 package com.yonge.cooleshow.biz.dal.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.yonge.cooleshow.biz.dal.enums.GoodTypeEnum;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -577,7 +580,7 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
         Map<String, Object> param = WrapperUtil.toMap(afterParam.getBizParam());
         String orderNo = afterParam.getOrderNo();
         Long studentId = (Long) param.get("studentId");
-        List<CourseSchedule> courseList = (List<CourseSchedule>) param.get("courseList");
+        List<CourseSchedule> courseList = JSONArray.parseArray(JSON.toJSONString(param.get("courseList")), CourseSchedule.class);
         CourseGroup courseGroup = (CourseGroup) param.get("courseGroup");
 
         //写course_schedule_student_payment表 作为记录锁定时间用,防止重复购买,如果支付失败则删除该数据

+ 11 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/LiveCourseInfoVo.java

@@ -57,6 +57,9 @@ public class LiveCourseInfoVo extends CourseGroupVo implements Serializable {
         @ApiModelProperty(value = "学员名称")
         private String studentName;
 
+        @ApiModelProperty(value = "头像")
+        private String avatar;
+
         @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
         @ApiModelProperty(value = "购买时间")
         private Date createTime;
@@ -77,6 +80,14 @@ public class LiveCourseInfoVo extends CourseGroupVo implements Serializable {
             this.studentName = studentName;
         }
 
+        public String getAvatar() {
+            return avatar;
+        }
+
+        public void setAvatar(String avatar) {
+            this.avatar = avatar;
+        }
+
         public Date getCreateTime() {
             return createTime;
         }

+ 1 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -47,6 +47,7 @@
     <select id="queryStudentInfoByGroupId" resultType="com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo$CourseBuyStudentVo">
         select a.user_id_      as studentId,
                b.real_name_    as studentName,
+               b.avatar_ as avatar,
                a.created_time_ as createTime
         from course_schedule_student_payment as a
                  left join sys_user as b on a.user_id_ = b.id_