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,