|
@@ -1,6 +1,8 @@
|
|
|
package com.ym.mec.teacher.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
+import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dto.MusicPitchDetailDto;
|
|
|
import com.ym.mec.biz.service.SoundService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
@@ -17,13 +19,14 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* @Author Joburgess
|
|
|
* @Date 2021/5/19 0019
|
|
|
*/
|
|
|
@Api(tags = "音频服务")
|
|
|
-@RequestMapping("sound")
|
|
|
+//@RequestMapping("sound")
|
|
|
@RestController
|
|
|
public class SoundController extends BaseController {
|
|
|
|
|
@@ -31,6 +34,8 @@ public class SoundController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private SoundService soundService;
|
|
|
+ @Autowired
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
|
|
|
@ApiOperation(value = "评分")
|
|
|
@PostMapping("compare")
|
|
@@ -50,8 +55,12 @@ public class SoundController extends BaseController {
|
|
|
|
|
|
@MessageMapping("/hello")
|
|
|
@SendTo("/topic/greetings")
|
|
|
- public String greeting(String message) throws Exception {
|
|
|
- LOGGER.info("接收消息:{}", message);
|
|
|
+ public String greeting(String message){
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if(Objects.isNull(sysUser)){
|
|
|
+ LOGGER.error("用户登录信息异常");
|
|
|
+ }
|
|
|
+ LOGGER.info("{}:{}", sysUser.getUsername(), message);
|
|
|
return message;
|
|
|
}
|
|
|
|