学生钱包和预定
This commit is contained in:
parent
9da0165cad
commit
20f44f06ee
@ -0,0 +1,72 @@
|
|||||||
|
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.ReservationDTO;
|
||||||
|
import com.wjbl.weightlosscamp.service.api.module.student.service.ReservationService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
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 ReservationController {
|
||||||
|
|
||||||
|
private ReservationService reservationService;
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "新增预定")
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ApiResult<Void> add(@Valid @RequestBody ReservationDTO dto) {
|
||||||
|
return reservationService.add(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "预定详情")
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public ApiResult<Void> detail(@Valid @RequestBody IdParam idParam) {
|
||||||
|
return reservationService.detail(idParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "预定取消")
|
||||||
|
@PostMapping("/cancel")
|
||||||
|
public ApiResult<Void> cancel(@Valid @RequestBody IdParam idParam) {
|
||||||
|
return reservationService.cancel(idParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "分页查询预定")
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ApiResult<Page<ReservationDTO>> list(@Valid @RequestBody PageParam<ReservationDTO> param) {
|
||||||
|
return reservationService.list(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "生成付款")
|
||||||
|
@PostMapping("payment/gen")
|
||||||
|
public ApiResult<Void> addFlow(@Valid @RequestBody ReservationDTO dto) {
|
||||||
|
return reservationService.genPayment(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "付款回调")
|
||||||
|
@PostMapping("payment/callback")
|
||||||
|
public ApiResult<Page<ReservationDTO>> payCallback(@Valid @RequestBody PageParam<ReservationDTO> param) {
|
||||||
|
return reservationService.payCallback(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
/**
|
/**
|
||||||
* 学员信息控制器
|
* 学员信息控制器
|
||||||
*/
|
*/
|
||||||
@Tag(name = "学员")
|
@Tag(name = "学员信息")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("student")
|
@RequestMapping("student")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -33,7 +33,7 @@ public class StudentController {
|
|||||||
|
|
||||||
@Operation(summary = "成员登录")
|
@Operation(summary = "成员登录")
|
||||||
@PostMapping("login")
|
@PostMapping("login")
|
||||||
public ApiResult<Void> login(@Valid @RequestBody MemberDTO dto) {
|
public ApiResult<Void> login(@Valid @RequestBody StudentDTO dto) {
|
||||||
return studentService.login(dto);
|
return studentService.login(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,59 @@
|
|||||||
|
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.PageParam;
|
||||||
|
import com.wjbl.weightlosscamp.service.api.module.student.dto.WalletDTO;
|
||||||
|
import com.wjbl.weightlosscamp.service.api.module.student.service.WalletService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
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 WalletController {
|
||||||
|
|
||||||
|
private WalletService walletService;
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "新增钱包")
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ApiResult<Void> add(@Valid @RequestBody WalletDTO dto) {
|
||||||
|
return walletService.add(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "分页查询钱包")
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ApiResult<Page<WalletDTO>> list(@Valid @RequestBody PageParam<WalletDTO> param) {
|
||||||
|
return walletService.list(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "新增钱包流水")
|
||||||
|
@PostMapping("flow/add")
|
||||||
|
public ApiResult<Void> addFlow(@Valid @RequestBody WalletDTO dto) {
|
||||||
|
return walletService.addFlow(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "分页查询钱包流水")
|
||||||
|
@PostMapping("flow/list")
|
||||||
|
public ApiResult<Page<WalletDTO>> listFlow(@Valid @RequestBody PageParam<WalletDTO> param) {
|
||||||
|
return walletService.listFlow(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 ReservationDTO {
|
||||||
|
}
|
||||||
@ -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 WalletDTO {
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
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.ReservationDTO;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
|
public class ReservationService {
|
||||||
|
public ApiResult<Void> add(@Valid ReservationDTO dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Void> detail(@Valid IdParam idParam) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Void> cancel(@Valid IdParam idParam) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Page<ReservationDTO>> list(@Valid PageParam<ReservationDTO> param) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Void> genPayment(@Valid ReservationDTO dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Page<ReservationDTO>> payCallback(@Valid PageParam<ReservationDTO> param) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -29,7 +29,7 @@ public class StudentService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApiResult<Void> login(@Valid MemberDTO dto) {
|
public ApiResult<Void> login(@Valid StudentDTO dto) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,26 @@
|
|||||||
|
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.PageParam;
|
||||||
|
import com.wjbl.weightlosscamp.service.api.module.student.dto.WalletDTO;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
|
public class WalletService {
|
||||||
|
public ApiResult<Void> add(@Valid WalletDTO dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Page<WalletDTO>> list(@Valid PageParam<WalletDTO> param) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Void> addFlow(@Valid WalletDTO dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResult<Page<WalletDTO>> listFlow(@Valid PageParam<WalletDTO> param) {
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user