首页>代码>ssm百货商城销售管理系统 >/department_store/src/com/controller/admin/AdminGoodsController.java
package com.controller.admin;
import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import com.po.Goods;
import com.service.admin.AdminGoodsService;
@Controller
@RequestMapping("/adminGoods")
public class AdminGoodsController extends BaseController{
	@Autowired
	private AdminGoodsService adminGoodsService;
	@RequestMapping("/selectGoods")
	public String selectGoods(Model model, Integer pageCur, String act) {
		return adminGoodsService.selectGoods(model, pageCur, act);
	}
	/**
	 *add页面初始化
	 */
	@RequestMapping("/toAddGoods")
	public String toAddGoods(Model model){
		model.addAttribute("goods", new Goods());
		return "admin/addGoods";
	}
	/**
	 * 添加与修改
	 */
	@RequestMapping("/addGoods")
	public String addGoods(@ModelAttribute Goods goods, HttpServletRequest request, String updateAct){
		return adminGoodsService.addOrUpdateGoods(goods, request, updateAct);
	}
	/**
	 * 查询一个名片
	 */
	@RequestMapping("/selectAGoods")
	public String selectAGoods(Model model, Integer id, String act){
		return adminGoodsService.selectAGoods(model, id, act);
	}
	/**
	 *删除多个商品
	 */
	@RequestMapping("/deleteGoods")
	public String deleteGoods(Integer ids[], Model model) {
		return adminGoodsService.deleteGoods(ids, model);
	}
	/**
	 * 删除单个商品
	 */
	@RequestMapping("/deleteAGoods")
	public String deleteAGoods(Integer id, Model model) {
		return adminGoodsService.deleteAGoods(id, model);
	}
}
最近下载更多
taoshen95  LV16 2024年12月21日
lyt010628  LV4 2024年7月9日
ziwng5211314  LV8 2024年4月17日
xiongM  LV4 2024年4月1日
mds123456  LV2 2023年11月5日
wuying8208  LV15 2023年9月3日
lilily1119  LV4 2023年4月28日
answer123  LV8 2023年3月28日
jgkghj  LV2 2023年3月20日
xmx123  LV5 2023年2月26日
最近浏览更多
SX520886  LV6 4月24日
li1213458 4月16日
暂无贡献等级
ClintClint  LV1 3月31日
哪里的完整版  LV8 3月1日
meng123wei 1月6日
暂无贡献等级
xiaoaitx  LV8 1月1日
微信网友_7310057461567488 2024年12月24日
暂无贡献等级
三秋桂子  LV1 2024年12月21日
bankroll  LV5 2024年12月16日
WenMeng  LV9 2024年12月2日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友