| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.DataCount; |
| | | import com.panzhihua.service_community.dao.ComActDynTypeMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActDynTypeDO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | import com.panzhihua.service_community.service.ComActDynService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | |
| | | private ComActDynUserDAO comActDynUserDAO; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | |
| | | @Resource |
| | | private ComActDynTypeMapper comActDynTypeMapper; |
| | | |
| | | /** |
| | | * 分页查询社区动态 |
| | |
| | | @Override |
| | | public R detailDynamic(Long id) { |
| | | ComActDynDO comActDynDO = this.getById(id); |
| | | |
| | | ComActDynTypeDO comActDynTypeDO=comActDynTypeMapper.selectById(id); |
| | | |
| | | if (ObjectUtils.isEmpty(comActDynDO)) { |
| | | return R.fail("社区动态不存在"); |
| | | } |
| | |
| | | } |
| | | comActDynDAO.updateById(comActDynDO); |
| | | } |
| | | |
| | | if(comActDynTypeDO!=null && !StringUtils.isEmpty(comActDynTypeDO.getName())) |
| | | { |
| | | comActDynVO.setTypeName(comActDynTypeDO.getName()); |
| | | } |
| | | return R.ok(comActDynVO); |
| | | } |
| | | |