智盟项目
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.

36 lines
824 B

  1. package svc
  2. import (
  3. "applet/app/db"
  4. "applet/app/e"
  5. "applet/app/utils"
  6. "github.com/gin-gonic/gin"
  7. )
  8. func GetHwOrder(c *gin.Context) {
  9. var args map[string]string
  10. if err := c.ShouldBindJSON(&args); err != nil {
  11. e.OutErr(c, e.ERR_INVALID_ARGS, err)
  12. return
  13. }
  14. args["uid"] = c.GetString("mid")
  15. order := db.GetHwOrderList(args)
  16. list := make([]map[string]string, 0)
  17. for _, v := range order {
  18. var tmp = map[string]string{
  19. "oid": v.Oid,
  20. "info": v.Info,
  21. "commission": utils.Float64ToStr(v.Commission),
  22. "status": v.Status,
  23. "type": v.Type,
  24. "zuid": v.Zuid,
  25. "is_share": utils.IntToStr(v.IsShare),
  26. "update_time": utils.IntToStr(v.UpdateTime),
  27. "create_time": utils.IntToStr(v.CreateTime),
  28. }
  29. list = append(list, tmp)
  30. }
  31. e.OutSuc(c, list, nil)
  32. return
  33. }