|
1234567891011121314151617181920212223242526272829303132333435 |
- package svc
-
- import (
- "applet/app/db"
- "applet/app/e"
- "applet/app/utils"
- "github.com/gin-gonic/gin"
- )
-
- func GetHwOrder(c *gin.Context) {
- var args map[string]string
- if err := c.ShouldBindJSON(&args); err != nil {
- e.OutErr(c, e.ERR_INVALID_ARGS, err)
- return
- }
- args["uid"] = c.GetString("mid")
- order := db.GetHwOrderList(args)
- list := make([]map[string]string, 0)
- for _, v := range order {
- var tmp = map[string]string{
- "oid": v.Oid,
- "info": v.Info,
- "commission": utils.Float64ToStr(v.Commission),
- "status": v.Status,
- "type": v.Type,
- "zuid": v.Zuid,
- "is_share": utils.IntToStr(v.IsShare),
- "update_time": utils.IntToStr(v.UpdateTime),
- "create_time": utils.IntToStr(v.CreateTime),
- }
- list = append(list, tmp)
- }
- e.OutSuc(c, list, nil)
- return
- }
|