Documentation ¶
Index ¶
- func AddReceiver(context *gin.Context)
- func AddToCart(context *gin.Context)
- func AddressDefault(context *gin.Context)
- func AddressDetail(context *gin.Context)
- func AddressList(context *gin.Context)
- func AppExchangeToken(context *gin.Context)
- func AppWeChatPay(context *gin.Context)
- func AreaList(context *gin.Context)
- func Auth(context *gin.Context)
- func BannerDetail(context *gin.Context)
- func BannerList(context *gin.Context)
- func BannerListAll(context *gin.Context)
- func BargainProduct(context *gin.Context)
- func CategoryList(context *gin.Context)
- func Check(context *gin.Context)
- func CheckTokenWeChat(context *gin.Context)
- func CityList(context *gin.Context)
- func CombineKey(context *gin.Context)
- func CreateOrder(context *gin.Context)
- func CreateOrderPrepare(context *gin.Context)
- func DemoList(context *gin.Context)
- func ExchangeToken(context *gin.Context)
- func ExportUserInfos(context *gin.Context)
- func FeedbackDetail(context *gin.Context)
- func FeedbackList(context *gin.Context)
- func FeedbackListAll(context *gin.Context)
- func GetProductListByOrderId(db *gorm.DB, orderId uint64) []*model.Product
- func GetProductListByOrderProductList(db *gorm.DB, orderProductList []*model.OrderProduct) []*model.Product
- func LevelCost(userId uint64, productId uint64, cost *model.Cost)
- func Liquidate(context *gin.Context)
- func LiquidateTotal(context *gin.Context)
- func Login(context *gin.Context)
- func LoginByWeChat(context *gin.Context)
- func Logout(context *gin.Context)
- func MerchantDetail(context *gin.Context)
- func MerchantDetailWithShop(context *gin.Context)
- func MerchantEmployeeOrderDetailList(context *gin.Context)
- func MerchantList(context *gin.Context)
- func MerchantMoneyLog(context *gin.Context)
- func MerchantOrderDetailDetail(context *gin.Context)
- func MerchantOrderDetailList(context *gin.Context)
- func MerchantOrderDetailListAll(context *gin.Context)
- func MerchantRegister(context *gin.Context)
- func MerchantWechatMPRegister(context *gin.Context)
- func MerchantWechatMPRegisterToken(context *gin.Context)
- func MicroWeChatPay(context *gin.Context)
- func MoneyLogList(context *gin.Context)
- func OptionList(context *gin.Context)
- func OrderDetail(context *gin.Context)
- func OrderList(context *gin.Context)
- func OrderListAll(context *gin.Context)
- func OrderProductList(context *gin.Context)
- func ProductDetail(context *gin.Context)
- func ProductList(context *gin.Context)
- func ProductListAll(context *gin.Context)
- func ProductPrice(context *gin.Context)
- func ProvinceList(context *gin.Context)
- func Register(context *gin.Context)
- func RegisterByWeChat(context *gin.Context)
- func RemoveBanner(context *gin.Context)
- func SaveAddress(context *gin.Context)
- func SaveBanner(context *gin.Context)
- func SaveFeedback(context *gin.Context)
- func SaveMerchant(context *gin.Context)
- func SaveMerchantOrderDetail(context *gin.Context)
- func SaveProduct(context *gin.Context)
- func SaveRole(context *gin.Context)
- func SaveShop(context *gin.Context)
- func SaveUser(context *gin.Context)
- func SaveUserOrderDetail(context *gin.Context)
- func Score(context *gin.Context)
- func SetDefaultAddress(context *gin.Context)
- func ShopDetail(context *gin.Context)
- func ShopDetailWithProduct(context *gin.Context)
- func ShopList(context *gin.Context)
- func ShopListNearby(context *gin.Context)
- func ShoppingCartInfo(context *gin.Context)
- func Statistics(context *gin.Context)
- func UpdateMoneyLog(context *gin.Context)
- func UpdateOrderAfterPay(context *gin.Context)
- func UserInfo(context *gin.Context)
- func UserOrderDetailDetail(context *gin.Context)
- func UserOrderDetailList(context *gin.Context)
- func UserOrderDetailListAll(context *gin.Context)
- func VerificationOrder(context *gin.Context)
- func Wallet(context *gin.Context)
- func WechatAppPayCallback(context *gin.Context)
- func WechatMPCallBack(context *gin.Context)
- func WechatMPConfigCallBack(context *gin.Context)
- func WechatMPRegister(context *gin.Context)
- type LoginForm
- type RegisterForm
- type WXLoginResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddReceiver ¶
func AddToCart ¶
购物车 @Summary 添加商品到购物车 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/user/AddToCart [get]
func AddressDefault ¶
获取默认 address 详情 @Summary 获取默认 address 详情 @Tags AddressController @Accept json @Produce json @Success 200 {object} model.Address @Router /api/app/address_default [get]
func AddressDetail ¶
获取 address 详情 @Summary 获取 address 详情 @Tags AddressController @Accept json @Produce json @Success 200 {object} model.Address @Router /api/app/address_detail [get]
func AddressList ¶
用户 @Summary 用户邮寄地址 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/user/address_list [get]
func AppExchangeToken ¶
func AppWeChatPay ¶
app 的 wechat 支付 @Summary app 的 wechat 支付,传 product_id 按 product_id 查 @Tags PayController @Consumes formData @Produce json @Param Gin-Access-Token header string true "令牌" @Param product_id query string true "产品记录id" @Router /api/app/wechat_pay [post]
func AreaList ¶
省份列表 @Summary 省份列表 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/common/area_list [get]
func Auth ¶
wechat授权,建立必要的 session, 然后跳转到授权页面 @Summary wechat授权 @Tags UserController @Accept json @Produce json @Param username query string true "用户名" @Param password query string true "密码" @Param phone query string true "电话号码" @Param email query string true "邮件" @Success 200 {object} helpers.JsonObject @Router /api/wechat/auth [post]
func BannerDetail ¶
获取 banner 详情 @Summary 获取 banner 详情 @Tags BannerController @Accept json @Produce json @Param banner_id query string true "列表的banner_id" @Success 200 {object} model.Banner @Router /api/app/banner_detail [get]
func BannerList ¶
获取 banner 轮播图 @Summary 获取 banner 轮播图,传 banner_id 按 banner_id 查,不传就查平台的 @Tags BannerController @Accept json @Produce json @Param shop_id query string false "产品记录id" @Success 200 {object} model.Banner @Router /api/banner/list [get]
func BannerListAll ¶
获取 banner 列表 @Summary 获取 banner 列表 @Tags BannerController @Accept json @Produce json @Success 200 {object} model.ListsResponse @Router /api/banner_list_all [get]
func BargainProduct ¶
func CategoryList ¶
产品分类 @Summary 用户积分 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/shop/category/list [get]
func Check ¶
版本校验 @Summary 版本校验 @Accept json @Produce json @Tags ScoreController @Success 200 {object} helpers.JsonObject @Router /api/version/check [get]
func CheckTokenWeChat ¶
func CityList ¶
省份列表 @Summary 省份列表 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/common/city_list [get]
func CombineKey ¶
产品分类 @Summary 用户积分 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/user/sku_list [get]
func CreateOrderPrepare ¶
func DemoList ¶
产品分类 @Summary 用户积分 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/user/demo_list [get]
func ExportUserInfos ¶
导出用户信息 @Summary 用户信息回显,传id按id查,传username按用户名查 @Tags UserController @Router /api/export_user_infos [get]
func FeedbackDetail ¶
获取 feedback 详情 @Summary 获取 feedback 详情 @Tags FeedbackController @Accept json @Produce json @Param feedback_id query string true "列表的feedback_id" @Success 200 {object} model.Feedback @Router /api/feedback_detail [get]
func FeedbackList ¶
获取 feedback 列表 @Summary 获取 feedback 列表,传 feedback_id 按 feedback_id 查,不传就查平台的 @Tags FeedbackController @Accept json @Produce json @Param shop_id query string false "产品记录id" @Success 200 {object} model.Feedback @Router /api/app/feedback_list [get]
func FeedbackListAll ¶
获取 feedback 列表 @Summary 获取 feedback 列表 @Tags FeedbackController @Accept json @Produce json @Success 200 {object} model.ListsResponse @Router /api/feedback_list_all [get]
func GetProductListByOrderId ¶
func Liquidate ¶
获取 merchantOrderDetail 列表 @Summary 获取 merchantOrderDetail 列表 @Tags MerchantOrderDetailController @Accept json @Produce json @Success 200 {object} model.MerchantOrderListsResponse @Router /api/app/order/liquidate [post]
func LiquidateTotal ¶
获取 merchantOrderDetail 列表 @Summary 获取 merchantOrderDetail 列表 @Tags MerchantOrderDetailController @Accept json @Produce json @Success 200 {object} model.MerchantOrderListsResponse @Router /api/app/order/liquidate_total [get]
func Login ¶
用户登陆接口 @Summary 用户登陆接口 @Tags LoginController @Accept json @Produce json @Param username query string true "用户名" @Param password query string true "密码" @Success 200 {object} helpers.JsonObject @Router /api/login [post]
func LoginByWeChat ¶
func MerchantDetail ¶
获取 merchant(商户) 详情 @Summary 获取 merchant(商户) 详情 @Tags MerchantController @Accept json @Produce json @Success 200 {object} model.Product @Router /api/merchant_detail [get]
func MerchantDetailWithShop ¶
获取 product 列表 @Summary 获取 product 列表 @Tags MerchantController @Accept json @Produce json @Success 200 {object} model.Product @Router /api/merchant_detail_with_shop [get]
func MerchantEmployeeOrderDetailList ¶
获取 merchantEmployeeOrderDetail 列表 @Summary 获取 merchantEmployeeOrderDetail 列表 @Tags MerchantOrderDetailController @Accept json @Produce json @Success 200 {object} model.MerchantOrderListsResponse @Router /api/app/order/merchant_employee_list [get]
func MerchantList ¶
获取 merchant 列表 @Summary 获取 merchant 列表 @Tags MerchantController @Accept json @Produce json @Success 200 {object} model.Merchant @Router /api/merchant_list [get]
func MerchantMoneyLog ¶
获取全部 @Summary 获取全部商户结算列表 @Tags MoneyLogController @Accept json @Produce json @Success 200 {object} helpers.JsonObject @Router /api/money_log/list_all [get]
func MerchantOrderDetailDetail ¶
获取 merchantOrderDetail 详情 @Summary 获取 merchantOrderDetail 详情 @Tags MerchantOrderDetailController @Accept json @Produce json @Success 200 {object} model.MerchantOrderDetail @Router /api/app/merchantOrderDetail_detail [get]
func MerchantOrderDetailList ¶
获取 merchantOrderDetail 列表 @Summary 获取 merchantOrderDetail 列表 @Tags MerchantOrderDetailController @Accept json @Produce json @Success 200 {object} model.MerchantOrderListsResponse @Router /api/app/order/merchant_list [get]
func MerchantRegister ¶
编辑 feedback @Summary feedback 编辑 @Tags FeedbackController @Accept json @Produce json @Success 200 {object} model.Feedback @Router /api/web/merchant/register [post] 以后再移走吧,临时放这里
func MerchantWechatMPRegister ¶
wechat授权,建立必要的 session, 然后跳转到授权页面 @Summary 业务员分享给商户注册 @Tags UserController @Accept json @Produce json @Param user_id query string true "用户id" @Success 200 {object} helpers.JsonObject @Router /api/web/merchant/wechat_mp_register [post]
func MicroWeChatPay ¶
微信小程序的 wechat 支付 @Summary app 的 wechat 支付,传 productId 按 productId 查 @Tags PayController @Consumes formData @Produce json @Param Gin-Access-Token header string true "令牌" @Param productId query string true "产品记录id" @Router /api/app/micro_wechat_pay [post]
func MoneyLogList ¶
获取当前商户的全部结算列表 @Summary 获取当前商户结算列表 @Tags MoneyLogController @Accept json @Produce json @Success 200 {object} helpers.JsonObject @Router /api/app/money_log/list [get]
func OptionList ¶
产品分类 @Summary 用户积分 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/user/option_list [get]
func OrderDetail ¶
获取 order 详情 @Summary 获取 order 详情 @Tags OrderController @Accept json @Produce json @Success 200 {object} model.Order @Router /api/app/order_detail [get]
func OrderList ¶
获取 order 列表 @Summary 获取 order 列表 @Tags OrderController @Accept json @Produce json @Success 200 {object} model.ListsResponse @Router /api/app/order/list [get]
func OrderListAll ¶
func OrderProductList ¶
产品分类 @Summary 用户积分 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/user/OrderProduct_list [get]
func ProductDetail ¶
获取 product 详情 @Summary 获取 product 详情 @Tags ProductController @Accept json @Produce json @Success 200 {object} model.Product @Router /api/shop/product_detail [get]
func ProductList ¶
获取 product 列表 @Summary 获取 product 列表 @Tags ProductController @Accept json @Produce json @Success 200 {object} model.ListsResponse @Router /api/shop/product_list [get]
func ProductListAll ¶
func ProductPrice ¶
func ProvinceList ¶
省份列表 @Summary 省份列表 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/common/province_list [get]
func Register ¶
用户注册 @Summary 用户注册 @Tags UserController @Accept json @Produce json @Param username query string true "用户名" @Param password query string true "密码" @Param phone query string true "电话号码" @Param email query string true "邮件" @Success 200 {object} helpers.JsonObject @Router /api/register [post]
func RegisterByWeChat ¶
这个函数以 code 作为输入, 返回调用微信接口得到的对象指针和异常情况
func RemoveBanner ¶
删除 banner @Summary 删除 banner @Tags BannerController @Accept json @Produce json @Success 200 {object} model.Banner @Router /api/banner/remove [delete]
func SaveAddress ¶
添加收货地址 @Summary 添加收货地址 @Tags AddressController @Accept json @Produce json @Success 200 {object} model.Address @Router /api/address/save [post]
func SaveBanner ¶
编辑 banner @Summary banner 编辑 @Tags BannerController @Accept json @Produce json @Success 200 {object} model.Banner @Router /api/banner/save [post]
func SaveFeedback ¶
编辑 feedback @Summary feedback 编辑 @Tags FeedbackController @Accept json @Produce json @Success 200 {object} model.Feedback @Router /api/feedback/save [post]
func SaveMerchant ¶
添加 merchant @Summary 添加 merchant @Tags MerchantController @Accept json @Produce json @Success 200 {object} model.Merchant @Router /api/merchant/save [post]
func SaveMerchantOrderDetail ¶
编辑 merchantOrderDetail @Summary merchantOrderDetail 编辑 @Tags MerchantOrderDetailController @Accept json @Produce json @Success 200 {object} model.MerchantOrderDetail @Router /api/merchantOrderDetail/verification [post]
func SaveProduct ¶
编辑 product @Summary product 编辑 @Tags ProductController @Accept json @Produce json @Success 200 {object} model.Product @Router /api/product/save [post]
func SaveRole ¶
添加修改角色 @Summary 添加修改角色 @Tags RoleController @Accept json @Produce json @Param id query string false "角色id,新增时id为空" @Param role_name query string true "角色名称" @Param role_key query string true "角色类别标识" @Param description query string true "角色描述信息" @Success 200 {object} helpers.JsonObject @Router /api/save_role [post]
func SaveShop ¶
编辑 shop @Summary shop 编辑 @Tags ShopController @Accept json @Produce json @Success 200 {object} model.Shop @Router /api/shop/save [post]
func SaveUser ¶
添加、修改用户信息 @Summary 添加、修改用户信息 @Tags UserController @Accept json @Produce json @Param user_id query string false "用户记录id" @Param username query string true "用户名" @Param password query string true "密码" @Param phone query string true "电话号码" @Param email query string true "邮件" @Param merchant_no query string true "商户号" @Param role_id query string true "角色id" @Success 200 {object} helpers.JsonObject @Router /api/user/save [post]
func SaveUserOrderDetail ¶
编辑 userOrderDetail @Summary userOrderDetail 编辑 @Tags UserOrderDetailController @Accept json @Produce json @Success 200 {object} model.UserOrderDetail @Router /api/userOrderDetail/verification [post]
func Score ¶
用户钱包 @Summary 获取用户积分 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/user/score [get]
func SetDefaultAddress ¶
把收货地址置为默认的,前端这个写得不好,先保留了 @Summary 添加收货地址 @Tags AddressController @Accept json @Produce json @Success 200 {object} model.Address @Router /api/set_default_address [post]
func ShopDetail ¶
获取 shop(店铺) 详情 @Summary 获取 shop(店铺) 详情 @Tags ShopController @Accept json @Produce json @Param shop_id query string true "商户列表的shop_id" @Success 200 {object} model.Product @Router /api/shop_detail [get]
func ShopDetailWithProduct ¶
获取带 product 的店铺详情 @Summary 获取带 product 的店铺详情 @Tags ShopController @Accept json @Produce json @Param shop_id query string true "商户列表的shop_id" @Success 200 {object} model.Product @Router /api/shop_detail_with_product [get]
func ShopList ¶
获取 shop 列表 @Summary 获取 shop 列表 @Tags ShopController @Accept json @Produce json @Success 200 {object} model.Shop @Router /api/app/shop_list [get]
func ShopListNearby ¶
获取附近 shop 列表 @Summary 获取附近 shop 列表 @Tags ShopController @Accept json @Produce json @Success 200 {object} model.Shop @Router /api/app/shop_list_nearby [get]
func ShoppingCartInfo ¶
@Summary 获取购物车信息 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/user/ShoppingCartInfo [get]
func Statistics ¶
func UpdateMoneyLog ¶
更新商户结算状态 @Summary 更新商户结算状态 @Tags MoneyLogController @Accept json @Produce json @Success 200 {object} helpers.JsonObject @Router /api/money_log/update [post]
func UserInfo ¶
用户信息回显 @Summary 用户信息回显,传id按id查,传username按用户名查 @Tags UserController @Accept json @Produce json @Param Gin-Access-Token header string true "令牌" @Success 200 {object} model.User @Router /api/user/info [get]
func UserOrderDetailDetail ¶
获取 userOrderDetail 详情 @Summary 获取 userOrderDetail 详情 @Tags UserOrderDetailController @Accept json @Produce json @Success 200 {object} model.UserOrderDetail @Router /api/app/userOrderDetail_detail [get]
func UserOrderDetailList ¶
获取 userOrderDetail 列表 @Summary 获取 userOrderDetail 列表 @Tags UserOrderDetailController @Accept json @Produce json @Success 200 {object} model.UserOrderListsResponse @Router /api/app/order/user_list [get]
func UserOrderDetailListAll ¶
func VerificationOrder ¶
编辑 order @Summary order 核销 @Tags OrderController @Accept json @Param check_user_id query string true "店员的user_id" @Param money query int64 true "当前核销的金额,为代金券时必传" @Param number query int true "当前核销的数量,为实物时必传" @Param shop_id query string true "支付的店铺id" @Produce json @Success 200 {object} model.Order @Router /api/order/verification [post]
func Wallet ¶
@Summary 获取用户积分 @Accept json @Produce json @Tags ScoreController @Param Gin-Access-Token header string true "令牌" @Success 200 {object} helpers.JsonObject @Router /api/user/score [get]
func WechatAppPayCallback ¶
app 的 wechat 支付回调 @Summary app 的 wechat 支付回调 @Tags PayController @Accept json @Produce json @Success 200 {object} model.AppWechatPay @Router /api/app/wechat_pay_callback [get]
func WechatMPConfigCallBack ¶
func WechatMPRegister ¶
wechat授权,建立必要的 session, 然后跳转到授权页面 @Summary wechat授权 @Tags UserController @Accept json @Produce json @Param username query string true "用户名" @Param password query string true "密码" @Param phone query string true "电话号码" @Param email query string true "邮件" @Success 200 {object} helpers.JsonObject @Router /api/wechat/wechat_mp_register [post]
Types ¶
type LoginForm ¶
type LoginForm struct {
WechatCode string `form:"code" binding:"required" json:"code"`
}
type RegisterForm ¶
Source Files ¶
- address_controller.go
- app_controller.go
- area_controller.go
- banner_controller.go
- category_controller.go
- city_controller.go
- demo_controller.go
- feedback_controller.go
- login_controller.go
- merchant_controller.go
- merchant_order_controller.go
- money_log_controller.go
- option_controller.go
- order_controller.go
- order_product_controller.go
- pay_controller.go
- product_controller.go
- province_controller.go
- role_controller.go
- shop_controller.go
- shopping_cart_controller.go
- sku_controller.go
- user_controller.go
- user_order_controller.go
- version_controller.go
- wallet_controller.go
- wechat_controller.go
- wechat_mp_controller.go