huanghongfa
2021-08-10 63cdfcdab5b90e25dc468967c5e4ac0315965f02
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -122,11 +122,13 @@
        if (ObjectUtils.isEmpty(comActEasyPhotoVO)||null== status) {
            return R.fail("随手拍不存在");
        }
        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) {
@@ -312,6 +314,7 @@
        page.setCurrent(pageNum);
        IPage<ComActEasyPhotoVO> iPage = comActEasyPhotoDAO.pageEasyPhotoApplets(page, comActEasyPhotoVO);
        List<ComActEasyPhotoVO> records = iPage.getRecords();
        if(userId != null){
        if (!ObjectUtils.isEmpty(records)) {
            records.forEach(comActEasyPhotoVO1 -> {
                Long id = comActEasyPhotoVO1.getId();
@@ -330,6 +333,7 @@
            });
            iPage.setRecords(records);
        }
        }
        return R.ok(iPage);
    }