Pārlūkot izejas kodu

曲谱审核流程调整

Eric 2 gadi atpakaļ
vecāks
revīzija
8fc4c4660d

+ 45 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/req/TeacherMusicSheetAuditReq.java

@@ -2,6 +2,7 @@ package com.yonge.cooleshow.biz.dal.dto.req;
 
 
 import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
+import com.yonge.cooleshow.common.enums.YesOrNoEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -32,6 +33,18 @@ public class TeacherMusicSheetAuditReq {
     @NotBlank(message = "审核理由不能为空 ")
     private String remark;
 
+    @ApiModelProperty("是否可以转简谱(0:否,1:是)")
+    private YesOrNoEnum notation;
+
+    @ApiModelProperty(value = "是否可以评测(0:否;1:是)")
+    private YesOrNoEnum canEvaluate;  //是否可以评测(0:否;1:是)
+
+    @ApiModelProperty(value = "是否展示指法(0:否;1:是)")
+    private YesOrNoEnum showFingering;  //是否展示指法(0:否;1:是)
+
+    @ApiModelProperty(value = "是否自带节拍器(0:否;1:是)")
+    private YesOrNoEnum hasBeat;  //是否自带节拍器(0:否;1:是)
+
     public String getMusicImg() {
         return musicImg;
     }
@@ -63,4 +76,36 @@ public class TeacherMusicSheetAuditReq {
     public void setRemark(String remark) {
         this.remark = remark;
     }
+
+    public YesOrNoEnum getNotation() {
+        return notation;
+    }
+
+    public void setNotation(YesOrNoEnum notation) {
+        this.notation = notation;
+    }
+
+    public YesOrNoEnum getCanEvaluate() {
+        return canEvaluate;
+    }
+
+    public void setCanEvaluate(YesOrNoEnum canEvaluate) {
+        this.canEvaluate = canEvaluate;
+    }
+
+    public YesOrNoEnum getShowFingering() {
+        return showFingering;
+    }
+
+    public void setShowFingering(YesOrNoEnum showFingering) {
+        this.showFingering = showFingering;
+    }
+
+    public YesOrNoEnum getHasBeat() {
+        return hasBeat;
+    }
+
+    public void setHasBeat(YesOrNoEnum hasBeat) {
+        this.hasBeat = hasBeat;
+    }
 }

+ 21 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/MusicSheet.java

@@ -527,4 +527,25 @@ public class MusicSheet implements Serializable {
 	public void setAuditVersion(YesOrNoEnum auditVersion) {
 		this.auditVersion = auditVersion;
 	}
+
+
+	public MusicSheet notation(YesOrNoEnum notation) {
+		this.notation = notation;
+		return this;
+	}
+
+	public MusicSheet canEvaluate(YesOrNoEnum canEvaluate) {
+		this.canEvaluate = canEvaluate;
+		return this;
+	}
+
+	public MusicSheet showFingering(YesOrNoEnum showFingering) {
+		this.showFingering = showFingering;
+		return this;
+	}
+
+	public MusicSheet hasBeat(YesOrNoEnum hasBeat) {
+		this.hasBeat = hasBeat;
+		return this;
+	}
 }

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

@@ -427,7 +427,14 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
         musicSheet.setUpdateBy(userId);
         musicSheet.setUpdateTime(new Date());
         if (AuthStatusEnum.PASS.getCode().equals(param.getAuthStatus().getCode())) {
-            musicSheet.setState(YesOrNoEnum.YES);
+
+            // 更新曲谱评测,指法、简谱、节拍器状态
+            musicSheet
+                    .notation(param.getNotation())
+                    .canEvaluate(param.getCanEvaluate())
+                    .showFingering(param.getShowFingering())
+                    .hasBeat(param.getHasBeat())
+                    .setState(YesOrNoEnum.YES);
             // 替换曲目id
             replaceMusicSheet(param, musicSheet, originalMusicSheetId);