diff --git a/api/suixing/index.go b/api/suixing/index.go index 59f3ff8..4d9bc75 100644 --- a/api/suixing/index.go +++ b/api/suixing/index.go @@ -58,17 +58,15 @@ func Create(c *gin.Context) { } func UploadSignedFile(c *gin.Context) { - data := map[string]interface{}{} result := map[string]interface{}{ - "code": 200, - "msg": "成功", - "data": data, + "status": "1", + "msg": "成功", } param := signer.UploadParam{} err := c.ShouldBind(¶m) if err != nil { - result["code"] = 201 + result["status"] = "0" result["msg"] = "参数异常" c.JSON(200, result) return @@ -77,7 +75,7 @@ func UploadSignedFile(c *gin.Context) { params := map[string]interface{}{} err = json.Unmarshal([]byte(param.Params), ¶ms) if err != nil { - result["code"] = 201 + result["status"] = "0" result["msg"] = "params解析异常" c.JSON(200, result) return @@ -85,7 +83,7 @@ func UploadSignedFile(c *gin.Context) { token := params["token"].(string) order, err := service.OrderService.GetOrderByToken(token) if err != nil { - result["code"] = 201 + result["status"] = "0" result["msg"] = err.Error() c.JSON(200, result) return @@ -93,7 +91,7 @@ func UploadSignedFile(c *gin.Context) { signFileUrl, err := service.OrderService.UploadPdf("pdf", c) if err != nil { - result["code"] = 201 + result["status"] = "0" result["msg"] = err.Error() c.JSON(200, result) return @@ -104,14 +102,14 @@ func UploadSignedFile(c *gin.Context) { res, err := service.OrderService.PostToZking(order.OrderSn) if err != nil { - result["code"] = 201 + result["status"] = "0" result["msg"] = "文件保存失败:" + err.Error() c.JSON(200, result) return } if res.Code != "200" { - result["code"] = 202 + result["status"] = "0" result["msg"] = res.Code c.JSON(200, result) return diff --git a/insure b/insure index fc240e6..214e7f3 100755 Binary files a/insure and b/insure differ diff --git a/third_party/zking/api.go b/third_party/zking/api.go index 25a34b0..74d2dcc 100644 --- a/third_party/zking/api.go +++ b/third_party/zking/api.go @@ -23,7 +23,7 @@ func (api *insureApi) SuixingCreate(param CommonParam) (*Result, error) { if err != nil { return nil, err } - res, err := api.post("/api/v1/insurance/public/suiXing/claim", param) + res, err := api.post("/api/v1/insurance/public/suiXing/create", param) if err != nil { return nil, err }