|
@@ -7,6 +7,8 @@ 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;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -91,12 +93,17 @@ public class ImController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "发送私聊消息")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "targetId", value = "接收人id", required = true, dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "content", value = "消息内容", required = true, dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "extra", value = "扩展字段", dataType = "String")
|
|
|
+ })
|
|
|
@GetMapping("/sendPrivateMessage")
|
|
|
- public Object sendPrivateMessage(String targetId,String content) {
|
|
|
+ public Object sendPrivateMessage(String targetId,String content, String extra) {
|
|
|
if (StringUtils.isEmpty(targetId) || StringUtils.isEmpty(content)) {
|
|
|
return failed("参数校验错误");
|
|
|
}
|
|
|
- sysMessageService.sendPrivateMessage(targetId,content);
|
|
|
+ sysMessageService.sendPrivateMessage(targetId,content, extra);
|
|
|
return succeed();
|
|
|
}
|
|
|
}
|