package com.rf.psychological.service.impl;

import com.rf.psychological.dao.model.LifeEntity;
import com.rf.psychological.dao.repository.LifeRepository;
import com.rf.psychological.service.LifeService;
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/2/1 16:57
 */
@Service
public class LifeServiceImpl implements LifeService {
    @Autowired
    private LifeRepository lifeRepository;
    /**
     * 全量查询
     *
     * @return
     */
    @Override
    public List<LifeEntity> findAll() {
        return this.lifeRepository.findAll(Sort.by("no"));
    }
}
