public String ignoreRel() //忽略好友描述请求
{
reqlist.clear();
response.setContentType("text/xml;charset=UTF-8");
response.setHeader("Cache-Control", "no-cache");
response.setCharacterEncoding("UTF-8");
Friendsinvite friendinvite=firendsinviteDAO.findById(Long.parseLong(fid));
id=fid;
if(friendinvite!=null)
{
friendinvite.setStatus(Long.parseLong("-1"));
firendsinviteDAO.merge(friendinvite);
flag=1;
}
List<Friendsinvite> desreqlist=new ArrayList();
String hql="from Friendsinvite friendsinvite where friendsinvite.receiverid="+request.getSession().getAttribute("nid")+" and friendsinvite.status='5'";
desreqlist=(ArrayList<Friendsinvite>) firendsinviteDAO.findByHql(hql);
desreqnum=desreqlist.size();
String s="{\"id\":\""+id+"\",\"flag\":\""+flag+"\",\"desreqnum\":\""+desreqnum+"\"}";
try {
response.getWriter().print(s);
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
{
reqlist.clear();
response.setContentType("text/xml;charset=UTF-8");
response.setHeader("Cache-Control", "no-cache");
response.setCharacterEncoding("UTF-8");
Friendsinvite friendinvite=firendsinviteDAO.findById(Long.parseLong(fid));
id=fid;
if(friendinvite!=null)
{
friendinvite.setStatus(Long.parseLong("-1"));
firendsinviteDAO.merge(friendinvite);
flag=1;
}
List<Friendsinvite> desreqlist=new ArrayList();
String hql="from Friendsinvite friendsinvite where friendsinvite.receiverid="+request.getSession().getAttribute("nid")+" and friendsinvite.status='5'";
desreqlist=(ArrayList<Friendsinvite>) firendsinviteDAO.findByHql(hql);
desreqnum=desreqlist.size();
String s="{\"id\":\""+id+"\",\"flag\":\""+flag+"\",\"desreqnum\":\""+desreqnum+"\"}";
try {
response.getWriter().print(s);
} catch (IOException e) {
e.printStackTrace();
}
return null;
}