From 092ac4b11d51756de711460826c816697c9322dd Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 10 Oct 2024 15:06:24 +0800 Subject: [PATCH] 1 --- app/db/db_store_qrcode.go | 16 ++++++++++++++++ app/svc/svc_store.go | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/db/db_store_qrcode.go b/app/db/db_store_qrcode.go index c70e493..1799144 100644 --- a/app/db/db_store_qrcode.go +++ b/app/db/db_store_qrcode.go @@ -25,3 +25,19 @@ func GetStoreQrcodeById(eg *xorm.Engine, id string) *model.CommunityTeamStoreQrc } return &data } +func GetStorePayQrcodeByUid(eg *xorm.Engine, uid int) *model.CommunityTeamStorePayQrcode { + var data model.CommunityTeamStorePayQrcode + get, err := eg.Where("uid=?", uid).Get(&data) + if get == false { + data = model.CommunityTeamStorePayQrcode{ + Uid: uid, + IsUse: 1, + Name: "收款码", + } + eg.Insert(&data) + } + if err != nil { + return nil + } + return &data +} diff --git a/app/svc/svc_store.go b/app/svc/svc_store.go index 8a7e1bf..985e03c 100644 --- a/app/svc/svc_store.go +++ b/app/svc/svc_store.go @@ -97,7 +97,7 @@ func StoreScan(c *gin.Context) { var result = RefundReq{ StoreId: utils.IntToStr(data.Uid), - TableNumber: utils.IntToStr(data.TableNum), + TableNumber: data.TableNum, AppId: appId, StoreType: utils.IntToStr(store.StoreType), InviteCode: inviteCode,