From d93a7131b5a3edad27154cbfcae0f4821bee1dc6 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 3 Nov 2023 14:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=81=E4=BB=B6=E8=AF=86=E5=88=ABapi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- card_pack/api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/card_pack/api.go b/card_pack/api.go index 7020e50..40b4192 100644 --- a/card_pack/api.go +++ b/card_pack/api.go @@ -7,6 +7,7 @@ import ( zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils" "errors" "fmt" + "github.com/tidwall/gjson" "time" "xorm.io/xorm" ) @@ -34,6 +35,9 @@ func CardPackSend(engine *xorm.Engine, args map[string]interface{}) (string, err if err2 != nil { return "", err2 } + if gjson.Get(send, "success").Bool() == false { + return "", errors.New("识别失败") + } //存入记录 ext := map[string]interface{}{ "send": send,