From c38d4683d342bb7cf113bc0fbcd9b51eb8276363 Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Tue, 16 Jul 2024 13:24:10 +0800 Subject: [PATCH] yh --- api/zking/index.go | 2 ++ insure.sql | 39 +++++++++++++++++++++++++++++++++++++++ service/order_service.go | 2 +- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/api/zking/index.go b/api/zking/index.go index 29aaa4c..238c4d0 100644 --- a/api/zking/index.go +++ b/api/zking/index.go @@ -114,6 +114,7 @@ func Push(c *gin.Context) { } func Revoke(c *gin.Context) { + fmt.Println("revoke callback") data := map[string]interface{}{} result := map[string]interface{}{ "code": 200, @@ -134,6 +135,7 @@ func Revoke(c *gin.Context) { } func Claim(c *gin.Context) { + fmt.Println("claim callback") data := map[string]interface{}{} result := map[string]interface{}{ "code": 200, diff --git a/insure.sql b/insure.sql index 171f5e0..2d4a33a 100644 --- a/insure.sql +++ b/insure.sql @@ -228,3 +228,42 @@ CREATE TABLE `user` ( ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表'; SET FOREIGN_KEY_CHECKS = 1; + + +CREATE TABLE `revoke` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `policy_no` varchar(50) NOT NULL DEFAULT '' COMMENT '保单号', + `bank_name` varchar(150) NOT NULL DEFAULT '' COMMENT '银行名称', + `account_name` varchar(150) NOT NULL DEFAULT '' COMMENT '退款账户', + `bank_card_num` varchar(150) NOT NULL DEFAULT '' COMMENT '收款账号', + `back_preminum` varchar(150) NOT NULL DEFAULT '' COMMENT '赔付金额', + `contact_name` varchar(150) NOT NULL DEFAULT '' COMMENT '联系人', + `contact_phone` varchar(150) NOT NULL DEFAULT '' COMMENT '联系电话', + `status` varchar(10) not null default '' comment '状态', + `file_list` text default null COMMENT '退保材料', + `reason` text default null COMMENT '原因材料', + `msg` text default null COMMENT '结果信息', + `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `udx_policyno` (`policy_no`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='退保记录'; + +CREATE TABLE `claim` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `policy_no` varchar(50) NOT NULL DEFAULT '' COMMENT '保单号', + `bank_name` varchar(150) NOT NULL DEFAULT '' COMMENT '银行名称', + `account_name` varchar(150) NOT NULL DEFAULT '' COMMENT '退款账户', + `bank_card_num` varchar(150) NOT NULL DEFAULT '' COMMENT '收款账号', + `back_preminum` varchar(150) NOT NULL DEFAULT '' COMMENT '赔付金额', + `contact_name` varchar(150) NOT NULL DEFAULT '' COMMENT '联系人', + `contact_phone` varchar(150) NOT NULL DEFAULT '' COMMENT '联系电话', + `status` varchar(10) not null default '' comment '状态', + `file_list` text default null COMMENT '理赔材料', + `reason` text default null COMMENT '原因材料', + `msg` text default null COMMENT '结果信息', + `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `udx_policyno` (`policy_no`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='理赔记录'; \ No newline at end of file diff --git a/service/order_service.go b/service/order_service.go index 61ae821..9da4f46 100644 --- a/service/order_service.go +++ b/service/order_service.go @@ -509,7 +509,7 @@ func (s *orderService) ZkingRevoke(revoke *model.Revoke) (*zking.Result, error) Version: "1.0.0", Data: string(data), } - result, err := zking.InsureApi.SuixingClaim(param) + result, err := zking.InsureApi.SuixingRevoke(param) if err != nil { return nil, err }