Selaa lähdekoodia

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

zouxuan 1 vuosi sitten
vanhempi
commit
cbf6e69262

+ 18 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/MusicSheetApplicationExtendController.java

@@ -12,8 +12,10 @@ import com.microsvc.toolkit.common.response.paging.PageInfo;
 import com.microsvc.toolkit.common.response.template.R;
 import com.microsvc.toolkit.common.webportal.exception.BizException;
 import com.microsvc.toolkit.config.jwt.utils.JwtUserInfo;
+import com.yonge.cooleshow.biz.dal.dto.PageUtil;
 import com.yonge.cooleshow.biz.dal.entity.MusicSheet;
 import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
+import com.yonge.cooleshow.biz.dal.wrapper.MusicSheetWrapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -28,6 +30,7 @@ import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -91,7 +94,21 @@ public class MusicSheetApplicationExtendController {
     public R<PageInfo<CbsMusicSheetWrapper.MusicSheet>> musicSheetPage(@RequestBody CbsMusicSheetWrapper.MusicSheetQuery var1) {
         var1.setAddAppId(Long.parseLong(openFeignClientConfigProperties.getAppId()));
         try {
-            return R.from(this.musicFeignClientService.musicSheetPage(var1).feignData());
+            PageInfo<CbsMusicSheetWrapper.MusicSheet> info = this.musicFeignClientService.musicSheetPage(var1).feignData();
+            if (CollectionUtils.isEmpty(info.getRows())) {
+                return R.from(info);
+            }else {
+                List<MusicSheetWrapper.CbsMusicSheet> result = new ArrayList<>();
+                for (CbsMusicSheetWrapper.MusicSheet row : info.getRows()) {
+                    MusicSheetWrapper.CbsMusicSheet cbsMusicSheet = JSONObject.parseObject(JSONObject.toJSONString(row), MusicSheetWrapper.CbsMusicSheet.class);
+                    cbsMusicSheet.setId(row.getId().toString());
+                    cbsMusicSheet.setBizId(row.getBizId().toString());
+                    cbsMusicSheet.setMusicCategoryId(row.getMusicCategoryId().toString());
+                    result.add(cbsMusicSheet);
+                }
+                PageUtil.pageInfo(info, result);
+                return R.from(info);
+            }
         } catch (Exception e) {
             log.error("查询曲目应用拓展表异常", e);
             if (e instanceof BizException) {

+ 1 - 1
cooleshow-auth/auth-server/pom.xml

@@ -51,7 +51,7 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
-            <version>2.0.9</version>
+            <version>1.2.79</version>
         </dependency>
 
         <dependency>

+ 1 - 1
cooleshow-user/user-biz/pom.xml

@@ -40,7 +40,7 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
-            <version>2.0.9</version>
+            <version>1.2.79</version>
         </dependency>
 
         <dependency>

+ 15 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/PageUtil.java

@@ -3,6 +3,7 @@ package com.yonge.cooleshow.biz.dal.dto;
 
 import com.yonge.toolset.base.page.PageInfo;
 
+import java.util.List;
 import java.util.Objects;
 
 /**
@@ -24,4 +25,18 @@ public class PageUtil {
         resultPage.setTotal(total);
         return resultPage;
     }
+
+    public static <T,E> PageInfo<T> pageInfo(com.microsvc.toolkit.common.response.paging.PageInfo<E> source, List<T> rows) {
+        if (Objects.isNull(source)) {
+            return new PageInfo<>(1, 20);
+        }
+        int total = Integer.parseInt(String.valueOf(source.getTotal()));
+        int limit = Integer.parseInt(String.valueOf(source.getLimit()));
+        PageInfo<T> resultPage = new PageInfo<>();
+        resultPage.setRows(rows);
+        resultPage.setPageNo(Long.valueOf(source.getCurrent()).intValue());
+        resultPage.setLimit(limit);
+        resultPage.setTotal(total);
+        return resultPage;
+    }
 }

+ 187 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/MusicSheetWrapper.java

@@ -2,8 +2,9 @@ package com.yonge.cooleshow.biz.dal.wrapper;
 
 import com.alibaba.fastjson.JSON;
 import com.dayaedu.cbs.common.enums.EClientType;
-import com.dayaedu.cbs.common.enums.music.EAudioType;
+import com.dayaedu.cbs.common.enums.music.*;
 import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
+import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -289,4 +290,189 @@ public class MusicSheetWrapper {
         }
 	}
 
+    @Data
+    @ApiModel(" MusicSheet-曲目表")
+    public static class CbsMusicSheet {
+
+        @ApiModelProperty("主键")
+        private String id;
+
+        @ApiModelProperty("业务平台曲目ID")
+        private String bizId;
+
+        @ApiModelProperty("曲目分类ID")
+        private String musicCategoryId;
+
+        @ApiModelProperty("曲目分类名称")
+        private String musicCategoryName;
+
+        @ApiModelProperty("曲目标签")
+        private String musicTag;
+
+        @ApiModelProperty("曲目标签名称")
+        private String musicTagNames;
+
+        @ApiModelProperty("曲目封面图")
+        private String musicCover;
+
+        @ApiModelProperty("曲目名称")
+        private String name;
+
+        @ApiModelProperty("是否审核版本")
+        private Boolean appAuditFlag;
+
+        @ApiModelProperty("曲目声部(多个,用逗号分隔)")
+        private String subjectIds;
+
+        @ApiModelProperty("曲目声部code")
+        private String subjectCodes;
+
+        @ApiModelProperty("曲目声部名称")
+        private String subjectNames;
+
+        @ApiModelProperty("曲目乐器(多个,用逗号分隔)")
+        private String musicalInstrumentIds;
+
+        @ApiModelProperty("曲目乐器code")
+        private String musicalInstrumentIdCodes;
+
+        @ApiModelProperty("曲目乐器名称")
+        private String musicalInstrumentNames;
+
+        @ApiModelProperty("作曲人/音乐人")
+        private String composer;
+
+        @ApiModelProperty("曲目类型(SINGLE:单曲 CONCERT:合奏)")
+        private EMusicSheetType musicSheetType;
+
+        @ApiModelProperty("是否使用系统节拍器(0:否;1:是)")
+        private Boolean isUseSystemBeat;
+
+        @ApiModelProperty("是否可评测(0:否;1:是)") //  midi默认1, mp3 有伴奏1
+        private Boolean isEvaluated;
+
+        @ApiModelProperty("是否可转谱(0:否; 1:是)") // 固定调,首调 有值 1
+        private Boolean isConvertibleScore;
+
+        @ApiModelProperty("是否展示指法(0:否;1:是)") // moren 1
+        private Boolean isShowFingering;
+
+        @ApiModelProperty("是否播入节拍器(0: 否 1:是)")
+        private Boolean isPlayBeat;
+
+        @ApiModelProperty("多声轨选择")
+        private String multiTracksSelection;
+
+        @ApiModelProperty("播放速度")
+        private String playSpeed;
+
+        @ApiModelProperty("播放模式(MIDI;MP3)")
+        private EMusicPlayMode playMode;
+
+        @ApiModelProperty("XML文件")
+        private String xmlFileUrl;
+
+        @ApiModelProperty("MIDI文件(保留字段)")
+        private String midiFileUrl;
+
+        @ApiModelProperty("曲目JSON")
+        private String musicJson;
+
+        @ApiModelProperty("曲目缓存JSON(后续使用)")
+        private String musicSvgJson;
+
+        @ApiModelProperty("曲目缓存")
+        private String musicSvg;
+
+
+        @ApiModelProperty("评测标准 节奏 AMPLITUDE 音准 FREQUENCY 分贝 DECIBELS")
+        private EEvaluationStandard evaluationStandard;
+
+        @ApiModelProperty("简谱缓存")
+        private String musicJianSvg;
+
+        @ApiModelProperty("首调缓存")
+        private String musicFirstSvg;
+
+        @ApiModelProperty("谱面图片JSON(后续使用)")
+        private String musicImgJson;
+
+        @ApiModelProperty("五线谱图片")
+        private String musicImg;
+
+        @ApiModelProperty("首调图片")
+        private String musicFirstImg;
+
+        @ApiModelProperty("固定调图片")
+        private String musicJianImg;
+
+        @ApiModelProperty("谱面参数设置")
+        private String extConfigJson;
+
+        @ApiModelProperty("谱面样式参数设置")
+        private String extStyleConfigJson;
+
+        @ApiModelProperty("可用类型(PLATFORM: 平台; ORG: 机构; PERSON: 个人)") // 暂时没有
+        private EMusicAvailableType availableType;
+
+        @ApiModelProperty("来源类型/作者属性(PLATFORM: 平台; ORG: 机构; PERSON: 个人)") // 作者属性
+        private EMusicSourceType sourceType;
+
+        @ApiModelProperty("音频类型(HOMEMODE: 自制 COMMON: 普通)")
+        private EAudioType audioType;
+
+        @ApiModelProperty("曲目状态(0:停用,1:启用)")
+        private Boolean status;
+
+        @ApiModelProperty("停用原因")
+        private String reason;
+
+        @ApiModelProperty("备注")
+        private String remark;
+
+        @ApiModelProperty("逻辑删除标识(0: 未删 1:已删)")
+        private Boolean delFlag;
+
+        @ApiModelProperty("更新人")
+        private Long updateBy;
+
+        @ApiModelProperty("更新时间")
+        private Date updateTime;
+
+        @ApiModelProperty("创建人")
+        private Long createBy;
+
+        @ApiModelProperty("上传人名称")
+        private String createByName;
+
+        @ApiModelProperty("创建时间")
+        private Date createTime;
+
+        @ApiModelProperty("评测频率,详情返回,指定应用端")
+        private String evaluationFrequency;
+
+
+        @ApiModelProperty("曲目伴奏")
+        private List<CbsMusicSheetWrapper.MusicSheetAccompaniment> musicSheetAccompanimentList;
+
+
+        @ApiModelProperty("曲目原音")
+        private List<CbsMusicSheetWrapper.MusicSheetSound> musicSheetSoundList;
+
+
+        @ApiModelProperty("所属人信息")
+        private CbsMusicSheetWrapper.MusicSheetExtend musicSheetExtend;
+
+        @ApiModelProperty("乐器信息")
+        private List<CbsMusicSheetWrapper.MusicalInstrument> musicalInstruments;
+
+        public String jsonString() {
+            return JSON.toJSONString(this);
+        }
+
+        public static CbsMusicSheetWrapper.MusicSheet from(String json) {
+            return JSON.parseObject(json, CbsMusicSheetWrapper.MusicSheet.class);
+        }
+    }
+
 }

+ 1 - 1
cooleshow-websocket/pom.xml

@@ -81,7 +81,7 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
-            <version>2.0.9</version>
+            <version>1.2.68</version>
         </dependency>
     </dependencies>
 

+ 2 - 2
pom.xml

@@ -239,7 +239,7 @@
 			<dependency>
 				<groupId>com.alibaba</groupId>
 				<artifactId>fastjson</artifactId>
-				<version>2.0.9</version>
+				<version>1.2.79</version>
 			</dependency>
 
 		</dependencies>
@@ -338,7 +338,7 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
-            <version>2.0.9</version>
+            <version>1.2.79</version>
         </dependency>
 	</dependencies>
 

+ 1 - 1
toolset/utils/pom.xml

@@ -95,7 +95,7 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
-            <version>2.0.9</version>
+            <version>1.2.70</version>
         </dependency>
 
         <dependency>