zl程序教程

您现在的位置是:首页 >  前端

当前栏目

ssm框架+easyUI模糊搜索。详解编程语言

EasyUI搜索框架编程语言 详解 SSM 模糊
2023-06-13 09:20:38 时间
@ResponseBody public String findByTilte(@RequestParam(value = "title",required = false)String title){ List MessPublish List = MessPubservice.findByTitle(title); String json = ""; int total = MessPubservice.total(); Map map = new HashMap String, Object map.put("total", total); map.put("rows", List); json = JSONObject.fromObject(map).toString(); return json; }



控制器里写入这个方法easyUI控件比较智能会根据你输出的值判断

 List MessPublish findByTitle(String title); 业务层方法
@Override 

 public List MessPublish findByTitle(String title) { 

 List MessPublish find = mapper.findByTitle(title); 业务层实现方法比较简单 

 return find; 

 }
List MessPublish findByTitle(String title); mapper 里面写的方法
 select id="findByTitle" parameterType="String" resultType="MessPublish" 

 select ID,Title,MessContent,CreateTime,TypeID,CorpID,UserName,UserID,ModifyTime,CheckState,CheckTime,CheckID,CheckRemark,Mess_Fujian from Mes_publish 

 where 

 if test=" _parameter!=null and _parameter!= " 

 and Title like %+#{_parameter}+% 

 /if 

 /where 

 /select 


上面为mapper里面的select 语句片段好了,记录到这。最后来前台展示

ssm框架+easyUI模糊搜索。详解编程语言

好了记录完活。最后希望大家不要感冒,最近头疼的厉害,写代码完全没有思路。



原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/13155.html

cjava