package com.mcwl.web.controller.communityCenter;

import com.mcwl.common.core.domain.R;
import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.communityCenter.domain.IncomeInfo;
import com.mcwl.communityCenter.domain.dto.*;
import com.mcwl.communityCenter.domain.vo.IncomeInfoVo;
import com.mcwl.communityCenter.service.IncomeInfoService;
import com.mcwl.communityCenter.service.PublishCollectService;
import com.mcwl.communityCenter.service.PublishService;
import com.mcwl.communityCenter.service.QuestionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * 收益明细
 */
@Api(tags = "收益明细")
@RestController
@RequiredArgsConstructor
@RequestMapping("incomeInfo")
public class IncomeInfoController {

    private final IncomeInfoService incomeInfoService;


    /**
     * 明细列表
     */
    @ApiOperation(value = "明细列表")
    @PostMapping("incomeList")
    public TableDataInfo incomeList(@Valid @RequestBody IncomeInfoListPageRes incomeInfoListPageRes) {
        return incomeInfoService.incomeList(incomeInfoListPageRes);
    }



    /**
     * 社区收益
     */
    @ApiOperation(value = "社区收益")
    @GetMapping("communityIncome")
    public R<IncomeInfoVo> communityIncome() {
        return incomeInfoService.communityIncome();
    }


}
