| | |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComPbServiceTeamDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.PageComPbServiceTeamDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoCommentDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoCommentUserDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoDAO; |
| | |
| | | }else { |
| | | comActEasyPhotoVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | comActEasyPhotoVO1.setPhone(SensitiveUtil.desensitizedPhoneNumber(comActEasyPhotoVO1.getPhone())); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | |
| | | @Override |
| | | public R detailEasyPhoto(Long id, Long userId) { |
| | | ComActEasyPhotoVO comActEasyPhotoVO=comActEasyPhotoDAO.detailEasyPhoto(id); |
| | | if (ObjectUtils.isEmpty(comActEasyPhotoVO)||null==comActEasyPhotoVO.getStatus()) { |
| | | Integer status = comActEasyPhotoVO.getStatus(); |
| | | 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)); |
| | |
| | | } else { |
| | | comActEasyPhotoVO.setHaveGiveThumbsUp(1); |
| | | } |
| | | List<ComActEasyPhotoCommentVO> comActEasyPhotoCommentVOList=new ArrayList<>(); |
| | | |
| | | if (status.intValue()==4) { |
| | | Date feedbackAt = comActEasyPhotoVO.getFeedbackAt(); |
| | | if (null==feedbackAt) { |
| | | comActEasyPhotoVO.setFeedbackAt(comActEasyPhotoVO.getExamineAt()); |
| | | } |
| | | } |
| | | comActEasyPhotoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(comActEasyPhotoVO.getPhone())); |
| | | if(comActEasyPhotoVO.getAddrRemark()==null){ |
| | | comActEasyPhotoVO.setAddrRemark(""); |
| | | } |
| | | return R.ok(comActEasyPhotoVO); |
| | | } |
| | | |
| | |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActEasyPhotoVO1 -> { |
| | | Long id = comActEasyPhotoVO1.getId(); |
| | | ComActEasyPhotoUserDO comActEasyPhotoUserDO = comActEasyPhotoUserDAO.selectOne(new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActEasyPhotoUserDO)) { |
| | | 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); |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActEasyPhotoCommentVO> iPage = comActEasyPhotoCommentDAO.pageComActEasyPhotoComment(page, pageComActEasyPhotoCommentDTO); |
| | | if(!iPage.getRecords().isEmpty()){ |
| | | for (ComActEasyPhotoCommentVO commentVO:iPage.getRecords()) { |
| | | if(StringUtils.isEmpty(commentVO.getName())){ |
| | | commentVO.setName(commentVO.getNickName()); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |