test_api.go 485 B

12345678910111213141516171819
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package vehicle
  4. import (
  5. "context"
  6. "gd_vehicle/apis"
  7. )
  8. func TestApi(ctx context.Context, req *apis.CommonReq, reply *apis.CommonReply) error {
  9. rData := req.Data.(map[string]interface{})
  10. plateNo := rData["chepai"].(string)
  11. replyData := make(map[string]string)
  12. replyData["plate_no"] = plateNo
  13. replyData["vin"] = "12345678901234567"
  14. reply.Data = replyData
  15. return nil
  16. }