1
This commit is contained in:
@@ -383,7 +383,7 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
|
||||
}
|
||||
|
||||
func IsRoled(ctx *jxcontext.Context) bool {
|
||||
if ctx.GetUserName() != "jxadmin" {
|
||||
if ctx.GetUserName() != "jxadmin" && ctx.GetUserName() != "shifengfix" {
|
||||
userRole, _ := dao.GetUserRole(dao.GetDB(), []string{ctx.GetUserID()}, nil)
|
||||
for _, v := range userRole {
|
||||
if v.RoleID == model.YES {
|
||||
|
||||
@@ -149,22 +149,23 @@ type GoodsOrder struct {
|
||||
OrderFinishedAt time.Time `orm:"type(datetime)" json:"orderFinishedAt"`
|
||||
StatusTime time.Time `orm:"type(datetime)" json:"statusTime"` // last status time
|
||||
PickDeadline time.Time `orm:"type(datetime);null" json:"pickDeadline"`
|
||||
DeliveryFeeFrom *time.Time `orm:"type(datetime);null" json:"deliveryFeeFrom,omitempty"` // 三方配置费计算的开始基准时间
|
||||
Flag int `json:"flag"` // 非运单调整相关的其它状态
|
||||
InvoiceTitle string `orm:"size(64)" json:"invoiceTitle"` // 发票抬头
|
||||
InvoiceTaxerID string `orm:"size(32);column(invoice_taxer_id)" json:"invoiceTaxerID"` // 发票纳税人识别码
|
||||
InvoiceEmail string `orm:"size(64)" json:"invoiceEmail"` // 发票邮箱
|
||||
VendorOrgCode string `orm:"size(64)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
|
||||
FromStoreID int `orm:"column(from_store_id)" json:"fromStoreID"` // 物料配送门店
|
||||
EclpOutID string `orm:"column(eclp_out_id)" json:"eclpOutID"` // 物料配送的出库单号
|
||||
AddressID int64 `orm:"column(address_id)" json:"addressID"` // 配送地址ID
|
||||
EarningType int `json:"earningType"` // 订单结算方式,2为扣点,1为报价
|
||||
OrderType int `json:"orderType"` // 订单类型,0为普通订单,1为物料订单,2为进货订单
|
||||
OrderPayPercentage int `json:"orderPayPercentage"` // 调价包?
|
||||
CouponIDs string `orm:"column(coupon_ids)" json:"couponIDs"` // 优惠券IDs(京西商城)
|
||||
NotifyType int `json:"notifyType"` // 0表示没有通知,1表示发的短信,2表示发的语音
|
||||
PhoneAscription string `orm:"column(phone_ascription)" json:"phoneAscription"` // 电话号码归属地,{代表抖音号码归宿地[yes-四川成都]}
|
||||
PackagePrice int `orm:"size(8);column(package_price);default(0)" json:"packagePrice"` // 门店包装袋金额
|
||||
DeliveryFeeFrom *time.Time `orm:"type(datetime);null" json:"deliveryFeeFrom,omitempty"` // 三方配置费计算的开始基准时间
|
||||
Flag int `json:"flag"` // 非运单调整相关的其它状态
|
||||
InvoiceTitle string `orm:"size(64)" json:"invoiceTitle"` // 发票抬头
|
||||
InvoiceTaxerID string `orm:"size(32);column(invoice_taxer_id)" json:"invoiceTaxerID"` // 发票纳税人识别码
|
||||
InvoiceEmail string `orm:"size(64)" json:"invoiceEmail"` // 发票邮箱
|
||||
VendorOrgCode string `orm:"size(64)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
|
||||
FromStoreID int `orm:"column(from_store_id)" json:"fromStoreID"` // 物料配送门店
|
||||
EclpOutID string `orm:"column(eclp_out_id)" json:"eclpOutID"` // 物料配送的出库单号
|
||||
AddressID int64 `orm:"column(address_id)" json:"addressID"` // 配送地址ID
|
||||
EarningType int `json:"earningType"` // 订单结算方式,2为扣点,1为报价
|
||||
OrderType int `json:"orderType"` // 订单类型,0为普通订单,1为物料订单,2为进货订单
|
||||
OrderPayPercentage int `json:"orderPayPercentage"` // 调价包?
|
||||
CouponIDs string `orm:"column(coupon_ids)" json:"couponIDs"` // 优惠券IDs(京西商城)
|
||||
NotifyType int `json:"notifyType"` // 0表示没有通知,1表示发的短信,2表示发的语音
|
||||
PhoneAscription string `orm:"column(phone_ascription)" json:"phoneAscription"` // 电话号码归属地,{代表抖音号码归宿地[yes-四川成都]}
|
||||
PackagePrice int `orm:"size(8);column(package_price);default(0)" json:"packagePrice"` // 门店包装袋金额
|
||||
ForceRequirePicture int `orm:"size(4);column(force_require_picture);default(0)" json:"forceRequirePicture"` // 是否强制返图1需要0不需要
|
||||
// 以下只是用于传递数据
|
||||
OriginalData string `orm:"-" json:"-"`
|
||||
Skus []*OrderSku `orm:"-" json:"-"`
|
||||
|
||||
@@ -47,6 +47,7 @@ var (
|
||||
102114997: true,
|
||||
102641826: true,
|
||||
102651220: true,
|
||||
156976863: true,
|
||||
// 果园啊
|
||||
6572945: true,
|
||||
6772759: true,
|
||||
|
||||
@@ -174,7 +174,7 @@ type IPurchasePlatformStoreSkuHandler interface {
|
||||
// UploadInvoice 发票回复
|
||||
UploadInvoice(param *model.InvoiceMsg, base64 string) ([]string, []string, error)
|
||||
// UploadPickingImg 上传订单拣货图片
|
||||
UploadPickingImg(order *model.GoodsOrder, imgList []string) error
|
||||
UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error
|
||||
}
|
||||
|
||||
type ISingleStoreStoreSkuHandler interface {
|
||||
|
||||
@@ -1095,6 +1095,6 @@ func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg, base64 string)
|
||||
}
|
||||
|
||||
// UploadPickingImg 上传拣货图片
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList []string) error {
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -361,6 +361,6 @@ func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg) ([]string, []st
|
||||
}
|
||||
|
||||
// UploadPickingImg 上传拣货图片
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList []string) error {
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -736,6 +736,6 @@ func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg, base64 string)
|
||||
}
|
||||
|
||||
// UploadPickingImg 上传拣货图片
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList []string) error {
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -350,6 +350,6 @@ func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg, base64 string)
|
||||
}
|
||||
|
||||
// UploadPickingImg 上传拣货图片
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList []string) error {
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -178,6 +178,6 @@ func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg) ([]string, []st
|
||||
}
|
||||
|
||||
// UploadPickingImg 上传拣货图片
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList []string) error {
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -188,6 +188,13 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
if openUID > 0 {
|
||||
order.VendorUserID = utils.Int64ToStr(openUID)
|
||||
}
|
||||
|
||||
// 当此数值为1时需要强制返图
|
||||
if utils.MustInterface2Int64(result["force_require_picture"]) == 1 {
|
||||
order.ForceRequirePicture = 1
|
||||
} else {
|
||||
order.ForceRequirePicture = 0
|
||||
}
|
||||
// 不设置最晚拣货时间,以缺省值为准
|
||||
// if utils.IsTimeZero(order.PickDeadline) && !utils.IsTimeZero(order.StatusTime) {
|
||||
// order.PickDeadline = order.StatusTime.Add(pickupOrderDelay) // 美团外卖要求在5分钟内拣货,不然订单会被取消
|
||||
@@ -1077,6 +1084,11 @@ func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg, base64 string)
|
||||
}
|
||||
|
||||
// UploadPickingImg 上传拣货图片
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList []string) error {
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error {
|
||||
return getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromOrder(order), order.VendorStoreID).UploadMediaToOrder(order.VendorOrderID, imgList)
|
||||
}
|
||||
|
||||
func GetVendorDetail(order *model.GoodsOrder) (map[string]interface{}, error) {
|
||||
result, err := getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromOrder(order), order.VendorStoreID).OrderGetOrderDetail(utils.Str2Int64(order.VendorOrderID), true)
|
||||
return result, err
|
||||
}
|
||||
|
||||
@@ -1005,6 +1005,6 @@ func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg, base64 string)
|
||||
}
|
||||
|
||||
// UploadPickingImg 上传拣货图片
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList []string) error {
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1123,6 +1123,6 @@ func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg, base64 string)
|
||||
}
|
||||
|
||||
// UploadPickingImg 上传拣货图片
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList []string) error {
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -324,6 +324,6 @@ func (c *PurchaseHandler) ApplyCompensationOrder(order *model.GoodsOrder) (strin
|
||||
}
|
||||
|
||||
// UploadPickingImg 上传拣货图片
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList []string) error {
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -129,6 +129,6 @@ func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg, base64 string)
|
||||
}
|
||||
|
||||
// UploadPickingImg 上传拣货图片
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList []string) error {
|
||||
func (c *PurchaseHandler) UploadPickingImg(order *model.GoodsOrder, imgList interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user