package controllers.data; import java.util.Map; import models.Depot; import com.et.mvc.JsonView; import com.et.mvc.View; import controllers.ApplicationController; public class DepotController extends ApplicationController{ public void index(){ } public View getItems() throws Exception{ return new JsonView(Depot.findAll(Depot.class)); } public View save(Depot item) throws Exception{ item.save(); return new JsonView(item); } public View update(int id, Map<String,Object> params) throws Exception{ Depot item = Depot.find(Depot.class, id); item = Depot.updateModel(item, params); item.save(); return new JsonView(item); } public View destroy(int id) throws Exception{ Depot item = Depot.find(Depot.class, id); item.destroy(); return new JsonView("success:true"); } }

hubugai1 LV11
4月25日
天涯过客JC LV1
4月15日
lhm789 LV6
2024年10月26日
233002037 LV3
2024年10月12日
educationAAA LV11
2024年5月17日
genyuan2014 LV6
2024年4月27日
wanglinddad LV55
2024年3月14日
erqiu2013 LV18
2023年12月27日
微笑刺客 LV21
2023年11月21日
Seaskye LV14
2023年11月4日

ES大兵 LV11
6月12日
暂无贡献等级
hubugai1 LV11
4月24日
付洋麟 LV5
4月23日
天涯过客JC LV1
4月15日
微信网友_6040315240812544 LV8
3月21日
weishenme1993 LV9
1月1日
sshiqi LV2
2024年12月11日
yimaoermao LV1
2024年11月28日
驱蚊器我
2024年11月18日
暂无贡献等级