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