| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- /**
- * @ File:
- * @ Date: 2021/5/21 10:59
- * @ Author: JYQ
- * @ Description:
- */
- package postgre
- import (
- pb "sportfitness/base/api/grpc/base"
- )
- type PGVerifyCode struct {
- }
- type VFCodeSendType int
- const (
- _ VFCodeSendType = iota
- VFCodeTypePhone
- VFCodeTypeEmail
- )
- type VCode struct {
- SId int64
- Account string
- SendType VFCodeSendType
- CodeType pb.VerifyType
- Code string
- Ip string
- CreateAt int64
- ExpireAt int64
- }
- func (PGVerifyCode) CreateVerifyCode(jsonStr string, sId int64) (result string, err error) {
- err = getClient().Raw("select fn_verify_code_create(? ,? ,?, ? )", 0, sId, jsonStr, "").
- Scan(&result).Error
- return
- }
- func (PGVerifyCode) CheckPhoneVerifyCode(jsonStr string, sId int64) (result bool, err error) {
- err = getClient().Raw("select fn_verify_code_check(? ,? ,?, ? )", 0, sId, jsonStr, "").
- Scan(&result).Error
- return
- }
- func (PGVerifyCode) GetShopSmsConf(sId int64) (result string, err error) {
- //err = getClient().Raw("select fn_verify_code_create(? ,? ,?, ? )", 0, sId, jsonStr, "").
- // Scan(&result).Error
- result = "英泓小飞龙"
- return
- }
|