U02.go 562 B

1234567891011121314151617181920212223242526272829
  1. package query
  2. import (
  3. "context"
  4. "encoding/json"
  5. "gd_adm_data/apis"
  6. "gd_adm_data/errors"
  7. jsoniter "github.com/json-iterator/go"
  8. )
  9. // 补充车辆数据
  10. func U02(ctx context.Context, params string) (reply *apis.QueryResponse, err error) {
  11. reply = &apis.QueryResponse{}
  12. reply.Data = params
  13. reqMap := make(map[string]interface{})
  14. err = json.Unmarshal([]byte(params), &reqMap)
  15. if err != nil {
  16. return reply, errors.ParamsError
  17. }
  18. // 补充车辆数据
  19. supplementData(reqMap)
  20. reply.Data, _ = jsoniter.MarshalToString(reqMap)
  21. return reply, nil
  22. }