diff --git a/app/mix/service/vasservice.go b/app/mix/service/vasservice.go index 6e3bdd4c..53c56d9a 100644 --- a/app/mix/service/vasservice.go +++ b/app/mix/service/vasservice.go @@ -375,6 +375,9 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto case dbstruct.CHSTypeIncomeRefundZoneAdmission: item.Desc = "(旧)空间退款" + getTypeIdDesc(chDB.GetTypeId()) item.Change = fmt.Sprintf("%d钻石", chDB.GetChange()) + if chDB.GetChange() == 0 { + item.Change = fmt.Sprintf("-%d钻石", chDB.GetChange()) + } case dbstruct.CHSTypeIncomeRefundThirdPartner: item.Desc = "代运营空间退款" + getTypeIdDesc(chDB.GetTypeId()) switch chDB.GetTypeId() { @@ -386,6 +389,9 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto item.Desc = "代运营(空间超粉退款)" } item.Change = fmt.Sprintf("%d钻石", chDB.GetChange()) + if chDB.GetChange() == 0 { + item.Change = fmt.Sprintf("-%d钻石", chDB.GetChange()) + } case dbstruct.CHSTypeIncomeRefundCollaborator: item.Desc = "合伙人空间退款" + getTypeIdDesc(chDB.GetTypeId()) switch chDB.GetTypeId() { @@ -397,6 +403,9 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto item.Desc = "合伙人(空间超粉退款)" } item.Change = fmt.Sprintf("%d钻石", chDB.GetChange()) + if chDB.GetChange() == 0 { + item.Change = fmt.Sprintf("-%d钻石", chDB.GetChange()) + } case dbstruct.CHSTypeIncomeRefundZoneStreamer: item.Desc = "空间退款" + getTypeIdDesc(chDB.GetTypeId()) switch chDB.GetTypeId() { @@ -408,7 +417,9 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto item.Desc = "空间超粉(用户退款)" } item.Change = fmt.Sprintf("%d钻石", chDB.GetChange()) - + if chDB.GetChange() == 0 { + item.Change = fmt.Sprintf("-%d钻石", chDB.GetChange()) + } } list = append(list, item) }