package com.nq.controller.backend;
|
|
import com.nq.common.ServerResponse;
|
import com.nq.pojo.StockConfig;
|
import com.nq.service.IStockConfigServices;
|
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;
|
|
@Controller
|
@RequestMapping({"/admin/stock/config"})
|
public class AdminStockConfigController {
|
|
|
|
@Autowired
|
IStockConfigServices stockConfigServices;
|
|
@RequestMapping({"updateConfig.do"})
|
@ResponseBody
|
public ServerResponse updateConfig(StockConfig stockConfig){
|
return stockConfigServices.updateStockConfig(stockConfig);
|
}
|
|
|
@RequestMapping({"queryStockConfig.do"})
|
@ResponseBody
|
public ServerResponse updateConfig(@RequestParam(value = "desc",required = false) String desc){
|
return stockConfigServices.queryAll(desc);
|
|
}
|
|
}
|