添加注释
This commit is contained in:
parent
5e032c11b4
commit
850b88dd97
@ -11,10 +11,10 @@ public class CommonDao {
|
||||
DataBaseUtil dataBaseUtil = new DataBaseUtil();
|
||||
public int delete(Connection ct, PreparedStatement ps, ResultSet rs,
|
||||
String sql, Long id) {
|
||||
|
||||
int flag;
|
||||
try {
|
||||
ct = dataBaseUtil.getConnection();
|
||||
// FIXME: 未对传入sql语句检测,可能有sql注入攻击
|
||||
ps = ct.prepareStatement(sql);
|
||||
ps.setLong(1, id);
|
||||
flag = ps.executeUpdate();
|
||||
|
Loading…
Reference in New Issue
Block a user