| | |
| | | import com.dsh.account.mapper.UserIntegralChangesMapper; |
| | | import com.dsh.account.model.SaveUserIntegralChangesVo; |
| | | import com.dsh.account.model.vo.userBenefitDetail.ExchangeDetailsResponse; |
| | | import com.dsh.account.model.vo.userBenefitDetail.IntegralDetailsResponse; |
| | | import com.dsh.account.model.vo.userBenefitDetail.IntegralsData; |
| | | import com.dsh.account.model.vo.userBenefitDetail.PointDetailsVo; |
| | | import com.dsh.account.service.UserIntegralChangesService; |
| | | import com.dsh.account.util.DateTimeHelper; |
| | |
| | | private MerChandiseClient mcClient; |
| | | |
| | | @Override |
| | | public IntegralDetailsResponse queryUserPointsDetails(String yearMonth, Integer recordId, Integer userIdFormRedis) { |
| | | IntegralDetailsResponse vo = new IntegralDetailsResponse(); |
| | | List<IntegralDetailsResponse.IntegralsData> details = new ArrayList<>(); |
| | | public List<IntegralsData> queryUserPointsDetails(String yearMonth, Integer recordId, Integer userIdFormRedis) { |
| | | List<IntegralsData> details = new ArrayList<>(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM-dd HH:mm"); |
| | | |
| | | Date monthStart = null; |
| | |
| | | .orderByDesc("insertTime")); |
| | | if (userIntegralChanges.size() > 0 ){ |
| | | for (UserIntegralChanges userIntegralChange : userIntegralChanges) { |
| | | IntegralDetailsResponse.IntegralsData detail= new IntegralDetailsResponse.IntegralsData(); |
| | | IntegralsData detail= new IntegralsData(); |
| | | switch (userIntegralChange.getType()){ |
| | | case 1: |
| | | detail.setConsumeAmount("+"+(userIntegralChange.getNewIntegral() - userIntegralChange.getOldIntegral())); |
| | |
| | | } |
| | | if (null != recordId){ |
| | | details = details.stream() |
| | | .filter(obj -> obj instanceof IntegralDetailsResponse.IntegralsData) |
| | | .filter(obj -> obj instanceof IntegralsData) |
| | | .filter(obj -> Objects.equals(obj.getDetailsType(), recordId)) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | TAppUser tAppUser = tauMapper.selectById(userIdFormRedis); |
| | | vo.setWpGold(tAppUser.getIntegral()); |
| | | vo.setDetailList(details); |
| | | } |
| | | return vo; |
| | | return details; |
| | | } |
| | | |
| | | |