160 lines
6.6 KiB
Go
160 lines
6.6 KiB
Go
package dao
|
||
|
||
import "git.rosy.net.cn/jx-callback/business/model"
|
||
|
||
// 带购物平台信息的
|
||
type StoreDetail struct {
|
||
model.Store
|
||
|
||
VendorOrgCode string `orm:"size(32)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
|
||
|
||
VendorStoreID string `orm:"column(vendor_store_id);size(48)" json:"vendorStoreID"`
|
||
VendorStoreName string `json:"vendorStoreName"`
|
||
VendorStatus int `json:"vendor_status"` // 取值同Store.Status
|
||
VendorPayPercentage int `json:"vendorPayPercentage"` //平台结算比例,大于50是报价门店
|
||
DeliveryFeeDeductionSill int `json:"deliveryFeeDeductionSill"`
|
||
DeliveryFeeDeductionFee int `json:"deliveryFeeDeductionFee"`
|
||
SyncStatus int8 `orm:"default(2)" json:"syncStatus"`
|
||
|
||
PricePercentage int16 `orm:"default(100)" json:"pricePercentage"` // todo 厂商价格相对于本地价格的百分比,这个字段的修改会比较特殊,因为可能需要刷新厂商价格
|
||
PricePercentagePackStr string `orm:"size(4096)" json:"-"` //
|
||
PricePercentagePackObj model.PricePercentagePack `orm:"-" json:"-"`
|
||
CreateDeliveryType int `orm:"default(0)" json:"createDeliveryType"` //默认0系统(品牌)发单,1为门店发单
|
||
|
||
FreightDeductionPackStr string `orm:"size(4096)" json:"-"` //
|
||
FreightDeductionPackObj *model.FreightDeductionPack `orm:"-" json:"-"`
|
||
|
||
AutoPickup int8 `orm:"default(1)" json:"autoPickup"` // 是否自动拣货
|
||
DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型
|
||
DeliveryCompetition int8 `orm:"default(1)" json:"deliveryCompetition"` // 是否支持配送竞争
|
||
IsSync int8 `orm:"default(1)" json:"isSync"` // 是否同步
|
||
IsService int `orm:"default(0)" json:"isService"` // 默认0非服务商,1服务商
|
||
DeliverySelf int `orm:"default(0)" json:"deliverySelf"` // 是否支持自提[1-支持]
|
||
|
||
DistrictName string `json:"districtName"`
|
||
CityName string `json:"cityName"`
|
||
ProvinceName string `json:"provinceName"` //省名
|
||
ProvinceCode int `json:"provinceCode"` //省名
|
||
JdCityCode int `json:"jdCityCode"` //京东市code
|
||
JdCode int `json:"jdCode"` //京东区code
|
||
JdsCode int `json:"jdsCode"` //京东商城地址代码
|
||
JdsStreetCode int `json:"jdsStreetCode"` //京东商城直辖市街道code
|
||
JdsStreetName string `json:"jdsStreetName"` //京东商城直辖市街道
|
||
|
||
IsAutoOrder int8 `json:"isAutoOrder"` // 平台是否自动接单,-1:否,0:未知,1:是
|
||
MarketManName string `json:"marketManName"` //市场负责人
|
||
OperatorName string `json:"operatorName"` //运营负责人
|
||
OperatorName2 string `json:"operatorName2"`
|
||
OperatorName3 string `json:"operatorName3"`
|
||
|
||
JdStoreLevel string `json:"jdStoreLevel"` //京东门店等级
|
||
IsOrder int `json:"isOrder"` //是否是下预订单门店
|
||
IsSupplyGoods int `json:"isSupplyGoods"`
|
||
|
||
YbAppID string `orm:"column(yb_app_id)" json:"ybAppID"`
|
||
YbAppKey string `json:"ybAppKey"`
|
||
YbStorePrefix string `json:"ybStorePrefix"` //vendorID=14 暂存打包费 / vendorID = 1 暂存美团门店地址
|
||
|
||
MtwmToken string `json:"mtwmToken"` // 当vendor为美团时存储美团token,为抖店时存储抖店token,也储存淘鲜达token,其他品牌门店授权时appkey相同时token不相同
|
||
EbaiSupplierID string `json:"ebaiSupplierID"`
|
||
|
||
BrandName string `json:"brandName"` //品牌信息
|
||
BrandLogo string `json:"brandLogo"`
|
||
BrandIsOpen int `json:"brandIsOpen"`
|
||
BrandIsPrint int `json:"brandIsPrint"`
|
||
}
|
||
|
||
// 带快递门店信息的
|
||
type StoreDetail2 struct {
|
||
model.Store
|
||
|
||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||
VendorStoreID string `orm:"column(vendor_store_id)" json:"vendorStoreID"` // 这个其实是京西快递门店ID的概念
|
||
CourierStatus int `json:"courierStatus"`
|
||
AuditStatus int `json:"auditStatus"`
|
||
|
||
DistrictName string `json:"districtName"`
|
||
CityName string `json:"cityName"`
|
||
}
|
||
|
||
type CityBrankBranch struct {
|
||
CityCode int
|
||
PayeeBankBranchName string `orm:"size(255)" json:"payeeBankBranchName"` // 开户支行
|
||
PayeeBankCode string `orm:"size(8)" json:"payeeBankCode"` // 开户行代码
|
||
}
|
||
|
||
type StorePriceScore struct {
|
||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||
StoreName string `json:"storeName"`
|
||
StoreScore float64 `json:"storeScore"`
|
||
CityName string `json:"cityName"`
|
||
DirectDownCount int `json:"directDownCount"`
|
||
SecKillCount int `json:"secKillCount"`
|
||
}
|
||
|
||
type StorePriceScoreEx struct {
|
||
StorePriceScoreList []*StorePriceScore `json:"storePriceScoreList"`
|
||
TotalCount int `json:"totalCount"`
|
||
}
|
||
|
||
// 容错用
|
||
type tPricePercentageItemFloat struct {
|
||
BeginPrice float64 `json:"beginPrice"` // 起始价格区间(包括)
|
||
PricePercentage float64 `json:"pricePercentage"` // 调价比例
|
||
PriceAdd float64 `json:"priceAdd"` // 调价额定值
|
||
}
|
||
|
||
type tStoreAudit struct {
|
||
model.StoreAudit
|
||
UserName string `json:"userName"`
|
||
CityName string `json:"cityName"`
|
||
}
|
||
type GetStoreManageStateResult struct {
|
||
StoreName string `json:"storeName"`
|
||
VendorStoreID string `orm:"column(vendor_store_id)" json:"vendorStoreID"`
|
||
MarketScale int `json:"marketScale"` //市场规模
|
||
Comment string `json:"comment"`
|
||
model.StoreManageState
|
||
}
|
||
type GetBrandUserResult struct {
|
||
model.BrandUser
|
||
Name string `json:"name"`
|
||
}
|
||
|
||
var FreightTemplateMap = make(map[int]*model.FreightTemplate)
|
||
|
||
type RefundOrder struct {
|
||
OrderId string
|
||
}
|
||
|
||
// BrandInfos 门店品牌信息
|
||
type BrandInfos struct {
|
||
Name string
|
||
Logo string
|
||
}
|
||
|
||
// StatisticsStore 门店信息统计
|
||
type StatisticsStore struct {
|
||
Count int `json:"count"` // 条数
|
||
Status int `json:"status"` // 状态
|
||
}
|
||
|
||
// StatisticsOrder 订单统计
|
||
type StatisticsOrder struct {
|
||
Count int `json:"count"` // 条数
|
||
Status int `json:"status"` // 状态
|
||
TotalShopMoney int `json:"total_shop_money"` // 订单金额
|
||
}
|
||
|
||
// StatisticsIncomeInfo 统计门店收入情况
|
||
type StatisticsIncomeInfo struct {
|
||
ID int64 `json:"id"`
|
||
Name string `json:"name"`
|
||
TotalIncome float64 `json:"total_income"`
|
||
JxIncome float64 `json:"jx_income"`
|
||
MarketIncome float64 `json:"market_income"`
|
||
OrderCount float64 `json:"order_count"` // 有效订单数
|
||
OrderSkuPrice float64 `json:"order_sku_price"` // 营业额(售卖价)
|
||
ServerFee float64 `json:"server_fee"` // 报价门店服务费
|
||
}
|