From ee3170150f642fd031081f06fd65bd1102b95d5f Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 23 Aug 2022 16:47:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=BA=E5=9F=9F=E5=85=AC?= =?UTF-8?q?=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/HighOrderServiceImpl.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java index 60a91e61..da6b0167 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java @@ -3085,17 +3085,23 @@ public class HighOrderServiceImpl implements HighOrderService { if (MapUtils.getLong(map , "agentId") != null) { criteria.andIdentificationCodeEqualTo(MapUtils.getLong(map , "agentId")); } else { - criteria.andIdentificationCodeIsNotNull(); + criteria.andIdentificationCodeIsNotNull().andIdentificationCodeNotEqualTo(60L); } List list = highOrderMapper.selectByExample(example); - for (HighOrder order : list) { - HighUser user = highUserService.findByUserId(order.getIdentificationCode()); - order.setTime(DateUtil.date2String(order.getCreateTime() , "MM月dd日 HH:mm")); - List childOrder = getChildOrderByOrder(order.getId()); - order.setGoodsTypeName("购买:" + GoodsType.getNameByType(childOrder.get(0).getGoodsType())); - order.setAgentName(user.getName()); + if (list.size() > 0) { + for (HighOrder order : list) { + HighUser user = highUserService.findByUserId(order.getIdentificationCode()); + order.setTime(DateUtil.date2String(order.getCreateTime() , "MM月dd日 HH:mm")); + List childOrder = getChildOrderByOrder(order.getId()); + order.setGoodsTypeName("购买:" + GoodsType.getNameByType(childOrder.get(0).getGoodsType())); + if (user != null) { + order.setAgentName(user.getName()); + } else { + order.setAgentName("暂无推广人"); + } + } } return list;