package com.hssx.pcbms.controller;


import com.hssx.pcbms.entity.Goods;
import com.hssx.pcbms.entity.GoodsNo;
import com.hssx.pcbms.service.GoodsNoService;
import com.hssx.pcbms.util.HttpRespMsg;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author 吴涛涛
 * @since 2019-11-14
 */
@Controller
@RequestMapping("/goodsno")
public class GoodsNoController {

    @Autowired
    private GoodsNoService goodsNoService;


    /**
     * 上架/下架
     * 参数：
     * 上架 goodsId:设备id,frameId:机架对应的id
     * 下架 id:设备id
     *
     * @return
     */
    @ApiOperation(value = "资产基本信息修改", notes = "资产基本信息修改方法")
    @RequestMapping("/update")
    @ResponseBody
    public HttpRespMsg updateInfo(Goods goods,@RequestParam(required = false) Integer frameId) {
        HttpRespMsg msg = goodsNoService.updateInfo(goods,frameId);
        return msg;
    }



}

