package com.sien.common.controller;

import com.sien.common.service.DonationRecordService;
import io.geekidea.springbootplus.framework.common.controller.BaseController;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 捐款记录 控制器
 *
 * @author hewei
 * @since 2021-02-25
 */
@Slf4j
@RestController
@RequestMapping("/donationRecord")
@Api(value = "捐款记录API", tags = {"捐款记录"})
public class DonationRecordController extends BaseController {

    @Autowired
    private DonationRecordService donationRecordService;

//    /**
//     * 添加捐款记录
//     */
//    @PostMapping("/add")
//        @OperationLog(name = "添加捐款记录", type = OperationLogType.ADD)
//    @ApiOperation(value = "添加捐款记录")
//    public ApiResult<Boolean> addDonationRecord(@Validated(Add.class) @RequestBody DonationRecord donationRecord)throws Exception{
//            boolean flag= donationRecordService.saveDonationRecord(donationRecord);
//            return ApiResult.result(flag);
//            }

//    /**
//     * 修改捐款记录
//     */
//    @PostMapping("/update")
//        @OperationLog(name = "修改捐款记录", type = OperationLogType.UPDATE)
//    @ApiOperation(value = "修改捐款记录")
//    public ApiResult<Boolean> updateDonationRecord(@Validated(Update.class) @RequestBody DonationRecord donationRecord)throws Exception{
//            boolean flag= donationRecordService.updateDonationRecord(donationRecord);
//            return ApiResult.result(flag);
//            }
//
//    /**
//     * 删除捐款记录
//     */
//    @PostMapping("/delete/{id}")
//        @OperationLog(name = "删除捐款记录", type = OperationLogType.DELETE)
//    @ApiOperation(value = "删除捐款记录")
//    public ApiResult<Boolean> deleteDonationRecord(@PathVariable("id") Long id)throws Exception{
//            boolean flag= donationRecordService.deleteDonationRecord(id);
//            return ApiResult.result(flag);
//            }
//
//    /**
//     * 获取捐款记录详情
//     */
//    @GetMapping("/info/{id}")
//        @OperationLog(name = "捐款记录详情", type = OperationLogType.INFO)
//    @ApiOperation(value = "捐款记录详情")
//    public ApiResult<DonationRecordQueryVo> getDonationRecord(@PathVariable("id") Long id)throws Exception{
//            DonationRecordQueryVo donationRecordQueryVo = donationRecordService.getDonationRecordById(id);
//            return ApiResult.ok(donationRecordQueryVo);
//            }
//
//    /**
//     * 捐款记录分页列表
//     */
//    @PostMapping("/getPageList")
//        @OperationLog(name = "捐款记录分页列表", type = OperationLogType.PAGE)
//    @ApiOperation(value = "捐款记录分页列表")
//    public ApiResult<Paging<DonationRecordQueryVo>>getDonationRecordPageList(@Validated @RequestBody DonationRecordPageParam donationRecordPageParam)throws Exception{
//            Paging<DonationRecordQueryVo> paging = donationRecordService.getDonationRecordPageList(donationRecordPageParam);
//            return ApiResult.ok(paging);
//            }

}

