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