1
This commit is contained in:
@@ -172,8 +172,10 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if isNewComment {
|
if isNewComment {
|
||||||
|
globals.SugarLogger.Debugf("================new comment2 := %s", utils.Format4Output(comment2, false))
|
||||||
err = dao.CreateEntity(db, comment2)
|
err = dao.CreateEntity(db, comment2)
|
||||||
} else if comment2 != nil {
|
} else if comment2 != nil {
|
||||||
|
globals.SugarLogger.Debugf("================UpdateEntity comment2 := %s", utils.Format4Output(comment2, false))
|
||||||
_, err = dao.UpdateEntity(db, comment2)
|
_, err = dao.UpdateEntity(db, comment2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package dao
|
package dao
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"git.rosy.net.cn/jx-print/dao"
|
"git.rosy.net.cn/jx-print/dao"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@@ -18,11 +20,14 @@ func GetBadCommentOrderId(jxStoreId int, startTime, endTime time.Time, foodNameL
|
|||||||
foodNameList,
|
foodNameList,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
globals.SugarLogger.Debugf("===========foodNameList := %s", utils.Format4Output(foodNameList, false))
|
||||||
commentOrder := make([]*badCommentOrder, 0, 0)
|
commentOrder := make([]*badCommentOrder, 0, 0)
|
||||||
if err := GetRows(GetDB(), &commentOrder, sql, sqlParams...); err != nil {
|
if err := GetRows(GetDB(), &commentOrder, sql, sqlParams...); err != nil {
|
||||||
|
globals.SugarLogger.Debugf("===========err := %v", err)
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
globals.SugarLogger.Debugf("===========commentOrder := %s", utils.Format4Output(commentOrder, false))
|
||||||
// 全等于的话就是目标订单
|
// 全等于的话就是目标订单
|
||||||
for _, v := range commentOrder {
|
for _, v := range commentOrder {
|
||||||
if v.Count == len(foodNameList) {
|
if v.Count == len(foodNameList) {
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
|
|||||||
}
|
}
|
||||||
vendorOrderID, _ := dao.GetBadCommentOrderId(storeDetail.ID, startTime, endTime, foodNameList)
|
vendorOrderID, _ := dao.GetBadCommentOrderId(storeDetail.ID, startTime, endTime, foodNameList)
|
||||||
if vendorOrderID != "" {
|
if vendorOrderID != "" {
|
||||||
|
globals.SugarLogger.Debugf("==================vendorOrderID := %s", vendorOrderID)
|
||||||
orderComment.VendorOrderID2 = vendorOrderID
|
orderComment.VendorOrderID2 = vendorOrderID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user