CustomMessage.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package com.ym.pojo;
  2. import io.rong.messages.BaseMessage;
  3. import org.apache.commons.lang3.StringUtils;
  4. public class CustomMessage extends BaseMessage {
  5. private Boolean enable;
  6. private int customType;
  7. private int rate;
  8. private int playVolume;
  9. private String userId;
  10. public int getPlayVolume() {
  11. return playVolume;
  12. }
  13. public void setPlayVolume(int playVolume) {
  14. this.playVolume = playVolume;
  15. }
  16. public Boolean getEnable() {
  17. return enable;
  18. }
  19. public void setEnable(Boolean enable) {
  20. this.enable = enable;
  21. }
  22. public int getCustomType() {
  23. return customType;
  24. }
  25. public void setCustomType(int customType) {
  26. this.customType = customType;
  27. }
  28. public int getRate() {
  29. return rate;
  30. }
  31. public void setRate(int rate) {
  32. this.rate = rate;
  33. }
  34. public String getUserId() {
  35. return userId;
  36. }
  37. public void setUserId(String userId) {
  38. this.userId = userId;
  39. }
  40. @Override
  41. public String getType() {
  42. return "DY:PlayMidiMessage";
  43. }
  44. @Override
  45. public String toString() {
  46. return "{\"enable\":" + enable +
  47. ", \"customType\":" + customType +
  48. ", \"rate\":" + rate +
  49. ", \"playVolume\":" + playVolume +
  50. ", \"userId\":" + (StringUtils.isEmpty(userId)?"\"\"":"\"" + userId + "\"") +
  51. '}';
  52. }
  53. }