package com.yida.data.device.consume.controller;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.consume.EduStudentConsumeCard;
import com.yida.data.device.consume.service.EduStudentConsumeCardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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;

/**
 * 学生消费机信息管理Controller
 *
 * @author ZYJ
 * @date 2023-03-14 18:02:27
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("consumeCard")
@Api(tags = "学生消费机信息管理api")
public class EduStudentConsumeCardController {

    private final EduStudentConsumeCardService eduStudentConsumeCardService;

    @ApiOperation("保存学生消费机信息")
    @PostMapping("/saveConsumeCard")
    public ResultBean<String> saveConsumeCard(@RequestBody EduStudentConsumeCard eduStudentConsumeCard) {
        eduStudentConsumeCardService.saveConsumeCard(eduStudentConsumeCard);
        return ResultBean.buildSuccess();
    }
}
