package com.ruoyi.web.controller.app;

import com.fasterxml.jackson.annotation.JsonView;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.JsonViewProfile;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.ss.receiveBill.domain.ReceiveBillQuery;
import com.ruoyi.ss.receiveBill.service.ReceiveBillService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wjh
 * 2024/8/7
 */
@RestController
@RequestMapping("/app/receiveBill")
public class AppReceiveBillController extends BaseController {

    @Autowired
    private ReceiveBillService receiveBillService;

    @ApiOperation("查询本人应付账单")
    @GetMapping("/list")
    @JsonView(JsonViewProfile.App.class)
    public TableDataInfo list(ReceiveBillQuery query) {
        query.setUserId(getUserId());
        startPage();
        return getDataTable(receiveBillService.selectReceiveBillList(query));
    }

}
