| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | |
| | | if(ObjectUtil.isEmpty(targetId)){ |
| | | return Result.fail("请返回重试"); |
| | | } |
| | | ArrayList<ChatOrderVo> chatOrderVoList = new ArrayList<>(); |
| | | List<ChatOrderVo> chatOrderVos = otcOrderDao.selectByMemberIdAndTargetId(memberId,targetId); |
| | | return Result.ok(chatOrderVos); |
| | | if(CollUtil.isNotEmpty(chatOrderVos)){ |
| | | for(ChatOrderVo chatOrderVo : chatOrderVos){ |
| | | Long memberIdDone = chatOrderVo.getMemberId(); |
| | | if(memberId.equals(memberIdDone) || memberId == memberIdDone){ |
| | | chatOrderVoList.add(chatOrderVo); |
| | | } |
| | | } |
| | | } |
| | | return Result.ok(chatOrderVoList); |
| | | } |
| | | |
| | | |