怎么用birthday进行查询?
package com.imooc.action; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import com.imooc.dao.GoddessDao; import com.imooc.model.Goddess; public class GoddessAction { public static void main(String[] args) throws Exception { GoddessDao g = new GoddessDao(); Goddess g1 = new Goddess(); g1.setUser_name("小夏"); g1.setAge(28); g1.setSex(1); g1.setBirthday(new Date()); g1.setEmail("xiaoxia@163.com"); g1.setMobile("18211114444"); g1.setCreate_user("tudou"); g1.setUpdate_user("tudou"); g1.setIsdel(1); g1.setId(3); //g.updateGoddess(g1); //g.addGoddess(g1); //Goddess g2 = g.get(3); //System.out.println(g2.toString()); java.sql.Date birthday = new java.sql.Date(0); List<Map<String,Object>> params = new ArrayList<Map<String,Object>>(); Map<String,Object> param = new HashMap<String,Object>(); param.put("name","user_name"); param.put("rela", "="); param.put("value","小夏"); param = new HashMap<String,Object>(); param.put("name", "birthday"); param.put("rela", "="); param.put("value",birthday.valueOf("1990-01-01")); params.add(param); List<Goddess> result = g.query(params); for (int i = 0; i < result.size(); i++) { System.out.println(result.get(i).toString()); } } }
为什么这样查询不出结果呢