Documentation ¶
Index ¶
- Constants
- Variables
- func GetMsg(code int) string
- type ApplyLogisticsArgs
- type ApplyLogisticsRsp
- type CommentsTags
- type CommonBusinessMsg
- type CreateOrderCommentsArgs
- type CreateTradeOrderArgs
- type CreateTradeOrderRsp
- type GenVerifyCodeArgs
- type GetCommentsTagsListArgs
- type GetOrderReportArgs
- type GetOrderReportRsp
- type GetShopCommentsListArgs
- type GetSkuListArgs
- type GetSkuListRsp
- type GoodsLogistics
- type ListUserInfoArgs
- type ListUserInfoRsp
- type LoginUserWithPwdArgs
- type LoginUserWithVerifyCodeArgs
- type LogisticsCommentsInfo
- type MerchantsMaterialArgs
- type MerchantsMaterialRsp
- type ModifyCommentsTagsArgs
- type OrderCommentsInfo
- type OrderShopDetail
- type OrderShopGoods
- type OrderShopSceneInfo
- type OrderShopStoreInfo
- type OrderTradeArgs
- type OrderTradeRsp
- type PageMeta
- type PasswordResetArgs
- type QueryLogisticsRecordArgs
- type QueryLogisticsRecordRsp
- type RegisterUserArgs
- type RegisterUserRsp
- type SearchShopArgs
- type SearchSkuInventoryArgs
- type ShopBusinessInfoArgs
- type ShopBusinessInfoRsp
- type SkuBusinessPutAwayArgs
- type SkuBusinessPutAwayRsp
- type SkuInventoryInfo
- type SkuJoinUserTrolleyArgs
- type SkuJoinUserTrolleyRsp
- type SkuPropertyExArgs
- type SkuPropertyExRsp
- type SkuRemoveUserTrolleyArgs
- type SkuRemoveUserTrolleyRsp
- type UpdateLogisticsRecordArgs
- type UpdateLogisticsRecordRsp
- type UserAccountChargeArgs
- type UserDeliveryInfo
- type UserInfoRsp
- type UserMobilePhone
- type UserOnlineState
- type UserRegisterNotice
- type UserSettingAddressGetArgs
- type UserSettingAddressPutArgs
- type UserStateNotice
- type UserTrolleyListRsp
- type UserTrolleyRecord
Constants ¶
View Source
const ( Unknown = 0 VerifyCodeRegister = 1 VerifyCodeLogin = 2 VerifyCodePassword = 3 VerifyCodeTemplate = "" /* 138-byte string literal not displayed */ )
View Source
const ( UserStateEventTypeRegister = 10010 UserStateEventTypeLogin = 10011 UserStateEventTypeLogout = 10012 UserStateEventTypePwdModify = 10013 )
View Source
const ( RpcServiceMicroMallUsers = "micro-mall-users" // 用户服务 RpcServiceMicroMallShop = "micro-mall-shop" // 店铺服务 RpcServiceMicroMallSku = "micro-mall-sku" // 商品服务 RpcServiceMicroMallTrolley = "micro-mall-trolley" // 购物车 RpcServiceMicroMallOrder = "micro-mall-order" // 订单服务 RpcServiceMicroMallPay = "micro-mall-pay" // 支付服务 RpcServiceMicroMallLogistics = "micro-mall-logistics" // 物流服务 RpcServiceMicroMallComments = "micro-mall-comments" // 评论服务 )
View Source
const ( CNY = 0 USD = 1 )
Variables ¶
View Source
var ( VerifyCodeTypes = []int{VerifyCodeRegister, VerifyCodeLogin, VerifyCodePassword} CoinTypes = []int{CNY, USD} )
View Source
var MsgFlags = map[int]string{ Unknown: "未知", VerifyCodeRegister: "注册", VerifyCodeLogin: "登录", VerifyCodePassword: "修改/重置密码", UserStateEventTypeRegister: "注册", UserStateEventTypePwdModify: "修改密码", UserStateEventTypeLogin: "登录上线", UserStateEventTypeLogout: "退出登录", }
Functions ¶
Types ¶
type ApplyLogisticsArgs ¶
type ApplyLogisticsArgs struct { Uid int `json:"uid"` OutTradeNo string `json:"out_trade_no" form:"out_trade_no"` Courier string `json:"courier" form:"courier"` CourierType int `json:"courier_type" form:"courier_type"` ReceiveType int `json:"receive_type" form:"receive_type"` SendUser string `json:"send_user" form:"send_user"` SendAddr string `json:"send_addr" form:"send_addr"` SendPhone string `json:"send_phone" form:"send_phone"` SendTime string `json:"send_time" form:"send_time"` ReceiveUser string `json:"receive_user" form:"receive_user"` ReceiveAddr string `json:"receive_addr" form:"receive_addr"` ReceivePhone string `json:"receive_phone" form:"receive_phone"` Goods []GoodsLogistics `json:"goods" form:"goods"` }
type ApplyLogisticsRsp ¶
type ApplyLogisticsRsp struct {
LogisticsCode string `json:"logistics_code"`
}
type CommentsTags ¶
type CommentsTags struct { TagCode string `form:"tag_code" json:"tag_code"` ClassificationMajor string `form:"classification_major" json:"classification_major"` ClassificationMedium string `form:"classification_medium" json:"classification_medium"` ClassificationMinor string `form:"classification_minor" json:"classification_minor"` Content string `form:"content" json:"content"` }
type CommonBusinessMsg ¶
type CreateOrderCommentsArgs ¶
type CreateOrderCommentsArgs struct { Uid int64 `json:"uid"` Anonymity bool `form:"anonymity" json:"anonymity"` OrderCommentsInfo OrderCommentsInfo LogisticsCommentsInfo LogisticsCommentsInfo }
type CreateTradeOrderArgs ¶
type CreateTradeOrderArgs struct { Uid int64 ClientIp string `form:"client_ip" json:"client_ip"` Description string `form:"description" json:"description"` DeviceId string `form:"device_id" json:"device_id"` OrderTxCode string `form:"order_tx_code" json:"order_tx_code"` UserDeliveryId int32 `form:"user_delivery_id" json:"user_delivery_id"` Detail []*OrderShopDetail `form:"detail" json:"detail"` }
func (*CreateTradeOrderArgs) Valid ¶
func (t *CreateTradeOrderArgs) Valid(v *validation.Validation)
type CreateTradeOrderRsp ¶
type CreateTradeOrderRsp struct {
TxCode string `json:"tx_code"` // 9-19修改为返回交易号
}
type GenVerifyCodeArgs ¶
type GenVerifyCodeArgs struct { CountryCode string `form:"country_code" json:"country_code"` Phone string `form:"phone" json:"phone"` BusinessType int `form:"business_type" json:"business_type"` ReceiveEmail string `form:"receive_email" json:"receive_email"` }
func (*GenVerifyCodeArgs) Valid ¶
func (t *GenVerifyCodeArgs) Valid(v *validation.Validation)
type GetCommentsTagsListArgs ¶
type GetCommentsTagsListArgs struct { Uid int64 `json:"uid"` CommentsTags }
type GetOrderReportArgs ¶
type GetOrderReportArgs struct { Uid int64 ShopId int64 `form:"shop_id" json:"shop_id"` StartTime string `form:"start_time" json:"start_time"` EndTime string `form:"end_time" json:"end_time"` PageSize int `form:"page_size" json:"page_size"` PageNum int `form:"page_num" json:"page_num"` }
func (*GetOrderReportArgs) Valid ¶
func (t *GetOrderReportArgs) Valid(v *validation.Validation)
type GetOrderReportRsp ¶
type GetOrderReportRsp struct {
ReportFilePath string `json:"report_file_path"`
}
type GetShopCommentsListArgs ¶
type GetSkuListArgs ¶
type GetSkuListArgs struct {
ShopId int64 `form:"shop_id" json:"shop_id"`
}
type GetSkuListRsp ¶
type GetSkuListRsp struct {
SkuInventoryInfoList []SkuInventoryInfo `json:"sku_inventory_info_list"`
}
type GoodsLogistics ¶
type ListUserInfoArgs ¶ added in v1.1.0
type ListUserInfoRsp ¶ added in v1.1.0
type ListUserInfoRsp struct {
UserInfoList []UserMobilePhone `json:"user_info_list"`
}
type LoginUserWithPwdArgs ¶
type LoginUserWithPwdArgs struct { CountryCode string `form:"country_code" json:"country_code"` Phone string `form:"phone" json:"phone"` Password string `form:"password" json:"password"` }
func (*LoginUserWithPwdArgs) Valid ¶
func (t *LoginUserWithPwdArgs) Valid(v *validation.Validation)
type LoginUserWithVerifyCodeArgs ¶
type LoginUserWithVerifyCodeArgs struct { CountryCode string `form:"country_code" json:"country_code"` Phone string `form:"phone" json:"phone"` VerifyCode string `form:"verify_code" json:"verify_code"` }
func (*LoginUserWithVerifyCodeArgs) Valid ¶
func (t *LoginUserWithVerifyCodeArgs) Valid(v *validation.Validation)
type LogisticsCommentsInfo ¶
type LogisticsCommentsInfo struct { LogisticsCode string `form:"logistics_code" json:"logistics_code"` FedexPack int8 `form:"fedex_pack_star" json:"fedex_pack"` FedexPackLabel []string `form:"fedex_pack_label" json:"fedex_pack_label"` DeliverySpeed int8 `form:"delivery_speed" json:"delivery_speed"` DeliverySpeedLabel []string `form:"delivery_speed_label" json:"delivery_speed_label"` DeliveryService int8 `form:"delivery_service" json:"delivery_service"` DeliveryServiceLabel []string `form:"delivery_service_label" json:"delivery_service_label"` Comment string `form:"comment" json:"comment"` }
type MerchantsMaterialArgs ¶
type MerchantsMaterialArgs struct { OperationType int `form:"operation_type" json:"operation_type"` Uid int `json:"uid"` RegisterAddr string `form:"register_addr" json:"register_addr"` HealthCardNo string `form:"health_card_no" json:"health_card_no"` Identity int `form:"identity" json:"identity"` TaxCardNo string `form:"tax_card_no" json:"tax_card_no"` }
商户申请
func (*MerchantsMaterialArgs) Valid ¶
func (t *MerchantsMaterialArgs) Valid(v *validation.Validation)
type MerchantsMaterialRsp ¶
type MerchantsMaterialRsp struct {
MerchantId int64 `json:"merchant_id"`
}
type ModifyCommentsTagsArgs ¶
type ModifyCommentsTagsArgs struct { Uid int64 `json:"uid"` OperationType int8 `form:"operation_type" json:"operation_type"` CommentsTags }
type OrderCommentsInfo ¶
type OrderCommentsInfo struct { ShopId int64 `form:"shop_id" json:"shop_id"` OrderCode string `form:"order_code" json:"order_code"` Star int8 `form:"star" json:"star"` Content string `form:"content" json:"content"` ImgList []string `form:"img_list" json:"img_list"` CommentId string `form:"comment_id" json:"comment_id"` }
type OrderShopDetail ¶
type OrderShopDetail struct { ShopId int64 `json:"shop_id"` CoinType int32 `json:"coin_type"` Goods []*OrderShopGoods `json:"goods"` SceneInfo *OrderShopSceneInfo `json:"scene_info"` }
type OrderShopGoods ¶
type OrderShopSceneInfo ¶
type OrderShopSceneInfo struct {
StoreInfo *OrderShopStoreInfo `json:"store_info"`
}
type OrderShopStoreInfo ¶
type OrderTradeArgs ¶
type OrderTradeArgs struct { TxCode string `form:"tx_code" json:"tx_code"` OpUid int64 `json:"op_uid"` OpIp string `json:"op_ip"` }
func (*OrderTradeArgs) Valid ¶
func (t *OrderTradeArgs) Valid(v *validation.Validation)
type OrderTradeRsp ¶
type OrderTradeRsp struct {
IsSuccess bool `json:"is_success"`
}
type PageMeta ¶ added in v1.1.0
type PageMeta struct { PageSize int32 `form:"page_size" json:"page_size"` PageNum int32 `form:"page_num" json:"page_num"` }
func (*PageMeta) Valid ¶ added in v1.1.0
func (p *PageMeta) Valid(v *validation.Validation)
type PasswordResetArgs ¶
type PasswordResetArgs struct { Uid int `json:"uid"` VerifyCode string `form:"verify_code" json:"verify_code"` Password string `form:"password" json:"password"` }
func (*PasswordResetArgs) Valid ¶
func (t *PasswordResetArgs) Valid(v *validation.Validation)
type QueryLogisticsRecordArgs ¶
type QueryLogisticsRecordArgs struct {
Uid int `json:"uid"`
}
type QueryLogisticsRecordRsp ¶
type QueryLogisticsRecordRsp struct { }
type RegisterUserArgs ¶
type RegisterUserArgs struct { UserName string `form:"user_name" json:"user_name"` Password string `form:"password" json:"password"` Sex int `form:"sex" json:"sex"` Email string `form:"email" json:"email"` CountryCode string `form:"country_code" json:"country_code"` Phone string `form:"phone" json:"phone"` Age int `json:"age" form:"age"` ContactAddr string `form:"contact_addr" json:"contact_addr"` VerifyCode string `form:"verify_code" json:"verify_code"` IdCardNo string `form:"id_card_no" json:"id_card_no"` InviteCode string `form:"invite_code" json:"invite_code"` }
func (*RegisterUserArgs) Valid ¶
func (t *RegisterUserArgs) Valid(v *validation.Validation)
type RegisterUserRsp ¶
type RegisterUserRsp struct {
InviteCode string `json:"invite_code"` // 注册成功返回邀请码
}
type SearchShopArgs ¶
type SearchShopArgs struct {
Keyword string `form:"keyword" json:"keyword"`
}
type SearchSkuInventoryArgs ¶
type SearchSkuInventoryArgs struct {
Keyword string `form:"keyword" json:"keyword"`
}
type ShopBusinessInfoArgs ¶
type ShopBusinessInfoArgs struct { Uid int OpIp string OperationType int `form:"operation_type" json:"operation_type"` ShopId int `form:"shop_id" json:"shop_id"` NickName string `form:"nick_name" json:"nick_name"` FullName string `form:"full_name" json:"full_name"` RegisterAddr string `form:"register_addr" json:"register_addr"` MerchantId int `form:"merchant_id" json:"merchant_id"` BusinessAddr string `form:"business_addr" json:"business_addr"` BusinessLicense string `form:"business_license" json:"business_license"` TaxCardNo string `form:"tax_card_no" json:"tax_card_no"` BusinessDesc string `form:"business_desc" json:"business_desc"` SocialCreditCode string `form:"social_credit_code" json:"social_credit_code"` OrganizationCode string `form:"organization_code" json:"organization_code"` }
func (*ShopBusinessInfoArgs) Valid ¶
func (t *ShopBusinessInfoArgs) Valid(v *validation.Validation)
type ShopBusinessInfoRsp ¶
type ShopBusinessInfoRsp struct {
ShopId int `json:"shop_id"`
}
type SkuBusinessPutAwayArgs ¶
type SkuBusinessPutAwayArgs struct { Uid int OpIp string OperationType int32 `form:"operation_type" json:"operation_type"` SkuCode string `form:"sku_code" json:"sku_code"` Name string `form:"name" json:"name"` Price string `form:"price" json:"price"` Title string `form:"title" json:"title"` SubTitle string `form:"sub_title" json:"sub_title"` Desc string `form:"desc" json:"desc"` Production string `form:"production" json:"production"` Supplier string `form:"supplier" json:"supplier"` Category int32 `form:"category" json:"category"` Color string `form:"color" json:"color"` ColorCode int32 `form:"color_code" json:"color_code"` Specification string `form:"specification" json:"specification"` DescLink string `form:"desc_link" json:"desc_link"` State int32 `form:"state" json:"state"` Amount int64 `form:"amount" json:"amount"` ShopId int64 `form:"shop_id" json:"shop_id"` }
func (*SkuBusinessPutAwayArgs) Valid ¶
func (t *SkuBusinessPutAwayArgs) Valid(v *validation.Validation)
type SkuBusinessPutAwayRsp ¶
type SkuBusinessPutAwayRsp struct { }
type SkuInventoryInfo ¶
type SkuInventoryInfo struct { SkuCode string `json:"sku_code"` Name string `json:"name"` Price string `json:"price"` Title string `json:"title"` SubTitle string `json:"sub_title"` Desc string `json:"desc"` Production string `json:"production"` Supplier string `json:"supplier"` Category int32 `json:"category"` Color string `json:"color"` ColorCode int32 `json:"color_code"` Specification string `json:"specification"` DescLink string `json:"desc_link"` State int32 `json:"state"` Amount int64 `json:"amount"` ShopId int64 `json:"shop_id"` Version int64 `json:"version"` }
type SkuJoinUserTrolleyArgs ¶
type SkuJoinUserTrolleyArgs struct { Uid int SkuCode string `form:"sku_code" json:"sku_code"` ShopId int `form:"shop_id" json:"shop_id"` Count int `form:"count" json:"count"` Time string `form:"time" json:"time"` Selected bool `form:"selected" json:"selected"` }
func (*SkuJoinUserTrolleyArgs) Valid ¶
func (t *SkuJoinUserTrolleyArgs) Valid(v *validation.Validation)
type SkuJoinUserTrolleyRsp ¶
type SkuJoinUserTrolleyRsp struct { }
type SkuPropertyExArgs ¶
type SkuPropertyExArgs struct { Uid int OpIp string OperationType int32 `form:"operation_type" json:"operation_type"` ShopId int64 `form:"shop_id" json:"shop_id"` SkuCode string `form:"sku_code" json:"sku_code"` Name string `form:"name" json:"name"` Size string `form:"size" json:"size"` Shape string `form:"shape" json:"shape"` ProductionCountry string `form:"production_country" json:"production_country"` ProductionDate string `form:"production_date" json:"production_date"` ShelfLife string `form:"shelf_life" json:"shelf_life"` }
func (*SkuPropertyExArgs) Valid ¶
func (t *SkuPropertyExArgs) Valid(v *validation.Validation)
type SkuPropertyExRsp ¶
type SkuPropertyExRsp struct { }
type SkuRemoveUserTrolleyArgs ¶
type SkuRemoveUserTrolleyArgs struct { Uid int SkuCode string `form:"sku_code" json:"sku_code"` ShopId int `form:"shop_id" json:"shop_id"` Amount int `json:"amount" form:"amount"` }
func (*SkuRemoveUserTrolleyArgs) Valid ¶
func (t *SkuRemoveUserTrolleyArgs) Valid(v *validation.Validation)
type SkuRemoveUserTrolleyRsp ¶
type SkuRemoveUserTrolleyRsp struct { }
type UpdateLogisticsRecordArgs ¶
type UpdateLogisticsRecordArgs struct {
Uid int `json:"uid"`
}
type UpdateLogisticsRecordRsp ¶
type UpdateLogisticsRecordRsp struct { }
type UserAccountChargeArgs ¶
type UserAccountChargeArgs struct { Uid int `json:"uid"` Ip string `json:"ip"` DeviceCode string `form:"device_code" json:"device_code"` DevicePlatform string `form:"device_platform" json:"device_platform"` AccountType int `form:"account_type" json:"account_type"` CoinType int `form:"coin_type" json:"coin_type"` OutTradeNo string `form:"out_trade_no" json:"out_trade_no"` Amount string `form:"amount" json:"amount"` }
func (*UserAccountChargeArgs) Valid ¶
func (t *UserAccountChargeArgs) Valid(v *validation.Validation)
type UserDeliveryInfo ¶
type UserDeliveryInfo struct { Id int64 `form:"id" json:"id"` DeliveryUser string `form:"delivery_user" json:"delivery_user"` MobilePhone string `form:"mobile_phone" json:"mobile_phone"` Area string `form:"area" json:"area"` DetailedArea string `form:"detailed_area" json:"detailed_area"` Label []string `form:"label" json:"label"` IsDefault bool `form:"is_default" json:"is_default"` }
type UserInfoRsp ¶
type UserInfoRsp struct { Id int `json:"id"` AccountId string `json:"account_id"` UserName string `json:"user_name"` Sex int `json:"sex"` Phone string `json:"phone"` CountryCode string `json:"country_code"` Email string `json:"email"` State int `json:"state"` IdCardNo string `json:"id_card_no"` Inviter int `json:"inviter"` InviteCode string `json:"invite_code"` ContactAddr string `json:"contact_addr"` Age int `json:"age"` CreateTime string `json:"create_time"` UpdateTime string `json:"update_time"` }
type UserMobilePhone ¶ added in v1.1.0
type UserOnlineState ¶
type UserRegisterNotice ¶
type UserSettingAddressPutArgs ¶
type UserSettingAddressPutArgs struct { Uid int `json:"uid"` UserDeliveryInfo // 0-新增,1-修改,2-删除 OperationType int `form:"operation_type" json:"operation_type"` }
func (*UserSettingAddressPutArgs) Valid ¶
func (t *UserSettingAddressPutArgs) Valid(v *validation.Validation)
type UserStateNotice ¶
type UserTrolleyListRsp ¶
type UserTrolleyListRsp struct {
List []UserTrolleyRecord `json:"list"`
}
Click to show internal directories.
Click to hide internal directories.