package com.rf.psychological.service.impl;


import com.rf.psychological.dao.model.TypeEntity;
import com.rf.psychological.dao.repository.TypeRepository;
import com.rf.psychological.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zzf
 * @description:
 * @date 2021/6/7 10:04
 */
@Service
public class TypeServiceImpl implements TypeService {

    @Autowired
    private TypeRepository typeRepository;

    /**
     * 全量查询
     *
     * @return
     */
    @Override
    public List<TypeEntity> findAll() {
        return this.typeRepository.findAll();
    }

    /**
     * 添加分类
     *
     * @param typeEntity
     */
    @Override
    public void saveType(TypeEntity typeEntity) {
        this.typeRepository.save(typeEntity);
    }
}
