Documentation
¶
Index ¶
- Variables
- func AddBrowseHistory(userID, goodsID uint)
- func AddCart(userID uint, req *AddCartReq) (*model.Cart, error)
- func AddErrorLog(typ, content, url, ip string)
- func AddInventoryLog(orderID, goodsID, skuID uint, quantity int, typ, remark string)
- func AddOrderStatusHistory(orderID uint, oldStatus, newStatus int8, msg, creator string)
- func AddOrderTraceSource(orderID, userID uint, source, params string)
- func AddPayRequestLog(payLogID uint, request, response, business string)
- func AddSearchHistory(userID uint, keyword string)
- func AdminDelete(id uint) error
- func AdminDetail(id uint) (*model.Admin, error)
- func AdminDisableUser(userID uint) error
- func AdminGetAftersaleList(page, pageSize int, status *int8) ([]model.OrderAftersale, int64, error)
- func AdminOrderPayUnderLine(orderID, adminID uint) error
- func AdminOrderServiceList(status *int8, page, pageSize int) ([]model.OrderService, int64, error)
- func AdminSave(id uint, nickname string, roleID uint) error
- func AftersaleAudit(asID uint) error
- func AftersaleCancel(userID, asID uint) error
- func AftersaleConfirm(asID uint) error
- func AftersaleCreate(userID uint, req *AftersaleCreateReq) (*model.OrderAftersale, error)
- func AftersaleDelivery(userID, asID uint, req *AftersaleDeliveryReq) error
- func AftersaleRefuse(asID uint, reason string) error
- func AgreementGet(name string) *model.Agreement
- func AgreementSave(name, content string) error
- func AlipayGatewayDoURL() string
- func AlipayQueryTrade(ctx context.Context, outTradeNo string) (tradeStatus, alipayTradeNo string, err error)
- func AlipayTradePaid(status string) bool
- func AlipayUserAuth(appID, code string) (string, error)
- func AlipayVerifyGatewaySyncSign(content, signBase64, publicKeyPEM string) bool
- func AlipayVerifySign(params map[string]string, publicKeyPEM string) bool
- func AppAccountsBindVerifySendHandle(account, typ string) error
- func AppAccountsBindhHandle(userID uint, platform, openID string) error
- func AppBaseConfig() map[string]string
- func AppCenterNavCreate(n *model.AppCenterNav) error
- func AppCenterNavDelete(id uint) error
- func AppCenterNavList() ([]model.AppCenterNav, error)
- func AppCenterNavStatusUpdate(id uint, status int8) error
- func AppClientHomeDiyData() map[string]interface{}
- func AppClientHomeDiyId() uint
- func AppCustomerServiceConfig() map[string]string
- func AppEmailBind(userID uint, email, code string) error
- func AppEmailBindVerifySend(email string) error
- func AppHomeNavCreate(n *model.AppHomeNav) error
- func AppHomeNavDelete(id uint) error
- func AppHomeNavList() ([]model.AppHomeNav, error)
- func AppHomeNavStatusUpdate(id uint, status int8) error
- func AppMiniConfig(platform string) map[string]string
- func AppMiniDetail(id uint) *model.AppMini
- func AppMiniOnekeyUserMobileBind(userID uint, mobile string) error
- func AppMiniUserInfo(userID uint, platform string) (*model.UserPlatform, error)
- func AppMobileBind(userID uint, req *BindMobileReq) error
- func AppMobileBindVerifySend(mobile string) error
- func AppTabbarList() ([]model.AppTabbar, error)
- func AppTabbarSave(items []model.AppTabbar) error
- func AppUserInfoHandle(user *model.User) map[string]interface{}
- func ApplyDistributor(userID, parentID uint) (*model.Distributor, error)
- func AppointGoodsList(ids []uint) []model.Goods
- func ArticleCategoryDelete(id uint) error
- func ArticleCategoryStatusUpdate(id uint, status int8) error
- func ArticleDeleteFull(id uint) error
- func ArticleStatusUpdate(id uint, status int8) error
- func ArticleTotal(catID uint) int64
- func AttachmentApiCategoryDelete(id uint) error
- func AttachmentApiCategoryList() ([]model.AttachmentCategory, error)
- func AttachmentApiCategorySave(name string) error
- func AttachmentApiDelete(id uint) error
- func AttachmentApiList(categoryID uint, page, pageSize int) ([]model.Attachment, int64, error)
- func AttachmentApiSave(a *model.Attachment) error
- func AttachmentCategoryDelete(id uint) error
- func AttachmentCategoryList() ([]model.AttachmentCategory, error)
- func AttachmentCategorySave(id uint, name string) error
- func AttachmentCategoryStatusUpdate(id uint, status int8) error
- func AttachmentDelete(id uint) error
- func AttachmentDetail(id uint) *model.Attachment
- func AttachmentDiskFilesToDb(path, pathType string)
- func AttachmentList(categoryID uint, page, pageSize int) ([]model.Attachment, int64, error)
- func AttachmentListHandle(list []model.Attachment) []model.Attachment
- func AttachmentSave(a *model.Attachment) error
- func AttachmentTotal(categoryID uint) int64
- func AuditWithdraw(id uint, approve bool, reason string) error
- func AuthUserProgram(userID uint) bool
- func AutoGoodsBrowseList(userID uint, limit int) []model.BrowseHistory
- func AutoGoodsList(categoryID uint, orderBy string, limit int) []model.Goods
- func BaiduUserAuth(appID, secret, code string) (string, error)
- func BindMobile(userID uint, req *BindMobileReq) error
- func BookingConfirm(orderID uint) error
- func BottomNavigationData() []model.Navigation
- func BrandCategoryDelete(id uint) error
- func BrandDeleteFull(id uint) error
- func BrandStatusUpdate(id uint, status int8) error
- func BrandTotal() int64
- func BuyDataDelete(userID uint)
- func BuyDataRead(userID uint) (map[string]interface{}, error)
- func BuyDataStorage(userID uint, data interface{}) error
- func BuyDefaultPayment(platform string) uint
- func BuyGoodsCheck(goodsID, skuID uint, quantity int) error
- func BuyOrderPayBeginGoodsCheck(cartIDs []uint, userID uint) error
- func CacheLoginUserInfo(userID uint) *model.User
- func CacheUserTokenData(userID uint) (string, error)
- func CalcCouponDiscount(coupon *model.Coupon, orderAmount int64) (int64, error)
- func CancelOrder(userID, orderID uint) error
- func CategoryBrandList(categoryID uint) []model.Brand
- func CategoryGoodsList(categoryID uint, page, pageSize int) ([]model.Goods, int64)
- func CategoryGoodsTotal(categoryID uint) int64
- func ChangePoints(userID uint, points int, typ string, refID uint, remark string) error
- func CheckPower(roleID uint, power string) bool
- func CheckVerifyCode(account, code, typ string) error
- func ClearBrowseHistory(userID uint) error
- func ClearCache(cacheType string) error
- func ClearSearchHistory(userID uint) error
- func ConfigContentRow(key string) string
- func ConfigInit()
- func ConfigList() ([]model.Config, error)
- func ConfigSave(key, value, group, desc string) error
- func ConfirmReceive(userID, orderID uint) error
- func CreateAddress(userID uint, req *AddressReq) (*model.Address, error)
- func CreateAdmin(req *CreateAdminReq) (*model.Admin, error)
- func CreateAnswer(userID uint, req *AnswerCreateReq) (*model.Answer, error)
- func CreateArticle(req *ArticleReq) (*model.Article, error)
- func CreateArticleCategory(name string, sort int) (*model.ArticleCategory, error)
- func CreateAttachmentCategory(name string) error
- func CreateBrand(name, logo, desc string, sort int) (*model.Brand, error)
- func CreateBrandCategoryRecord(name string, sort int) *model.BrandCategory
- func CreateCategory(req *CategoryReq) (*model.Category, error)
- func CreateCoupon(req *CreateCouponReq) (*model.Coupon, error)
- func CreateExpress(name, code, icon string, sort int) (*model.Express, error)
- func CreateGoods(req *CreateGoodsReq) (*model.Goods, error)
- func CreateGroupBuy(req *GroupBuyReq) (*model.Promotion, error)
- func CreateLink(l *model.Link) error
- func CreateNavigation(n *model.Navigation) error
- func CreateOrder(userID uint, req *CreateOrderReq) (*model.Order, error)
- func CreateOrderReviewsShopXO(userID, orderID uint, goodsIDs []uint, ratings []int, ...) error
- func CreateOrderService(orderID, userID uint, typ, content string) (*model.OrderService, error)
- func CreateParamsTemplate(req *ParamsTemplateReq) (*model.GoodsParamsTemplate, error)
- func CreatePayLog(userID uint, orderIDs []uint, paymentID uint, clientType string) (*model.PayLog, error)
- func CreatePayment(p *model.Payment) error
- func CreatePower(parentID uint, name, control string, sort int) (*model.Power, error)
- func CreatePromotion(req *CreatePromotionReq) (*model.Promotion, error)
- func CreateRefundLog(orderID, payLogID, userID uint, refundPrice int64, reason string) *model.RefundLog
- func CreateReview(userID uint, req *CreateReviewReq) (*model.Review, error)
- func CreateRole(req *RoleReq) (*model.Role, error)
- func CreateSeckill(req *SeckillReq) (*model.Promotion, error)
- func CreateSlide(s *model.Slide) error
- func CreateSpecTemplate(req *SpecTemplateReq) (*model.SpecTemplate, error)
- func CreateWarehouse(req *WarehouseReq) (*model.Warehouse, error)
- func CronGoodsGiveIntegral(deps *app.Deps) (sucs, fail int)
- func CronIntegralRelease(deps *app.Deps, limitMinutes int) (sucs, fail int)
- func CronOrderAutoReceive(deps *app.Deps, days int) (sucs, fail int)
- func CronOrderClose(deps *app.Deps, minutes int) (sucs, fail int)
- func CronRefundReconcile(deps *app.Deps) (sucs, fail int)
- func CustomViewCreate(title, content string) (*model.CustomView, error)
- func CustomViewDelete(id uint) error
- func CustomViewList() ([]model.CustomView, error)
- func CustomViewStatusUpdate(id uint, status int8) error
- func CustomerServiceCustom() string
- func CustomerServiceTel() string
- func DefaultTheme() *model.ThemeData
- func DeleteAddress(userID, addrID uint) error
- func DeleteAnswer(id uint) error
- func DeleteAppMini(id uint) error
- func DeleteArticle(id uint) error
- func DeleteAttachment(id uint) error
- func DeleteBrand(id uint) error
- func DeleteCart(userID uint, ids []uint) error
- func DeleteExpress(id uint) error
- func DeleteOrder(userID, orderID uint) error
- func DeletePower(id uint) error
- func DeleteRole(id uint) error
- func DeleteSpecTemplate(id uint) error
- func DeleteWarehouse(id uint) error
- func DesignAccessCountInc(id uint)
- func DesignCreate(name, data string) (*model.Design, error)
- func DesignDelete(id uint) error
- func DesignDownload(id uint) (string, error)
- func DesignList() ([]model.Design, error)
- func DesignSave(id uint, name, data string) error
- func DesignStatusUpdate(id uint, status int8) error
- func DesignSync(id uint) error
- func DesignUpdate(id uint, data string) error
- func DesignUpload(zipPath string) (uint, error)
- func DiyAccessCountInc(id uint)
- func DiyApiArticleAutoData(categoryID uint, limit int) ([]model.Article, error)
- func DiyApiBrandAutoData(limit int) ([]model.Brand, error)
- func DiyApiCustomInit(diyID uint) (map[string]interface{}, error)
- func DiyApiGoodsAutoData(p *DiyApiParams) ([]model.Goods, error)
- func DiyApiGoodsBrowseAutoData(userID uint, limit int) ([]model.BrowseHistory, error)
- func DiyApiGoodsFavorAutoData(userID uint, limit int) ([]model.Favorite, error)
- func DiyApiUserHeadData(userID uint) map[string]int64
- func DiyCreate(name, data string) (*model.Diy, error)
- func DiyData(id uint) *model.Diy
- func DiyDelete(id uint) error
- func DiyDownload(id uint) (string, error)
- func DiyList() ([]model.Diy, error)
- func DiyPreviewData(id uint) map[string]interface{}
- func DiySave(id uint, name, data string) error
- func DiyStatusUpdate(id uint, status int8) error
- func DiyUpdate(id uint, data string) error
- func DiyUpload(zipPath string) (uint, error)
- func EmailLogAdd(email, title, content string, status int8)
- func EmailLogAllDelete() error
- func EmailLogDelete(ids []uint) error
- func EmailLogList(page, pageSize int) ([]model.EmailLog, int64, error)
- func ErrorLogAllDelete() error
- func ErrorLogDelete(ids []uint) error
- func ExchangePoints(userID uint, points int) (int64, error)
- func ExecuteSQL(sqlStr string) ([]map[string]interface{}, error)
- func ExportData(w io.Writer, req *ExportReq) error
- func ExpressDelete(id uint) error
- func ExpressDetail(id uint) *model.Express
- func ExpressSave(e *model.Express) error
- func ExpressStatusUpdate(id uint, status int8) error
- func ForgetPassword(req *ForgetPwdReq) error
- func ForgetPwd(req *ForgetPwdReq) error
- func ForgetPwdVerifySend(account string) error
- func FormInputApiDelete(id, userID uint) error
- func FormInputApiDetail(id uint) (*model.FormInput, error)
- func FormInputApiList(page, pageSize int) ([]model.FormInput, int64, error)
- func FormInputApiSave(formID, userID uint, data string) error
- func FormInputCreate(name, config string) error
- func FormInputDataDetailForUser(userID, rowID uint) (map[string]interface{}, error)
- func FormInputDataList(formID uint, page, pageSize int) ([]model.FormInputData, int64, error)
- func FormInputDataSubmit(formID, userID uint, data string) error
- func FormInputDelete(id uint) error
- func FormInputDetail(id uint) *model.FormInput
- func FormInputDownload(id uint) (string, error)
- func FormInputList() ([]model.FormInput, error)
- func FormInputPreview(id uint) map[string]interface{}
- func FormInputStatusUpdate(id uint, status int8) error
- func FormInputUpload(zipPath string) error
- func FormTableQuery(p *FormTableParams) (int64, []map[string]interface{}, error)
- func GenerateQRCodeURL(content string) string
- func GetActiveGroupBuys() ([]model.Promotion, error)
- func GetActivePromotions() ([]model.Promotion, error)
- func GetActiveSeckills() ([]model.Promotion, error)
- func GetAddress(userID, addrID uint) (*model.Address, error)
- func GetAddressList(userID uint) ([]model.Address, error)
- func GetAdminList(page, pageSize int) (int64, []model.Admin, error)
- func GetAftersaleDetail(userID, asID uint) (*model.OrderAftersale, error)
- func GetAftersaleList(userID uint, page, pageSize int) ([]model.OrderAftersale, int64, error)
- func GetAnswerList(goodsID uint, page, pageSize int) ([]model.Answer, int64, error)
- func GetAppMiniList() ([]model.AppMini, error)
- func GetArticleCategoryList() ([]model.ArticleCategory, error)
- func GetArticleDetail(id uint) (*model.Article, error)
- func GetArticleList(categoryID uint, page, pageSize int) ([]model.Article, int64, error)
- func GetBrandCategoryListRecords() []model.BrandCategory
- func GetBrandList() ([]model.Brand, error)
- func GetBrowseHistory(userID uint, page, pageSize int) ([]model.BrowseHistory, int64, error)
- func GetCacheStats() map[string]interface{}
- func GetCartList(userID uint) ([]model.Cart, error)
- func GetCategoryTree() ([]model.Category, error)
- func GetCommissionLogs(distributorID uint, page, pageSize int) (int64, []model.CommissionLog, error)
- func GetConfig(key string) string
- func GetConfigGroup(group string) ([]model.Config, error)
- func GetCouponList() ([]model.Coupon, error)
- func GetDistributorByUser(userID uint) (*model.Distributor, error)
- func GetDistributorList(page, pageSize int) (int64, []model.Distributor, error)
- func GetErrorLogList(page, pageSize int) ([]model.ErrorLog, int64, error)
- func GetExpressList() ([]model.Express, error)
- func GetFavorites(userID uint, page, pageSize int) ([]model.Favorite, int64, error)
- func GetFormFields(formID uint) ([]model.FormTableUserFields, error)
- func GetFormGoodsContentAppParams(goodsID uint) string
- func GetFormGoodsPhotoParams(goodsID uint) ([]model.GoodsPhoto, error)
- func GetFormGoodsSpecificationsBaseParams(goodsID uint) ([]model.GoodsSpecBase, error)
- func GetFormGoodsSpecificationsParams(goodsID uint) map[string]interface{}
- func GetGoodsContentApp(goodsID uint) string
- func GetGoodsDetail(id uint) (*model.Goods, error)
- func GetGoodsParams(goodsID uint) ([]model.GoodsParams, error)
- func GetGoodsPhotos(goodsID uint) ([]model.GoodsPhoto, error)
- func GetGoodsReviews(goodsID uint, page, pageSize int) ([]model.Review, int64, error)
- func GetGoodsSpecBase(goodsID uint) ([]model.GoodsSpecBase, error)
- func GetGroupBuyList(page, pageSize int) (int64, []model.Promotion, error)
- func GetGroupOrderDetail(id uint) (*model.GroupOrder, []model.GroupOrderMember, error)
- func GetHotKeywords(limit int) ([]string, error)
- func GetInventoryLogList(goodsID uint, page, pageSize int) ([]model.InventoryLog, int64, error)
- func GetLangPack(lang, module string) (map[string]string, error)
- func GetMessages(userID uint, page, pageSize int) ([]model.Message, int64, error)
- func GetMyCoupons(userID uint, status *int8) ([]model.UserCoupon, error)
- func GetOrderDetail(userID, orderID uint) (*model.Order, error)
- func GetOrderStatusHistory(orderID uint) ([]model.OrderStatusHistory, error)
- func GetOrderTraceSource(orderID uint) ([]model.OrderTraceSource, error)
- func GetParamsTemplateList() ([]model.GoodsParamsTemplate, error)
- func GetPayLogList(userID uint, page, pageSize int) ([]model.PayLog, int64, error)
- func GetPointsLog(userID uint, page, pageSize int) ([]model.PointsLog, int64, error)
- func GetPowerTree() ([]model.Power, error)
- func GetPromoPrice(skuID uint) (int64, error)
- func GetPromotionAdminList(page, pageSize int, keyword string) (int64, []model.Promotion, error)
- func GetRefundLogList(page, pageSize int) ([]model.RefundLog, int64, error)
- func GetRegionList(parentID uint) ([]model.Region, error)
- func GetRoleList() ([]model.Role, error)
- func GetRolePluginIDs(roleID uint) ([]uint, error)
- func GetRolePowers(roleID uint) ([]uint, error)
- func GetScreeningPrices() ([]model.ScreeningPrice, error)
- func GetSearchHistory(userID uint) ([]model.SearchHistory, error)
- func GetSeckillList(page, pageSize int) (int64, []model.Promotion, error)
- func GetSelfExtractionAddressList() []map[string]interface{}
- func GetShipment(orderID uint) (*model.Shipment, error)
- func GetSiteConfig() map[string]string
- func GetSpecTemplateList() ([]model.SpecTemplate, error)
- func GetSubDistributors(userID uint) ([]model.Distributor, error)
- func GetUserByID(id uint) (*model.User, error)
- func GetUserPlatforms(userID uint) ([]model.UserPlatform, error)
- func GetUserViewInfo(userID uint) map[string]interface{}
- func GetWarehouseList() ([]model.Warehouse, error)
- func GetWithdrawList(page, pageSize int, status *int8) (int64, []model.WithdrawRequest, error)
- func GoodsAccessCountInc(goodsID uint)
- func GoodsAppData(goodsID uint) map[string]interface{}
- func GoodsBaseFieldsRequiredConfigData() map[string]bool
- func GoodsBaseForbidOperateData(goodsID uint) map[string]bool
- func GoodsBaseTemplate() map[string]interface{}
- func GoodsBrowseDelete(ids []uint, userID uint) error
- func GoodsBrowseList(userID uint, page, pageSize int) ([]model.BrowseHistory, int64, error)
- func GoodsBrowseListHandle(list []model.BrowseHistory) []model.BrowseHistory
- func GoodsBuyButtonList(goods *model.Goods) []map[string]string
- func GoodsBuyLeftNavList() []map[string]string
- func GoodsCartListHandle(list []model.Cart) []model.Cart
- func GoodsCartSave(userID uint, req *AddCartReq) (*model.Cart, error)
- func GoodsCartSaveHandle(userID uint, goodsID, skuID uint, quantity int) (*model.Cart, error)
- func GoodsCartStock(cartID uint) (int, error)
- func GoodsCartTotal(userID uint) int64
- func GoodsCategoryAll() []model.Category
- func GoodsCategoryDelete(id uint) error
- func GoodsCategoryInsert(goodsID uint, catIDs []uint)
- func GoodsCategoryItemsIds(ids []uint, deep int) []uint
- func GoodsCategoryLevel() int
- func GoodsCategoryName(id uint) string
- func GoodsCategoryNames(ids []uint) map[uint]string
- func GoodsCategoryParentIds(id uint) []uint
- func GoodsCategoryStatusUpdate(id uint, status int8) error
- func GoodsCommentsDelete(id uint) error
- func GoodsCommentsDeleteForUser(id, userID uint) error
- func GoodsCommentsList(goodsID uint, page, pageSize int) ([]model.Review, int64, error)
- func GoodsCommentsListHandle(list []model.Review) []model.Review
- func GoodsCommentsSave(userID uint, req *CreateReviewReq) (*model.Review, error)
- func GoodsCommentsStatusUpdate(id uint, status int8) error
- func GoodsCommentsTotal(goodsID uint) int64
- func GoodsContentAppInsert(goodsID uint, content string) error
- func GoodsData(id uint) *model.Goods
- func GoodsDataEditStatusCheck(id uint) error
- func GoodsDeleteFull(id uint) error
- func GoodsDetailGuessYouLikeData(goodsID uint, limit int) []model.Goods
- func GoodsDetailMiddleTabsNavList(goodsID uint) []map[string]interface{}
- func GoodsDetailSeeingYouData(goodsID uint, limit int) []model.Goods
- func GoodsEditParameters(goodsID uint) map[string]interface{}
- func GoodsEditSpecifications(goodsID uint) map[string]interface{}
- func GoodsFavorDelete(ids []uint, userID uint) error
- func GoodsFavorList(userID uint, page, pageSize int) ([]model.Favorite, int64, error)
- func GoodsFavorListHandle(list []model.Favorite) []model.Favorite
- func GoodsFavorTotal(userID uint) int64
- func GoodsFirstSeveralComments(goodsID uint, n int) []model.Review
- func GoodsImagesCoverHandle(goods *model.Goods) string
- func GoodsListHandle(list []model.Goods) []model.Goods
- func GoodsParametersData(goodsID uint) ([]model.GoodsParams, error)
- func GoodsParamsInsert(goodsID uint, params []ParamsConfigItem) error
- func GoodsParamsOperateData(goodsID uint) map[string]interface{}
- func GoodsPhotoData(goodsID uint) ([]model.GoodsPhoto, error)
- func GoodsPhotoInsert(goodsID uint, images []string) error
- func GoodsQrcode(id uint) string
- func GoodsSalesCountInc(goodsID uint, count int)
- func GoodsSalesModelType(goods *model.Goods) string
- func GoodsSave(id uint, req *GoodsSaveReq) (*model.Goods, error)
- func GoodsSaveBaseUpdate(id uint, updates map[string]interface{}) error
- func GoodsSearchList(keyword string, categoryID, brandID uint, page, pageSize int) ([]model.Goods, int64)
- func GoodsSearchListForWarehouse(warehouseID uint, keyword string) []model.Goods
- func GoodsSpecBaseFields() []string
- func GoodsSpecChangeInventorySync(goodsID uint) error
- func GoodsSpecDefaultName() string
- func GoodsSpecInventorySync(goodsID uint) error
- func GoodsSpecOperateData(goodsID uint) map[string]interface{}
- func GoodsSpecType(goodsID uint) []model.SpecType
- func GoodsSpecificationsActual(goodsID uint) ([]model.GoodsSpecBase, error)
- func GoodsSpecificationsConcise(goodsID uint) []string
- func GoodsSpecificationsData(goodsID uint) ([]model.GoodsSKU, error)
- func GoodsSpecificationsExtends(goodsID uint) map[string]interface{}
- func GoodsSpecificationsInsert(goodsID uint, specs []SpecBaseReq) error
- func GoodsStatusUpdate(id uint, status int8) error
- func GoodsStock(goodsID uint, spec string) (int, error)
- func GoodsTotal(status *int8) int64
- func GoodsUrlCreate(id uint) string
- func GuessYouLike(userID uint, limit int) []model.Goods
- func HandlePayNotify(outTradeNo string, transactionID string) error
- func HomeHavTopRight() bool
- func InferPaymentKeyFromPaymentName(name string) string
- func InitOrderService(svc *OrderService)
- func IntegralLogList(userID uint, page, pageSize int) ([]model.PointsLog, int64, error)
- func IntegralLogListHandle(list []model.PointsLog) []model.PointsLog
- func IntegralLogTotal(userID uint) int64
- func InvalidateCategoryCache()
- func IsBookingMode() bool
- func IsExistAccounts(account string) bool
- func IsGoodsSiteTypeConsistent(goodsID uint) bool
- func IsImaVerify() bool
- func IsSuperAdmin(roleID uint) bool
- func JoinGroup(userID, groupOrderID uint) error
- func KuaishouUserAuth(appID, secret, code string) (string, error)
- func LayoutList() ([]model.Layout, error)
- func LayoutSave(name, typ, data string) error
- func LevelOneNav() []model.Navigation
- func LinkDelete(id uint) error
- func LinkList() ([]model.Link, error)
- func LinkListHandle(list []model.Link) []model.Link
- func LinkSave(l *model.Link) error
- func LinkStatusUpdate(id uint, status int8) error
- func LoginUserInfo(userID uint) *model.User
- func LoginVerifySend(account string) error
- func Logout(userID uint) error
- func MatchingUserPlatformData(userID uint) []model.UserPlatform
- func MessageDelete(ids []uint, userID uint) error
- func MessageListHandle(list []model.Message) []model.Message
- func MessageListWhere(userID uint) []model.Message
- func MessageTotal(userID uint) int64
- func MoreOrderPayBeginCheck(userID uint, orderIDs []uint) error
- func MultilingualGetUserValue(userID uint) string
- func MultilingualSetUserValue(userID uint, lang string)
- func NavDataAll() []model.Navigation
- func NavDataDealWith(list []model.Navigation) []model.Navigation
- func NavDelete(id uint) error
- func NavSave(n *model.Navigation) error
- func NavStatusUpdate(id uint, status int8) error
- func NavigationHandle(list []model.Navigation) []model.Navigation
- func NavigationList(typ string) ([]model.Navigation, error)
- func NotifyOrderStatus(userID, orderID uint, orderNo, status string)
- func OpenGroup(userID, itemID uint) (*model.GroupOrder, error)
- func OrderAddressData(order *model.Order) map[string]interface{}
- func OrderAftersaleCalculation(orderDetailID uint, number int) int64
- func OrderAftersaleChoiceTypeList(orderID uint) []map[string]interface{}
- func OrderAftersaleDelete(id uint) error
- func OrderAftersaleDetailData(id uint) map[string]interface{}
- func OrderAftersaleListHandle(list []model.OrderAftersale) []model.OrderAftersale
- func OrderAftersaleListWhere(userID uint) []model.OrderAftersale
- func OrderAftersaleReturnGoodsAddress(orderID uint) map[string]string
- func OrderAftersaleStepData(asID uint) []model.AftersaleHistory
- func OrderAftersaleTipsMsg(status int8) string
- func OrderAftersaleTotal(userID uint, status *int8) int64
- func OrderConfirm(orderID, adminID uint) error
- func OrderDeliverySyncWeixin(orderNo, tradeNo, openID, goodsTitle, expressName, expressNumber, tel string, ...) error
- func OrderDirectSuccess(orderID uint) error
- func OrderGoodsIntegralGiving(userID, orderID uint, payAmount int64) error
- func OrderGoodsIntegralRollback(orderID, orderDetailID uint, refundAmount int64) error
- func OrderIsCanLaunchAftersale(orderID, userID uint) bool
- func OrderItemList(orderID uint) []model.OrderItem
- func OrderListHandle(list []model.Order) []model.Order
- func OrderPayCheck(userID, orderID uint) (*model.Order, error)
- func OrderPayLogInsert(userID uint, orderIDs []uint, paymentID uint, clientType string) (*model.PayLog, error)
- func OrderPayLogValueList(payLogID uint) []model.PayLogValue
- func OrderRewardPoints(userID, orderID uint, payAmount int64) error
- func OrderServiceData(orderID uint) []model.OrderService
- func OrderServiceList(orderID uint) ([]model.OrderService, error)
- func OrderSplitHandle(userID uint, req *CreateOrderReq) ([]*model.Order, error)
- func OrderStatusGroupTotal(userID uint) map[string]int64
- func OrderTraceSourceData(orderID uint) ([]model.OrderTraceSource, error)
- func PayLogClose(payNo string) error
- func PayLogData(payNo string) *model.PayLog
- func PayLogListHandle(list []model.PayLog) []model.PayLog
- func PayLogMenuRowsShopXO(userID uint) []map[string]string
- func PayLogOrderRowsShopXO(userID, payLogID uint) ([]map[string]string, error)
- func PayLogPagesDetailData(id uint) *model.PayLog
- func PayLogPagesListData(page, pageSize int) ([]model.PayLog, int64, error)
- func PayLogSuccess(payNo, tradeNo string) error
- func PayLogTypeList() []map[string]string
- func PayOrder(userID uint, req *PayOrderReq) (*jsapi.PrepayWithRequestPaymentResponse, error)
- func PaymentDelete(id uint) error
- func PaymentDriverKeyFromPayment(p *model.Payment) (string, error)
- func PaymentEntranceCreate(payment string) error
- func PaymentEntranceDelete(payment string) error
- func PaymentList() ([]model.Payment, error)
- func PaymentOpenUserUpdate(id uint, open int8) error
- func PaymentSave(p *model.Payment) error
- func PaymentStatusUpdate(id uint, status int8) error
- func PaymentUpgradeInfo() []map[string]interface{}
- func PersonalSave(userID uint, req *PersonalSaveReq) error
- func PluginConfigGet(pluginID uint, key string) string
- func PluginConfigSet(pluginID uint, key, value string) error
- func PluginInstall(name, title, desc, author, version string) error
- func PluginList() ([]model.Plugin, error)
- func PluginUninstall(id uint) error
- func PluginsAdminDelete(id uint) error
- func PluginsAdminList() ([]model.Plugin, error)
- func PluginsAdminSave(id uint, config string) error
- func PluginsAdminStatusUpdate(id uint, status int8) error
- func PluginsBaseList() ([]model.Plugin, error)
- func PluginsCategoryDelete(id uint) error
- func PluginsCategoryList() []model.PluginCategory
- func PluginsCategorySave(name string, sort int) error
- func PluginsCheck(name string) bool
- func PluginsControlCall(name, method string, params map[string]interface{}) interface{}
- func PluginsData(id uint) *model.Plugin
- func PluginsDataHandle(list []model.Plugin) []model.Plugin
- func PluginsDataSave(id uint, config string) error
- func PluginsEventCall(hookName string, params map[string]interface{})
- func PluginsField(name, field string) string
- func PluginsHomeDataList() []model.Plugin
- func PluginsNewVersionCheck() bool
- func PluginsSortList() []model.Plugin
- func PluginsStatus(id uint, status int8) error
- func PowerSave(p *model.Power) error
- func PowerStatusUpdate(id uint, status int8) error
- func QQUserAuth(appID, secret, code string) (string, error)
- func QuickNavCreate(n *model.QuickNav) error
- func QuickNavDelete(id uint) error
- func QuickNavList() ([]model.QuickNav, error)
- func QuickNavStatusUpdate(id uint, status int8) error
- func ReadAllMessages(userID uint) error
- func ReadMessage(userID, msgID uint) error
- func ReceiveCoupon(userID, couponID uint) error
- func ReconcileAlipayPayments(ctx context.Context, deps *app.Deps) (payLogsFixed, ordersFixed int)
- func ReconcileWechatPayments(ctx context.Context, deps *app.Deps) (payLogsFixed, ordersFixed int)
- func RefundOrder(userID uint, req *RefundReq) error
- func Reg(req *RegisterReq) (*model.User, error)
- func RegVerifySend(account string) error
- func RegionAll() []model.Region
- func RegionCodeData(id uint) *model.Region
- func RegionDelete(id uint) error
- func RegionItemsIds(pid uint) []uint
- func RegionName(id uint) string
- func RegionNodeSon(pid uint) []model.Region
- func RegionSave(r *model.Region) error
- func RegionStatusUpdate(id uint, status int8) error
- func Register(req *RegisterReq) (*model.User, error)
- func RegisterPayEventListeners()
- func ReplyAnswer(id uint, reply string) error
- func ReplyOrderService(id, adminID uint, reply string) error
- func ReplyReview(reviewID uint, reply string) error
- func RequestWithdraw(userID uint, amount int64, accountType, accountNo, accountName string) error
- func RunInDBTx(db *gorm.DB, fn func(tx *gorm.DB) error) error
- func SaveAppMini(req *AppMiniReq) error
- func SaveFormFields(formID uint, fields []model.FormTableUserFields) error
- func SaveGoodsCategoryJoinRecords(goodsID uint, categoryIDs []uint)
- func SaveGoodsContentApp(goodsID uint, content string) error
- func SaveGoodsParams(goodsID uint, params []ParamsConfigItem) error
- func SaveGoodsPhotos(goodsID uint, images []string) error
- func SaveGoodsSpecBase(goodsID uint, specs []SpecBaseReq) error
- func SaveOrderCurrency(orderID uint, amount int64)
- func SaveRolePlugins(roleID uint, pluginIDs []uint) error
- func SaveRolePowers(roleID uint, powerIDs []uint) error
- func SaveSelfExtractionAddress(list []map[string]interface{})
- func SaveSiteConfig(configs map[string]string)
- func ScreeningPriceDelete(id uint) error
- func ScreeningPriceSave(s *model.ScreeningPrice) error
- func SearchAdd(userID uint, keyword string)
- func SearchGoodsMaxPrice() int64
- func SearchGoodsProduceRegionList() []string
- func SearchIsLoginCheck() bool
- func SearchKeywordsList() []string
- func SearchMapHandle(params map[string]interface{}) map[string]interface{}
- func SearchMapInfo(params map[string]interface{}) map[string]interface{}
- func SearchMapOrderByList() []map[string]string
- func SearchParamsWhereTypeValue() string
- func SearchProhibitCheck(keyword string) bool
- func SeckillBuy(userID, itemID uint) error
- func SelectAllCart(userID uint, selected bool) error
- func SendEmail(to, subject, body string) error
- func SendMessage(userID uint, title, content, typ string, refID uint) error
- func SendSms(phone, templateCode, templateParam string) error
- func SendVerifyCode(account, typ string) error
- func SendWxTemplateMsg(openID, templateID string, data map[string]interface{}, page string) error
- func SetConfig(key, value, group, desc string) error
- func SetCurrencyConfig(cfg *CurrencyConfig)
- func SetMultilingualConfig(defaultLang string, available []string)
- func SettleCommission(orderID uint)
- func ShipOrder(req *ShipOrderReq) error
- func ShortcutMenuDelete(id uint) error
- func ShortcutMenuList() ([]model.ShortcutMenu, error)
- func ShortcutMenuSave(items []model.ShortcutMenu) error
- func SignIn(userID uint) (int, error)
- func SingleOrderPayBeginCheck(userID, orderID uint) error
- func SiteFictitiousConfig() map[string]string
- func SiteFilingList() []map[string]interface{}
- func SiteTitleIconHandle() map[string]string
- func SlideDelete(id uint) error
- func SlideList() ([]model.Slide, error)
- func SlideListHandle(list []model.Slide) []model.Slide
- func SlideSave(s *model.Slide) error
- func SlideStatusUpdate(id uint, status int8) error
- func SmsLogAdd(phone, content, typ string, status int8)
- func SmsLogAllDelete() error
- func SmsLogDelete(ids []uint) error
- func SmsLogList(page, pageSize int) ([]model.SmsLog, int64, error)
- func SmsTemplateValue(typ string) string
- func SplitOrderByWarehouse(userID uint, req *CreateOrderReq) ([]*model.Order, error)
- func StalePendingPayLogsCleanup(deps *app.Deps, maxAgeMinutes int) (closed int)
- func StartCronJobs(ctx context.Context, deps *app.Deps)
- func StatisticalBaseTotalCount() map[string]int64
- func StatisticalDateTimeList(days int) []string
- func StatisticalDayCreate()
- func StatisticalInit()
- func ThemeAdminConfig(id uint) *model.ThemeData
- func ThemeAdminDelete(id uint) error
- func ThemeAdminDownload(id uint) (string, error)
- func ThemeAdminList() ([]model.ThemeData, error)
- func ThemeAdminSave(name, data string) error
- func ThemeAdminSwitch(id uint) error
- func ThemeAdminUpload(zipPath string) error
- func ThemeCreate(name, data string) error
- func ThemeDataDelete(id uint) error
- func ThemeDataDownload(id uint) (string, error)
- func ThemeDataListHandle(list []model.ThemeData) []model.ThemeData
- func ThemeDataSave(id uint, name, data string) error
- func ThemeDataStatusUpdate(id uint, status int8) error
- func ThemeDataUpload(zipPath string) error
- func ThemeList() ([]model.ThemeData, error)
- func ToggleFavorite(userID, goodsID uint) (bool, error)
- func TokenUserinfo(token string) (*model.User, error)
- func ToutiaoUserAuth(appID, secret, code string) (string, error)
- func UnreadCount(userID uint) int64
- func UpdateAddress(userID, addrID uint, req *AddressReq) error
- func UpdateAdminStatus(id uint, status int8) error
- func UpdateBrand(id uint, name, logo, desc string, sort int) error
- func UpdateCart(userID, cartID uint, req *UpdateCartReq) error
- func UpdatePassword(userID uint, req *UpdatePwdReq) error
- func UpdateRefundLog(refundNo string, status int8, tradeNo string)
- func UpdateRole(id uint, req *RoleReq) error
- func UpdateWarehouse(id uint, req *WarehouseReq) error
- func UpdateWarehouseStatus(id uint, status int8) error
- func UserAvatarUpload(userID uint, avatarURL string) error
- func UserBaseHandle(user *model.User)
- func UserBaseInfo(userID uint) *model.User
- func UserCartGoodsCountData(userID uint) int64
- func UserCenterLeftList() []model.Navigation
- func UserCenterMiniNavigationData() []model.Navigation
- func UserDelete(userID uint) error
- func UserEntranceLeftData(userID uint) []map[string]interface{}
- func UserFavorGoodsCountData(userID uint) int64
- func UserForgetAccountsCheck(account string) (*model.User, error)
- func UserHandle(user *model.User)
- func UserInfo(userID uint) map[string]interface{}
- func UserInsert(username, password, nickname string) (*model.User, error)
- func UserIntegral(userID uint) map[string]int
- func UserListHandle(list []model.User) []model.User
- func UserListService(page, pageSize int, keyword string, status *int8) ([]model.User, int64, error)
- func UserLoginAccountsCheck(account string) (*model.User, error)
- func UserLoginOrRegBackRefererUrl() string
- func UserLoginRecord(userID uint, ip, platform string)
- func UserLogout(userID uint) error
- func UserNumberCodeCreatedHandle() string
- func UserOpenidBind(userID uint, platform, openID, unionID string) error
- func UserOpenidHandle(platform, openID string) *model.UserPlatform
- func UserPlatformInfo(userID uint, platform string) *model.UserPlatform
- func UserPlatformInsert(p *model.UserPlatform) error
- func UserPlatformUpdate(id uint, updates map[string]interface{}) error
- func UserReferrerDecrypt(ref string) uint
- func UserReferrerEncryption(userID uint) string
- func UserRegAccountsCheck(username string) error
- func UserRegForbidCheck() error
- func UserSafetyPanelList() []map[string]string
- func UserSave(userID uint, nickname, avatar, phone string) error
- func UserStatusCheck(userID uint) error
- func UserSystemInfo(userID uint) map[string]interface{}
- func UserTokenData(userID uint) (string, error)
- func UserTokenUpdate(userID uint) (string, error)
- func UserTotal() int64
- func UserUnionidHandle(platform, unionID string) *model.UserPlatform
- func UserUniqueMethod() string
- func UserUpdateHandle(userID uint, updates map[string]interface{}) error
- func UsersPersonalShowFieldList() []string
- func WarehouseGoodsAdd(warehouseID, goodsID uint, inventory int) error
- func WarehouseGoodsData(warehouseID, goodsID uint) *model.WarehouseGoods
- func WarehouseGoodsDelete(id uint) error
- func WarehouseGoodsInventory(goodsID uint) int
- func WarehouseGoodsInventoryDeduct(orderID, goodsID uint, skuID uint, quantity int) error
- func WarehouseGoodsInventoryRollback(orderID, goodsID uint, skuID uint, quantity int) error
- func WarehouseGoodsList(warehouseID uint) ([]model.WarehouseGoods, error)
- func WarehouseGoodsListHandle(list []model.WarehouseGoods) []model.WarehouseGoods
- func WarehouseGoodsSpecData(warehouseID, goodsID uint) []model.WarehouseGoodsSpec
- func WarehouseGoodsSpecInventory(warehouseID, goodsID, skuID uint) int
- func WarehouseGoodsSpecSave(warehouseID, goodsID, skuID uint, inventory int, specValues string) error
- func WarehouseGoodsStatusUpdate(id uint, status int8) error
- func WeixinUserAuth(appID, secret, code string) (string, string, error)
- func ZipExport(dir, name string) (string, error)
- func ZipImport(zipPath, destDir string) error
- type AddCartReq
- type AddressReq
- type AdminLoginReq
- type AdminLoginResp
- type AftersaleCreateReq
- type AftersaleDeliveryReq
- type AlipayDriver
- type AlipayFaceDriver
- type AlipayMiniDriver
- type AnswerCreateReq
- type AppMiniReq
- type ArticleReq
- type BindMobileReq
- type BuyGoodsItem
- type BuyInitResp
- type CategoryReq
- type CreateAdminReq
- type CreateCouponReq
- type CreateGoodsReq
- type CreateOrderReq
- type CreatePromotionReq
- type CreateReviewReq
- type CurrencyConfig
- type DayStat
- type DiyApiParams
- type ExportReq
- type ExtractionInfo
- type ForgetPwdReq
- type FormTableParams
- type FormTableWhere
- type GoodsListReq
- type GoodsListResp
- type GoodsRank
- type GoodsReq
- type GoodsSaveReq
- type GoodsScoreData
- type GoodsSpecDetailResp
- type GroupBuyReq
- type HomeFloor
- type LoginReq
- type LoginResp
- type MultilingualConfig
- type OfflineDriver
- type OrderListReq
- type OrderListResp
- type OrderOperate
- type OrderService
- func (s *OrderService) CancelOrder(userID, orderID uint) error
- func (s *OrderService) CreateOrder(userID uint, req *CreateOrderReq) (*model.Order, error)
- func (s *OrderService) GetOrderDetail(userID, orderID uint) (*model.Order, error)
- func (s *OrderService) GetOrderList(userID uint, req *OrderListReq) (*OrderListResp, error)
- type OrderStatusDist
- type OrderStep
- type ParamFilterItem
- type ParamsConfigItem
- type ParamsTemplateReq
- type PayDriverReq
- type PayDriverResp
- type PayOrderReq
- type PayPalDriver
- type PayTypeStat
- type PaymentDriver
- type PersonalSaveReq
- type PlatformLoginReq
- type PlatformLoginResp
- type PromotionItemReq
- type RefundDriverReq
- type RefundReq
- type RegionStat
- type RegisterReq
- type RoleReq
- type SKUReq
- type SandboxDriver
- type SearchRankItem
- type SearchStartResp
- type SeckillReq
- type ShipOrderReq
- type SpecBaseReq
- type SpecFilterItem
- type SpecTemplateReq
- type SpecTypeReq
- type StatItem
- type StatisticalData
- type StatisticalExt
- type SystemInfo
- type TrackInfo
- type TrackResult
- type UnifiedPayReq
- type UpdateAdminStatusReq
- type UpdateCartReq
- type UpdatePwdReq
- type UserRank
- type WalletPayDriver
- type WarehouseReq
- type WechatAppDriver
- type WechatH5Driver
- type WechatJSAPIDriver
- type WechatNativeDriver
- type WxLoginReq
- type WxLoginResp
Constants ¶
This section is empty.
Variables ¶
var ( MetricOrderCreated = promauto.NewCounter(prometheus.CounterOpts{ Name: "goshop_order_created_total", Help: "Total number of orders created", }) MetricPaySuccess = promauto.NewCounter(prometheus.CounterOpts{ Name: "goshop_pay_success_total", Help: "Total number of successful payments", }) MetricPayTotal = promauto.NewCounter(prometheus.CounterOpts{ Name: "goshop_pay_total", Help: "Total number of payment attempts (notify received)", }) MetricRefundSuccess = promauto.NewCounter(prometheus.CounterOpts{ Name: "goshop_refund_success_total", Help: "Total number of successful refunds", }) )
业务指标:下单/支付/退款计数器。 在关键路径上 Inc,Prometheus 抓取后可用于告警和 Dashboard。
var AppVersion = "dev"
AppVersion 由构建时 -ldflags 注入,默认 dev。
Functions ¶
func AddBrowseHistory ¶
func AddBrowseHistory(userID, goodsID uint)
func AddInventoryLog ¶
库存变动日志
func AddOrderStatusHistory ¶
---- 订单状态历史 ----
func AddOrderTraceSource ¶
---- 订单溯源 ----
func AddPayRequestLog ¶
func AddSearchHistory ¶
func AdminDelete ¶
func AdminDetail ¶
==================== Admin ====================
func AdminDisableUser ¶ added in v1.5.5
AdminDisableUser 管理后台将用户设为禁用(不物理删除,保留订单等关联数据)。
func AdminGetAftersaleList ¶
func AdminOrderPayUnderLine ¶
AdminOrderPayUnderLine 管理员确认线下支付收款
func AdminOrderServiceList ¶
func AftersaleCancel ¶
func AftersaleCreate ¶
func AftersaleCreate(userID uint, req *AftersaleCreateReq) (*model.OrderAftersale, error)
func AftersaleDelivery ¶
func AftersaleDelivery(userID, asID uint, req *AftersaleDeliveryReq) error
func AftersaleRefuse ¶
func AgreementSave ¶
func AlipayGatewayDoURL ¶ added in v1.6.0
func AlipayGatewayDoURL() string
AlipayGatewayDoURL 返回支付宝 OpenAPI 网关完整地址(以 /gateway.do 结尾)。 配置 alipay.gateway_url 可为沙箱(如 https://openapi.alipaydev.com/gateway.do)或自定义网关;仅填 origin 时自动补全 /gateway.do。
func AlipayQueryTrade ¶ added in v1.6.0
func AlipayQueryTrade(ctx context.Context, outTradeNo string) (tradeStatus, alipayTradeNo string, err error)
AlipayQueryTrade 调用官方 alipay.trade.query(商户订单号 out_trade_no)。同步响应经 RSA2 验签;网关地址见 alipay.gateway_url。
func AlipayTradePaid ¶ added in v1.6.0
AlipayTradePaid 判断支付宝 trade.query 返回的 trade_status 是否表示已支付。
func AlipayUserAuth ¶
func AlipayVerifyGatewaySyncSign ¶ added in v1.6.0
AlipayVerifyGatewaySyncSign 校验支付宝 OpenAPI 同步 JSON 中业务报文体(如 alipay_trade_query_response)的 RSA2 签名。 content 必须是网关响应里该字段的原文(解析为 json.RawMessage 后转 string),不得用 json.Marshal 重新序列化,避免字段顺序变化导致验签失败。
func AlipayVerifySign ¶ added in v1.5.0
AlipayVerifySign 验证支付宝回调签名(RSA2-SHA256)
func AppAccountsBindVerifySendHandle ¶
AppAccountsBindVerifySendHandle 绑定验证码发送处理
func AppAccountsBindhHandle ¶
AppAccountsBindhHandle 账号绑定处理
func AppBaseConfig ¶
func AppCenterNavCreate ¶
func AppCenterNavCreate(n *model.AppCenterNav) error
func AppCenterNavDelete ¶
func AppCenterNavList ¶
func AppCenterNavList() ([]model.AppCenterNav, error)
func AppCenterNavStatusUpdate ¶
==================== AppCenterNav ====================
func AppClientHomeDiyData ¶
func AppClientHomeDiyData() map[string]interface{}
func AppClientHomeDiyId ¶
func AppClientHomeDiyId() uint
func AppEmailBindVerifySend ¶
AppEmailBindVerifySend 邮箱绑定验证码
func AppHomeNavCreate ¶
func AppHomeNavCreate(n *model.AppHomeNav) error
func AppHomeNavDelete ¶
func AppHomeNavStatusUpdate ¶
==================== AppHomeNav ====================
func AppMiniConfig ¶
func AppMiniDetail ¶
func AppMiniOnekeyUserMobileBind ¶
AppMiniOnekeyUserMobileBind 一键手机号绑定(小程序获取手机号)
func AppMiniUserInfo ¶
func AppMiniUserInfo(userID uint, platform string) (*model.UserPlatform, error)
AppMiniUserInfo 获取各平台用户信息
func AppMobileBind ¶
func AppMobileBind(userID uint, req *BindMobileReq) error
AppMobileBind 手机绑定(别名)
func AppMobileBindVerifySend ¶
AppMobileBindVerifySend 手机绑定验证码
func AppTabbarList ¶
func AppTabbarSave ¶
func AppUserInfoHandle ¶
AppUserInfoHandle APP用户信息处理
func ApplyDistributor ¶ added in v1.5.0
func ApplyDistributor(userID, parentID uint) (*model.Distributor, error)
func ArticleCategoryDelete ¶
func ArticleCategoryStatusUpdate ¶
==================== ArticleCategory ====================
func ArticleDeleteFull ¶
func ArticleStatusUpdate ¶
==================== Article ====================
func ArticleTotal ¶
func AttachmentApiCategoryList ¶
func AttachmentApiCategoryList() ([]model.AttachmentCategory, error)
func AttachmentApiDelete ¶
func AttachmentApiList ¶
func AttachmentApiSave ¶
func AttachmentApiSave(a *model.Attachment) error
func AttachmentCategoryList ¶
func AttachmentCategoryList() ([]model.AttachmentCategory, error)
func AttachmentCategorySave ¶
func AttachmentCategoryStatusUpdate ¶
==================== AttachmentCategory ====================
func AttachmentDelete ¶
==================== Attachment ====================
func AttachmentDetail ¶
func AttachmentDetail(id uint) *model.Attachment
func AttachmentDiskFilesToDb ¶
func AttachmentDiskFilesToDb(path, pathType string)
func AttachmentList ¶
---- 附件 ----
func AttachmentListHandle ¶
func AttachmentListHandle(list []model.Attachment) []model.Attachment
func AttachmentSave ¶
func AttachmentSave(a *model.Attachment) error
func AttachmentTotal ¶
func AuditWithdraw ¶ added in v1.5.0
AuditWithdraw 管理员审核提现。
- 通过 FOR UPDATE 行锁 + 事务保证单次性,避免并发双审;
- 拒绝分支整个退款流程(退余额 + 写流水 + 改状态)在同一事务内完成;
- Status != 0 直接返回 "已处理",实现幂等。
func AutoGoodsBrowseList ¶
func AutoGoodsBrowseList(userID uint, limit int) []model.BrowseHistory
func AutoGoodsList ¶
AutoGoodsList 自动商品列表(按条件)
func BaiduUserAuth ¶
func BindMobile ¶
func BindMobile(userID uint, req *BindMobileReq) error
func BottomNavigationData ¶
func BottomNavigationData() []model.Navigation
func BrandCategoryDelete ¶
==================== BrandCategory ====================
func BrandDeleteFull ¶
func BrandStatusUpdate ¶
==================== Brand ====================
func BrandTotal ¶
func BrandTotal() int64
func BuyDataDelete ¶
func BuyDataDelete(userID uint)
func BuyDataRead ¶
func BuyDataStorage ¶
BuyDataStorage 购买数据临时存储(Redis)
func BuyDefaultPayment ¶
func BuyGoodsCheck ¶
BuyGoodsCheck 购买前商品校验
func CacheLoginUserInfo ¶
CacheLoginUserInfo 缓存登录用户信息(Go用JWT无需session缓存)
func CacheUserTokenData ¶
CacheUserTokenData 缓存Token数据
func CalcCouponDiscount ¶
CalcCouponDiscount 计算优惠券抵扣金额
func CancelOrder ¶
func CategoryBrandList ¶
CategoryBrandList 指定分类下的品牌列表
func CategoryGoodsList ¶
CategoryGoodsList 分类下商品列表
func ChangePoints ¶
ChangePoints 变动积分(通用方法)
func CheckPower ¶
func ClearBrowseHistory ¶
func ClearCache ¶
func ClearSearchHistory ¶
func ConfigContentRow ¶
func ConfigInit ¶
func ConfigInit()
func ConfigSave ¶
func ConfirmReceive ¶
func CreateAddress ¶
func CreateAddress(userID uint, req *AddressReq) (*model.Address, error)
func CreateAdmin ¶
func CreateAdmin(req *CreateAdminReq) (*model.Admin, error)
func CreateAnswer ¶
func CreateAnswer(userID uint, req *AnswerCreateReq) (*model.Answer, error)
func CreateArticle ¶
func CreateArticle(req *ArticleReq) (*model.Article, error)
func CreateArticleCategory ¶
func CreateArticleCategory(name string, sort int) (*model.ArticleCategory, error)
func CreateBrandCategoryRecord ¶
func CreateBrandCategoryRecord(name string, sort int) *model.BrandCategory
func CreateCategory ¶
func CreateCategory(req *CategoryReq) (*model.Category, error)
func CreateCoupon ¶
func CreateCoupon(req *CreateCouponReq) (*model.Coupon, error)
func CreateExpress ¶
快递公司
func CreateGoods ¶
func CreateGoods(req *CreateGoodsReq) (*model.Goods, error)
func CreateGroupBuy ¶ added in v1.5.0
func CreateGroupBuy(req *GroupBuyReq) (*model.Promotion, error)
func CreateLink ¶
func CreateNavigation ¶
func CreateNavigation(n *model.Navigation) error
func CreateOrder ¶
func CreateOrder(userID uint, req *CreateOrderReq) (*model.Order, error)
func CreateOrderReviewsShopXO ¶ added in v1.6.0
func CreateOrderReviewsShopXO(userID, orderID uint, goodsIDs []uint, ratings []int, contents, imageJSONs []string) error
CreateOrderReviewsShopXO 对应 shopxo-uniapp order/commentssave:按订单批量评价多商品。
func CreateOrderService ¶
func CreateOrderService(orderID, userID uint, typ, content string) (*model.OrderService, error)
OrderService
func CreateParamsTemplate ¶
func CreateParamsTemplate(req *ParamsTemplateReq) (*model.GoodsParamsTemplate, error)
func CreatePayLog ¶
func CreatePayLog(userID uint, orderIDs []uint, paymentID uint, clientType string) (*model.PayLog, error)
CreatePayLog 创建支付日志(支持合并支付多个订单)。clientType 为渠道/来源标识(如 api、shopxo)。
func CreatePayment ¶
func CreatePower ¶
func CreatePromotion ¶
func CreatePromotion(req *CreatePromotionReq) (*model.Promotion, error)
func CreateRefundLog ¶
func CreateRefundLog(orderID, payLogID, userID uint, refundPrice int64, reason string) *model.RefundLog
CreateRefundLog 创建退款日志
func CreateReview ¶
func CreateReview(userID uint, req *CreateReviewReq) (*model.Review, error)
func CreateSeckill ¶ added in v1.5.0
func CreateSeckill(req *SeckillReq) (*model.Promotion, error)
func CreateSlide ¶
func CreateSpecTemplate ¶
func CreateSpecTemplate(req *SpecTemplateReq) (*model.SpecTemplate, error)
func CreateWarehouse ¶
func CreateWarehouse(req *WarehouseReq) (*model.Warehouse, error)
func CronGoodsGiveIntegral ¶
CronGoodsGiveIntegral 商品赠送积分(订单完成后延迟赠送)
func CronIntegralRelease ¶
CronIntegralRelease 定时释放锁定积分(赠送后N天释放)
func CronOrderAutoReceive ¶
CronOrderAutoReceive 自动确认收货(默认15天)
func CronOrderClose ¶
CronOrderClose 自动关闭超时未支付订单(默认30分钟)
func CronRefundReconcile ¶ added in v1.6.1
CronRefundReconcile 扫描长时间处于 "处理中"(status=0)的退款单,尝试恢复其本地落账。
场景:RefundOrder 第三步(事务化更新订单+回库存+标记 RefundLog=1)可能因进程崩溃或 DB 抖动 失败,此时第三方往往已退款成功,但本地订单仍是 Paid/Shipped。本 cron 的职责是:
- 订单已为 Refunded → RefundLog 只需刷新状态(历史原因的清理);
- 订单仍在 Paid/Shipped → 在事务内完成状态+库存更新并置 RefundLog=1;
- 状态异常(Cancelled/Completed 等)→ 保留 status=0,落 slog 告警;
- 超过 retentionHours 未恢复 → 落 WARN 告警,留待人工介入(不自动改为 2,避免误判)。
返回 sucs/fail:成功恢复数、告警计数(含 stuck 超时)。
func CustomViewCreate ¶
func CustomViewCreate(title, content string) (*model.CustomView, error)
func CustomViewDelete ¶
func CustomViewStatusUpdate ¶
==================== CustomView ====================
func CustomerServiceCustom ¶ added in v1.5.5
func CustomerServiceCustom() string
*
- CustomerServiceCustom 读取客服自定义文案/链接等扩展配置。
- 优先 common_app_customer_service_custom,回退 app_customer_service_custom。
func CustomerServiceTel ¶ added in v1.5.5
func CustomerServiceTel() string
*
- CustomerServiceTel 读取客服电话,与 InitDefaultConfig 中 common_app_customer_service_tel 一致。
- 若为空则回退 app_customer_service_tel(历史错误 key,兼容旧数据)。
func DefaultTheme ¶
func DeleteAddress ¶
func DeleteAnswer ¶
func DeleteAppMini ¶
func DeleteArticle ¶
func DeleteAttachment ¶
func DeleteBrand ¶
func DeleteCart ¶
func DeleteExpress ¶
func DeletePower ¶
func DeleteRole ¶
func DeleteSpecTemplate ¶
func DeleteWarehouse ¶
func DesignAccessCountInc ¶
func DesignAccessCountInc(id uint)
func DesignDelete ¶
func DesignDownload ¶
func DesignSave ¶
func DesignStatusUpdate ¶
==================== Design ====================
func DesignSync ¶
func DesignUpdate ¶
func DesignUpload ¶
func DiyAccessCountInc ¶
func DiyAccessCountInc(id uint)
func DiyApiArticleAutoData ¶
func DiyApiCustomInit ¶
DiyApiCustomInit DIY自定义组件初始化
func DiyApiGoodsAutoData ¶
func DiyApiGoodsAutoData(p *DiyApiParams) ([]model.Goods, error)
func DiyApiGoodsBrowseAutoData ¶
func DiyApiGoodsBrowseAutoData(userID uint, limit int) ([]model.BrowseHistory, error)
func DiyApiUserHeadData ¶
DiyApiUserHeadData 用户头部数据(消息数+购物车数+收藏数)
func DiyDownload ¶
func DiyPreviewData ¶
func DiyStatusUpdate ¶
==================== Diy ====================
func EmailLogAdd ¶
func EmailLogAllDelete ¶
func EmailLogAllDelete() error
func EmailLogDelete ¶
func ErrorLogAllDelete ¶
func ErrorLogAllDelete() error
func ErrorLogDelete ¶
==================== ErrorLog ====================
func ExchangePoints ¶
ExchangePoints 积分抵扣(100积分=1元)
func ExecuteSQL ¶
func ExpressDelete ¶
func ExpressDetail ¶
func ExpressSave ¶
func ExpressStatusUpdate ¶
==================== Express ====================
func ForgetPassword ¶
func ForgetPassword(req *ForgetPwdReq) error
func ForgetPwdVerifySend ¶
ForgetPwdVerifySend 忘记密码验证码发送
func FormInputApiDelete ¶
FormInputApiDelete Form表单API删除数据
func FormInputApiDetail ¶
FormInputApiDetail Form表单API详情
func FormInputApiList ¶
FormInputApiList Form表单API列表
func FormInputApiSave ¶
FormInputApiSave Form表单API保存数据
func FormInputCreate ¶
func FormInputDataDetailForUser ¶ added in v1.6.0
FormInputDataDetailForUser shopxo-uniapp forminputdata/detail:单条提交记录 + 字段定义。
func FormInputDataList ¶
func FormInputDataSubmit ¶
func FormInputDelete ¶
func FormInputDetail ¶
func FormInputPreview ¶
func FormInputStatusUpdate ¶
==================== FormInput ====================
func FormInputUpload ¶
func FormTableQuery ¶
func FormTableQuery(p *FormTableParams) (int64, []map[string]interface{}, error)
func GenerateQRCodeURL ¶
func GetActiveGroupBuys ¶ added in v1.5.0
func GetActivePromotions ¶
func GetActiveSeckills ¶ added in v1.5.0
func GetAftersaleDetail ¶
func GetAftersaleDetail(userID, asID uint) (*model.OrderAftersale, error)
func GetAftersaleList ¶
func GetAnswerList ¶
func GetAppMiniList ¶
func GetArticleCategoryList ¶
func GetArticleCategoryList() ([]model.ArticleCategory, error)
func GetArticleList ¶
func GetBrandCategoryListRecords ¶
func GetBrandCategoryListRecords() []model.BrandCategory
func GetBrandList ¶
func GetBrowseHistory ¶
func GetCacheStats ¶
func GetCacheStats() map[string]interface{}
func GetCategoryTree ¶
func GetCommissionLogs ¶ added in v1.5.0
func GetCouponList ¶
func GetDistributorByUser ¶ added in v1.5.0
func GetDistributorByUser(userID uint) (*model.Distributor, error)
func GetDistributorList ¶ added in v1.5.0
func GetDistributorList(page, pageSize int) (int64, []model.Distributor, error)
func GetExpressList ¶
func GetFavorites ¶
func GetFormFields ¶
func GetFormFields(formID uint) ([]model.FormTableUserFields, error)
func GetFormGoodsContentAppParams ¶
GetFormGoodsContentAppParams 表单APP详情参数
func GetFormGoodsPhotoParams ¶
func GetFormGoodsPhotoParams(goodsID uint) ([]model.GoodsPhoto, error)
GetFormGoodsPhotoParams 表单相册参数
func GetFormGoodsSpecificationsBaseParams ¶
func GetFormGoodsSpecificationsBaseParams(goodsID uint) ([]model.GoodsSpecBase, error)
GetFormGoodsSpecificationsBaseParams 表单规格基础参数
func GetFormGoodsSpecificationsParams ¶
GetFormGoodsSpecificationsParams 表单规格参数
func GetGoodsContentApp ¶
func GetGoodsParams ¶
func GetGoodsParams(goodsID uint) ([]model.GoodsParams, error)
func GetGoodsPhotos ¶
func GetGoodsPhotos(goodsID uint) ([]model.GoodsPhoto, error)
func GetGoodsReviews ¶
func GetGoodsSpecBase ¶
func GetGoodsSpecBase(goodsID uint) ([]model.GoodsSpecBase, error)
func GetGroupBuyList ¶ added in v1.5.0
func GetGroupOrderDetail ¶ added in v1.5.0
func GetGroupOrderDetail(id uint) (*model.GroupOrder, []model.GroupOrderMember, error)
GetGroupOrderDetail 获取拼团详情
func GetHotKeywords ¶
func GetInventoryLogList ¶
func GetLangPack ¶
GetLangPack 获取语言包(从config表读取,key格式: lang_{code}_{module}_{key})
func GetMessages ¶
func GetMyCoupons ¶
func GetMyCoupons(userID uint, status *int8) ([]model.UserCoupon, error)
func GetOrderStatusHistory ¶
func GetOrderStatusHistory(orderID uint) ([]model.OrderStatusHistory, error)
func GetOrderTraceSource ¶
func GetOrderTraceSource(orderID uint) ([]model.OrderTraceSource, error)
func GetParamsTemplateList ¶
func GetParamsTemplateList() ([]model.GoodsParamsTemplate, error)
func GetPayLogList ¶
func GetPointsLog ¶
func GetPowerTree ¶
func GetPromoPrice ¶
GetPromoPrice 获取 SKU 的促销价,无促销返回 0
func GetRoleList ¶
func GetRolePluginIDs ¶ added in v1.5.5
GetRolePluginIDs 返回角色已绑定的插件 ID 列表。
func GetRolePowers ¶
func GetScreeningPrices ¶
func GetScreeningPrices() ([]model.ScreeningPrice, error)
func GetSearchHistory ¶
func GetSearchHistory(userID uint) ([]model.SearchHistory, error)
func GetSeckillList ¶ added in v1.5.0
func GetSelfExtractionAddressList ¶
func GetSelfExtractionAddressList() []map[string]interface{}
func GetSiteConfig ¶
func GetSpecTemplateList ¶
func GetSpecTemplateList() ([]model.SpecTemplate, error)
func GetSubDistributors ¶ added in v1.5.0
func GetSubDistributors(userID uint) ([]model.Distributor, error)
func GetUserPlatforms ¶
func GetUserPlatforms(userID uint) ([]model.UserPlatform, error)
GetUserPlatforms 获取用户绑定的平台
func GetUserViewInfo ¶
GetUserViewInfo 用户展示信息(脱敏)
func GetWarehouseList ¶
func GetWithdrawList ¶ added in v1.5.0
func GoodsBaseFieldsRequiredConfigData ¶
GoodsBaseFieldsRequiredConfigData 基础字段必填配置
func GoodsBaseForbidOperateData ¶
GoodsBaseForbidOperateData 禁止操作数据
func GoodsBrowseDelete ¶
==================== GoodsBrowse ====================
func GoodsBrowseList ¶
func GoodsBrowseListHandle ¶
func GoodsBrowseListHandle(list []model.BrowseHistory) []model.BrowseHistory
func GoodsBuyButtonList ¶
GoodsBuyButtonList 购买按钮列表
func GoodsBuyLeftNavList ¶
GoodsBuyLeftNavList 购买左侧导航
func GoodsCartSave ¶
func GoodsCartSave(userID uint, req *AddCartReq) (*model.Cart, error)
func GoodsCartSaveHandle ¶
func GoodsCartStock ¶
func GoodsCartTotal ¶
==================== GoodsCart ====================
func GoodsCategoryAll ¶
func GoodsCategoryDelete ¶
func GoodsCategoryInsert ¶
GoodsCategoryInsert 保存商品分类关联
func GoodsCategoryItemsIds ¶
func GoodsCategoryLevel ¶
func GoodsCategoryLevel() int
func GoodsCategoryName ¶
func GoodsCategoryNames ¶
func GoodsCategoryParentIds ¶
func GoodsCategoryStatusUpdate ¶
==================== GoodsCategory ====================
func GoodsCommentsDelete ¶
func GoodsCommentsList ¶
func GoodsCommentsSave ¶
func GoodsCommentsSave(userID uint, req *CreateReviewReq) (*model.Review, error)
func GoodsCommentsStatusUpdate ¶
==================== GoodsComments ====================
func GoodsCommentsTotal ¶
func GoodsContentAppInsert ¶
GoodsContentAppInsert 保存APP详情
func GoodsDataEditStatusCheck ¶
GoodsDataEditStatusCheck 编辑状态检查
func GoodsDeleteFull ¶
func GoodsDetailGuessYouLikeData ¶
GoodsDetailGuessYouLikeData 猜你喜欢(详情页)
func GoodsDetailMiddleTabsNavList ¶
GoodsDetailMiddleTabsNavList 详情页中间导航
func GoodsDetailSeeingYouData ¶
GoodsDetailSeeingYouData 看了又看
func GoodsEditParameters ¶
GoodsEditParameters 编辑页参数数据
func GoodsEditSpecifications ¶
GoodsEditSpecifications 编辑页规格数据
func GoodsFavorDelete ¶
func GoodsFavorList ¶
func GoodsFavorTotal ¶
==================== GoodsFavor ====================
func GoodsImagesCoverHandle ¶
GoodsImagesCoverHandle 封面图处理
func GoodsParametersData ¶
func GoodsParametersData(goodsID uint) ([]model.GoodsParams, error)
GoodsParametersData 商品参数数据
func GoodsParamsInsert ¶
func GoodsParamsInsert(goodsID uint, params []ParamsConfigItem) error
GoodsParamsInsert 保存参数
func GoodsParamsOperateData ¶
GoodsParamsOperateData 参数操作数据
func GoodsPhotoData ¶
func GoodsPhotoData(goodsID uint) ([]model.GoodsPhoto, error)
GoodsPhotoData 商品相册数据
func GoodsPhotoInsert ¶
GoodsPhotoInsert 保存相册
func GoodsSalesCountInc ¶
GoodsSalesCountInc 商品销量增加
func GoodsSalesModelType ¶
GoodsSalesModelType 销售模式类型
func GoodsSaveBaseUpdate ¶
GoodsSaveBaseUpdate 仅更新基础信息
func GoodsSearchList ¶
func GoodsSearchList(keyword string, categoryID, brandID uint, page, pageSize int) ([]model.Goods, int64)
GoodsSearchList 商品搜索列表(含关键字+分类+品牌)
func GoodsSpecChangeInventorySync ¶
GoodsSpecChangeInventorySync 商品规格变更后同步仓库库存结构
func GoodsSpecInventorySync ¶
GoodsSpecInventorySync 仓库库存同步到商品SKU库存(所有启用仓库的该商品库存求和)
func GoodsSpecOperateData ¶
GoodsSpecOperateData 规格操作数据
func GoodsSpecificationsActual ¶
func GoodsSpecificationsActual(goodsID uint) ([]model.GoodsSpecBase, error)
GoodsSpecificationsActual 获取实际规格组合
func GoodsSpecificationsConcise ¶
GoodsSpecificationsConcise 规格简洁数据
func GoodsSpecificationsData ¶
GoodsSpecificationsData 获取商品规格数据
func GoodsSpecificationsExtends ¶
GoodsSpecificationsExtends 规格扩展数据
func GoodsSpecificationsInsert ¶
func GoodsSpecificationsInsert(goodsID uint, specs []SpecBaseReq) error
GoodsSpecificationsInsert 保存规格
func GoodsStatusUpdate ¶
==================== Goods ====================
func GoodsTotal ¶
func GuessYouLike ¶
GuessYouLike 猜你喜欢(基于浏览记录+销量)
func HandlePayNotify ¶
HandlePayNotify 处理支付回调:先按订单号单笔;否则按 PayLog.pay_no(合并支付)。 幂等保护:通过 WHERE status = pending 条件更新,并发重复回调只有一个能成功。 成功单笔更新后调用 postPaidHook 触发订单历史与通知(与合并支付路径 PayLogSuccess 行为一致)。
func HomeHavTopRight ¶
func HomeHavTopRight() bool
func InferPaymentKeyFromPaymentName ¶ added in v1.5.5
InferPaymentKeyFromPaymentName 根据支付方式展示名称猜测内部 payment_key(与 ShopXO PHP 类名无关)。
func InitOrderService ¶ added in v1.5.5
func InitOrderService(svc *OrderService)
InitOrderService 注册进程内单例;在 main 启动路径上仅应调用一次。
func IntegralLogList ¶
func IntegralLogTotal ¶
func InvalidateCategoryCache ¶ added in v1.5.5
func InvalidateCategoryCache()
func IsBookingMode ¶
func IsBookingMode() bool
func IsGoodsSiteTypeConsistent ¶
IsGoodsSiteTypeConsistent 商品站点类型一致性检查
func IsSuperAdmin ¶ added in v1.5.0
IsSuperAdmin 判断角色是否为超级管理员(Powers包含"*")
func KuaishouUserAuth ¶
func LayoutSave ¶
func LevelOneNav ¶
func LevelOneNav() []model.Navigation
func LinkDelete ¶
func LinkStatusUpdate ¶
==================== Link ====================
func MatchingUserPlatformData ¶
func MatchingUserPlatformData(userID uint) []model.UserPlatform
MatchingUserPlatformData 匹配用户平台数据
func MessageDelete ¶
func MessageListWhere ¶
func MessageTotal ¶
==================== Message ====================
func MoreOrderPayBeginCheck ¶
MoreOrderPayBeginCheck 多订单合并支付前校验
func MultilingualSetUserValue ¶
MultilingualSetUserValue 设置用户语言偏好
func NavDataAll ¶
func NavDataAll() []model.Navigation
func NavDataDealWith ¶
func NavDataDealWith(list []model.Navigation) []model.Navigation
func NavSave ¶
func NavSave(n *model.Navigation) error
func NavStatusUpdate ¶
==================== Navigation ====================
func NavigationHandle ¶
func NavigationHandle(list []model.Navigation) []model.Navigation
func NavigationList ¶
func NavigationList(typ string) ([]model.Navigation, error)
func NotifyOrderStatus ¶
NotifyOrderStatus 订单状态变更通知(站内信+微信)
func OpenGroup ¶ added in v1.5.0
func OpenGroup(userID, itemID uint) (*model.GroupOrder, error)
OpenGroup 开团:扣活动库存、写入团单与团长成员在同一事务内完成。
func OrderAddressData ¶
OrderAddressData 订单地址数据
func OrderAftersaleCalculation ¶
OrderAftersaleCalculation 自动计算退款金额
func OrderAftersaleChoiceTypeList ¶
OrderAftersaleChoiceTypeList 可选售后类型
func OrderAftersaleDelete ¶
func OrderAftersaleListHandle ¶
func OrderAftersaleListHandle(list []model.OrderAftersale) []model.OrderAftersale
func OrderAftersaleListWhere ¶
func OrderAftersaleListWhere(userID uint) []model.OrderAftersale
func OrderAftersaleReturnGoodsAddress ¶
OrderAftersaleReturnGoodsAddress 退货地址(优先仓库地址)
func OrderAftersaleStepData ¶
func OrderAftersaleStepData(asID uint) []model.AftersaleHistory
OrderAftersaleStepData 售后进度
func OrderAftersaleTipsMsg ¶
OrderAftersaleTipsMsg 售后提示信息
func OrderAftersaleTotal ¶
OrderAftersaleTotal 售后总数
func OrderDeliverySyncWeixin ¶
func OrderGoodsIntegralGiving ¶
OrderGoodsIntegralGiving 订单完成后赠送积分(先锁定)
func OrderGoodsIntegralRollback ¶
OrderGoodsIntegralRollback 售后退款扣减锁定积分
func OrderIsCanLaunchAftersale ¶
OrderIsCanLaunchAftersale 判断订单是否可发起售后
func OrderListHandle ¶
OrderListHandle 订单列表数据处理
func OrderPayCheck ¶
OrderPayCheck 支付前校验
func OrderPayLogInsert ¶
func OrderPayLogInsert(userID uint, orderIDs []uint, paymentID uint, clientType string) (*model.PayLog, error)
OrderPayLogInsert 订单支付日志插入
func OrderPayLogValueList ¶
func OrderPayLogValueList(payLogID uint) []model.PayLogValue
OrderPayLogValueList 支付日志关联订单
func OrderRewardPoints ¶
OrderRewardPoints 订单完成奖励积分(每消费1元=1积分)
func OrderServiceData ¶
func OrderServiceData(orderID uint) []model.OrderService
OrderServiceData 订单服务数据
func OrderServiceList ¶
func OrderServiceList(orderID uint) ([]model.OrderService, error)
func OrderSplitHandle ¶
func OrderSplitHandle(userID uint, req *CreateOrderReq) ([]*model.Order, error)
func OrderStatusGroupTotal ¶
OrderStatusGroupTotal 订单状态分组统计
func OrderTraceSourceData ¶
func OrderTraceSourceData(orderID uint) ([]model.OrderTraceSource, error)
OrderTraceSourceData 订单溯源数据
func PayLogData ¶
func PayLogMenuRowsShopXO ¶ added in v1.6.0
PayLogMenuRowsShopXO shopxo-uniapp paylog/index:name + url 列表。
func PayLogOrderRowsShopXO ¶ added in v1.6.0
PayLogOrderRowsShopXO shopxo-uniapp paylog/detail:订单号与详情链接。
func PayLogPagesDetailData ¶
func PayLogPagesListData ¶
func PayOrder ¶
func PayOrder(userID uint, req *PayOrderReq) (*jsapi.PrepayWithRequestPaymentResponse, error)
PayOrder 发起支付,返回小程序调起支付的参数
func PaymentDelete ¶
func PaymentDriverKeyFromPayment ¶ added in v1.5.5
PaymentDriverKeyFromPayment 从配置 JSON 读取 payment_key;不含 ShopXO 的 payment 类名字段。 /api.php 与 PHP 迁移数据请用 compat/shopxo.PaymentDriverKeyFromPayment。
func PaymentEntranceCreate ¶
func PaymentEntranceDelete ¶
func PaymentOpenUserUpdate ¶
func PaymentSave ¶
func PaymentStatusUpdate ¶
func PaymentUpgradeInfo ¶
func PaymentUpgradeInfo() []map[string]interface{}
func PersonalSave ¶
func PersonalSave(userID uint, req *PersonalSaveReq) error
func PluginConfigSet ¶
func PluginInstall ¶
func PluginUninstall ¶
func PluginsAdminDelete ¶
func PluginsAdminList ¶
func PluginsAdminSave ¶
func PluginsBaseList ¶
func PluginsCategoryDelete ¶
func PluginsCategoryList ¶
func PluginsCategoryList() []model.PluginCategory
func PluginsCategorySave ¶
==================== PluginsCategory ====================
func PluginsCheck ¶
func PluginsControlCall ¶
func PluginsData ¶
func PluginsDataSave ¶
func PluginsEventCall ¶
func PluginsField ¶
func PluginsHomeDataList ¶
func PluginsNewVersionCheck ¶
func PluginsNewVersionCheck() bool
func PluginsSortList ¶
func PluginsStatus ¶
func PowerStatusUpdate ¶
==================== Power ====================
func QQUserAuth ¶
func QuickNavCreate ¶
func QuickNavDelete ¶
func QuickNavStatusUpdate ¶
==================== QuickNav ====================
func ReadAllMessages ¶
func ReadMessage ¶
func ReceiveCoupon ¶
func ReconcileAlipayPayments ¶ added in v1.6.0
ReconcileAlipayPayments 主动查询支付宝订单状态,补回调丢失(合并 PayLog.out_trade_no = pay_no,单笔为 order_no)。
func ReconcileWechatPayments ¶ added in v1.6.0
ReconcileWechatPayments 主动查询微信订单状态,补「回调丢失」场景:合并支付 PayLog + 单笔订单号。
func RefundOrder ¶
RefundOrder 申请退款:分三步
- 事务内幂等预检 + 插入 RefundLog(status=0)。
- 调支付驱动退款(支付驱动由 order.PaymentID 解析,兼容微信/支付宝/钱包/线下/PayPal)。
- 第三方成功后事务化更新订单状态为 Refunded + 回库存 + 标记 RefundLog=1。
幂等:同一订单已有 status IN (0, 1) 的 RefundLog 时拒绝重复申请。 事务失败后 RefundLog 会留在 status=0(处理中),可由 reconcile cron 或人工处理。
func RegionCodeData ¶
func RegionDelete ¶
func RegionItemsIds ¶
func RegionName ¶
func RegionNodeSon ¶
func RegionSave ¶
==================== Region ====================
func RegionStatusUpdate ¶
func RegisterPayEventListeners ¶ added in v1.8.0
func RegisterPayEventListeners()
RegisterPayEventListeners 注册支付成功后的事件监听器。应在 main 启动时调用一次。
func ReplyAnswer ¶
func ReplyOrderService ¶
func ReplyReview ¶
func RequestWithdraw ¶ added in v1.5.0
RequestWithdraw 用户申请提现:扣余额 + 写 WithdrawRequest + 写流水在同一事务内完成。 任一步失败整体回滚,避免"余额扣了但申请/流水没写"造成资金漂移。
func RunInDBTx ¶ added in v1.6.0
*
- RunInDBTx 在 (*gorm.DB).Transaction 内执行 fn:fn 返回非 nil 时自动回滚,nil 时提交。
- 全库多语句写库请优先用此,避免手写 Begin/Commit/Rollback。
func SaveAppMini ¶
func SaveAppMini(req *AppMiniReq) error
func SaveFormFields ¶
func SaveFormFields(formID uint, fields []model.FormTableUserFields) error
FormTableUserFields
func SaveGoodsContentApp ¶
GoodsContentApp
func SaveGoodsParams ¶
func SaveGoodsParams(goodsID uint, params []ParamsConfigItem) error
func SaveGoodsPhotos ¶
SaveGoodsPhotos 保存商品相册
func SaveGoodsSpecBase ¶
func SaveGoodsSpecBase(goodsID uint, specs []SpecBaseReq) error
func SaveOrderCurrency ¶
SaveOrderCurrency 订单创建时保存货币信息
func SaveRolePowers ¶
func SaveSelfExtractionAddress ¶
func SaveSelfExtractionAddress(list []map[string]interface{})
func SaveSiteConfig ¶
func ScreeningPriceDelete ¶
func ScreeningPriceSave ¶
func ScreeningPriceSave(s *model.ScreeningPrice) error
==================== ScreeningPrice ====================
func SearchGoodsMaxPrice ¶
func SearchGoodsMaxPrice() int64
func SearchGoodsProduceRegionList ¶
func SearchGoodsProduceRegionList() []string
SearchGoodsProduceRegionList 获取所有产地列表
func SearchIsLoginCheck ¶
func SearchIsLoginCheck() bool
func SearchKeywordsList ¶
func SearchKeywordsList() []string
func SearchMapHandle ¶
func SearchMapInfo ¶
func SearchMapInfo(params map[