Documentation ¶
Index ¶
- func CreateGood(r *CreateGoodsRequest) error
- func CreateSpecification(req CreateSpecificationRequest) error
- func CreateVoucher(req CreateVoucherRequest) error
- func DeleteGood(orgID string, id string) error
- func DeleteSpecification(orgID string, id string) error
- func DeleteVoucher(orgID string, voucherID string) error
- func Destroy()
- func Init(baseUrl string, timeoutSec time.Duration)
- func Off(req VoucherOffRequest) error
- func UpdateGood(r UpdateGoodsRequest) error
- func UpdateSpecification(r UpdateSpecificationRequest) error
- func UpdateVoucher(req UpdateVoucherRequest) error
- func UploadGood(f *multipart.FileHeader) (string, string, error)
- func UploadVoucher(h *multipart.FileHeader) (string, string, error)
- type CreateGoodsRequest
- type CreateSpecificationRequest
- type CreateVoucherRequest
- type DeleteGoodsQuery
- type DeleteSpecificationQuery
- type DeleteVoucherQuery
- type Field
- type FieldValue
- type GetGoodsQuery
- type GetGoodsResponse
- type GetRuleResponse
- type GetSpecificationsQuery
- type GetSpecificationsResponse
- type GetVoucherGoodResponse
- type GetVoucherReceiveLogsQuery
- type GetVoucherReceiveLogsResponse
- type GetVouchersQuery
- type GetVouchersResponse
- type GetWriteOffLogsQuery
- type GetWriteOffLogsResponse
- type GoodPicInfo
- type GoodPriceInfo
- type GoodSpecificationInfo
- type GoodsInfo
- type RuleFieldInfo
- type RuleInfo
- type RuleTypeValues
- type RuleValue
- type RuleValueComponent
- type SpecificationInfo
- type SpecificationName
- type SpecificationPrice
- type UpdateGoodsRequest
- type UpdateSpecificationRequest
- type UpdateVoucherRequest
- type UploadGoodsRequest
- type UploadGoodsResponse
- type UploadVoucherResponse
- type VoucherGoodInfo
- type VoucherGoodSpecificationInfo
- type VoucherInfo
- type VoucherOffRequest
- type VoucherPicInfo
- type VoucherReceiveLogInfo
- type WriteOffLogInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGood ¶
func CreateGood(r *CreateGoodsRequest) error
func CreateSpecification ¶
func CreateSpecification(req CreateSpecificationRequest) error
func CreateVoucher ¶
func CreateVoucher(req CreateVoucherRequest) error
func Destroy ¶
func Destroy()
func Off ¶
func Off(req VoucherOffRequest) error
func UpdateGood ¶
func UpdateGood(r UpdateGoodsRequest) error
func UpdateSpecification ¶
func UpdateSpecification(r UpdateSpecificationRequest) error
func UpdateVoucher ¶
func UpdateVoucher(req UpdateVoucherRequest) error
Types ¶
type CreateGoodsRequest ¶
type CreateGoodsRequest struct { OrgID string `json:"orgId" binding:"required"` Name string `json:"name" binding:"required"` SP []SpecificationPrice `json:"sp"` }
type CreateSpecificationRequest ¶
type CreateVoucherRequest ¶
type CreateVoucherRequest struct { OrgID string `json:"orgId"` Title string `json:"title"` PublisherID string `json:"publisherId"` ObjName string `json:"objName"` RuleExplain string `json:"ruleExplain"` GoodIDs []string `json:"goodIds"` RuleValues []RuleTypeValues `json:"ruleValues"` WriteOffs []string `json:"writeOffs"` }
type DeleteGoodsQuery ¶
type DeleteGoodsQuery struct {
OrgID string `form:"orgId" binding:"required"`
}
type DeleteSpecificationQuery ¶
type DeleteSpecificationQuery struct {
OrgID string `form:"orgId" binding:"required"`
}
type DeleteVoucherQuery ¶
type DeleteVoucherQuery struct {
OrgID string `form:"orgId" binding:"required"`
}
type Field ¶
type GetGoodsQuery ¶
type GetGoodsResponse ¶
type GetRuleResponse ¶
type GetRuleResponse struct { Infos []RuleInfo `json:"infos"` // contains filtered or unexported fields }
type GetSpecificationsQuery ¶
type GetSpecificationsResponse ¶
type GetSpecificationsResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []SpecificationInfo `json:"infos"` // contains filtered or unexported fields }
type GetVoucherGoodResponse ¶
type GetVoucherGoodResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []VoucherGoodInfo `json:"infos"` // contains filtered or unexported fields }
type GetVoucherReceiveLogsQuery ¶
type GetVoucherReceiveLogsQuery struct { AppID string `form:"appId" binding:"required"` Secret string `form:"secret" binding:"required"` Page string `form:"page" binding:"required"` UserID string `form:"userId" binding:"required"` OrgID string `form:"orgId"` ID string `form:"id"` RecipientID string `form:"recipientId"` VoucherID string `form:"voucherId"` PageNo int `form:"pageNo"` PageSize int `form:"pageSize"` }
type GetVoucherReceiveLogsResponse ¶
type GetVoucherReceiveLogsResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []VoucherReceiveLogInfo `json:"infos"` // contains filtered or unexported fields }
type GetVouchersQuery ¶
type GetVouchersQuery struct { AppID string `form:"appId" binding:"required"` Secret string `form:"secret" binding:"required"` Page string `form:"page" binding:"required"` OrgID string `form:"orgId"` ID string `form:"id"` Title string `form:"title"` PageNo int `form:"pageNo"` PageSize int `form:"pageSize"` }
type GetVouchersResponse ¶
type GetVouchersResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []VoucherInfo `json:"infos"` // contains filtered or unexported fields }
type GetWriteOffLogsQuery ¶
type GetWriteOffLogsResponse ¶
type GetWriteOffLogsResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []WriteOffLogInfo `json:"infos"` // contains filtered or unexported fields }
type GoodPicInfo ¶
type GoodPriceInfo ¶
type GoodPriceInfo struct { GSS []GoodSpecificationInfo `json:"gss"` MarketPrice float64 `json:"marketPrice"` SalePrice float64 `json:"salePrice"` Url string `json:"url"` ObjName string `json:"objName"` }
type GoodSpecificationInfo ¶
type GoodsInfo ¶
type GoodsInfo struct { ID string `json:"id"` Name string `json:"name"` OrgID string `json:"orgId"` GSS []GoodPriceInfo `json:"gss"` }
type RuleFieldInfo ¶
type RuleInfo ¶
type RuleInfo struct { TypeCode uint8 `json:"typeCode"` Fields []RuleFieldInfo `json:"fields"` }
type RuleTypeValues ¶
type RuleValue ¶
type RuleValue struct { Name string `json:"name"` Value interface{} `json:"value"` }
type RuleValueComponent ¶
type RuleValueComponent struct { TypeCode uint8 `json:"typeCode"` Def bool `json:"def"` Fields []FieldValue `json:"fields"` }
type SpecificationInfo ¶
type SpecificationName ¶
type SpecificationPrice ¶
type SpecificationPrice struct { SN []SpecificationName `json:"sn"` MarketPrice float64 `json:"marketPrice"` SalePrice float64 `json:"salePrice"` ObjName string `json:"objName"` }
type UpdateGoodsRequest ¶
type UpdateGoodsRequest struct { OrgID string `json:"orgId" binding:"required"` ID string `json:"id" binding:"required"` Name string `json:"name"` SP []SpecificationPrice `json:"sp"` }
type UpdateSpecificationRequest ¶
type UpdateVoucherRequest ¶
type UpdateVoucherRequest struct { OrgID string `json:"orgId"` ID string `json:"id"` Title string `json:"title"` ObjName string `json:"objName"` RuleExplain string `json:"ruleExplain"` GoodIDs []string `json:"goodIds"` RuleValues []RuleTypeValues `json:"ruleValues"` WriteOffs []string `json:"writeOffs"` }
type UploadGoodsRequest ¶
type UploadGoodsRequest struct {
File *multipart.FileHeader `form:"file"`
}
type UploadGoodsResponse ¶
type UploadGoodsResponse struct { Info *GoodPicInfo `json:"info"` // contains filtered or unexported fields }
type UploadVoucherResponse ¶
type UploadVoucherResponse struct { Info *VoucherPicInfo `json:"info"` // contains filtered or unexported fields }
type VoucherGoodInfo ¶
type VoucherGoodSpecificationInfo ¶
type VoucherInfo ¶
type VoucherInfo struct { ID string `json:"id"` Title string `json:"title"` PublishTime string `json:"publishTime"` PublisherID string `json:"publisherId"` OrgID string `json:"orgId"` RuleExplain string `json:"ruleExplain"` Url string `json:"url"` Qr string `json:"qr"` ObjName string `json:"objName"` WriteOffs []string `json:"writeOffs"` Goods []VoucherGoodInfo `json:"goods"` RuleValues []RuleValueComponent `json:"ruleValues"` Features map[string]interface{} `json:"features"` }
func GetVoucher ¶
func GetVoucher(req GetVouchersQuery) ([]VoucherInfo, int64, error)
type VoucherOffRequest ¶
type VoucherPicInfo ¶
type VoucherReceiveLogInfo ¶
type VoucherReceiveLogInfo struct { ID string `json:"id"` VoucherID string `json:"voucherId"` VoucherName string `json:"voucherName"` OrgName string `json:"orgName"` RecipientID string `json:"recipientId"` RecipientName string `json:"recipientName"` RecipientTime string `json:"recipientTime"` RecipientPhone string `json:"recipientPhone"` OrgID string `json:"orgId"` Qr string `json:"qr"` VoucherPic string `json:"voucherPic"` RuleExplain string `json:"ruleExplain"` Used bool `json:"used"` CanOff bool `json:"canOff"` Features map[string]interface{} `json:"features"` Goods []VoucherGoodInfo `json:"goods"` }
func GetReceiveLogs ¶
func GetReceiveLogs(req GetVoucherReceiveLogsQuery) ([]VoucherReceiveLogInfo, int64, error)
type WriteOffLogInfo ¶
type WriteOffLogInfo struct { ID string `json:"id"` VoucherID string `json:"voucherId"` VoucherName string `json:"voucherName"` VoucherPic string `json:"voucherPic"` WriteOffPersonID string `json:"writeOffPersonId"` WriteOffPersonName string `json:"writeOffPersonName"` RecipientID string `json:"recipientId"` RecipientName string `json:"recipientName"` RecipientPhone string `json:"recipientPhone"` WriteOffTime string `json:"writeOffTime"` OrgName string `json:"orgName"` OrgID string `json:"orgId"` Feature map[string]interface{} `json:"feature"` RuleExplain string `json:"ruleExplain"` Goods []VoucherGoodInfo `json:"goods"` }
func GetWriteOffLogs ¶
func GetWriteOffLogs(params GetWriteOffLogsQuery) ([]WriteOffLogInfo, int64, error)
Click to show internal directories.
Click to hide internal directories.