service

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrSaveWxAppConfig

func CreateOrSaveWxAppConfig(userId int64, wxConfig *config2.WxConfig) error

Types

type AddressSrv

type AddressSrv struct {
	BaseSrv
}

func GetAddressSrv

func GetAddressSrv() *AddressSrv

func (*AddressSrv) AddAddress

func (srv *AddressSrv) AddAddress(c context.Context, address *model.BeeUserAddress) (*proto.UserAddressResp, error)

func (*AddressSrv) Default

func (*AddressSrv) DeleteAddress

func (srv *AddressSrv) DeleteAddress(userId int64, id int64) error

func (*AddressSrv) GetAddress

func (srv *AddressSrv) GetAddress(c context.Context, id int64) (*proto.UserAddressDetailResp, error)

func (*AddressSrv) GetAddressDto

func (srv *AddressSrv) GetAddressDto(c context.Context, uid int64, id int64) (*model.BeeUserAddress, error)

func (*AddressSrv) ListAddress

func (srv *AddressSrv) ListAddress(c context.Context) ([]*proto.UserAddressResp, error)

func (*AddressSrv) SaveAddress

func (srv *AddressSrv) SaveAddress(c context.Context, address *proto.SaveAddressReq) (*proto.UserAddressResp, error)

func (*AddressSrv) SetDefault

func (srv *AddressSrv) SetDefault(c context.Context, uid int64, addressId int64) error

type BalanceSrv

type BalanceSrv struct {
	BaseSrv
}

func GetBalanceSrv

func GetBalanceSrv() *BalanceSrv

func (*BalanceSrv) GetAmount

func (srv *BalanceSrv) GetAmount(ctx context.Context, uid int64) (*model.BeeUserAmount, error)

func (*BalanceSrv) InitAmount

func (srv *BalanceSrv) InitAmount(ctx context.Context, uid int64) (*model.BeeUserAmount, error)

func (*BalanceSrv) OperAmount

func (srv *BalanceSrv) OperAmount(c context.Context, userId int64, amountType enum.BalanceType, num decimal.Decimal, orderId string, mark string, extraTx ...func(tx *gorm.DB) error) (*model.BeeUserAmount, error)

func (*BalanceSrv) OperAmountByTx

func (srv *BalanceSrv) OperAmountByTx(c context.Context, tx *gorm.DB, userId int64, amountType enum.BalanceType, num decimal.Decimal, orderId string, mark string, extraTx ...func(tx *gorm.DB) error) (*model.BeeUserAmount, error)

type BannerSrv

type BannerSrv struct {
	BaseSrv
}

func GetBannerSrv

func GetBannerSrv() *BannerSrv

func (*BannerSrv) GetBannerList

func (srv *BannerSrv) GetBannerList() ([]*model.BeeBanner, error)

type BaseSrv

type BaseSrv struct {
}

type CmsSrv

type CmsSrv struct {
	BaseSrv
}

func GetCmsSrv

func GetCmsSrv() *CmsSrv

func (*CmsSrv) GetCmsInfo

func (srv *CmsSrv) GetCmsInfo(key string) (*proto.CmsResp, error)

type CommentSrv

type CommentSrv struct {
	BaseSrv
}

func GetCommentSrv

func GetCommentSrv() *CommentSrv

func (*CommentSrv) Add

type CommonSrv

type CommonSrv struct {
	BaseSrv
}

func GetCommonSrv

func GetCommonSrv() *CommonSrv

func (*CommonSrv) GetDistance

func (srv *CommonSrv) GetDistance(lonA, latA, lonB, latB float64) float64

GetDistance 获取距离 lonA, latA分别为A点的纬度和经度 lonB, latB分别为B点的纬度和经度 返回的距离单位为米

func (*CommonSrv) GetMapQQDistance

func (srv *CommonSrv) GetMapQQDistance(key string, mode string, from string, to string) (*proto.DistanceResp, error)

type CouponSrv

