user_changeUserWord.go 683 B

12345678910111213141516171819202122232425262728293031
  1. package gatesink
  2. import (
  3. "encoding/json"
  4. "bet24.com/log"
  5. coreservice "bet24.com/servers/coreservice/client"
  6. "bet24.com/servers/transaction"
  7. )
  8. //修改个性签名
  9. func (this *user) changeUserWord(msg, data string) {
  10. obj := transaction.NewChangeUserWord()
  11. err := json.Unmarshal([]byte(data), &obj.IN)
  12. if err != nil {
  13. log.Debug("changeUserWord UnMarshal data failed %v", data)
  14. return
  15. }
  16. obj.IN.UserID = this.getUserId()
  17. obj.IN.UserWords = coreservice.ParseKeyword(obj.IN.UserWords)
  18. obj.DoAction(nil)
  19. retData, err := json.Marshal(obj.OUT)
  20. if err != nil {
  21. log.Debug("send changeUserWord return Marshal failed")
  22. return
  23. }
  24. this.WriteMsg(msg, string(retData))
  25. }