53 lines
2.6 KiB
Go
53 lines
2.6 KiB
Go
package repository
|
|
|
|
import (
|
|
"context"
|
|
"finclip-app-manager/domain/entity"
|
|
)
|
|
|
|
//const QRCODEINFO_DB_NAME = "qrCodeInfo"
|
|
//
|
|
//const (
|
|
// QrCodeTypeReview = "review" //审核版二维码信息
|
|
// QrCodeTypeTrial = "trial" //体验版
|
|
// QrCodeTypeTemporary = "temporary" //临时版
|
|
// QrCodeTypeRelease = "release" //线上版
|
|
//)
|
|
//
|
|
////AppStartParams 小程序启动参数
|
|
//type AppStartParams struct {
|
|
// PathAndQuery string `json:"pathAndQuery" bson:"path_and_query"`
|
|
//}
|
|
//
|
|
//type QrCodeInfo struct {
|
|
// Type string `json:"type" bson:"type"` //二维码的类型
|
|
// Uuid string `json:"uuid" bson:"uuid"` //标识该二维码
|
|
// AppId string `json:"appId" bson:"app_id"` //小程序Id
|
|
// Sequence int `json:"sequence" bson:"sequence"` //小程序序列号
|
|
// ApiServer string `json:"apiServer" bson:"api_server"` //小程序apiServer
|
|
// CodeId string `json:"codeId" bson:"code_id"` //标识某个编译版本的id
|
|
// StartParams AppStartParams `json:"startParams" bson:"start_params"` //小程序启动参数
|
|
// ExpireTime int64 `json:"expireTime" bson:"expire_time"` //过期时间
|
|
// CreateTime int64 `json:"createTime" bson:"create_time"` //创建时间
|
|
// UpdateTime string `json:"updateTime" bson:"Update_time"` //更新时间
|
|
// DeleteTime int64 `json:"deleteTime" bson:"Delete_time"` //删除时间-暂不用
|
|
//}
|
|
|
|
type IQrCodeInfoRepo interface {
|
|
Insert(ctx context.Context, info *entity.QrCodeInfo) error
|
|
GenInfo(ctx context.Context, info *entity.QrCodeInfo) error
|
|
GetInfoByUuid(ctx context.Context, uuid string) (*entity.QrCodeInfo, error)
|
|
GetInfoByCodeId(ctx context.Context, codeId string) (*entity.QrCodeInfo, error)
|
|
GetReviewInfo(ctx context.Context, appId string, seq int) (*entity.QrCodeInfo, error)
|
|
GetReleaseInfo(ctx context.Context, appId string) (*entity.QrCodeInfo, error)
|
|
GetTrialInfo(ctx context.Context, appId string) (*entity.QrCodeInfo, error)
|
|
GetTemporaryInfo(ctx context.Context, appId string, seq int) (*entity.QrCodeInfo, error)
|
|
GetRemoteDebugInfo(ctx context.Context, appId string, seq int) (*entity.QrCodeInfo, error)
|
|
UpdateTrialStartParams(ctx context.Context, codeId string, p entity.AppStartParams) error
|
|
UpdateStartParamsByUuid(ctx context.Context, uuid string, p entity.AppStartParams) error
|
|
UpdateApiServer(ctx context.Context, uuid string, apiServer string) error
|
|
UpdateInfo(ctx context.Context, uuid string, upInfo map[string]interface{}) error
|
|
GenReviewQrCodeInfo(ctx context.Context, info *entity.QrCodeInfo) error
|
|
NotFound(err error) bool
|
|
}
|