| | |
| | | } |
| | | |
| | | @Override |
| | | public List<EntrustListInfoVo> findOwnEntrustOrder() { |
| | | public List<EntrustListInfoVo> findOwnEntrustOrder(EntrustOrderListDto orderListDto) { |
| | | MemberEntity member = LoginUserUtils.getAppLoginUser(); |
| | | |
| | | OtcEntrustOrder query = new OtcEntrustOrder(); |
| | | query.setStatus(3); |
| | | query.setMemberId(member.getId()); |
| | | List<OtcEntrustOrder> otcEntrustOrders = this.baseMapper.selectEntrustOrderByOrderType(query); |
| | | return OtcEntrustOrderMapper.INSTANCE.entrustToListInfoVoList(otcEntrustOrders); |
| | | |
| | | Page<OtcEntrustOrder> page = new Page<>(orderListDto.getPageNum(), orderListDto.getPageSize()); |
| | | IPage<OtcEntrustOrder> result = this.baseMapper.selectOwnEntrustListInPage(query, page); |
| | | return OtcEntrustOrderMapper.INSTANCE.entrustToListInfoVoList(result.getRecords()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public Result findEntrustOrderDetail(Long id) { |
| | | MemberEntity member = LoginUserUtils.getAppLoginUser(); |
| | | |
| | | OtcEntrustOrder otcEntrustOrder = this.baseMapper.selectById(id); |
| | | if (otcEntrustOrder == null) { |
| | | return Result.fail("参数错误"); |
| | | } |
| | | |
| | | if (!member.getId().equals(otcEntrustOrder.getMemberId())) { |
| | | return Result.fail("请求有误"); |
| | | } |
| | | |
| | | MemberEntity member = memberDao.selectById(otcEntrustOrder.getMemberId()); |
| | | EntrustOrderDetailVo detail = OtcEntrustOrderMapper.INSTANCE.entityToOrderDetail(otcEntrustOrder); |
| | | detail.setName(member.getName()); |
| | | return Result.ok(detail); |
| | | } |
| | | } |