This commit is contained in:
wyn
2026-05-08 18:16:00 +08:00
parent f58918b179
commit bc52704f0f
2 changed files with 25 additions and 9 deletions

View File

@@ -20,10 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.Instant;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@@ -260,7 +257,24 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
@Override
public List<Map<String, Object>> exportPhysicalBuyOrderInfo(String date,String orderType) {
return this.baseMapper.exportPhysicalBuyOrderInfo(date, orderType);
List<Map<String, Object>> list = this.baseMapper.exportPhysicalBuyOrderInfo(date, orderType);
List<Map<String, Object>> newList = new ArrayList<>();
for (Map<String, Object> map:list){
if(map.get("orderStatus").toString().equals("已退款")){
Map<String, Object> newMap = new HashMap<>(map);
map.put("orderStatus","已付款");
newList.add(map);
newMap.put("orderPrice","-"+map.get("orderPrice").toString());
newMap.put("price","-"+map.get("price").toString());
newList.add(newMap);
}else{
newList.add(map);
}
}
return newList;
}
@Override