Browse Source

Merge branch 'develop' of http://git.dayaedu.com/yonge/cooleshow into develop

liujc 1 year ago
parent
commit
e89691949e

+ 9 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/tenant/controller/StudentController.java

@@ -83,6 +83,15 @@ public class StudentController extends BaseController {
         IPage<StudentVo> pages = studentService.selectPage(PageUtil.getPage(query), query);
         List<StudentVo> rows = pages.getRecords();
 
+        //如果真实姓名字段为空 把真实姓名赋值给昵称
+        rows.stream().forEach(r->{
+            if (StringUtils.isEmpty(r.getRealName())){
+                if (StringUtils.isNotEmpty(r.getUsername()))
+                    r.setRealName(r.getUsername());
+            }
+        });
+
+        
         Map<String, List<TenantActivationCode>> groupByUserId = new HashMap<>();
         if (!rows.isEmpty() && query.getTenantAlbumPurchaseId() != null) {
             List<String> studentIdList = rows.stream().map(StudentVo::getPhone).collect(Collectors.toList());

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

@@ -110,7 +110,7 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
             }
 
             //获取声部名
-            if (!musicSubject.isEmpty()){
+            if (StringUtils.isNotEmpty(musicSubject)){
                 List<Subject> subject = subjectService.findBySubjectByIdList(musicSubject);
                 Subject subject1 = subject.get(0);
                 m.setMusicSubjectName(subject1.getName());

+ 9 - 0
cooleshow-user/user-tenant/src/main/java/com/yonge/cooleshow/tenant/controller/StudentController.java

@@ -81,6 +81,15 @@ public class StudentController extends BaseController {
         IPage<StudentVo> pages = studentService.selectPage(PageUtil.getPage(query), query);
         List<StudentVo> rows = pages.getRecords();
 
+        //如果真实姓名字段为空 把真实姓名赋值给昵称
+        rows.stream().forEach(r->{
+            if (StringUtils.isEmpty(r.getRealName())){
+                if (StringUtils.isNotEmpty(r.getUsername()))
+                r.setRealName(r.getUsername());
+            }
+        });
+
+
         Map<Long, List<TenantActivationCode>> groupByUserId = new HashMap<>();
         if (!rows.isEmpty() && query.getTenantAlbumPurchaseId() != null) {
             List<String> studentPhones = rows.stream().map(StudentVo::getPhone).collect(Collectors.toList());