package com.uas.finance.controller;

import com.uas.finance.service.BusinessConditionService;
import com.uas.finance.model.BusinessCondition;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;

/**
 * 情况描述表单有关操作
 * created by shicr on 2017/12/21
 **/
@Controller
@RequestMapping("/businesscondition")
public class BusinessConditionController {

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

    @Autowired
    private BusinessConditionService businessConditionService;

    /**
     * 情况描述表单保存
     *
     * @param businessCondition
     * @return
     */
    @RequestMapping(value = "/save", method = RequestMethod.POST)
    @ResponseBody
    public BusinessCondition save(@RequestBody BusinessCondition businessCondition) {
        logger.info("情况描述表单保存", "success");
        return businessConditionService.save(businessCondition);
    }
}
