首页>代码>基于spring+springMVC+mybatis+easyui技术实现的医药后台管理系统>/MMS/src/main/java/mms/controller/ClientController.java
package mms.controller;

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 mms.pojo.Client;
import mms.pojo.EasyUIResult;
import mms.services.ClientService;

@RequestMapping("Client")
@Controller
public class ClientController {
	// 顾客controller
	@Autowired
	// 注入service
	private ClientService clientService;

	// 按编号查询
	@RequestMapping("GetClient")
	@ResponseBody
	public Client queryClientBycno(String cno) {
		Client client = clientService.queryClientBycno(cno);
		return client;
	}

	// 按编号删除
	@RequestMapping("DeleteClient")
	@ResponseBody
	public void deleteClientBycno(String cno) {
		clientService.deleteClientBycno(cno);
	}
//	批量删除
	@RequestMapping(value = "DeleteRows", produces = "text/html;charset=UTF-8")
	@ResponseBody
	public String deleteClientByRows(
			@RequestParam(value = "array[]") String[] array) {
		return clientService.deleteClientByRows(array);
		
//		clientService.deleteClientBycno(cno);
	}

	// 保存顾客信息
	@RequestMapping(value = "SaveClient", produces = "text/html;charset=UTF-8")
	@ResponseBody
	public String saveClient(Client client) {
		return clientService.saveClient(client);
	}

	@RequestMapping("GetMessage")
	@ResponseBody
	// easyui返回json
	public EasyUIResult queryAllClient(@RequestParam(value = "page", defaultValue = "1") Integer page,
			@RequestParam(value = "rows", defaultValue = "5") Integer rows) {
		EasyUIResult queryAllClient = clientService.queryAllClient(page, rows);
		return queryAllClient;
	}

	// 修改客户信息
	@RequestMapping(value = "ModifyClient", produces = "text/html;charset=UTF-8")
	@ResponseBody
	public String modifyClient(Client client) {
		return clientService.modifyClient(client);
	}
}
最近下载更多
fellowfun  LV12 2023年12月4日
KAIzx11  LV7 2023年6月15日
LITIANYU084414  LV11 2023年1月4日
wcy071213  LV27 2022年12月8日
2931765614  LV2 2022年11月4日
testuser1234567  LV24 2022年6月30日
葡萄树下酒庄  LV9 2022年1月4日
幸运疯子  LV13 2021年12月20日
hulahula123  LV4 2021年12月16日
893213895  LV18 2021年12月16日
最近浏览更多
苯科仔 2024年12月16日
暂无贡献等级
krispeng  LV14 2024年11月19日
Sean_admin  LV7 2024年8月8日
fengst 2024年6月18日
暂无贡献等级
大魔王help 2024年6月11日
暂无贡献等级
飃go with wind 2024年5月7日
暂无贡献等级
WBelong  LV8 2024年4月2日
微信网友_6914427966033920  LV4 2024年3月19日
superqi 2024年1月1日
暂无贡献等级
夜起星河  LV8 2023年12月29日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友