| | |
| | | if (ObjectUtils.isEmpty(comActEasyPhotoVO)||null== status) { |
| | | return R.fail("随手拍不存在"); |
| | | } |
| | | ComActEasyPhotoUserDO comActEasyPhotoUserDO = comActEasyPhotoUserDAO.selectOne(new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActEasyPhotoUserDO)) { |
| | | comActEasyPhotoVO.setHaveGiveThumbsUp(0); |
| | | } else { |
| | | comActEasyPhotoVO.setHaveGiveThumbsUp(1); |
| | | if(!userId.equals(0L)){ |
| | | ComActEasyPhotoUserDO comActEasyPhotoUserDO = comActEasyPhotoUserDAO.selectOne(new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActEasyPhotoUserDO)) { |
| | | comActEasyPhotoVO.setHaveGiveThumbsUp(0); |
| | | } else { |
| | | comActEasyPhotoVO.setHaveGiveThumbsUp(1); |
| | | } |
| | | } |
| | | |
| | | if (status.intValue()==4) { |
| | |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActEasyPhotoVO> iPage = comActEasyPhotoDAO.pageEasyPhotoApplets(page, comActEasyPhotoVO); |
| | | List<ComActEasyPhotoVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActEasyPhotoVO1 -> { |
| | | Long id = comActEasyPhotoVO1.getId(); |
| | | Integer status = comActEasyPhotoVO1.getStatus(); |
| | | Date feedbackAt = comActEasyPhotoVO1.getFeedbackAt(); |
| | | List<ComActEasyPhotoUserDO> comActEasyPhotoUserDO = |
| | | comActEasyPhotoUserDAO.selectList(new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId)); |
| | | if (comActEasyPhotoUserDO==null||comActEasyPhotoUserDO.size()==0) { |
| | | comActEasyPhotoVO1.setHaveGiveThumbsUp(0); |
| | | }else { |
| | | comActEasyPhotoVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | if(status.intValue()==4&&null==feedbackAt){ |
| | | comActEasyPhotoVO1.setFeedbackAt(comActEasyPhotoVO1.getExamineAt()); |
| | | } |
| | | }); |
| | | iPage.setRecords(records); |
| | | if(userId != null){ |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActEasyPhotoVO1 -> { |
| | | Long id = comActEasyPhotoVO1.getId(); |
| | | Integer status = comActEasyPhotoVO1.getStatus(); |
| | | Date feedbackAt = comActEasyPhotoVO1.getFeedbackAt(); |
| | | List<ComActEasyPhotoUserDO> comActEasyPhotoUserDO = |
| | | comActEasyPhotoUserDAO.selectList(new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId)); |
| | | if (comActEasyPhotoUserDO==null||comActEasyPhotoUserDO.size()==0) { |
| | | comActEasyPhotoVO1.setHaveGiveThumbsUp(0); |
| | | }else { |
| | | comActEasyPhotoVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | if(status.intValue()==4&&null==feedbackAt){ |
| | | comActEasyPhotoVO1.setFeedbackAt(comActEasyPhotoVO1.getExamineAt()); |
| | | } |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | | } |
| | | return R.ok(iPage); |
| | | } |