package com.crm.custom.controller;

import com.crm.custom.service.CustomLoginFirmOfferService;
import com.crm.login.rely.backend.controller.BaseLoginController;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.model.dto.custom.login.CustomLoginFirmOfferRollDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/roll")
public class CustomFirmOfferRollController extends BaseLoginController {
    @Autowired
    private CustomLoginFirmOfferService service;

    @PostMapping("/firm/offer/list")
    public BaseResultDto searchList() throws Exception {


        List<CustomLoginFirmOfferRollDto> dtos = service.rollList();

        return BaseResultDto.success(dtos);
    }

}