type CouponSrv struct {
	BaseSrv
}

func GetCouponSrv

func GetCouponSrv() *CouponSrv

func (*CouponSrv) CouponDetail

func (srv *CouponSrv) CouponDetail(c context.Context, id int64) (*proto.CouponDetailResp, error)

func (*CouponSrv) FetchCoupon

func (srv *CouponSrv) FetchCoupon(c context.Context, userInfo *model.BeeUser, id int64) error

func (*CouponSrv) GetCoupons

func (srv *CouponSrv) GetCoupons(showInFront int) ([]*model.BeeCoupon, error)

func (*CouponSrv) GetMyCouponListByStatus

func (srv *CouponSrv) GetMyCouponListByStatus(userId int64, status enum.CouponStatus) ([]*model.BeeUserCoupon, error)

func (*CouponSrv) GetMyCouponStatistics

func (srv *CouponSrv) GetMyCouponStatistics(userId int64) (*proto.MyCouponStatisticsResp, error)

func (*CouponSrv) GetUserCoupon

func (srv *CouponSrv) GetUserCoupon(userId, id int64) (*model.BeeUserCoupon, error)

func (*CouponSrv) GetUserCouponByIds

func (srv *CouponSrv) GetUserCouponByIds(c context.Context, userId int64, ids []int64) ([]*model.BeeUserCoupon, error)

func (*CouponSrv) ReturnCoupon

func (srv *CouponSrv) ReturnCoupon(c context.Context, tx *gorm.DB, userId int64, id int64) error

func (*CouponSrv) UseCoupon

func (srv *CouponSrv) UseCoupon(c context.Context, tx *gorm.DB, userId int64, id int64) error

type CyTableSrv

type CyTableSrv struct {
	BaseSrv
}

func GetCyTableSrv

func GetCyTableSrv() *CyTableSrv

func (CyTableSrv) AddOrder

func (s CyTableSrv) AddOrder(c context.Context, ip string, goods []*proto.BeeOrderGoods) error

func (CyTableSrv) CreateToken

func (s CyTableSrv) CreateToken(c context.Context, info *model.BeeCyTable) (string, error)

CreateToken 扫码点餐需要一个虚拟用户token

func (CyTableSrv) Token

func (s CyTableSrv) Token(c context.Context, tableId int64, key string) (*proto.CyTableTokenResp, error)

type DadaSrv

type DadaSrv struct {
	BaseSrv
}

func GetDadaSrv

func GetDadaSrv() *DadaSrv

func (*DadaSrv) GetRemark

func (s *DadaSrv) GetRemark(param *dadasdk.CallbackParam) string

func (*DadaSrv) Notify

func (s *DadaSrv) Notify(c context.Context, param *dadasdk.CallbackParam) error

type DeliverySrv

type DeliverySrv struct {
	BaseSrv
}

func GetDeliverySrv

func GetDeliverySrv() *DeliverySrv

func (*DeliverySrv) AddOrder

func (s *DeliverySrv) AddOrder(ctx context.Context, t enum.DeliveryType, preOrderNo string) error

func (*DeliverySrv) AddOrderDirect

func (*DeliverySrv) BindYunlaba

func (s *DeliverySrv) BindYunlaba(ctx context.Context, shopId int64, appId string, state string) error

func (*DeliverySrv) GetNotifyUrl

func (s *DeliverySrv) GetNotifyUrl(ctx context.Context, t enum.DeliveryType) (string, error)

func (*DeliverySrv) QueryDeliveryFee

func (*DeliverySrv) QueryDetail

func (s *DeliverySrv) QueryDetail(ctx context.Context, t enum.DeliveryType, peisongOrderNo string) (*proto.QueryDeliveryResult, error)

func (*DeliverySrv) SupportPreOrder

func (s *DeliverySrv) SupportPreOrder(ctx context.Context, t enum.DeliveryType) (bool, error)

type DfsSrv

