|
@@ -4,6 +4,7 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dto.BasicUserDto;
|
|
|
import com.ym.mec.biz.service.ClassGroupService;
|
|
|
+import com.ym.mec.biz.service.SysMessageService;
|
|
|
import com.ym.mec.biz.service.TeacherService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -27,6 +28,8 @@ public class ImController extends BaseController {
|
|
|
@Autowired
|
|
|
private ClassGroupService classGroupService;
|
|
|
@Autowired
|
|
|
+ private SysMessageService sysMessageService;
|
|
|
+ @Autowired
|
|
|
private TeacherService teacherService;
|
|
|
|
|
|
@ApiOperation(value = "获取教务所有聊天群组")
|
|
@@ -90,4 +93,14 @@ public class ImController extends BaseController {
|
|
|
return succeed(classGroupService.getUserInfoWithUserId(groupId,userId));
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "发送私聊消息")
|
|
|
+ @GetMapping("/sendPrivateMessage")
|
|
|
+ public Object sendPrivateMessage(String targetId,String content) {
|
|
|
+ if (StringUtils.isEmpty(targetId) || StringUtils.isEmpty(content)) {
|
|
|
+ return failed("参数校验错误");
|
|
|
+ }
|
|
|
+ sysMessageService.sendPrivateMessage(targetId,content);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
}
|