package com.dsh.account.controller;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.dsh.account.entity.TStudent;
|
import com.dsh.account.service.TStudentService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
|
/**
|
* @author zhibing.pu
|
* @date 2023/6/24 14:59
|
*/
|
@RestController
|
@RequestMapping("")
|
public class StudentController {
|
|
@Autowired
|
private TStudentService studentService;
|
|
|
/**
|
* 获取用户学员列表
|
* @param appUserId
|
* @return
|
*/
|
@ResponseBody
|
@PostMapping("/student/queryStudentList")
|
public List<TStudent> queryStudentList(@RequestBody Integer appUserId){
|
try {
|
List<TStudent> list = studentService.list(new QueryWrapper<TStudent>().eq("appUserId", appUserId).eq("state", 1));
|
return list;
|
}catch (Exception e){
|
e.printStackTrace();
|
return new ArrayList<>();
|
}
|
}
|
}
|