type DfsSrv struct {
	BaseSrv
}

func GetDfsSrv

func GetDfsSrv() *DfsSrv

func (DfsSrv) FillFileUrl

func (s DfsSrv) FillFileUrl(path string) string

func (DfsSrv) ReplaceHtmlFilepath

func (s DfsSrv) ReplaceHtmlFilepath(content string) string

func (DfsSrv) SaveUploadedFile

func (s DfsSrv) SaveUploadedFile(c context.Context, host string, file *multipart.FileHeader, domain, filename, fileUrl string, hours int64) (*proto.UploadFileResp, error)

type FeeSrv

type FeeSrv struct {
	BaseSrv
}

func GetFeeSrv

func GetFeeSrv() *FeeSrv

func (*FeeSrv) GetPeiSongByDistance

func (fee *FeeSrv) GetPeiSongByDistance(c context.Context, distance float64) (*model.BeePeiSong, error)

func (*FeeSrv) GetPeiSongById

func (fee *FeeSrv) GetPeiSongById(c context.Context, id int64) (*model.BeePeiSong, error)

func (*FeeSrv) ListPeiSong

func (fee *FeeSrv) ListPeiSong(c context.Context) ([]*model.BeePeiSong, error)

type FreightTplSrv

type FreightTplSrv struct {
	BaseSrv
}

func GetFreightTplSrv

func GetFreightTplSrv() *FreightTplSrv

func (*FreightTplSrv) GetBeeLogistics

func (srv *FreightTplSrv) GetBeeLogistics(c context.Context, logisticsId int64, regionId string) (*proto.GoodsLogistics, error)

func (*FreightTplSrv) GetBeeLogisticsDtoByIds

func (srv *FreightTplSrv) GetBeeLogisticsDtoByIds(c context.Context, logisticsIds []int64) ([]*model.BeeLogistics, error)

type GoodsSrv

type GoodsSrv struct {
	BaseSrv
}

func GetGoodsSrv

func GetGoodsSrv() *GoodsSrv

func (*GoodsSrv) GetCategoryAll

func (srv *GoodsSrv) GetCategoryAll(c context.Context) ([]*model.BeeShopGoodsCategory, error)

func (*GoodsSrv) GetGoodsAddition

func (srv *GoodsSrv) GetGoodsAddition(c context.Context, goodsId int64) ([]*model.BeeShopGoodsAddition, error)

func (*GoodsSrv) GetGoodsDetail

func (srv *GoodsSrv) GetGoodsDetail(c context.Context, id int64, regionId string) (*proto.GoodsDetailResp, error)

func (*GoodsSrv) GetGoodsList

func (srv *GoodsSrv) GetGoodsList(c context.Context, shopId int64, categoryId int64, page, pageSize int) ([]*model.BeeShopGoods, error)

func (*GoodsSrv) GetGoodsWithSku

func (srv *GoodsSrv) GetGoodsWithSku(c context.Context, goodsId int64, propertyChildIds string) (*model.BeeShopGoods, *model.BeeShopGoodsSku, error)

func (*GoodsSrv) GetPrice

func (srv *GoodsSrv) GetPrice(c context.Context, goodsId int64, propertyChildIds string) (*proto.GoodsPriceResp, error)

func (*GoodsSrv) GetPropsByIds

func (srv *GoodsSrv) GetPropsByIds(c context.Context, propIds []int64) ([]*model.BeeShopGoodsProp, error)

type LogisticsItem

type LogisticsItem struct {
	LogisticsId int64
	Amount      decimal.Decimal
	Num         decimal.Decimal
	Weight      decimal.Decimal
}

type NoticeSrv

type NoticeSrv struct {
	BaseSrv
}

func GetNoticeSrv

func GetNoticeSrv() *NoticeSrv

func (*NoticeSrv) GetDetail

func (srv *NoticeSrv) GetDetail(id int64) (*model.BeeNotice, error)

func (*NoticeSrv) GetLastOne

