package com.fjhx.jushuitan.controller.jst;

import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.jushuitan.entity.jst.vo.JstOrderPayInfoVo;
import com.fjhx.jushuitan.entity.jst.dto.JstOrderPayInfoSelectDto;
import com.fjhx.jushuitan.entity.jst.dto.JstOrderPayInfoDto;
import com.ruoyi.common.core.domain.BaseSelectDto;
import com.fjhx.jushuitan.service.jst.JstOrderPayInfoService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * <p>
 * 聚水潭支付信息表 前端控制器
 * </p>
 *
 * @author 
 * @since 2024-01-20
 */
@RestController
@RequestMapping("/jstOrderPayInfo")
public class JstOrderPayInfoController {

    @Autowired
    private JstOrderPayInfoService jstOrderPayInfoService;

    /**
     * 聚水潭支付信息表列表
     */
    @PostMapping("/list")
    public List<JstOrderPayInfoVo> list(@RequestBody JstOrderPayInfoSelectDto dto) {
        return jstOrderPayInfoService.getList(dto);
    }

    /**
     * 聚水潭支付信息表分页
     */
    @PostMapping("/page")
    public Page<JstOrderPayInfoVo> page(@RequestBody JstOrderPayInfoSelectDto dto) {
        return jstOrderPayInfoService.getPage(dto);
    }

    /**
     * 聚水潭支付信息表明细
     */
    @PostMapping("/detail")
    public JstOrderPayInfoVo detail(@RequestBody BaseSelectDto dto) {
        return jstOrderPayInfoService.detail(dto.getId());
    }

    /**
     * 聚水潭支付信息表新增
     */
    @PostMapping("/add")
    public void add(@RequestBody JstOrderPayInfoDto jstOrderPayInfoDto) {
        jstOrderPayInfoService.add(jstOrderPayInfoDto);
    }

    /**
     * 聚水潭支付信息表编辑
     */
    @PostMapping("/edit")
    public void edit(@RequestBody JstOrderPayInfoDto jstOrderPayInfoDto) {
        jstOrderPayInfoService.edit(jstOrderPayInfoDto);
    }

    /**
     * 聚水潭支付信息表删除
     */
    @PostMapping("/delete")
    public void delete(@RequestBody BaseSelectDto dto) {
        jstOrderPayInfoService.delete(dto.getId());
    }

}
