差评补款
This commit is contained in:
@@ -746,3 +746,39 @@ func RefreshOrdersWithoutJxStoreID(ctx *jxcontext.Context, fromDate, toDate stri
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
func GetOrdersSupplement(ctx *jxcontext.Context, storIDs, vendorIDs []int, vendorOrderID, fromTime, toTime string, status, stype, offset, pageSize int) (pageInfo *model.PagedInfo, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
fromTimeP time.Time
|
||||
toTimeP time.Time
|
||||
)
|
||||
if fromTime != "" {
|
||||
fromTimeP = utils.Str2Time(fromTime)
|
||||
}
|
||||
if toTime != "" {
|
||||
toTimeP = utils.Str2Time(toTime)
|
||||
}
|
||||
result, totalCount, err := dao.GetOrdersSupplement(db, storIDs, vendorIDs, vendorOrderID, fromTimeP, toTimeP, status, stype, offset, pageSize)
|
||||
pageInfo = &model.PagedInfo{
|
||||
Data: result,
|
||||
TotalCount: totalCount,
|
||||
}
|
||||
return pageInfo, err
|
||||
}
|
||||
|
||||
func AddUpdateOrdersSupplement(ctx *jxcontext.Context, ordersSupplement *model.OrderSupplementFee) (num int, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
id = ordersSupplement.ID
|
||||
)
|
||||
if id > 0 {
|
||||
if ordersSupplement.Status == 1 {
|
||||
return 0,fmt.Errorf("已结账的扣款信息不允许修改", a)
|
||||
}
|
||||
dao.UpdateEntity(db, ordersSupplement)
|
||||
} else {
|
||||
|
||||
}
|
||||
return num, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user