parent
d6932b75e1
commit
5e37650982
@ -0,0 +1,58 @@
|
|||||||
|
package com.softegg.freetogo.Evaluate.controller;
|
||||||
|
|
||||||
|
import com.softegg.freetogo.Evaluate.bean.Evaluations;
|
||||||
|
import com.softegg.freetogo.Evaluate.service.EvaluateService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 对评价的操作
|
||||||
|
* @author: zhanglinhao
|
||||||
|
* @date: 2024/5/11 17:33
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/evaluate")
|
||||||
|
public class EvaluationController {
|
||||||
|
@Autowired
|
||||||
|
EvaluateService evaluateService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 获取所有需求
|
||||||
|
* @param: null
|
||||||
|
* @return: java.util.List<com.softegg.freetogo.Evaluate.bean.Evaluations>
|
||||||
|
* @author: zhanglinhao
|
||||||
|
* @date: 2024/5/12 0:11
|
||||||
|
*/
|
||||||
|
@GetMapping("findAllEvaluation")
|
||||||
|
public List<Evaluations> findAllEvaluation() {
|
||||||
|
return evaluateService.evaluationList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 添加评价
|
||||||
|
* @param: ebody
|
||||||
|
* @return: void
|
||||||
|
* @author: zhanglinhao
|
||||||
|
* @date: 2024/5/12 0:28
|
||||||
|
*/
|
||||||
|
@PostMapping("addEvaluation")
|
||||||
|
public void addEvaluation(@RequestBody Map<String, Evaluations> ebody) {
|
||||||
|
Evaluations evaluation = ebody.get("evaluation");
|
||||||
|
evaluateService.addEvaluation(evaluation);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 通过手机获取评价
|
||||||
|
* @param: phone
|
||||||
|
* @return: java.util.List<com.softegg.freetogo.Evaluate.bean.Evaluations>
|
||||||
|
* @author: zhanglinhao
|
||||||
|
* @date: 2024/5/12 0:30
|
||||||
|
*/
|
||||||
|
@GetMapping("evaluationByPhone")
|
||||||
|
public List<Evaluations> evaluationByPhone(String phone) {
|
||||||
|
return evaluateService.getEListByPhone(phone);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue