package cn.estsh.i3plus.core.apiservice.controller.base;

import cn.estsh.i3plus.core.api.iservice.base.IDataSimpleService;
import cn.estsh.i3plus.platform.common.util.PlatformConstWords;
import cn.estsh.impp.framework.base.controller.CoreBaseController;
import cn.estsh.impp.framework.boot.util.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description :
 * @Reference :
 * @Author : alwaysfrin
 * @CreateDate : 2018-09-05 16:40
 * @Modify:
 **/
@RestController
@Api(tags="SimpleController",description="简单服务demo")
@RequestMapping(PlatformConstWords.BASE_URL +"/simple-service")
public class SimpleController extends CoreBaseController{
    private Logger LOGGER = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private IDataSimpleService dataSimpleService;

    @PutMapping(value="/insert")
    @ApiOperation(value="service服务",notes="返回内容添加service")
    public ResultBean insertFactory(@RequestParam("name")String name, @RequestParam("code")String code){
//        MachineFactory machineFactory = new MachineFactory();
//        machineFactory.setFactoryName(name);
//        machineFactory.setFactoryCode(code);
//        dataSimpleService.saveMachineFactory(machineFactory);

        return new ResultBean(true,"工厂已保存");
    }


}
