package com.crm.manager.controller;

import com.crm.manager.service.CustomFundHistoryFeignService;
import com.crm.manager.service.FinanceTrainFeignService;
import com.crm.rely.backend.core.constant.Constants;
import com.crm.rely.backend.core.constant.StatusConstants;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.model.dto.custom.fund.history.CustomFundHistoryDto;
import com.crm.rely.backend.model.dto.finance.train.FinanceTrainDto;
import com.crm.rely.backend.model.entity.custom.fund.history.CustomFundHistorySearchListEntity;
import com.crm.rely.backend.model.entity.finance.train.FinanceTrainApproveEntity;
import com.crm.rely.backend.model.entity.finance.train.FinanceTrainSearchListEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
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;


@RestController
@RequestMapping("/custom/fund/history")
public class CustomFundHistoryController {

    @Autowired
    private CustomFundHistoryFeignService service;


    @PostMapping("/search/list")
    public ResultWithPagerDto<CustomFundHistoryDto> searchList(@RequestBody @Validated CustomFundHistorySearchListEntity entity) throws Exception {

        ResultWithPagerDto<CustomFundHistoryDto> resultWithPagerDto = service.searchList(entity);
        return resultWithPagerDto;
    }


}