| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.api.feignClient.AppUserAddressClient; |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.account.api.model.TAppUser; |
| | | import com.ruoyi.account.api.model.TAppUserAddress; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | |
| | | |
| | | @Resource |
| | | private AppUserAddressClient appUserAddressClient; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | PageInfo<TExchangeOrder> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); |
| | | List<TExchangeOrder> list = this.baseMapper.pageList(pageInfo,query,startTime1,startTime2); |
| | | |
| | | for (TExchangeOrder tShoppingOrder : list) { |
| | | tShoppingOrder.setUid(tShoppingOrder.getId().toString()); |
| | | switch (tShoppingOrder.getOrderType()){ |
| | | case 1: |
| | | TGoods data = goodsClient.getGoodsById(tShoppingOrder.getGoodsId()).getData(); |
| | | if (data!=null){ |
| | | tShoppingOrder.setName(data.getName()); |
| | | } |
| | | break; |
| | | case 2: |
| | | TCoupon data1 = couponClient.getCouponById1(tShoppingOrder.getCouponId()).getData(); |
| | | if (data1!=null){ |
| | | tShoppingOrder.setName(data1.getName()); |
| | | } |
| | | break; |
| | | } |
| | | if (tShoppingOrder.getAppUserId() != null){ |
| | | TAppUser data = appUserClient.getUserById(tShoppingOrder.getAppUserId()).getData(); |
| | | if (data!=null){ |
| | | tShoppingOrder.setPhone(data.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |