Documentation
¶
Index ¶
- type App
- func (app *App) NewParamsWith(params ...Params) Params
- func (app *App) OilCardAdd(notMustParams ...Params) (body []byte, err error)
- func (app *App) OilCardDel(notMustParams ...Params) (body []byte, err error)
- func (app *App) OilCardEdit(notMustParams ...Params) (body []byte, err error)
- func (app *App) OilCardInfo(notMustParams ...Params) (body []byte, err error)
- func (app *App) OilOrderPush(notMustParams ...Params) (body []byte, err error)
- func (app *App) OilOrderQuery(notMustParams ...Params) (body []byte, err error)
- func (app *App) PowerAddCard(notMustParams ...Params) (body []byte, err error)
- func (app *App) PowerCardInfo(notMustParams ...Params) (body []byte, err error)
- func (app *App) PowerDelCard(notMustParams ...Params) (body []byte, err error)
- func (app *App) PowerEditCard(notMustParams ...Params) (body []byte, err error)
- func (app *App) PowerPushOrder(notMustParams ...Params) (body []byte, err error)
- func (app *App) PowerQuery(notMustParams ...Params) (body []byte, err error)
- func (app *App) RechargePushOrder(notMustParams ...Params) (result RechargePpushOrderResponse, err error)
- func (app *App) RechargeQuery(orderNumber string) (result RechargeQueryResponse, err error)
- func (app *App) UserQuery() (result UserQueryResponse, err error)
- type Params
- type PowerAddCardResult
- type PowerPushOrderResult
- type PowerQueryResult
- type RechargePpushOrderRequest
- type RechargePpushOrderResponse
- type RechargeQueryResponse
- type UserQueryResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
StoreID int
AppKey int
AppSecret string
ClientIP string
ZapLog *zap.Logger // 日志服务
Db *gorm.DB // 关系数据库服务
RDb *redis.Client // 缓存数据库服务
MDb *mongo.Client // 非关系数据库服务
}
func (*App) NewParamsWith ¶
func (*App) OilCardAdd ¶
OilCardAdd 添加充值卡
func (*App) OilCardDel ¶
OilCardDel 油卡删除
func (*App) OilCardEdit ¶
OilCardEdit 编辑充值卡
func (*App) OilCardInfo ¶
OilCardInfo 油卡详情
func (*App) OilOrderPush ¶
OilOrderPush 充值下单
func (*App) OilOrderQuery ¶
OilOrderQuery 订单查询
func (*App) PowerAddCard ¶
PowerAddCard 添加充值卡
func (*App) PowerCardInfo ¶
PowerCardInfo 充值卡详情
func (*App) PowerDelCard ¶
PowerDelCard 充值卡删除
func (*App) PowerEditCard ¶
PowerEditCard 编辑充值卡
func (*App) PowerPushOrder ¶
PowerPushOrder 充值下单
func (*App) PowerQuery ¶
func (*App) RechargePushOrder ¶
func (app *App) RechargePushOrder(notMustParams ...Params) (result RechargePpushOrderResponse, err error)
RechargePushOrder 充值请求业务参数
func (*App) RechargeQuery ¶
func (app *App) RechargeQuery(orderNumber string) (result RechargeQueryResponse, err error)
RechargeQuery 查询接口
func (*App) UserQuery ¶
func (app *App) UserQuery() (result UserQueryResponse, err error)
UserQuery 查询余额接口
type PowerAddCardResult ¶
type PowerAddCardResult struct {
Code string `json:"code"`
Msg string `json:"msg"`
Time string `json:"time"`
Data struct {
CardNum string `json:"card_num"`
StoreId string `json:"store_id"`
CreateTime int `json:"create_time"`
Type int `json:"type"` // 缴费单位
CmsUid int `json:"cms_uid"`
Province string `json:"province"` // 缴费省份
City string `json:"city"` // 缴费城市
Id string `json:"id"` // 缴费卡编号
} `json:"data"`
}
type PowerPushOrderResult ¶
type PowerQueryResult ¶
type PowerQueryResult struct {
Code string `json:"code"`
Msg string `json:"msg"`
Time string `json:"time"`
Data struct {
OrderNumber string `json:"order_number"` // 订单号
OrderNo string `json:"order_no"` // 订单号
CardId string `json:"card_id"` // 卡编号
Amount int `json:"amount"` // 充值金额
CostPrice string `json:"cost_price"` // 成本价
Fanli string `json:"fanli"` // 平台返利
Status int `json:"status"` // 交易结果(0 待支付 1 已付充值中 2充值成功 3充值失败需要退款 4退款成功 6 待充值 7 已匹配)
} `json:"data"`
}
type RechargePpushOrderRequest ¶
type RechargePpushOrderRequest struct {
StoreId string `json:"store_id"` // 铺ID
Mobile string `json:"mobile"` // 充值号码
OrderNo string `json:"order_no"` // 充值订单号
Money int `json:"money"` // 充值金额(100,200)
RechargeTyp int `json:"recharge_typ"` // 是 1快充 0慢充
NotifyUrl string `json:"notify_url"` // 异步回调地址(POST)
Change int `json:"change,omitempty"` // 失败更换渠道充值 0 否 1是
Source int `json:"source,omitempty"` // 是否强制渠道 传source字段则可以强制某渠道,强制快充走94折则,source传6
}
RechargePpushOrderRequest 请求参数
type RechargePpushOrderResponse ¶
type RechargePpushOrderResponse struct {
Code string `json:"code"`
Msg string `json:"msg"`
Data struct {
OrderNumber string `json:"order_number"`
} `json:"data"`
}
RechargePpushOrderResponse 返回参数
type RechargeQueryResponse ¶
type RechargeQueryResponse struct {
Code string `json:"code"`
Msg string `json:"msg"`
Data struct {
OrderNumber string `json:"order_number"`
Status int `json:"status"`
Mobile string `json:"mobile"`
Amount int `json:"amount"`
OrderNo string `json:"order_no"`
} `json:"data"`
}
RechargeQueryResponse 返回参数
Click to show internal directories.
Click to hide internal directories.