Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop

This commit is contained in:
richboo111
2023-10-16 14:40:00 +08:00
3 changed files with 10 additions and 9 deletions

View File

@@ -2,8 +2,6 @@ package orderman
import (
"encoding/json"
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
"math/rand"
"time"
@@ -84,9 +82,6 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
if dao.IsNoRowsError(err) {
err = nil
isNewComment = true
if orderComment.StoreID == 669247 {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "自动好评回复orderCommentList:", utils.Format4Output(orderCommentList[0], false))
}
if orderComment.IsReplied == 0 && time.Now().Sub(orderComment.CommentCreatedAt) < time.Duration(orderComment.ModifyDuration)*time.Hour {
if storeDetail, err2 := dao.GetStoreDetail(db, orderComment.StoreID, orderComment.VendorID, ""); err2 == nil {
if storeDetail.AutoReplyType == model.AutoReplyAll || orderComment.Score > JX_BAD_COMMENTS_MAX_LEVEL && storeDetail.AutoReplyType == model.AutoReplyGoodComment {

View File

@@ -112,9 +112,11 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, ven
VendorOrgCode: order.VendorOrgCode,
}
err = dao.CreateEntity(dao.GetDB(), bill)
order.VendorWaybillID = order.VendorOrderID
order.WaybillVendorID = model.VendorJXFakeWL
dao.UpdateEntity(dao.GetDB(), order, "VendorWaybillID", "WaybillVendorID")
//if order.VendorID == model.VendorIDTaoVegetable {
// order.VendorWaybillID = order.VendorOrderID
// order.WaybillVendorID = model.VendorJXFakeWL
// dao.UpdateEntity(dao.GetDB(), order, "VendorWaybillID", "WaybillVendorID")
//}
}
return err
}()

View File

@@ -64,7 +64,11 @@ func OrderStatusChangeDelivery(order *model.GoodsOrder, orderStatus string) *req
BizOrderId: utils.Int64ToPointer(utils.Str2Int64(order.VendorOrderID)),
Status: utils.String2Pointer(orderStatus),
}
bill, _ := partner.CurOrderManager.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
var bill *model.Waybill
bill, _ = partner.CurOrderManager.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
if bill == nil {
bill, _ = partner.CurOrderManager.LoadWaybill(order.VendorOrderID, model.VendorJXFakeWL)
}
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, model.VendorIDTaoVegetable, "")
if bill != nil {
if bill.CourierName == "" && bill.CourierMobile == "" {