package com.rf.psychological.service.impl;

import com.rf.psychological.dao.model.MoodEntity;
import com.rf.psychological.dao.repository.MoodRepository;
import com.rf.psychological.service.MoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zzf
 * @description:正性负性情绪量表
 * @date 2021/1/20 18:42
 */
@Service
public class MoodServiceImpl implements MoodService {
    @Autowired
    private MoodRepository moodRepository;
    /**
     * 全量查询正性负性情绪量表
     *
     * @return
     */
    @Override
    public List<MoodEntity> findAll() {
        return this.moodRepository.findAll(Sort.by("no"));
    }
}
