elf 5 months ago
parent 82af661a88
commit 95e1154e27

@ -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(&param)
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), &params)
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

BIN
insure

Binary file not shown.

@ -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
}

Loading…
Cancel
Save