func (srv *NoticeSrv) GetLastOne() (*model.BeeNotice, error)

type OrderSrv

type OrderSrv struct {
	BaseSrv
}

func GetOrderSrv

func GetOrderSrv() *OrderSrv

func (*OrderSrv) CancelDelivery

func (s *OrderSrv) CancelDelivery(ctx context.Context, peisongId int64, reasonId int, reason string) error

CancelDelivery 取消配送

func (*OrderSrv) Close

func (s *OrderSrv) Close(c context.Context, orderId int64, remark string) error

func (*OrderSrv) CreateOrder

func (s *OrderSrv) CreateOrder(c context.Context, ip string, req *proto.CreateOrderReq) (*proto.CreateOrderResp, error)

CreateOrder 生成订单 token: 2139988c3b3611ef857c0a2c448f23fc goodsJsonStr: [{"propertyChildIds":",211245:1686933,211246:1686935,211247:1686938","goodsId":1808569,"number":1,"logisticsType":0,"inviter_id":0,"goodsTimesDay":"","goodsTimesItem":""}] remark: 订单备注测试 peisongType: zq isCanHx: true shopIdZt: 391592 shopNameZt: 龙楼店(文昌市龙楼镇) extJsonStr: {"联系电话":"18283848592","取餐时间":"09:30"}

func (*OrderSrv) Delete

func (s *OrderSrv) Delete(c context.Context, orderId int64) error

func (*OrderSrv) Delivery

func (s *OrderSrv) Delivery(c context.Context, orderId int64) error

func (*OrderSrv) Detail

func (s *OrderSrv) Detail(c context.Context, orderId int64, hxNumber string) (*proto.GetOrderDetailResp, error)

func (*OrderSrv) GetOrderByOrderId

func (s *OrderSrv) GetOrderByOrderId(c context.Context, orderId int64) (*proto.OrderDto, error)

func (*OrderSrv) GetOrderByOrderNo

func (s *OrderSrv) GetOrderByOrderNo(c context.Context, orderNo string) (*proto.OrderDto, error)

func (*OrderSrv) GetOrderDetailByOrderId

func (s *OrderSrv) GetOrderDetailByOrderId(c context.Context, orderId int64) (*proto.OrderDetailDto, error)

func (*OrderSrv) GetPeisongDetail

func (s *OrderSrv) GetPeisongDetail(ctx context.Context, peisongId int64) (*proto.QueryDeliveryResult, error)

func (*OrderSrv) GetPeisongOrderInfoById

func (s *OrderSrv) GetPeisongOrderInfoById(c context.Context, id int64) (*model.BeeOrderPeisong, error)

func (*OrderSrv) GetPeisongOrderInfoByPeisongOrderId

func (s *OrderSrv) GetPeisongOrderInfoByPeisongOrderId(c context.Context, peisongOrderId string) (*model.BeeOrderPeisong, error)

func (*OrderSrv) GetPeisongOrderInfoByPeisongOrderNo

func (s *OrderSrv) GetPeisongOrderInfoByPeisongOrderNo(c context.Context, peisongOrderNo string) (*model.BeeOrderPeisong, error)

func (*OrderSrv) Hx

func (s *OrderSrv) Hx(c context.Context, number string) error

func (*OrderSrv) List

func (*OrderSrv) NotifyDelivery

func (s *OrderSrv) NotifyDelivery(ctx context.Context, orderId int64) error

NotifyDelivery 通知配送

func (*OrderSrv) PayByBalance

func (s *OrderSrv) PayByBalance(c context.Context, ip, orderId string, code string, pwd string) error

func (*OrderSrv) PayOrderByBalance

func (s *OrderSrv) PayOrderByBalance(c context.Context, ip string, payLog *model.BeePayLog, orderId string, thirdId string, amount decimal.Decimal, extraTx ...func(tx *gorm.DB) error) error

