Documentation ¶
Index ¶
Constants ¶
View Source
const ( CALLBACK_USER_STATUS_FAILED = "failed" CALLBACK_USER_STATUS_SUCCESSFULLY = "successfully" CALLBACK_USER_STATUS_WAIT_CALLBACK = "wait_callback" CALLBACK_USER_STATUS_IN_HAND = "in_hand" )
View Source
const ( OPERATOR_CM = "CM" OPERATOR_CT = "CT" OPERATOR_CU = "CU" ORDER_STATUS_WAIT_PAY = "wait_pay" ORDER_STATUS_WAIT_HANDLE = "wait_handle" ORDER_STATUS_RECHARGING = "recharging" ORDER_STATUS_WAIT_CALLBACK = "wait_callback" ORDER_STATUS_FAILED = "failed" ORDER_STATUS_SUCCESSFULLY = "successfully" ORDER_STATUS_UNKNOWN_ERROR = "unknown_error" ORDER_STATUS_CACHED = "cached" )
View Source
const ( COMMIT_STATUS_WAIT_COMMIT = "wait_commit" COMMIT_STATUS_IN_HAND = "in_hand" COMMIT_STATUS_WAIT_CALLBACK = "wait_callback" COMMIT_STATUS_FAILED = "failed" COMMIT_STATUS_SUCCESSFULLY = "successfully" COMMIT_STATUS_UNKNOWN_ERROR = "unknown_error" )
View Source
const ( SUPPLIER_STATUS_ACTIVE = "active" SUPPLIER_STATUS_DISABLE = "disable" SUPPLIER_STATUS_STAY = "stay" )
View Source
const ( USER_STATUS_ACTIVE = "active" USER_STATUS_WAIT_CHECK = "wait_check" USER_STATUS_FORBIDDEN = "forbidden" )
Variables ¶
View Source
var ( DB *gorm.DB DBErr error )
Functions ¶
This section is empty.
Types ¶
type CallbackUser ¶
type CallbackUser struct { Model UserId int //'回调用户的ID', FlowOrderId int //'flow_order id', OrderId string // '平台订单号', UserOrderId string // '分销商订单号', Tel string // '号码', NotifyUrl string // '回调地址', PostData string // '回调数据', NotifyNum uint8 // '已回调次数', Status string // '状态', ReplyStatus string // '响应的http状态码', ReplyBody string // '响应内容body', }
func (CallbackUser) TableName ¶
func (c CallbackUser) TableName() string
type Cellphone ¶
type FlowOrder ¶
type FlowOrder struct { Model OrderId string // '平台订单号,给上下游', UserOrderId string // '分销商的订单号', SupplierOrderId string // '上游的订单号', SupplierId string // '使用上游的标识符', UserId uint AccountId uint ProductId uint // 'products id', SaleProductId uint // 'sale_products id', SupplierProductId int // 'supplier_product id', Tel string // '充值的手机号', ProductValue int // '充值的流量值 M', PayPrice float32 // '用户支付的价格', SupplierPrice float32 // '交易时上游给的价格', NotifyUrl string // '下游提供的回调URL', Status string // '订单状态', Ip string // 提单ip SupplierError string // '上游错误代码和描述', CallbackError string // '回调下游错误描述', ErrorCode string // '平台错误代码', ErrorString string // '平台错误描述', PayType uint8 // '支付类型0account 1第三方支付', PayId int //'支付ID sale_account_logs id pay_order id', Operator string // '运营商CM CT CU', ProvinceId uint8 // '号码归属省', CityId uint16 // '号码归属市', Source string //'订单来源', }
type FlowOrderCommit ¶
type FlowOrderCommit struct { Model FlowOrderId int // 'flow_orders id', OrderId string //'平台订单号', SupplierId string //'供应商标识ID', Tel string //'号码', SupplierOrderId string // '上游的订单号', Status string // '供应商状态', ErrorCode string //'供应商错误码', ErrorString string // '供应商错误描述', }
func (FlowOrderCommit) TableName ¶
func (f FlowOrderCommit) TableName() string
type FlowProduct ¶
type FlowProduct struct { Product SaleProduct }
func LoadProduct ¶
func LoadProduct(productId string, userId uint) FlowProduct
type Product ¶
type Product struct { Model ProductId string // '自定义产品ID', Main string // '厂商FCM FCT TCU Viqiyi', Name string // ProductValue int // '流量MB话费元其他面值', ProductType string // '定向包,提速包等直冲,卡密等', GuidePrice float32 // '官方价格', ProvinceId uint8 CityId uint16 UseArea uint8 // '使用范围0全国1省2市3区 ', ValidDate uint8 // '有效期 流量-1跨月0当月其他值天数 话费0', Detail string // '详细描述', SoftDelete }
type SaleAccount ¶
func (SaleAccount) TableName ¶
func (s SaleAccount) TableName() string
type SaleAccountLog ¶
type SaleProduct ¶
type SoftDelete ¶
type SupplierCallback ¶
type SupplierCallback struct { Model SupplierId string SupplierOrderId string OrderId string ClientIp string Reply string RequestMethod string RequestUri string RequestHeader string RequestParams string SoftDelete }
func (SupplierCallback) TableName ¶
func (c SupplierCallback) TableName() string
type SupplierConfig ¶
type SupplierConfig struct { Model Title string Config string SyncApi uint8 QueryApi uint8 CallbackApi uint8 BankId int Balance float32 Status string // '供应商状态active disable stay', SoftDelete }
func (SupplierConfig) TableName ¶
func (c SupplierConfig) TableName() string
type SupplierProduct ¶
type User ¶
type User struct { Model UserName string Email string Password string Name string Tel string Status string Remark string Company string ApiToken string ApiId string Secret string AllowIp sql.NullString NotifyUrl string PriceLimit uint8 HiddenError uint8 SoftDelete SaleAccount SaleAccount `gorm:"foreignkey:UserId"` }
func ApiLoadUser ¶
api_id (uid) find user check status and allow ip
Click to show internal directories.
Click to hide internal directories.