up
This commit is contained in:
@@ -923,15 +923,22 @@ func GetMyOrderCountInfo(db *DaoDB, userID string, fromDate, toDate time.Time, s
|
||||
if utils.IsTimeZero(fromDate) {
|
||||
return nil, fmt.Errorf("必须指定开始日期")
|
||||
}
|
||||
if utils.IsTimeZero(toDate) {
|
||||
toDate = fromDate
|
||||
if !utils.IsTimeZero(fromDate) {
|
||||
fromDate = utils.Time2Date(fromDate)
|
||||
if utils.IsTimeZero(toDate) {
|
||||
toDate = fromDate
|
||||
}
|
||||
}
|
||||
if !utils.IsTimeZero(toDate) {
|
||||
toDate = utils.Time2Date(toDate)
|
||||
toDate = toDate.Add(24 * time.Hour)
|
||||
}
|
||||
|
||||
sql := `
|
||||
SELECT t1.lock_status, t1.status, COUNT(*) count
|
||||
FROM goods_order t1
|
||||
WHERE t1.user_id = ? AND t1.vendor_id = ?
|
||||
AND t1.order_created_at >= ? AND t1.order_created_at <= ?
|
||||
AND t1.order_created_at >= ? AND t1.order_created_at < ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
userID,
|
||||
|
||||
@@ -42,9 +42,9 @@ func (c *PurchaseHandler) isAfsMsg(msg *mtwmapi.CallbackMsg) bool {
|
||||
if msg.Cmd == mtwmapi.MsgTypeOrderRefund || msg.Cmd == mtwmapi.MsgTypeOrderPartialRefund {
|
||||
// refundData := msg.Data.(*mtwmapi.CallbackRefundInfo)
|
||||
orderID := utils.Str2Int64(GetOrderIDFromMsg(msg))
|
||||
orderInfo, err := api.MtwmAPI.OrderGetOrderDetail2(orderID, false)
|
||||
status, err := api.MtwmAPI.OrderViewStatus(orderID)
|
||||
if err == nil {
|
||||
return orderInfo.Status == int(utils.Str2Int64(mtwmapi.OrderStatusFinished))
|
||||
return utils.Int2Str(status) == mtwmapi.OrderStatusFinished
|
||||
}
|
||||
globals.SugarLogger.Warnf("mtwm isAfsMsg OrderGetOrderDetail2 orderID:%d failed with error:%v", orderID, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user