PayOrderByBalance 支付成功 amount 标志第三方支付金额,如果是用余额支付,请用0

func (*OrderSrv) PayOrderOffline

func (s *OrderSrv) PayOrderOffline(c context.Context, orderId string, extraTx ...func(tx *gorm.DB) error) error

func (*OrderSrv) Reputation

func (s *OrderSrv) Reputation(c context.Context, req *proto.BeeOrderReputationReq) error

func (*OrderSrv) ShippedBeeOrder

func (s *OrderSrv) ShippedBeeOrder(ctx context.Context, orderId int64) error

func (*OrderSrv) StartDaemon

func (s *OrderSrv) StartDaemon(ctx context.Context, wg *sync.WaitGroup)

func (*OrderSrv) UpdatePeisongOrderInfoStatus

func (s *OrderSrv) UpdatePeisongOrderInfoStatus(c context.Context, info *model.BeeOrderPeisong) error

type PaySrv

type PaySrv struct {
	BaseSrv
	// contains filtered or unexported fields
}

func GetPaySrv

func GetPaySrv() *PaySrv

func (*PaySrv) GetSendRuleByAmount

func (fee *PaySrv) GetSendRuleByAmount(ctx context.Context, payTotal decimal.Decimal, userId int64) (*model.RechargeSendRule, error)

func (*PaySrv) GetWechatPayClient

func (fee *PaySrv) GetWechatPayClient(ctx context.Context, cfg *WxPayConfig) (*wechat.ClientV3, error)

func (*PaySrv) GetWxAppPayInfo

func (fee *PaySrv) GetWxAppPayInfo(c context.Context, money decimal.Decimal, remark string, nextAction string, name string) (*proto.GetWxPayInfoRes, error)

func (*PaySrv) PayBill

func (fee *PaySrv) PayBill(c context.Context, shopId int64, money decimal.Decimal, pwd string, calculate bool, smsCode string) (*proto.PayBillRes, error)

func (*PaySrv) RechargeSendRule

func (fee *PaySrv) RechargeSendRule(c context.Context) ([]*model.RechargeSendRule, error)

func (*PaySrv) WxNotify

func (fee *PaySrv) WxNotify(c context.Context, ip string, req *wechat.V3NotifyReq) error

WxNotify 微信支付回调网关

type PrinterSrv

type PrinterSrv struct {
	BaseSrv
}

func GetPrinterSrv

func GetPrinterSrv() *PrinterSrv

func (*PrinterSrv) StartDaemon

func (srv *PrinterSrv) StartDaemon(ctx context.Context, wg *sync.WaitGroup)

func (*PrinterSrv) TestPrinter

func (srv *PrinterSrv) TestPrinter(ctx context.Context, _printer *model.BeePrinter) error

type QueueSrv

type QueueSrv struct {
	BaseSrv
}

func GetQueueSrv

func GetQueueSrv() *QueueSrv

func (*QueueSrv) CallQueue

func (srv *QueueSrv) CallQueue(c context.Context, id int64, curNumber int64) error

func (*QueueSrv) Get

func (srv *QueueSrv) Get(c context.Context, queueId int64, mobile string) error

func (*QueueSrv) GetMyQueueInfo

func (srv *QueueSrv) GetMyQueueInfo(c context.Context, queueId int64, status string) ([]*proto.MyQueue, error)

func (*QueueSrv) GetQueueTypes

func (srv *QueueSrv) GetQueueTypes(c context.Context, status string) ([]*model.BeeQueue, error)

func (*QueueSrv) NextBeeQueue

func (srv *QueueSrv) NextBeeQueue(c context.Context, id int64) error

func (*QueueSrv) PassQueue

func (srv *QueueSrv) PassQueue(c context.Context, id int64) error

func (*QueueSrv) ReCallBeeQueue

func (srv *QueueSrv) ReCallBeeQueue(ctx context.Context, id int64) error

type RegionSrv

type RegionSrv struct {
	BaseSrv
}

