This commit is contained in:
邹宗楠
2022-09-30 17:16:22 +08:00
parent e2b41bf9db
commit 97c092cd26
36 changed files with 1753 additions and 1895 deletions

View File

@@ -123,26 +123,26 @@ func (c *PurchaseHandler) convertAfsAppealType(vendorAppealType string) int8 {
func (c *PurchaseHandler) buildAfsOrder(afsInfo *jdapi.AfsServiceResponse) (afsOrder *model.AfsOrder) {
afsOrder = &model.AfsOrder{
VendorID: model.VendorIDJD,
AfsOrderID: afsInfo.AfsServiceOrder,
VendorOrderID: afsInfo.OrderID,
VendorStoreID: afsInfo.StationID,
StoreID: int(utils.Str2Int64WithDefault(afsInfo.StationNumOutSystem, 0)),
AfsCreatedAt: afsInfo.CreateTime.GoTime(),
VendorID: model.VendorIDJD,
AfsOrderID: afsInfo.AfsServiceOrder,
VendorOrderID: afsInfo.OrderID,
VendorStoreID: afsInfo.StationID,
StoreID: int(utils.Str2Int64WithDefault(afsInfo.StationNumOutSystem, 0)),
AfsCreatedAt: afsInfo.CreateTime.GoTime(),
VendorAppealType: afsInfo.ApplyDeal,
AppealType: c.convertAfsAppealType(afsInfo.ApplyDeal),
VendorReasonType: utils.Int2Str(afsInfo.QuestionTypeCid),
ReasonType: c.convertAfsReasonType(afsInfo.QuestionTypeCid),
ReasonDesc: utils.LimitUTF8StringLen(afsInfo.QuestionDesc, 1024),
ReasonImgList: utils.LimitUTF8StringLen(jdapi.ProcessQuestionPic(afsInfo.QuestionPic), 1024),
VendorOrgCode: afsInfo.VenderID,
FreightUserMoney: afsInfo.OrderFreightMoney,
AfsFreightMoney: afsInfo.AfsFreight,
BoxMoney: afsInfo.PackagingMoney,
TongchengFreightMoney: afsInfo.TongchengFreightMoney,
SkuBoxMoney: afsInfo.MealBoxMoney,
VendorStatus: utils.Int2Str(afsInfo.AfsServiceState),
VendorReasonType: utils.Int2Str(afsInfo.QuestionTypeCid),
ReasonType: c.convertAfsReasonType(afsInfo.QuestionTypeCid),
ReasonDesc: utils.LimitUTF8StringLen(afsInfo.QuestionDesc, 1024),
ReasonImgList: utils.LimitUTF8StringLen(jdapi.ProcessQuestionPic(afsInfo.QuestionPic), 1024),
VendorAppealType: afsInfo.ApplyDeal,
AppealType: c.convertAfsAppealType(afsInfo.ApplyDeal),
VendorOrgCode: afsInfo.VenderID,
VendorStatus: utils.Int2Str(afsInfo.AfsServiceState),
}
afsOrder.Status = c.GetAfsStatusFromVendorStatus(afsOrder.VendorStatus)