查询用户的京东快递
This commit is contained in:
@@ -595,9 +595,13 @@ func CancelJdDelivery(ctx *jxcontext.Context, vendorWaybillID, reason string) (e
|
||||
)
|
||||
err = dao.GetEntity(db, &dOrder, "VendorWaybillID")
|
||||
userBill, err := dao.GetUserBill(db, ctx.GetUserID(), "")
|
||||
dOrders, err := dao.GetDeliveryOrdersNoPage(db, []string{ctx.GetUserID()}, []int{model.OrderStatusCanceled}, DayTimeBegin, DayTimeEnd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(dOrders) > 0 {
|
||||
return fmt.Errorf("抱歉,您已经在今天取消过京东物流订单!")
|
||||
}
|
||||
if dOrder.ID == 0 {
|
||||
return fmt.Errorf("未找到该运单!")
|
||||
}
|
||||
@@ -635,3 +639,7 @@ func CancelJdDelivery(ctx *jxcontext.Context, vendorWaybillID, reason string) (e
|
||||
dao.Commit(db)
|
||||
return err
|
||||
}
|
||||
|
||||
func GetJdDelivery(ctx *jxcontext.Context, status int, fromTime, toTime string, pageSize, offset int) (pagedInfo *model.PagedInfo, err error) {
|
||||
return dao.GetDeliveryOrders(dao.GetDB(), []string{ctx.GetUserID()}, []int{status}, utils.Str2Time(fromTime), utils.Str2Time(toTime), pageSize, offset)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user