首页>代码>spring+spring mvc+hibernate+bootstrap开发小型物业管理系统>/物业管理系统/propertysystem/src/com/www/controller/MaintainCategoryController.java
package com.www.controller; import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import com.google.gson.Gson; import com.www.service.MaintainCategoryService; import com.www.service.ProjectService; @Controller @RequestMapping("/category") public class MaintainCategoryController { @Resource private MaintainCategoryService categoryService; @RequestMapping(value ="/tojson") @ResponseBody protected List jsontest(HttpServletRequest request, HttpServletResponse response) throws Exception { System.out.println("进来了?。。。category jsontest。。"); String reqBody = request.getParameter("parentId"); System.out.println(reqBody+"req...................."); StringBuffer hql = new StringBuffer(" from Maintaincategory where 1=1 "); System.out.println(hql+"hql================"); List param = new ArrayList(); if(reqBody != null && !"".equals(reqBody)){ hql.append(" and parentId =?"); param.add(reqBody); System.out.println(param+"param'''''''''''''333==="); } List list=categoryService.findAll(hql.toString(), param.toArray()); System.out.println(list+">>>>>>>>>>>>>list"); return categoryService.findAll(hql.toString(), param.toArray()); } }
最近下载更多
A-sunny-day LV4
2023年6月11日
张真狗 LV9
2023年6月10日
wangjiedashuaige LV1
2023年3月1日
pangxiangdong LV4
2023年1月23日
2385649653 LV7
2022年11月2日
oulingqiao LV13
2022年10月20日
LYLHYC LV5
2022年10月12日
17683946472 LV9
2022年7月3日
邬松桥 LV11
2022年5月31日
地上有草 LV12
2022年5月11日
最近浏览更多
zhangxiyu LV3
前天
eagerwujin LV4
3月2日
OMITUUID LV6
2月26日
jiyun2021 LV9
1月24日
linXH_AiMo LV2
1月19日
lilong007 LV20
2023年12月30日
iiiiiiixiiiiii LV1
2023年12月28日
263648 LV7
2023年12月28日
gaiung LV2
2023年12月27日
草帽小小鸡 LV7
2023年12月23日