用户接口远程调用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
735 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. package userrpc
  2. import (
  3. "testing"
  4. )
  5. func Test_GetUserByToken(t *testing.T) {
  6. dbname := "shop_v2"
  7. // token := "5536827c-36a5-4ec7-946d-49e4380c5103"
  8. // res, err := GetUserByToken(dbname, token, "111.229.34.252:7976")
  9. // t.Log(res)
  10. // t.Log(res["UserId"])
  11. // t.Log(err)
  12. res2, err := GetById("1023", dbname, "3")
  13. t.Log(res2)
  14. // t.Log(res2.GetUserId())
  15. t.Log(err)
  16. // res3, err := GetUserByUsercode(dbname, "2233")
  17. // t.Log(res3)
  18. // t.Log(*res3.UserId)
  19. // t.Log(err)
  20. }
  21. // func Test_Login(t *testing.T) {
  22. // dbname := "dev_tetele_net"
  23. // account := "admin"
  24. // password := "e10adc3949ba59abbe56e057f20f883e"
  25. // res, err := Login(dbname, account, password)
  26. // t.Log(res)
  27. // t.Log(res["UserId"])
  28. // t.Log(err)
  29. // }