Compare commits
No commits in common. 'master' and 'finance' have entirely different histories.
@ -1,5 +0,0 @@
|
||||
package data
|
||||
|
||||
type Data struct {
|
||||
Wallet wallet
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type wallet struct {
|
||||
}
|
||||
type ArgsWalletMonthCount struct {
|
||||
StartAt string // 年份
|
||||
EndAt string // 月份
|
||||
}
|
||||
type WalletMonthCountItem struct {
|
||||
UserId uint `json:"userId"`
|
||||
UserName string `json:"userName"`
|
||||
BeforePeriod decimal.Decimal `json:"beforePeriod"` // 期初
|
||||
RechargeAmount decimal.Decimal `json:"rechargeAmount"` // 充值
|
||||
PlaceAmount decimal.Decimal `json:"placeAmount"` // 下单
|
||||
RefundAmount decimal.Decimal `json:"refundAmount"` // 退款
|
||||
AfterPeriod decimal.Decimal `json:"afterPeriod"` // 期末
|
||||
}
|
||||
|
||||
// MonthCount @Title 月消费统计
|
||||
func (w *wallet) MonthCount(ctx context.Context, args ArgsWalletMonthCount) (reply []WalletMonthCountItem, err error) {
|
||||
xClient, err := client.GetClient(w)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = xClient.Call(ctx, "MonthCount", args, &reply)
|
||||
return
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
)
|
||||
|
||||
type message struct {
|
||||
}
|
||||
|
||||
var (
|
||||
MessageTypeOrder = messageType{
|
||||
Type: 1,
|
||||
TypeName: "零售订单",
|
||||
}
|
||||
MessageTypeAfterOrder = messageType{
|
||||
Type: 2,
|
||||
TypeName: "售后订单",
|
||||
}
|
||||
)
|
||||
|
||||
type messageType struct {
|
||||
Type uint
|
||||
TypeName string
|
||||
}
|
||||
type ArgsMessagePublish struct {
|
||||
CustomerId uint // 客户id
|
||||
Message string // 消息内容
|
||||
Type messageType // 消息类型
|
||||
TypeId uint // 消息来源id
|
||||
}
|
||||
|
||||
// Publish @Title 推送消息
|
||||
func (m *message) Publish(ctx context.Context, args ArgsMessagePublish) error {
|
||||
reply := 0
|
||||
xClient, err := client.GetClient(m)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return xClient.Call(ctx, "Publish", args, &reply)
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
)
|
||||
|
||||
type real struct {
|
||||
}
|
||||
|
||||
type ArgsUserRealLists struct {
|
||||
Search UserRealSearch
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type UserRealSearch struct {
|
||||
UserName string
|
||||
AuditStatus uint // 状态 1=待审核 2=审核通过 3=审核驳回
|
||||
}
|
||||
|
||||
type ReplyUserRealLists struct {
|
||||
Lists []UserRealItem
|
||||
Total int64
|
||||
}
|
||||
|
||||
type UserRealItem struct {
|
||||
Id uint `json:"id"`
|
||||
UserName string `json:"userName"`
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
CardImg string `json:"cardImg"`
|
||||
AuditStatus uint `json:"auditStatus"`
|
||||
AuditUserId uint `json:"auditUserId"`
|
||||
AuditAt int64 `json:"auditAt"`
|
||||
Reason string `json:"reason"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
}
|
||||
|
||||
// List @Title 实名认证列表
|
||||
func (r *real) List(ctx context.Context, args ArgsUserRealLists) (reply ReplyUserRealLists, err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return ReplyUserRealLists{}, err
|
||||
}
|
||||
err = xClient.Call(ctx, "List", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ReplyUserRealInfo struct {
|
||||
Id uint `json:"id"`
|
||||
UserName string `json:"userName"`
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
CardImg string `json:"cardImg"`
|
||||
AuditStatus uint `json:"auditStatus"`
|
||||
AuditUserId uint `json:"auditUserId"`
|
||||
AuditAt int64 `json:"auditAt"`
|
||||
Reason string `json:"reason"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
}
|
||||
|
||||
// Info @Title 审核详情
|
||||
func (r *real) Info(ctx context.Context, RealId uint) (reply ReplyUserRealInfo, err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return ReplyUserRealInfo{}, err
|
||||
}
|
||||
err = xClient.Call(ctx, "Info", RealId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsUserRealAdopt struct {
|
||||
RealId uint
|
||||
AuditUserId uint // 审核人Id
|
||||
}
|
||||
|
||||
// Adopt @Title 审核通过
|
||||
func (r *real) Adopt(ctx context.Context, args ArgsUserRealAdopt) error {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Adopt", args, &reply)
|
||||
}
|
||||
|
||||
type ArgsUserRealReject struct {
|
||||
RealId uint
|
||||
AuditUserId uint // 审核人Id
|
||||
Reason string // 驳回原因
|
||||
}
|
||||
|
||||
// Reject @Title 审核驳回
|
||||
func (r *real) Reject(ctx context.Context, args ArgsUserRealReject) error {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Reject", args, &reply)
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type walletHistory struct {
|
||||
}
|
||||
|
||||
const (
|
||||
WalletHistoryOrderIdAsc = 1 // 排序 id正序
|
||||
WalletHistoryOrderIdDesc = 2 // 排序 id 倒序
|
||||
)
|
||||
|
||||
type ArgsWalletHistoryLists struct {
|
||||
Search WalletHistorySearch
|
||||
Page bean.Page
|
||||
Orders []uint
|
||||
}
|
||||
|
||||
type WalletHistorySearch struct {
|
||||
StartTime string // 格式 2006-01-02 15:04:05 开始时间
|
||||
EndTime string // 格式 2006-01-02 15:04:05 截止时间
|
||||
}
|
||||
|
||||
type ReplyWalletHistoryList struct {
|
||||
Lists []WalletHistoryItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
type WalletHistoryItem struct {
|
||||
Id uint `json:"id"`
|
||||
UserId uint `json:"userId"`
|
||||
UserName string `json:"userName"`
|
||||
Type uint `json:"type"`
|
||||
Title string `json:"title"`
|
||||
BeforeAmount decimal.Decimal `json:"beforeAmount"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
AfterAmount decimal.Decimal `json:"afterAmount"`
|
||||
TradeChannel string `json:"tradeChannel"`
|
||||
TradeSerialSn string `json:"tradeSerialSn"`
|
||||
Remark string `json:"remark"`
|
||||
ServiceId uint `json:"serviceId"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
ServiceName string `json:"serviceName"`
|
||||
}
|
||||
|
||||
// Lists @Title 消费记录
|
||||
func (w *walletHistory) Lists(ctx context.Context, args ArgsWalletHistoryLists) (reply ReplyWalletHistoryList, err error) {
|
||||
xClient, err := client.GetClient(w)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Lists", args, &reply)
|
||||
return
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package data
|
||||
|
||||
type Data struct {
|
||||
Order order
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type order struct {
|
||||
}
|
||||
|
||||
type ArgsOrderLists struct {
|
||||
StartCreatedAt string
|
||||
EndCreatedAt string
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type ReplyOrderLists struct {
|
||||
Lists []OrderItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type OrderItem struct {
|
||||
OrderSubSn string `json:"orderSubSn"` // 订单号
|
||||
SourceOrderSn string `json:"sourceOrderSn"` // 供应商订单号(云交易外部订单号)
|
||||
Status uint `json:"status"` // 订单状态
|
||||
CreatedAt int64 `json:"createdAt"` // 创建时间
|
||||
LadingBillAt int64 `json:"ladingBillAt"` // 支付时间
|
||||
StockOutAt int64 `json:"stockOutAt"` // 发货时间
|
||||
FinishAt int64 `json:"finishAt"` // 确认收获时间
|
||||
ProcureTotalPrice decimal.Decimal `json:"procureTotalPrice"` // 采购商品金额
|
||||
ProcureFreightPrice decimal.Decimal `json:"procureFreightPrice"` // 应付运费
|
||||
ProcurePrice decimal.Decimal `json:"procurePrice"` // 采购合计金额
|
||||
ServiceFee decimal.Decimal `json:"serviceFee"` // 技术服务费 采购合金金额*1%
|
||||
}
|
||||
|
||||
// Lists @Title 订单列表
|
||||
func (o *order) Lists(ctx context.Context, args ArgsOrderLists) (reply ReplyOrderLists, err error) {
|
||||
xClient, err := client.GetClient(o)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "PayOrderList", args, &reply)
|
||||
return
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
package skycrane
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
)
|
||||
|
||||
type address struct {
|
||||
}
|
||||
type AddressSearch struct {
|
||||
AddressId int64
|
||||
Mate int // 1=已匹配 2=未匹配
|
||||
}
|
||||
type ArgsAddressList struct {
|
||||
Search AddressSearch
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type AddressItem struct {
|
||||
Id int64 `json:"id"`
|
||||
ProvinceName string `json:"provinceName"`
|
||||
CityName string `json:"cityName"`
|
||||
CountyName string `json:"countyName"`
|
||||
MateAddressId int64 `json:"mateAddressId"`
|
||||
MateProvinceName string `json:"mateProvinceName"`
|
||||
MateCityName string `json:"mateCityName"`
|
||||
MateCountyName string `json:"mateCountyName"`
|
||||
}
|
||||
type ReplyAddressList struct {
|
||||
Lists []AddressItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
// List @Title 地址列表
|
||||
func (c *address) List(ctx context.Context, args ArgsAddressList) (reply ReplyAddressList, err error) {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
xClient.Call(ctx, "List", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsAddressMate struct {
|
||||
AddressId int64 // 地址id
|
||||
MateAddressID int64 // 修改匹配地址id
|
||||
}
|
||||
|
||||
// Mate @Title 地址匹配
|
||||
func (c *address) Mate(ctx context.Context, args ArgsAddressMate) error {
|
||||
reply := 0
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return xClient.Call(ctx, "Mate", args, &reply)
|
||||
}
|
||||
|
||||
// All @Title 地址
|
||||
func (c *address) All(ctx context.Context, args AddressSearch) (reply []AddressItem, err error) {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
xClient.Call(ctx, "All", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type MateAddressItem struct {
|
||||
Id int64 `json:"id"`
|
||||
ProvinceName string `json:"provinceName"`
|
||||
CityName string `json:"cityName"`
|
||||
CountyName string `json:"countyName"`
|
||||
}
|
||||
|
||||
// MateAll @Title 匹配地址
|
||||
func (c *address) MateAll(ctx context.Context) (reply []MateAddressItem, err error) {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
xClient.Call(ctx, "MateAll", 0, &reply)
|
||||
return
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package skycrane
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
)
|
||||
|
||||
type brand struct {
|
||||
}
|
||||
type BrandSearch struct {
|
||||
Name string // 商品名称
|
||||
}
|
||||
type ArgsBrandList struct {
|
||||
Search BrandSearch
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type BrandItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
MateBrandID int64 `json:"mateBrandID"`
|
||||
}
|
||||
type ReplyBrandList struct {
|
||||
Lists []BrandItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
// List @Title 品牌列表
|
||||
func (b *brand) List(ctx context.Context, args ArgsBrandList) (reply ReplyBrandList, err error) {
|
||||
xClient, err := client.GetClient(b)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
xClient.Call(ctx, "List", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsBrandMate struct {
|
||||
BrandId int64 // 品牌id
|
||||
SupplyBrandId int64 // 修改匹配品牌id
|
||||
}
|
||||
|
||||
// Mate @Title 品牌匹配
|
||||
func (b *brand) Mate(ctx context.Context, args ArgsBrandMate) error {
|
||||
reply := 0
|
||||
xClient, err := client.GetClient(b)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return xClient.Call(ctx, "Mate", args, &reply)
|
||||
}
|
||||
|
||||
// All @Title 品牌
|
||||
func (b *brand) All(ctx context.Context, args BrandSearch) (reply []BrandItem, err error) {
|
||||
xClient, err := client.GetClient(b)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
xClient.Call(ctx, "All", args, &reply)
|
||||
return
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
package skycrane
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
)
|
||||
|
||||
type callback struct {
|
||||
}
|
||||
|
||||
// Cancel @TITLE 取消订单
|
||||
func (c *callback) Cancel(ctx context.Context, sourceOrderSn string) error {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", sourceOrderSn, &reply)
|
||||
}
|
||||
|
||||
// StockOut @Title 出库
|
||||
func (c *callback) StockOut(ctx context.Context, sourceOrderSn string) error {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "StockOut", sourceOrderSn, &reply)
|
||||
}
|
||||
|
||||
// Delivered @Title 订单妥投
|
||||
func (c *callback) Delivered(ctx context.Context, sourceOrderSn string) error {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Delivered", sourceOrderSn, &reply)
|
||||
}
|
||||
|
||||
// Finish @Title 订单完成
|
||||
func (c *callback) Finish(ctx context.Context, sourceOrderSn string) error {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Finish", sourceOrderSn, &reply)
|
||||
}
|
||||
|
||||
// Logistics @Title 更新包裹信息
|
||||
func (c *callback) Logistics(ctx context.Context, sourceOrderSn string) error {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Logistics", sourceOrderSn, &reply)
|
||||
}
|
||||
|
||||
type ArgsCallbackAfsStepResult struct {
|
||||
ReturnOrderCode string
|
||||
ReturnOrderStatus int64
|
||||
}
|
||||
|
||||
// AfsStepResult @Title 售后处理
|
||||
func (c *callback) AfsStepResult(ctx context.Context, args ArgsCallbackAfsStepResult) error {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "AfsStepResult", args, &reply)
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
package skycrane
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
)
|
||||
|
||||
type category struct {
|
||||
}
|
||||
type CategorySearch struct {
|
||||
CategoryId int64
|
||||
Mate int // 1=已匹配 2=未匹配
|
||||
}
|
||||
type ArgsCategoryList struct {
|
||||
Search CategorySearch
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type CategoryItem struct {
|
||||
Id int64 `json:"id"`
|
||||
FirstCategoryName string `json:"firstCategoryName"`
|
||||
SecondCategoryName string `json:"secondCategoryName"`
|
||||
ThirdCategoryName string `json:"thirdCategoryName"`
|
||||
MateCategoryID int64 `json:"mateCategoryID"`
|
||||
}
|
||||
type ReplyCategoryList struct {
|
||||
Lists []CategoryItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
// List @Title 类目列表
|
||||
func (c *category) List(ctx context.Context, args ArgsCategoryList) (reply ReplyCategoryList, err error) {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
xClient.Call(ctx, "List", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsCategoryMate struct {
|
||||
CategoryId int64 // 类目id
|
||||
SupplyCategoryId int64 // 修改匹配类目id
|
||||
}
|
||||
|
||||
// Mate @Title 类目匹配
|
||||
func (c *category) Mate(ctx context.Context, args ArgsCategoryMate) error {
|
||||
reply := 0
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return xClient.Call(ctx, "Mate", args, &reply)
|
||||
}
|
||||
|
||||
// All @Title 类目
|
||||
func (c *category) All(ctx context.Context, args CategorySearch) (reply []CategoryItem, err error) {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
xClient.Call(ctx, "All", args, &reply)
|
||||
return
|
||||
}
|
@ -1,191 +0,0 @@
|
||||
package skycrane
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
const (
|
||||
SkuStatusNone = 1 // 待处理
|
||||
SkuStatusAdopt = 2 // 同步入库
|
||||
SkuStatusReject = 3 // 废弃商品
|
||||
)
|
||||
|
||||
type sku struct {
|
||||
}
|
||||
type SkuSearch struct {
|
||||
Status int // 状态
|
||||
Name string // 商品名称
|
||||
Code string // sku编码
|
||||
CategoryId int64 // 类目id
|
||||
BrandName string // 品牌
|
||||
MinSupplyPrice decimal.Decimal // 采购价最小
|
||||
MaxSupplyPrice decimal.Decimal // 采购价最大
|
||||
}
|
||||
type ArgsSkuList struct {
|
||||
Search SkuSearch
|
||||
Page bean.Page
|
||||
}
|
||||
type SkuItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
MainPhoto string `json:"mainPhoto"`
|
||||
BrandName string `json:"brandName"`
|
||||
FirstCategoryName string `json:"firstCategoryName"`
|
||||
SecondCategoryName string `json:"secondCategoryName"`
|
||||
ThirdCategoryName string `json:"thirdCategoryName"`
|
||||
SupplyPrice decimal.Decimal `json:"supplyPrice"`
|
||||
GuidePrice decimal.Decimal `json:"guidePrice"`
|
||||
ShelvesStatus int64 `json:"shelvesStatus"`
|
||||
Status int64 `json:"status"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
UpdatedAt int64 `json:"updatedAt"`
|
||||
MateBrandId int64 `json:"mateBrandId"`
|
||||
MateCategoryId int64 `json:"mateCategoryId"`
|
||||
}
|
||||
type ReplySkuList struct {
|
||||
Lists []SkuItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
// List @Title 商品列表
|
||||
func (s *sku) List(ctx context.Context, args ArgsSkuList) (reply ReplySkuList, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
xClient.Call(ctx, "List", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type SkuImg struct {
|
||||
Id int64 `json:"id"`
|
||||
Path string `json:"path"`
|
||||
ReplacePath string `json:"replacePath"`
|
||||
}
|
||||
|
||||
// Imgs @Title 获取预览图
|
||||
func (s *sku) Imgs(ctx context.Context, skuId int64) (reply []SkuImg, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Imgs", skuId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ReplySkuInfo struct {
|
||||
Id int64 `json:"id"`
|
||||
GoodsCode string `json:"goodsCode"`
|
||||
GoodsName string `json:"goodsName"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Title string `json:"title"`
|
||||
SellPrice decimal.Decimal `json:"sellPrice"`
|
||||
MarketPrice decimal.Decimal `json:"marketPrice"`
|
||||
StartQty int64 `json:"startQty"`
|
||||
ShelvesStatus int64 `json:"shelvesStatus"`
|
||||
TaxCode string `json:"taxCode"`
|
||||
TaxRate decimal.Decimal `json:"taxRate"`
|
||||
BarCode string `json:"barCode"`
|
||||
IsDeleted int64 `json:"isDeleted"`
|
||||
BrandId int64 `json:"brandId"`
|
||||
BrandCode string `json:"brandCode"`
|
||||
BrandName string `json:"brandName"`
|
||||
CategoryId int64 `json:"categoryId"`
|
||||
FirstCategoryCode string `json:"firstCategoryCode"`
|
||||
FirstCategoryName string `json:"firstCategoryName"`
|
||||
SecondCategoryCode string `json:"secondCategoryCode"`
|
||||
SecondCategoryName string `json:"secondCategoryName"`
|
||||
ThirdCategoryCode string `json:"thirdCategoryCode"`
|
||||
ThirdCategoryName string `json:"thirdCategoryName"`
|
||||
ReturnGoodsRules int64 `json:"returnGoodsRules"`
|
||||
GoodsCharacteristic string `json:"goodsCharacteristic"`
|
||||
GoodsUnit string `json:"goodsUnit"`
|
||||
ModelNumber string `json:"modelNumber"`
|
||||
ProductPlace string `json:"productPlace"`
|
||||
HaveShelfLife int64 `json:"haveShelfLife"`
|
||||
ShelfLife string `json:"shelfLife"`
|
||||
FragileGoods int64 `json:"fragileGoods"`
|
||||
GrossWeight decimal.Decimal `json:"grossWeight"`
|
||||
GrossWeightUnit string `json:"grossWeightUnit"`
|
||||
Density decimal.Decimal `json:"density"`
|
||||
Extent decimal.Decimal `json:"extent"`
|
||||
Width decimal.Decimal `json:"width"`
|
||||
Height decimal.Decimal `json:"height"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
UpdatedAt int64 `json:"updatedAt"`
|
||||
MateBrandId int64 `json:"mateBrandId"`
|
||||
MateCategoryId int64 `json:"mateCategoryId"`
|
||||
Content string `json:"content"`
|
||||
Imgs []SkuImg `json:"imgs"`
|
||||
Attributes []SkuAttribute `json:"attributes"`
|
||||
Specs []SkuSpec `json:"specs"`
|
||||
}
|
||||
|
||||
type SkuAttribute struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
type SkuSpec struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// Info @Title 获取详情
|
||||
func (s *sku) Info(ctx context.Context, skuId int64) (reply ReplySkuInfo, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Info", skuId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsSkuReplaceImg struct {
|
||||
SkuId int64 // 商品id
|
||||
ImgId int64 // 图片id
|
||||
ImgPath string // 图片路径
|
||||
}
|
||||
|
||||
// ReplaceImg @Title 替换图片
|
||||
func (s *sku) ReplaceImg(ctx context.Context, args ArgsSkuReplaceImg) error {
|
||||
reply := 0
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return xClient.Call(ctx, "ReplaceImg", args, &reply)
|
||||
}
|
||||
|
||||
type AdoptItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
// Adopt @Title 入库
|
||||
func (s *sku) Adopt(ctx context.Context, skuIds []int64) (reply []AdoptItem, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Adopt", skuIds, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
// Discard @Title 废弃
|
||||
func (s *sku) Discard(ctx context.Context, skuIds []int64) error {
|
||||
reply := 0
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return xClient.Call(ctx, "Discard", skuIds, &reply)
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
package skycrane
|
||||
|
||||
type Skycrane struct {
|
||||
Task task
|
||||
Sku sku
|
||||
Brand brand
|
||||
Category category
|
||||
Address address
|
||||
Callback callback
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
package skycrane
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
TaskStatusIng = 1 // 进行中
|
||||
TaskStatusFinish = 2 // 结束
|
||||
)
|
||||
|
||||
type task struct {
|
||||
}
|
||||
|
||||
// Pull @Title 拉取商品
|
||||
func (t *task) Pull(ctx context.Context) error {
|
||||
a := 0
|
||||
xClient, err := client.GetClient(t)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return xClient.Call(ctx, "Pull", 0, &a)
|
||||
}
|
||||
|
||||
type TaskStatus struct {
|
||||
ScrollId string `json:"scrollId"`
|
||||
Total int64 `json:"total"`
|
||||
Count int64 `json:"count"`
|
||||
Status int `json:"status"` // 1=运行中 2=已完成
|
||||
Msg string `json:"msg"`
|
||||
StartTime time.Time `json:"startTime"`
|
||||
LastTime time.Time `json:"lastTime"`
|
||||
}
|
||||
|
||||
// GetPullStatus @Title 获取拉取状态
|
||||
func (t *task) GetPullStatus(ctx context.Context) (reply TaskStatus, err error) {
|
||||
xClient, err := client.GetClient(t)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "GetPullStatus", 0, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
// Prices @Title 商品更新
|
||||
func (t *task) Prices(ctx context.Context) error {
|
||||
a := 0
|
||||
xClient, err := client.GetClient(t)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return xClient.Call(ctx, "Prices", 0, &a)
|
||||
}
|
||||
|
||||
// GetPricesStatus @Title 获取拉取状态
|
||||
func (t *task) GetPricesStatus(ctx context.Context) (reply TaskStatus, err error) {
|
||||
xClient, err := client.GetClient(t)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "GetPricesStatus", 0, &reply)
|
||||
return
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
package supplier
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
)
|
||||
|
||||
type supplierReal struct {
|
||||
}
|
||||
|
||||
type ArgsSupplierRealLists struct {
|
||||
Search SupplierRealSearch
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type SupplierRealSearch struct {
|
||||
SupplierName string
|
||||
ApplyUserName string
|
||||
AuditStatus uint // 状态 1=待审核 2=审核通过 3=审核驳回
|
||||
}
|
||||
|
||||
type ReplySupplierRealLists struct {
|
||||
Lists []SupplierRealItem
|
||||
Total int64
|
||||
}
|
||||
|
||||
type SupplierRealItem struct {
|
||||
Id uint `json:"id"`
|
||||
SupplierName string `json:"supplierName"`
|
||||
ApplyUserName string `json:"applyUserName"`
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
CardImg string `json:"cardImg"`
|
||||
AuditStatus uint `json:"auditStatus"`
|
||||
AuditUserId uint `json:"auditUserId"`
|
||||
AuditAt int64 `json:"auditAt"`
|
||||
Reason string `json:"reason"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
}
|
||||
|
||||
// List @Title 实名认证列表
|
||||
func (s *supplierReal) List(ctx context.Context, args ArgsSupplierRealLists) (reply ReplySupplierRealLists, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return ReplySupplierRealLists{}, err
|
||||
}
|
||||
err = xClient.Call(ctx, "List", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ReplySupplierRealInfo struct {
|
||||
Id uint `json:"id"`
|
||||
SupplierName string `json:"supplierName"`
|
||||
ApplyUserName string `json:"applyUserName"`
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
CardImg string `json:"cardImg"`
|
||||
AuditStatus uint `json:"auditStatus"`
|
||||
AuditUserId uint `json:"auditUserId"`
|
||||
AuditAt int64 `json:"auditAt"`
|
||||
Reason string `json:"reason"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
}
|
||||
|
||||
// Info @Title 审核详情
|
||||
func (s *supplierReal) Info(ctx context.Context, RealId uint) (reply ReplySupplierRealInfo, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return ReplySupplierRealInfo{}, err
|
||||
}
|
||||
err = xClient.Call(ctx, "Info", RealId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsSupplierRealAdopt struct {
|
||||
RealId uint
|
||||
AuditUserId uint // 审核人Id
|
||||
}
|
||||
|
||||
// Adopt @Title 审核通过
|
||||
func (s *supplierReal) Adopt(ctx context.Context, args ArgsSupplierRealAdopt) error {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Adopt", args, &reply)
|
||||
}
|
||||
|
||||
type ArgsSupplierRealReject struct {
|
||||
RealId uint
|
||||
AuditUserId uint // 审核人Id
|
||||
Reason string // 驳回原因
|
||||
}
|
||||
|
||||
// Reject @Title 审核驳回
|
||||
func (s *supplierReal) Reject(ctx context.Context, args ArgsSupplierRealReject) error {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Reject", args, &reply)
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type afs struct {
|
||||
}
|
||||
|
||||
type ArgsAfsLists struct {
|
||||
StartFinishAt string
|
||||
EndFinishAt string
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type ReplyAfsLists struct {
|
||||
Lists []AfsItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type AfsItem struct {
|
||||
SourceName string `json:"sourceName"` // 供应渠道
|
||||
SourceSonName string `json:"sourceSonName"` // 供应商
|
||||
CustomerName string `json:"customerName"` // 客户名
|
||||
AfsSn string `json:"afsSn"` // 售后单号
|
||||
AfsResult string `json:"afsResult"` // 售后处理结果
|
||||
AfsFinishAt int64 `json:"afsFinishAt"` // 售后完成时间
|
||||
OrderSn string `json:"orderSn"` // 原始订单号
|
||||
OrderSunSn string `json:"orderSunSn"` // 订单号
|
||||
LadingBillAt int64 `json:"ladingBillAt"` // 订单支付时间
|
||||
FinishAt int64 `json:"finishAt"` // 确认收货时间
|
||||
SkuName string `json:"skuName"` // 商品名称
|
||||
SkuUpcCode string `json:"skuUpcCode"` // 商品条码
|
||||
Unit string `json:"unit"` // 单位
|
||||
AfsQuality uint `json:"afsQuality"` // 售后数量
|
||||
NewOrderSn string `json:"newOrderSn"` // 新订单号
|
||||
PlatformRefund decimal.Decimal `json:"platformRefund"` // 平台退款金额
|
||||
SupplierRefund decimal.Decimal `json:"supplierRefund"` // 供应商退款金额
|
||||
}
|
||||
|
||||
// AfsLists @Title 售后明细列表
|
||||
func (a *afs) AfsLists(ctx context.Context, args ArgsAfsLists) (reply ReplyAfsLists, err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "AfsLists", args, &reply)
|
||||
return
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type count struct {
|
||||
}
|
||||
|
||||
type ArgsCountSource struct {
|
||||
StartAt string
|
||||
EndAt string
|
||||
}
|
||||
|
||||
type ReplySourceItem struct {
|
||||
SourceName string `json:"sourceName"` // 供应渠道
|
||||
ProduceTotalPrice decimal.Decimal `json:"produceTotalPrice"` // 采购总金额
|
||||
ProduceFreightFee decimal.Decimal `json:"produceFreightFee"` // 采购应付运费
|
||||
ProducePrice decimal.Decimal `json:"producePrice"` // 采购合计金额
|
||||
SaleTotalPrice decimal.Decimal `json:"saleTotalPrice"` // 销售总金额
|
||||
SaleFreightFee decimal.Decimal `json:"saleFreightFee"` // 销售应收运费
|
||||
SalePrice decimal.Decimal `json:"salePrice"` // 销售合计金额
|
||||
PlatformRefund decimal.Decimal `json:"platformRefund"` // 平台退款金额
|
||||
SupplierRefund decimal.Decimal `json:"supplierRefund"` // 供应商退款金额
|
||||
}
|
||||
|
||||
// Source @Title 供应商对账表
|
||||
func (c *count) Source(ctx context.Context, args ArgsCountSource) (reply []ReplySourceItem, err error) {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Source", args, &reply)
|
||||
return
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package data
|
||||
|
||||
type Data struct {
|
||||
Order order
|
||||
Afs afs
|
||||
Count count
|
||||
}
|
@ -1,201 +0,0 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type order struct {
|
||||
}
|
||||
|
||||
type ArgsPayOrderLists struct {
|
||||
StartLadingBillAt string
|
||||
EndLadingBillAt string
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type ReplyPayOrderLists struct {
|
||||
Lists []PayOrderItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type PayOrderItem struct {
|
||||
SourceName string `json:"sourceName"` // 供应渠道
|
||||
SourceSonName string `json:"sourceSonName"` // 供应商
|
||||
CustomerName string `json:"customerName"` // 客户名
|
||||
OrderSn string `json:"orderSn"` // 原始订单号
|
||||
OrderSubSn string `json:"orderSubSn"` // 订单号
|
||||
SupplierOrderSn string `json:"supplierOrderSn"` // 供应商订单号
|
||||
OrderStatus uint `json:"orderStatus"` // 订单状态
|
||||
LadingBillAt int64 `json:"ladingBillAt"` // 支付时间
|
||||
StockOutAt int64 `json:"stockOutAt"` // 发货时间
|
||||
FinishAt int64 `json:"finishAt"` // 确认收货时间
|
||||
SkuName string `json:"skuName"` // 商品名称
|
||||
SkuUpcCode string `json:"skuUpcCode"` // 商品条码
|
||||
Specification string `json:"specification"` // 规格
|
||||
Quality uint `json:"quality"` // 数量
|
||||
ProduceSupplyPrice decimal.Decimal `json:"produceSupplyPrice"` // 采购单价
|
||||
ProduceTotalPrice decimal.Decimal `json:"produceTotalPrice"` // 采购总金额
|
||||
ProduceFreightFee decimal.Decimal `json:"ProduceFreightFee"` // 采购应付运费
|
||||
ProducePrice decimal.Decimal `json:"producePrice"` // 采购合计金额
|
||||
SaleSupplyPrice decimal.Decimal `json:"saleSupplyPrice"` // 销售单价
|
||||
SaleTotalPrice decimal.Decimal `json:"saleTotalPrice"` // 销售总金额
|
||||
SaleFreightFee decimal.Decimal `json:"saleFreightFee"` // 销售应收运费
|
||||
SalePrice decimal.Decimal `json:"salePrice"` // 销售合计金额
|
||||
Unit string `json:"unit"` // 单位
|
||||
Tax string `json:"tax"` // 税率
|
||||
ReceiverName string `json:"receiverName"` // 收件人
|
||||
ReceiverPhone string `json:"receiverPhone"` // 收件人手机号
|
||||
ReceiverAddress string `json:"receiverAddress"` // 收件人地址
|
||||
}
|
||||
|
||||
// PayOrderList @Title 支付订单统计
|
||||
func (o *order) PayOrderList(ctx context.Context, args ArgsPayOrderLists) (result ReplyPayOrderLists, err error) {
|
||||
xClient, err := client.GetClient(o)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "PayOrderList", args, &result)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsCancelOrderLists struct {
|
||||
StartCancelAt string
|
||||
EndCancelAt string
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type ReplyCancelOrderLists struct {
|
||||
Lists []CancelOrderItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
type CancelOrderItem struct {
|
||||
SourceName string `json:"sourceName"` // 供应渠道
|
||||
SourceSonName string `json:"sourceSonName"` // 供应商
|
||||
CustomerName string `json:"customerName"` // 客户名
|
||||
OrderSn string `json:"orderSn"` // 原始订单号
|
||||
OrderSubSn string `json:"orderSubSn"` // 订单号
|
||||
SupplierOrderSn string `json:"supplierOrderSn"` // 供应商订单号
|
||||
OrderStatus uint `json:"orderStatus"` // 订单状态
|
||||
LadingBillAt int64 `json:"ladingBillAt"` // 支付时间
|
||||
StockOutAt int64 `json:"stockOutAt"` // 发货时间
|
||||
CancelAt int64 `json:"cancelAt"` // 取消时间
|
||||
|
||||
TotalPrice decimal.Decimal `json:"totalPrice"` // 商品金额
|
||||
FreightFee decimal.Decimal `json:"freightFee"` // 运费
|
||||
Price decimal.Decimal `json:"price"` // 销售合计金额
|
||||
RefundPrice decimal.Decimal `json:"refundPrice"` // 退款金额
|
||||
}
|
||||
|
||||
// CancelOrderLists @Title 取消订单统计
|
||||
func (o *order) CancelOrderLists(ctx context.Context, args ArgsCancelOrderLists) (result ReplyCancelOrderLists, err error) {
|
||||
xClient, err := client.GetClient(o)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "CancelOrderLists", args, &result)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsStockOutOrderList struct {
|
||||
StartStockOutAt string
|
||||
EndStockOutAt string
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type ReplyStockOutOrderList struct {
|
||||
Lists []StockOutOrderItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type StockOutOrderItem struct {
|
||||
SourceName string `json:"sourceName"` // 供应渠道
|
||||
SourceSonName string `json:"sourceSonName"` // 供应商
|
||||
CustomerName string `json:"customerName"` // 客户名
|
||||
OrderSn string `json:"orderSn"` // 原始订单号
|
||||
OrderSubSn string `json:"orderSubSn"` // 订单号
|
||||
SupplierOrderSn string `json:"supplierOrderSn"` // 供应商订单号
|
||||
OrderStatus uint `json:"orderStatus"` // 订单状态
|
||||
LadingBillAt int64 `json:"ladingBillAt"` // 支付时间
|
||||
StockOutAt int64 `json:"stockOutAt"` // 发货时间
|
||||
FinishAt int64 `json:"finishAt"` // 确认收货时间
|
||||
SkuName string `json:"skuName"` // 商品名称
|
||||
SkuUpcCode string `json:"skuUpcCode"` // 商品条码
|
||||
Specification string `json:"specification"` // 规格
|
||||
Quality uint `json:"quality"` // 数量
|
||||
ProduceSupplyPrice decimal.Decimal `json:"produceSupplyPrice"` // 采购单价
|
||||
ProduceTotalPrice decimal.Decimal `json:"produceTotalPrice"` // 采购总金额
|
||||
ProduceFreightFee decimal.Decimal `json:"ProduceFreightFee"` // 采购应付运费
|
||||
ProducePrice decimal.Decimal `json:"producePrice"` // 采购合计金额
|
||||
SaleSupplyPrice decimal.Decimal `json:"saleSupplyPrice"` // 销售单价
|
||||
SaleTotalPrice decimal.Decimal `json:"saleTotalPrice"` // 销售总金额
|
||||
SaleFreightFee decimal.Decimal `json:"saleFreightFee"` // 销售应收运费
|
||||
SalePrice decimal.Decimal `json:"salePrice"` // 销售合计金额
|
||||
Unit string `json:"unit"` // 单位
|
||||
Tax string `json:"tax"` // 税率
|
||||
ReceiverName string `json:"receiverName"` // 收件人
|
||||
ReceiverPhone string `json:"receiverPhone"` // 收件人手机号
|
||||
ReceiverAddress string `json:"receiverAddress"` // 收件人地址
|
||||
}
|
||||
|
||||
// StockOutOrderList @Title 发货订单统计
|
||||
func (o *order) StockOutOrderList(ctx context.Context, args ArgsStockOutOrderList) (result ReplyStockOutOrderList, err error) {
|
||||
xClient, err := client.GetClient(o)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "StockOutOrderList", args, &result)
|
||||
return
|
||||
}
|
||||
|
||||
type JdOrderItem struct {
|
||||
CustomerName string `json:"customerName"`
|
||||
OrderSn string `json:"orderSn"`
|
||||
OrderSubSn string `json:"orderSubSn"`
|
||||
SupplierOrderSn string `json:"supplierOrderSn"`
|
||||
OrderStatus uint `json:"orderStatus"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
LadingBillAt int64 `json:"ladingBillAt"`
|
||||
StockOutAt int64 `json:"stockOutAt"`
|
||||
FinishAt int64 `json:"finishAt"`
|
||||
SkuName string `json:"skuName"`
|
||||
SkuUpcCode string `json:"skuUpcCode"`
|
||||
Specification string `json:"specification"`
|
||||
Quality uint `json:"quality"`
|
||||
ProduceSupplyPrice decimal.Decimal `json:"produceSupplyPrice"`
|
||||
ProduceTotalPrice decimal.Decimal `json:"produceTotalPrice"`
|
||||
ProduceFreightFee decimal.Decimal `json:"produceFreightFee"`
|
||||
ProducePrice decimal.Decimal `json:"producePrice"`
|
||||
SaleSupplyPrice decimal.Decimal `json:"saleSupplyPrice"`
|
||||
SaleTotalPrice decimal.Decimal `json:"saleTotalPrice"`
|
||||
SaleFreightFee decimal.Decimal `json:"saleFreightFee"`
|
||||
SalePrice decimal.Decimal `json:"salePrice"`
|
||||
Unit string `json:"unit"`
|
||||
Tax string `json:"tax"`
|
||||
ReceiverName string `json:"receiverName"`
|
||||
ReceiverPhone string `json:"receiverPhone"`
|
||||
ReceiverAddress string `json:"receiverAddress"`
|
||||
}
|
||||
|
||||
type ArgsJdOrderList struct {
|
||||
StartAt string
|
||||
EndAt string
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type ReplyJdOrderList struct {
|
||||
Lists []JdOrderItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
// JdList @Title 京东订单
|
||||
func (o *order) JdList(ctx context.Context, args ArgsJdOrderList) (result ReplyJdOrderList, err error) {
|
||||
xClient, err := client.GetClient(o)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "JdList", args, &result)
|
||||
return
|
||||
}
|
Loading…
Reference in new issue