view层查询的问题,求大神解答
这个values的值怎么改成由in输入(控制台输入女神姓名,手机号)
这个values的值怎么改成由in输入(控制台输入女神姓名,手机号)
2018-06-10
if (OPERATION_SEARCH.equals(a.toUpperCase()) || OPERATION_SEARCH.substring(0, 1).equals(a.toUpperCase())
|| OPERATION_SEARCH.equals(string)) {
string=OPERATION_SEARCH;
System.out.println("请输入姓名:(支持模糊查询)");
String s1=dllx.next();
System.out.println("请输入手机号码:(支持模糊查询)");
String s2=dllx.next();
List<Map<String, Object>> list2= new ArrayList<Map<String, Object>>();
Map<String, Object> map=new HashMap<String, Object>();
map.put("name", "user_name");
map.put("relation", "like");
map.put("value", "'%"+s1+"%'");
list2.add(map);
map=new HashMap<String, Object>();
map.put("name", "mobile");
map.put("relation", "like");
map.put("value", "'%"+s2+"%'");
list2.add(map);
List<Goddess> list3 = rt.query(list2);
for (Goddess god : list3) {
System.out.println(god.toString());
}
}
举报