فهرست منبع

酷乐秀曲目来源改为内容平台

zouxuan 1 سال پیش
والد
کامیت
480f146b60

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

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.dayaedu.cbs.openfeign.client.MusicFeignClientService;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetApplicationExtendClientWrapper;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
+import com.microsvc.toolkit.common.response.template.R;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.dao.MusicSheetAuthRecordDao;
 import com.yonge.cooleshow.biz.dal.dto.req.TeacherMusicSheetAuditReq;
@@ -116,7 +117,10 @@ public class MusicSheetAuthRecordServiceImpl extends ServiceImpl<MusicSheetAuthR
             List<Subject> subjectList = subjectService.findBySubjectByIdList(musicalInstrumentIds);
             addMusicSheet.setMusicalInstrumentIds(subjectList.stream().map(e->e.getCbsSubjectId().toString()).distinct().collect(Collectors.joining(",")));
             addMusicSheet.setSubjectIds(subjectList.stream().map(e->e.getParentSubjectId().toString()).distinct().collect(Collectors.joining(",")));
-            musicFeignClientService.musicSheetAdd(addMusicSheet);
+            R<Long> longR = musicFeignClientService.musicSheetAdd(addMusicSheet);
+            if (!longR.getCode().equals(200)) {
+                throw new BizException("同步到内容平台失败");
+            }
         }else {
             musicSheetService.updateById(musicSheet);
         }

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

@@ -570,7 +570,7 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
         MusicSheetDetailVo detailVo = baseMapper.detail(Long.parseLong(id));
         if (detailVo == null) {
             //获取待审核曲目信息
-            MusicSheetAuthRecord record = musicSheetAuthRecordService.getById(id);
+            MusicSheetAuthRecord record = musicSheetAuthRecordService.lambdaQuery().eq(MusicSheetAuthRecord::getMusicSheetId, id).last("LIMIT 1").one();
             if(Objects.nonNull(record)){
                 String musicSheetJson = record.getMusicSheetJson();
                 if(StringUtils.isNotEmpty(musicSheetJson)){

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

@@ -782,7 +782,7 @@
         ,msar.reason_ as auditReason
         ,msar.music_sheet_json_ as musicSheetJson
         ,msar.batch_no_ as batchNo
-        ,msar.batch_no_ as id
+        ,msar.music_sheet_id_ as id
         from music_sheet_auth_record  msar
         left join music_sheet t on t.id_ = msar.music_sheet_id_
         left join sys_user su on su.id_ = t.create_by_