package user_merchant import ( "context" "gd_management/apis" "gd_management/errors" "github.com/astaxie/beego/orm" ) func MangementGetApiOrderInfo(ctx context.Context, req *apis.MangementGetApiOrderInfoReq, reply *apis.MangementGetApiOrderInfoReply) (err error) { if req.OrderId == 0 { return errors.ArgsError } err = orm.NewOrm().QueryTable("t_gd_data_api_order").Filter("id", req.OrderId).One(&reply.OrderInfo) if err != nil { if err == orm.ErrNoRows { return errors.ApiOrderNotExist } return errors.DataBaseError } return nil }