| | |
| | | loginVO.setFailureTime(TimeUnit.MILLISECONDS.toSeconds((long)jwt.get("exp"))); |
| | | loginVO.setPhone(appUser.getPhone()); |
| | | loginVO.setSkipPage(1); |
| | | loginVO.setIsCourier(appUser.getCourierId()!=null); |
| | | loginVO.setIsCourier(false); |
| | | if (appUser.getCourierId()!=null){ |
| | | Courier courier = courierMapper.selectById(appUser.getCourierId()); |
| | | if (courier!=null && courier.getDelFlag().equals(0) && courier.getStatus().equals(1)){ |
| | | loginVO.setIsCourier(true); |
| | | } |
| | | } |
| | | return R.ok(loginVO); |
| | | } |
| | | |
| | |
| | | loginVO.setFailureTime(TimeUnit.MILLISECONDS.toSeconds((long)jwt.get("exp"))); |
| | | loginVO.setPhone(appUser.getPhone()); |
| | | loginVO.setSkipPage(1); |
| | | loginVO.setIsCourier(appUser.getCourierId()!=null); |
| | | loginVO.setIsCourier(false); |
| | | if (appUser.getCourierId()!=null){ |
| | | Courier courier = courierMapper.selectById(appUser.getCourierId()); |
| | | if (courier!=null && courier.getDelFlag().equals(0) && courier.getStatus().equals(1)){ |
| | | loginVO.setIsCourier(true); |
| | | } |
| | | } |
| | | |
| | | |
| | | return R.ok(loginVO); |
| | | } |
| | | |
| | |
| | | loginVO.setFailureTime(TimeUnit.MILLISECONDS.toSeconds((long)jwt.get("exp"))); |
| | | loginVO.setPhone(appUser2.getPhone()); |
| | | loginVO.setSkipPage(1); |
| | | loginVO.setIsCourier(appUser2.getCourierId()!=null); |
| | | |
| | | loginVO.setIsCourier(false); |
| | | if (appUser2.getCourierId()!=null){ |
| | | Courier courier = courierMapper.selectById(appUser2.getCourierId()); |
| | | if (courier!=null && courier.getDelFlag().equals(0) && courier.getStatus().equals(1)){ |
| | | loginVO.setIsCourier(true); |
| | | } |
| | | } |
| | | return loginVO; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public OrderPageVO getOrderPage(Integer communityId) { |
| | | public OrderPageVO getOrderPage(Integer communityId,String regionExtend) { |
| | | AppUser appUser = (AppUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); |
| | | //更换绑定的小区 |
| | | if (communityId!=null&& !Objects.equals(appUser.getCommunityId(), communityId)){ |
| | | appUser.setCommunityId(communityId); |
| | | this.updateById(appUser); |
| | | } |
| | | if (regionExtend!=null&& !Objects.equals(appUser.getRegionExtend(), regionExtend)){ |
| | | appUser.setRegionExtend(regionExtend); |
| | | this.updateById(appUser); |
| | | } |
| | | List<OrderPageVO> orderPage = this.getBaseMapper().getOrderPage(appUser.getId()); |
| | |
| | | public AppUserInfoVO getMyInfo() { |
| | | AppUser appUser = (AppUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); |
| | | AppUserInfoVO myInfo = this.getBaseMapper().getMyInfo(appUser.getId()); |
| | | |
| | | myInfo.setIsCourier(false); |
| | | if (myInfo.getCourierId()!=null){ |
| | | Courier courier = courierMapper.selectById(myInfo.getCourierId()); |
| | | if (courier!=null && courier.getDelFlag().equals(0) && courier.getStatus().equals(1)){ |
| | | myInfo.setIsCourier(true); |
| | | } |
| | | } |
| | | myInfo.setEndTimeStamp(myInfo.getEndTime() != null ? |
| | | myInfo.getEndTime().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli() : |
| | | null); |