user_feedback.go 443 B

1234567891011121314151617181920212223
  1. package gatesink
  2. import (
  3. "encoding/json"
  4. "bet24.com/log"
  5. "bet24.com/servers/transaction"
  6. )
  7. // 客服反馈
  8. func (this *user) feedback(msg, data string) {
  9. obj := transaction.NewFeedback()
  10. err := json.Unmarshal([]byte(data), &obj.In)
  11. if err != nil {
  12. log.Debug("feedback unmarshal data failed %v", data)
  13. return
  14. }
  15. obj.In.IPAddress = this.GetIP()
  16. obj.DoAction()
  17. buf, _ := json.Marshal(obj.Out)
  18. this.WriteMsg(msg, string(buf))
  19. }