Explorar el Código

realName 字段

chengpeng hace 5 años
padre
commit
76524cbed6

+ 11 - 0
mec-education/src/main/java/com/ym/mec/education/entity/SysUser.java

@@ -110,6 +110,10 @@ public class SysUser extends Model<SysUser> {
      */
     @TableField("im_token_")
     private String imToken;
+
+
+    @TableField("real_name_")
+    private String realName;
     /**
      * 身份证号码
      */
@@ -126,6 +130,13 @@ public class SysUser extends Model<SysUser> {
     @TableField("wechat_id_")
     private String wechatId;
 
+    public String getRealName() {
+        return realName;
+    }
+
+    public void setRealName(String realName) {
+        this.realName = realName;
+    }
 
     public Integer getId() {
         return id;

+ 3 - 1
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysUserMapper.xml

@@ -26,11 +26,13 @@
         <result column="id_card_no_" property="idCardNo" />
         <result column="esign_id_" property="esignId" />
         <result column="wechat_id_" property="wechatId" />
+        <result column="real_name_" property="realName" />
+
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id_, username_, password_, salt_, phone_, avatar_, create_time_, update_time_, lock_flag_, del_flag_, wx_openid_, qq_openid_, user_type_, gender_, nation_, birthdate_, email_, organ_id_, im_token_, id_card_no_, esign_id_, wechat_id_
+        id_, username_, password_, salt_, phone_, avatar_, create_time_, update_time_, lock_flag_, del_flag_, wx_openid_, qq_openid_, user_type_, gender_, nation_, birthdate_, email_, organ_id_, im_token_, id_card_no_, esign_id_, wechat_id_,real_name_
     </sql>
 
 </mapper>

+ 5 - 3
mec-education/src/main/java/com/ym/mec/education/service/impl/MusicGroupServiceImpl.java

@@ -260,9 +260,11 @@ public class MusicGroupServiceImpl extends ServiceImpl<MusicGroupMapper, MusicGr
 
                     studentMappers.forEach(stud ->{
 
-                        sysUserService.getById(stud.getUserId());
-
-
+                        SysUser sysUser = sysUserService.getById(stud.getUserId());
+                        if(sysUser != null){
+                            classStudentResp.setName(sysUser.);
+                            classStudentResp.setAvatar(sysUser.getAvatar());
+                        }
                         QueryWrapper<StudentAttendance> truntWrapper = new QueryWrapper<>();
                         //旷课
                         truntWrapper.lambda().eq(true, StudentAttendance::getMusicGroupId, req.getGroupId())