try_api_task_get.go 532 B

12345678910111213141516171819
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package base_api
  4. import (
  5. "context"
  6. "gd_management/apis"
  7. "gd_management/errors"
  8. "github.com/astaxie/beego/orm"
  9. )
  10. func ManagementGetApiTask(ctx context.Context, req *apis.ManagementGetApiTaskReq, reply *apis.ManagementGetApiTaskReply) error {
  11. o := orm.NewOrm()
  12. err := o.Raw("select * from t_gd_try_api_task where id=?", req.TaskId).QueryRow(&reply.Data)
  13. if err != nil {
  14. return errors.DataBaseError
  15. }
  16. return nil
  17. }