接口优化
This commit is contained in:
parent
a9b920e8bd
commit
2cd7d304a4
|
|
@ -69,7 +69,19 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
json.put("code", Constants.SUCCESS);
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
* @return 成功消息
|
||||
*/
|
||||
public static AjaxResult success(Object object)
|
||||
{
|
||||
AjaxResult json = new AjaxResult();
|
||||
json.put("msg", "成功");
|
||||
json.put("code", Constants.SUCCESS);
|
||||
json.put("data", object);
|
||||
return json;
|
||||
}
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class ApiPracticeController extends BaseController {
|
|||
|
||||
|
||||
@PostMapping("/list")
|
||||
public AjaxResult list(ExamPractice examPractice) {
|
||||
public AjaxResult list(@RequestBody ExamPractice examPractice) {
|
||||
|
||||
List<ExamPractice> list = examPracticeService.selectListFromWeb(examPractice);
|
||||
AjaxResult success = success("查询成功");
|
||||
|
|
|
|||
Loading…
Reference in New Issue