Skip to content

Commit

Permalink
sql注入修改
Browse files Browse the repository at this point in the history
  • Loading branch information
KeRan213539 committed Dec 12, 2019
1 parent 592385b commit b47cb1e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3181,7 +3181,9 @@ public void insertTenantInfoAtomic(String kp, String tenantId, String tenantName
* @return int
*/
public int countByTenantId(String tenantId){
return jt.queryForObject("select count(1) from tenant_info where tenant_id = '" + tenantId + "'", Integer.class);
String[] args = new String[1];
args[0] = tenantId;
return jt.queryForObject("select count(1) from tenant_info where tenant_id = ?", args, Integer.class);
}

/**
Expand Down

0 comments on commit b47cb1e

Please sign in to comment.