func GetRegionSrv

func GetRegionSrv() *RegionSrv

func (*RegionSrv) GetAllChild

func (srv *RegionSrv) GetAllChild(pid string) ([]*model.BeeRegion, error)

func (*RegionSrv) GetAllProvince

func (srv *RegionSrv) GetAllProvince() ([]*model.BeeRegion, error)

func (*RegionSrv) GetRegion

func (srv *RegionSrv) GetRegion(id string) (*model.BeeRegion, error)

type ScoreSrv

type ScoreSrv struct {
	BaseSrv
}

func GetScoreSrv

func GetScoreSrv() *ScoreSrv

func (*ScoreSrv) GetLastSignLog

func (srv *ScoreSrv) GetLastSignLog(c context.Context) (*model.BeeSignLog, error)

func (*ScoreSrv) GetScoreLogs

func (srv *ScoreSrv) GetScoreLogs(c context.Context, page int64, size int64) ([]*model.BeeScoreLog, error)

func (*ScoreSrv) GetSignLogs

func (srv *ScoreSrv) GetSignLogs(c context.Context) ([]*model.BeeSignLog, error)

func (*ScoreSrv) Sign

func (srv *ScoreSrv) Sign(c context.Context) error

func (*ScoreSrv) WxaGroup

func (srv *ScoreSrv) WxaGroup(c context.Context) error

type ShopSrv

type ShopSrv struct {
	BaseSrv
}

func GetShopSrv

func GetShopSrv() *ShopSrv

func (*ShopSrv) GetShopInfo

func (srv *ShopSrv) GetShopInfo(c context.Context, id int64, lat, lon float64) (*model.BeeShopInfo, error)

func (*ShopSrv) List

type ShoppingCartSrv

type ShoppingCartSrv struct {
	BaseSrv
}

func GetShoppingCartSrv

func GetShoppingCartSrv() *ShoppingCartSrv

func (*ShoppingCartSrv) Add

func (srv *ShoppingCartSrv) Add(c context.Context, goodsId int64, num int64, sku string, addition string) (*proto.ShoppingCartInfo, error)

func (*ShoppingCartSrv) Empty

func (*ShoppingCartSrv) GetShoppingCart

func (srv *ShoppingCartSrv) GetShoppingCart(c context.Context, userId int64) (*proto.ShoppingCartInfo, error)

func (*ShoppingCartSrv) ModifyNumber

func (srv *ShoppingCartSrv) ModifyNumber(c context.Context, userId int64, key string, number int64) (*proto.ShoppingCartInfo, error)

func (*ShoppingCartSrv) Remove

type TokenSrv

type TokenSrv struct {
	BaseSrv
}

func GetTokenSrv

func GetTokenSrv() *TokenSrv

func (*TokenSrv) CleanExpireToken

func (srv *TokenSrv) CleanExpireToken() error

func (*TokenSrv) CreateToken

func (srv *TokenSrv) CreateToken(c context.Context, uid int64, sessionKey string) (string, error)

func (*TokenSrv) GetTokenInfoFromToken

func (srv *TokenSrv) GetTokenInfoFromToken(token string) (*model.BeeToken, error)

func (*TokenSrv) GetUserIdFromToken

func (srv *TokenSrv) GetUserIdFromToken(token string) (int64, error)

func (*TokenSrv) RefreshToken

func (srv *TokenSrv) RefreshToken(token string) error

type UserSrv

type UserSrv struct {
	BaseSrv
}

func GetUserSrv

func GetUserSrv() *UserSrv

func (*UserSrv) Amount

func (srv *UserSrv) Amount(c context.Context, userId int64) (*proto.GetUserAmountResp, error)

func (*UserSrv) BindWxMobile

func (srv *UserSrv) BindWxMobile(c context.Context, req *proto.BindWxMobileReq) (string, error)

func (*UserSrv) CashLog

