添加订单押金暂扣与归还
This commit is contained in:
@@ -58,6 +58,11 @@ func (row orderRow) toAdminDTO() OrderDTO {
|
||||
SettlementStatus: row.SettlementStatus,
|
||||
RefundStatus: row.RefundStatus,
|
||||
RefundAmountCent: row.RefundAmountCent,
|
||||
DepositHoldStatus: row.DepositHoldStatus,
|
||||
DepositHoldAmountCent: row.DepositHoldAmountCent,
|
||||
DepositHoldReason: row.DepositHoldReason,
|
||||
DepositHeldAt: row.DepositHeldAt,
|
||||
DepositHoldReleasedAt: row.DepositHoldReleasedAt,
|
||||
AdminActions: adminActionsForOrder(row.RentalOrder),
|
||||
CreatedAt: row.CreatedAt,
|
||||
UpdatedAt: row.UpdatedAt,
|
||||
@@ -67,6 +72,12 @@ func (row orderRow) toAdminDTO() OrderDTO {
|
||||
func (row orderRow) toDTOForUser(userID uint64) OrderDTO {
|
||||
dto := row.toAdminDTO()
|
||||
dto.AdminActions = nil
|
||||
// 押金暂扣属于客服内部处置,不向租客/号主暴露。
|
||||
dto.DepositHoldStatus = ""
|
||||
dto.DepositHoldAmountCent = 0
|
||||
dto.DepositHoldReason = ""
|
||||
dto.DepositHeldAt = nil
|
||||
dto.DepositHoldReleasedAt = nil
|
||||
applyOrderPriceView(&dto, row.RentalOrder, userID)
|
||||
return dto
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user