package com.rf.psychological.service.impl;

import com.rf.psychological.dao.model.SupportEntity;
import com.rf.psychological.dao.repository.SupportRepository;
import com.rf.psychological.service.SupportService;
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:08
 */
@Service
public class SupportServiceImpl implements SupportService {

    @Autowired
    private SupportRepository supportRepository;
    /**
     * 全量查询
     *
     * @return
     */
    @Override
    public List<SupportEntity> findAll() {

        return this.supportRepository.findAll(Sort.by(Sort.Direction.ASC, "sortBy"));
    }
}
