package com.uas.finance.controller;

import com.uas.finance.model.FsSale;
import com.uas.finance.service.FsSaleService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 基础合同控制层
 * created by shicr on 2018/1/25
 **/
@RequestMapping("/fssale")
@RestController
public class FsSaleController {

    private final static Logger logger = LoggerFactory.getLogger(FsSaleController.class);

    @Autowired
    private FsSaleService fsSaleService;

    /**
     * 基础合同保存
     *
     * @param fsSales
     * @return
     */
    @RequestMapping(value = "/save", method = RequestMethod.POST)
    public List<FsSale> save(@RequestBody List<FsSale> fsSales) {
        logger.info("基础合同保存", "成功");
        List<FsSale> fsSaleList = fsSaleService.save(fsSales);
        return fsSaleList;
    }
}
