Bläddra i källkod

Merge branch 'dev_1_3_3_0824_online'

liujunchi 2 år sedan
förälder
incheckning
ad234d08f9

+ 2 - 3
cooleshow-common/src/main/java/com/yonge/cooleshow/common/controller/BaseController.java

@@ -107,7 +107,6 @@ public class BaseController {
             e = ex;
         }
         logger.error("System Error", ex);
-        // return failed(e.getMessage());
         if (e instanceof BizException || e instanceof ThirdpartyException) {
             if (e.getMessage().equals("205")) {
                 return failed(HttpStatus.RESET_CONTENT, e.getMessage());
@@ -149,13 +148,13 @@ public class BaseController {
 
     public String dingTalkRobotsSecurityParam() throws Exception {
         Long timestamp = System.currentTimeMillis();
-        String secret = "SEC5af33b7c3febfa4613ef67202bec4e07c37ccc54c51d058594f199c23af48e3e";
+        String secret = "SEC06c8de454d4cbe6b67140e984d0319836b239d2cb211a2c771cdedd57e286a24";
         String stringToSign = timestamp + "\n" + secret;
         Mac mac = Mac.getInstance("HmacSHA256");
         mac.init(new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256"));
         byte[] signData = mac.doFinal(stringToSign.getBytes("UTF-8"));
         String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)), "UTF-8");
-        StringBuffer sb = new StringBuffer("https://oapi.dingtalk.com/robot/send?access_token=74faf5f6229b648396edfb3918eeb262916dc2f194cf866f1f6764a8906cff60");
+        StringBuffer sb = new StringBuffer("https://oapi.dingtalk.com/robot/send?access_token=39d0cd9f95e52b2750c37d6b064bcfa7930e37a760711f7790f52e1822e1b9df");
         sb.append(timestamp).append("&sign=").append(sign);
         return sb.toString();
     }

+ 9 - 0
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/MusicSheetController.java

@@ -16,6 +16,7 @@ import com.yonge.cooleshow.biz.dal.enums.*;
 import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
 import com.yonge.cooleshow.biz.dal.service.MusicTagService;
 import com.yonge.cooleshow.common.enums.YesOrNoEnum;
+import com.yonge.toolset.base.exception.BizException;
 import com.yonge.toolset.mybatis.support.PageUtil;
 import com.yonge.cooleshow.biz.dal.vo.*;
 import com.yonge.cooleshow.common.controller.BaseController;
@@ -101,6 +102,10 @@ public class MusicSheetController extends BaseController {
             return failed("每个一级标签只能选一个二级标签");
         }
 
+        if (StringUtil.isEmpty(musicSheetDto.getMusicImg())) {
+            throw new BizException("曲目渲染失败");
+        }
+
         musicSheetDto.setUserId(sysUser.getId());
         musicSheetDto.setAuditStatus(AuthStatusEnum.PASS);
         musicSheetDto.setDelFlag(false);
@@ -151,6 +156,10 @@ public class MusicSheetController extends BaseController {
             musicSheet.setNotation(YesOrNoEnum.NO);
         }
 
+        if (StringUtil.isEmpty(musicSheet.getMusicImg())) {
+            throw new BizException("曲目渲染失败");
+        }
+
         musicSheet.setUpdateBy(sysUser.getId());
         musicSheet.setAuditStatus(AuthStatusEnum.PASS);
         musicSheet.setUpdateTime(new Date());

+ 2 - 2
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/StudentController.java

@@ -66,9 +66,9 @@ public class StudentController extends BaseController {
         }
         OutputStream outputStream = response.getOutputStream();
         try {
-            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学生编号", "学生姓名", "性别", "出生日期",
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学生编号", "学生姓名", "真实姓名", "性别", "出生日期",
                     "年龄", "专业", "手机号码", "是否是会员", "注册时间"}, new String[]{
-                    "userId", "realName", "gender.msg", "birthdate", "age", "subjectName", "phone",
+                    "userId","username" , "realName", "gender.msg", "birthdate", "age", "subjectName", "phone",
                     "isVip.msg", "createTime"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attac:wq" +

+ 6 - 0
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/TeacherController.java

@@ -14,6 +14,7 @@ import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -98,6 +99,11 @@ public class TeacherController extends BaseController {
         if (rows.size() < 1) {
             throw new BizException("没有可导出数据");
         }
+        for(TeacherVo vo : rows){
+        	if(StringUtils.isNotBlank(vo.getTag())){
+        		vo.setTag(vo.getTag().replace("STYLE", "个人风采").replace("LIVE", "直播课").replace("VIDEO", "视频课").replace("MUSIC", "乐谱"));
+        	}
+        }
         OutputStream outputStream = response.getOutputStream();
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"老师编号", "昵称", "姓名", "手机号", "老师类型",

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

@@ -21,6 +21,9 @@ public class TeacherMusicSheetAuditReq {
     @NotNull(message = "曲目id不能为空 ")
     private Long musicSheetId;
 
+    @ApiModelProperty(value = "曲谱渲染图",required = true)
+    private String musicImg;
+
     @ApiModelProperty(value = "审批状态(PASS:通过,UNPASS:不通过)",required = true)
     @NotNull(message = "审批状态不为空 ")
     private AuthStatusEnum authStatus;
@@ -29,6 +32,14 @@ public class TeacherMusicSheetAuditReq {
     @NotBlank(message = "审核理由不能为空 ")
     private String remark;
 
+    public String getMusicImg() {
+        return musicImg;
+    }
+
+    public void setMusicImg(String musicImg) {
+        this.musicImg = musicImg;
+    }
+
     public Long getMusicSheetId() {
         return musicSheetId;
     }

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

@@ -48,6 +48,10 @@ public class MusicSheet implements Serializable {
 	@ApiModelProperty("是否可以转简谱(0:否,1:是)")
 	private YesOrNoEnum notation;
 
+	@TableField("music_img_")
+	@ApiModelProperty("曲目图片")
+	private String musicImg;
+
 	@TableField("source_type_")
 	@ApiModelProperty(value = "曲目来源类型 TEACHER 老师 PLATFORM 平台")
 	private SourceTypeEnum sourceType;
@@ -194,6 +198,14 @@ public class MusicSheet implements Serializable {
 	@ApiModelProperty(value = "假删除标识 0:未删除 1:已删除")
 	private Boolean delFlag;
 
+	public String getMusicImg() {
+		return musicImg;
+	}
+
+	public void setMusicImg(String musicImg) {
+		this.musicImg = musicImg;
+	}
+
 	public AccompanimentTypeEnum getAccompanimentType() {
 		return accompanimentType;
 	}

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

@@ -372,6 +372,11 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
         boolean flag = false;
         if (musicSheetAuthRecordService.audit(param, userId)) {
             musicSheet.setAuditStatus(param.getAuthStatus());
+            if (param.getAuthStatus().equals(AuthStatusEnum.PASS) && StringUtil.isEmpty(param.getMusicImg())) {
+                throw new BizException("曲目渲染失败");
+            } else if (param.getAuthStatus().equals(AuthStatusEnum.PASS) && !StringUtil.isEmpty(param.getMusicImg())) {
+                musicSheet.setMusicImg(param.getMusicImg());
+            }
             musicSheet.setUpdateBy(userId);
             musicSheet.setUpdateTime(new Date());
             if (AuthStatusEnum.PASS.getCode().equals(param.getAuthStatus().getCode())) {

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

@@ -30,6 +30,7 @@
         <result column="notation_" jdbcType="VARCHAR" property="notation"/>
         <result column="accompaniment_type_" jdbcType="VARCHAR" property="accompanimentType"/>
         <result column="title_img_" jdbcType="VARCHAR" property="titleImg"/>
+        <result column="music_img_" jdbcType="VARCHAR" property="musicImg"/>
     </resultMap>
 
     <sql id="Base_Column_List">
@@ -67,6 +68,7 @@
         t.remark_ as remark,
         t.title_img_ as titleImg,
         t.reason_ as reason,
+        t.music_img_ as musicImg,
         t.notation_ as notation
     </sql>
 
@@ -261,6 +263,7 @@
         <result column="reason" jdbcType="VARCHAR" property="reason"/>
         <result column="accompanimentType" jdbcType="VARCHAR" property="accompanimentType"/>
         <result column="notation" jdbcType="VARCHAR" property="notation"/>
+        <result column="musicImg" jdbcType="VARCHAR" property="musicImg"/>
         <result column="aiDefaultFrequency" jdbcType="VARCHAR" property="aiDefaultFrequency"/>
         <collection property="background" ofType="com.yonge.cooleshow.biz.dal.entity.MusicSheetAccompaniment">
             <id column="accompanimentId" jdbcType="BIGINT" property="id"/>

+ 0 - 3
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/MusicAlbumController.java

@@ -38,13 +38,10 @@ import javax.validation.Valid;
 public class MusicAlbumController extends BaseController {
     @Autowired
     private SysUserFeignService sysUserFeignService;
-
 	@Autowired
 	private MusicAlbumService musicAlbumService;
-
     @Autowired
     private StudentService studentService;
-
     @Autowired
     private AppVersionInfoService appVersionInfoService;
 

+ 0 - 3
pom.xml

@@ -261,18 +261,15 @@
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-web</artifactId>
 		</dependency>
-
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-actuator</artifactId>
 		</dependency>
-
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-test</artifactId>
 			<scope>test</scope>
 		</dependency>
-
 		<dependency>
 			<groupId>org.springframework.cloud</groupId>
 			<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>