huangjiajun 2 months ago
parent
commit
092ac4b11d
2 changed files with 17 additions and 1 deletions
  1. +16
    -0
      app/db/db_store_qrcode.go
  2. +1
    -1
      app/svc/svc_store.go

+ 16
- 0
app/db/db_store_qrcode.go View File

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

+ 1
- 1
app/svc/svc_store.go View File

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


Loading…
Cancel
Save