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"); } }
最近下载更多
genyuan2014 LV6
4月27日
wanglinddad LV55
3月14日
erqiu2013 LV18
2023年12月27日
微笑刺客 LV16
2023年11月21日
Seaskye LV14
2023年11月4日
ssh123 LV10
2023年9月28日
想飞的大肥猪 LV9
2023年8月2日
uni-code_0123 LV1
2023年7月19日
AlanLi LV18
2023年7月6日
dzlwindy LV8
2023年6月29日
最近浏览更多
kenhomeliu LV29
4月30日
genyuan2014 LV6
4月27日
2716804680 LV9
4月20日
educationAAA LV5
4月17日
op123129
4月15日
暂无贡献等级
微信网友_6927932988952576 LV12
3月30日
vluobo LV1
3月19日
kaye7549317
3月18日
暂无贡献等级
wanglinddad LV55
3月14日
uid0901 LV2
3月13日