func (srv *UserSrv) CashLog(c context.Context, userId int64, req *proto.CashLogReq) (*proto.CashLogResp, error)

func (*UserSrv) CreateUser

func (srv *UserSrv) CreateUser(c context.Context, tx *gorm.DB, user *model.BeeUser) error

func (*UserSrv) CreateUserToken

func (srv *UserSrv) CreateUserToken(c context.Context, userId int64, uid int64, openId string, sessionKey string) (*proto.AuthorizeResp, error)

func (*UserSrv) GetDynamicUserCode

func (srv *UserSrv) GetDynamicUserCode(c context.Context) (string, error)

func (*UserSrv) GetLevelByAmount

func (srv *UserSrv) GetLevelByAmount(c context.Context, amount decimal.Decimal) (*model.BeeLevel, error)

func (*UserSrv) GetMinLevel

func (srv *UserSrv) GetMinLevel(c context.Context) (*model.BeeLevel, error)

func (*UserSrv) GetUserInfo

func (srv *UserSrv) GetUserInfo(c context.Context, token string) (*model.BeeUser, error)

func (*UserSrv) GetUserInfoByUid

func (srv *UserSrv) GetUserInfoByUid(c context.Context, uid int64) (*model.BeeUser, error)

func (*UserSrv) GetUserLevel

func (srv *UserSrv) GetUserLevel(c context.Context, uid int64) (*model.BeeUserLevel, error)

func (*UserSrv) GetUserWxOpenId

func (srv *UserSrv) GetUserWxOpenId(c context.Context) (string, error)

func (*UserSrv) IncrUserLevelAmount

func (srv *UserSrv) IncrUserLevelAmount(c context.Context, tx *gorm.DB, uid int64, payAmount decimal.Decimal) error

func (*UserSrv) LevelList

func (srv *UserSrv) LevelList(c context.Context) (*proto.GetLevelListResp, error)

func (*UserSrv) Login

func (srv *UserSrv) Login(c context.Context, code string) (*proto.AuthorizeResp, error)

func (*UserSrv) Modify

func (srv *UserSrv) Modify(user *model.BeeUser) error

func (*UserSrv) PayLogs

func (srv *UserSrv) PayLogs(c context.Context, userId int64, req *proto.PayLogsReq) (proto.PayLogsResp, error)

type WxAppSrv

type WxAppSrv struct {
	BaseSrv
	sync.RWMutex
	Appid       string
	Secret      string
	WeAppClient *weapp.Client
	WeAppAuth   *auth.Auth
}

func GetWxAppSrv

func GetWxAppSrv(c context.Context) (*WxAppSrv, error)

func GetWxAppSrvByUserId

func GetWxAppSrvByUserId(c context.Context, userId int64) (*WxAppSrv, error)

func (*WxAppSrv) Authorize

func (srv *WxAppSrv) Authorize(c context.Context, code string) (*weapp.LoginResponse, error)

func (*WxAppSrv) GetWxAppQrCode

func (srv *WxAppSrv) GetWxAppQrCode(c context.Context, req *weapp.UnlimitedQRCode) ([]byte, error)

GetWxAppQrCode 获取小程序码

type WxPayConfig

type WxPayConfig struct {
	MchId           string `json:"mchId"`           //商户号
	Secret          string `json:"secret"`          //秘钥,对应微信支付是, APIv3Key,商户平台获取
	Token           string `json:"token"`           //token, 商户证书的证书序列号
	ReturnUrl       string `json:"returnUrl"`       //返回地址
	NotifyUrl       string `json:"notifyUrl"`       //回调地址
	PrivateCertPath string `json:"privateCertPath"` //商户API证书下载后,私钥 apiclient_key.pem 读取后的字符串内容
	Debug           bool   `json:"debug"`
}

type YunlabaSrv

type YunlabaSrv struct {
	BaseSrv
}

func GetYunlabaSrv

func GetYunlabaSrv() *YunlabaSrv

func (*YunlabaSrv) Notify

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL