|
@@ -74,16 +74,17 @@ func handleGuideOrdTable(msg []byte) error { |
|
|
provinceId, cityId, countyId, provinceName, cityName, countyName := getUserAddress(db.DBs[masterId], data.Uid) |
|
|
provinceId, cityId, countyId, provinceName, cityName, countyName := getUserAddress(db.DBs[masterId], data.Uid) |
|
|
now := time.Now() |
|
|
now := time.Now() |
|
|
esData := esMd.ZhiosOrdersEs{ |
|
|
esData := esMd.ZhiosOrdersEs{ |
|
|
OrdKind: "guide", |
|
|
|
|
|
MasterId: utils.StrToInt(masterId), |
|
|
|
|
|
OrdId: data.OrdId, |
|
|
|
|
|
MainOrdId: data.ParentOrdId, |
|
|
|
|
|
StoreOrdId: data.PvdOid, |
|
|
|
|
|
GoodsId: data.ItemId, |
|
|
|
|
|
Uid: data.Uid, |
|
|
|
|
|
BuyerPhone: user.Phone, |
|
|
|
|
|
CostPrice: utils.StrToFloat64(data.CostPrice), |
|
|
|
|
|
Gmv: utils.StrToFloat64(data.CostPrice) * float64(utils.StrToInt(data.ItemNum)), |
|
|
|
|
|
|
|
|
OrdKind: "guide", |
|
|
|
|
|
MasterId: utils.StrToInt(masterId), |
|
|
|
|
|
OrdId: data.OrdId, |
|
|
|
|
|
MainOrdId: data.ParentOrdId, |
|
|
|
|
|
StoreOrdId: data.PvdOid, |
|
|
|
|
|
GoodsId: data.ItemId, |
|
|
|
|
|
Uid: data.Uid, |
|
|
|
|
|
BuyerPhone: user.Phone, |
|
|
|
|
|
CostPrice: utils.StrToFloat64(data.PaidPrice), |
|
|
|
|
|
//Gmv: utils.StrToFloat64(data.CostPrice) * float64(utils.StrToInt(data.ItemNum)), |
|
|
|
|
|
Gmv: utils.StrToFloat64(data.PaidPrice), |
|
|
State: int32(utils.StrToInt(data.State)), |
|
|
State: int32(utils.StrToInt(data.State)), |
|
|
StateZh: md.CanalGuideOrderState(int32(utils.StrToInt(data.State))).String(), |
|
|
StateZh: md.CanalGuideOrderState(int32(utils.StrToInt(data.State))).String(), |
|
|
GoodsNum: utils.StrToInt(data.ItemNum), |
|
|
GoodsNum: utils.StrToInt(data.ItemNum), |
|
@@ -106,6 +107,9 @@ func handleGuideOrdTable(msg []byte) error { |
|
|
CreatedAt: now.Format("2006-01-02 15:04:05"), |
|
|
CreatedAt: now.Format("2006-01-02 15:04:05"), |
|
|
UpdatedAt: now.Format("2006-01-02 15:04:05"), |
|
|
UpdatedAt: now.Format("2006-01-02 15:04:05"), |
|
|
} |
|
|
} |
|
|
|
|
|
if esData.GoodsNum == 0 { |
|
|
|
|
|
esData.GoodsNum = 1 |
|
|
|
|
|
} |
|
|
if esData.PayTime == "" { |
|
|
if esData.PayTime == "" { |
|
|
esData.PayTime = "1970-01-01 00:00:00" |
|
|
esData.PayTime = "1970-01-01 00:00:00" |
|
|
} |
|
|
} |
|
|