You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
package com.softegg.freetogo.Evaluate.service;
|
|
|
|
import com.softegg.freetogo.Evaluate.Dao.EvaluateRepository;
|
|
import com.softegg.freetogo.Evaluate.bean.Evaluations;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @description:
|
|
* @author:zhanglinhao
|
|
* @date:2024/5/10 9:25
|
|
*/
|
|
@Component
|
|
public class evaluateServiceImpl implements evaluateService {
|
|
|
|
@Autowired
|
|
EvaluateRepository evaluateRepository;
|
|
|
|
/**
|
|
* @description: 获取所有评论
|
|
* @param: null
|
|
* @return: void
|
|
* @author: zhanglinhao
|
|
* @date: 2024/5/10 9:25
|
|
*/
|
|
@Override
|
|
public List<Evaluations> evaluationList() {
|
|
System.out.println("查询评论");
|
|
return evaluateRepository.findAll();
|
|
}
|
|
|
|
/**
|
|
* @description: 添加评论
|
|
* @param: evaluation
|
|
* @return: void
|
|
* @author: zhanglinhao
|
|
* @date: 2024/5/10 21:20
|
|
*/
|
|
@Override
|
|
public void addEvaluation(Evaluations evaluation) {
|
|
evaluateRepository.save(evaluation);
|
|
System.out.println("添加评论" + evaluation.getEbody());
|
|
}
|
|
}
|