package com.twitter.dao; import java.sql.Timestamp; import java.util.List; import com.twitter.pojo.Forwards; import com.twitter.util.DBUtil; public class ForwardsDao { public Forwards getForward(int tid, int uid) { String sql = "select fid,tid, stid from forwards where stid=? and uid=? limit 1"; List<Forwards> list = DBUtil.query(Forwards.class, sql, tid, uid); if (list.size() > 0) return list.get(0); return null; } public Forwards getForward(int tid, Timestamp ftime) { String sql = "select fid,tid, stid from forwards where tid=? and ftime=? limit 1"; List<Forwards> list = DBUtil.query(Forwards.class, sql, tid, ftime); if (list.size() > 0) return list.get(0); return null; } public boolean selForward(int uid, int stid) { String sql = "select fid,tid, stid,uid from forwards where uid=? and stid=? limit 1"; List<Forwards> list = DBUtil.query(Forwards.class, sql, uid, stid); if (list.size() > 0) { return true; } return false; } public int addForward(int tid, int stid, int uid, Timestamp ftime) { String sql = "insert into forwards(tid, stid, uid,ftime) values(?,?,?,?)"; int n = DBUtil.update(sql, tid, stid, uid, ftime); return n; } }

微信网友_7298640909209600 LV2
2024年12月22日
zolscy LV24
2024年11月28日
tiancj LV1
2024年11月14日
goccgoccgocc LV4
2024年5月9日
微信网友_6768521601667072 LV1
2023年12月7日
拜托你仔细听 LV3
2023年9月21日
hyy1362 LV1
2023年7月5日
罗清晨 LV13
2023年6月20日
543539666 LV7
2023年6月19日
qq3577025766 LV6
2022年4月24日

微信网友_7298640909209600 LV2
2024年12月22日
roshan LV3
2024年12月6日
zolscy LV24
2024年11月28日
tiancj LV1
2024年11月12日
张泽帅 LV6
2024年10月18日
Iterman LV2
2024年8月23日
Bill_Xiong
2024年5月24日
暂无贡献等级
goccgoccgocc LV4
2024年5月9日
3334004690 LV10
2024年3月20日
Gin19960217 LV4
2024年1月15日