workflow.go 959 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package dao
  2. import (
  3. "context"
  4. "net/url"
  5. "strconv"
  6. "go-common/library/ecode"
  7. "go-common/library/log"
  8. "go-common/library/net/metadata"
  9. )
  10. const (
  11. _workFlowAppealDelete = "/x/internal/workflow/appeal/v3/delete"
  12. )
  13. // WorkFlowAppealDelete .
  14. func (d *Dao) WorkFlowAppealDelete(c context.Context, bid, oid, subtitleID int64) (err error) {
  15. var (
  16. res struct {
  17. Code int `json:"code"`
  18. Message string `json:"message"`
  19. }
  20. params = url.Values{}
  21. ip = metadata.String(c, metadata.RemoteIP)
  22. )
  23. params.Set("bid", strconv.FormatInt(bid, 10))
  24. params.Set("oid", strconv.FormatInt(oid, 10))
  25. params.Set("eid", strconv.FormatInt(subtitleID, 10))
  26. if err = d.httpCli.Post(c, d.workFlowURI, ip, params, &res); err != nil {
  27. log.Error("WorkFlowTagList(params:%v),error(%v)", params, err)
  28. return
  29. }
  30. if err = ecode.Int(res.Code); err != ecode.OK {
  31. log.Error("WorkFlowTagList(params:%v),error(%v)", params, err)
  32. return
  33. }
  34. err = nil
  35. return
  36. }