Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
a8fd0a7a1e
2 changed files with 37 additions and 0 deletions
  1. +28
    -0
      db/db_fb_pay_assciation_list.go
  2. +9
    -0
      db/model/fb_pay_association_list.go

+ 28
- 0
db/db_fb_pay_assciation_list.go View File

@@ -0,0 +1,28 @@
package db

import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/db/model"
"xorm.io/xorm"
)

func GetFbPayAssciationList(eg *xorm.Engine, storeId, subAppid string) *model.FbPayAssociationList {
var data model.FbPayAssociationList
get, err := eg.Where("store_id=? and sub_appid=? ", storeId, subAppid).Get(&data)
if get == false || err != nil {
return nil
}
return &data
}
func SetFbPayAssciation(eg *xorm.Engine, args map[string]string) {
list := GetFbPayAssciationList(eg, args["StoreId"], args["MerchantId"])
if list != nil {
return
}
var data = model.FbPayAssociationList{
MerchantId: args["MerchantId"],
StoreId: args["StoreId"],
SubAppid: args["SubAppid"],
Platform: args["Platform"],
}
eg.Insert(&data)
}

+ 9
- 0
db/model/fb_pay_association_list.go View File

@@ -0,0 +1,9 @@
package model

type FbPayAssociationList struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
MerchantId string `json:"merchant_id" xorm:"not null comment('商户号') VARCHAR(255)"`
StoreId string `json:"store_id" xorm:"not null comment('商户门店号') VARCHAR(255)"`
SubAppid string `json:"sub_appid" xorm:"not null default '' comment('微信appid') VARCHAR(255)"`
Platform string `json:"platform" xorm:"comment('00:公众号(默认)01:小程序') VARCHAR(255)"`
}

Loading…
Cancel
Save