本来是增加记录的,结果却是把表记录查询list,为啥...
@RequestMapping(value="/addorderroominfo",method = RequestMethod.POST)@ResponseBody
public String wxBuysDhroominfo(HttpServletRequest request, HttpServletResponse response) {
// AjaxJson j = new AjaxJson();
String message = "添加成功";
try{
TabBookroomPskEntity tabBookroominfo = new TabBookroomPskEntity();
tabBookroominfo.setId(request.getParameter("id"));
tabBookroominfo.setSysOrgCode(request.getParameter("sysOrgCode"));
tabBookroominfo.setBooker(request.getParameter("xm"));
// tabBookroominfo.setRoomcheckin();
//增加订单明细信息
TabBookroomPskMxEntity tabSdhroominfoMx = new TabBookroomPskMxEntity();
tabSdhroominfoMx.setId(request.getParameter("mxid"));
tabSdhroominfoMx.setSysOrgCode(request.getParameter("sysOrgCode"));
tabSdhroominfoMx.setBookid(request.getParameter("id"));
tabSdhroominfoMx.setRoomtypedesc(request.getParameter("roomdesc"));
tabSdhroominfoMx.setRoomtypeid(request.getParameter("roomtypeid"));
tabSdhroominfoMx.setRoomnum(Integer.valueOf(request.getParameter("roomnum")));
? admin 发表于 2018-7-4 16:10 static/image/common/back.gif
?
看代码应该是增加记录 ,却是查询结果......
这是自己写的代码,请自己分析 luckystar 发表于 2018-7-4 16:52 static/image/common/back.gif
看代码应该是增加记录 ,却是查询结果......
随便定义一个方法都是返回entity内数据的json,好奇怪的框架啊。。。。。。
@RequestMapping(value="/addorderroominfo",method = RequestMethod.POST)
@ResponseBody
public void wxBuysDhroominfo(HttpServletRequest request, HttpServletResponse response) {
// AjaxJson j = new AjaxJson();
String message = "添加成功";
} admin 发表于 2018-7-4 18:11 static/image/common/back.gif
这是自己写的代码,请自己分析
和我自己的代码不相干,一行代码没有一样返回json!! @ResponseBody
自学一下springmvc admin 发表于 2018-7-5 09:35 static/image/common/back.gif
@ResponseBody
自学一下springmvc
和@ResponseBody这个没有关系,不知道框架在什么地方设置了啥,以下的代码一样返回entity的json
@RequestMapping(params = "addroominfo",method = RequestMethod.POST)
public void addroominfo(HttpServletRequest request, HttpServletResponse response){
}
页:
[1]