学生基础信息
This commit is contained in:
parent
d11c76f969
commit
bce1c398dc
@ -0,0 +1,71 @@
|
|||||||
|
package com.wjbl.weightlosscamp.service.api.module.student.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.wjbl.weightlosscamp.api.base.core.ApiResult;
|
||||||
|
import com.wjbl.weightlosscamp.api.base.core.IdParam;
|
||||||
|
import com.wjbl.weightlosscamp.api.base.core.PageParam;
|
||||||
|
import com.wjbl.weightlosscamp.service.api.module.student.dto.BalanceRefundDTO;
|
||||||
|
import com.wjbl.weightlosscamp.service.api.module.student.dto.StudentDTO;
|
||||||
|
import com.wjbl.weightlosscamp.service.api.module.student.service.StudentService;
|
||||||
|
import com.wjbl.weightlosscamp.service.api.module.sys.dto.MemberDTO;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学员信息控制器
|
||||||
|
*/
|
||||||
|
@Tag(name = "学员")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("student")
|
||||||
|
@Slf4j
|
||||||
|
@Setter
|
||||||
|
public class StudentController {
|
||||||
|
|
||||||
|
private StudentService studentService;
|
||||||
|
|
||||||
|
@Operation(summary = "成员登录")
|
||||||
|
@PostMapping("login")
|
||||||
|
public ApiResult<Void> login(@Valid @RequestBody MemberDTO dto) {
|
||||||
|
return studentService.login(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "新增学员")
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ApiResult<Void> add(@Valid @RequestBody StudentDTO dto) {
|
||||||
|
return studentService.add(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "编辑学员")
|
||||||
|
@PostMapping("/edit")
|
||||||
|
public ApiResult<Void> edit(@Valid @RequestBody StudentDTO dto) {
|
||||||
|
return studentService.edit(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "分页查询学员")
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ApiResult<Page<StudentDTO>> list(@Valid @RequestBody PageParam<StudentDTO> param) {
|
||||||
|
return studentService.list(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "切换学员状态")
|
||||||
|
@PostMapping("/switch-status")
|
||||||
|
public ApiResult<Void> switchStatus(@Valid @RequestBody IdParam param) {
|
||||||
|
return studentService.switchStatus(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "绑定企业微信")
|
||||||
|
@PostMapping("/bind-corp-wx")
|
||||||
|
public ApiResult<Void> bindCorpWx(@Valid @RequestBody IdParam param) {
|
||||||
|
return studentService.bindCorpWx(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package com.wjbl.weightlosscamp.service.api.module.student.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "学员DTO")
|
||||||
|
public class StudentDTO {
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package com.wjbl.weightlosscamp.service.api.module.student.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.wjbl.weightlosscamp.api.base.core.ApiResult;
|
||||||
|
import com.wjbl.weightlosscamp.api.base.core.IdParam;
|
||||||
|
import com.wjbl.weightlosscamp.api.base.core.PageParam;
|
||||||
|
import com.wjbl.weightlosscamp.service.api.module.student.dto.StudentDTO;
|
||||||
|
import com.wjbl.weightlosscamp.service.api.module.sys.dto.MemberDTO;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
|
public class StudentService {
|
||||||
|
public ApiResult<Void> add(@Valid StudentDTO dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Void> edit(@Valid StudentDTO dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Page<StudentDTO>> list(@Valid PageParam<StudentDTO> param) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Void> switchStatus(@Valid IdParam param) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Void> bindCorpWx(@Valid IdParam param) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Void> login(@Valid MemberDTO dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user