package com.diaoyun.zion.chinafrica.service.impl;

import com.diaoyun.zion.chinafrica.dao.TbCfCommentsInfoDao;
import com.diaoyun.zion.chinafrica.entity.TbCfCommentsInfoEntity;
import com.diaoyun.zion.chinafrica.service.TbCfCommentsInfoService;
import com.diaoyun.zion.master.util.IdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Service实现类
 *
 * @author lipengjun
 * @date 2019-10-26 17:13:28
 */
@Service("tbCfCommentsInfoService")
public class TbCfCommentsInfoServiceImpl implements TbCfCommentsInfoService {
    @Autowired
    private TbCfCommentsInfoDao tbCfCommentsInfoDao;

    @Override
    public int delete(String commentId) {
        return tbCfCommentsInfoDao.delete(commentId);
    }

    @Override
    public int save(TbCfCommentsInfoEntity tbCfCommentsInfo) {
        tbCfCommentsInfo.setCommentId(IdUtil.createIdbyUUID());
        return tbCfCommentsInfoDao.save(tbCfCommentsInfo);
    }

    @Override
    public List<TbCfCommentsInfoEntity> findByOwnerId(String ownerId) {
        return null;
    }
}
