Spring jdbctemplate 中查询语句有IN 怎么传参数

private JdbcTemplate jt = null;

    public void setDataSource(DataSource dataSource) {
        jt = new JdbcTemplate(dataSource);
    }

 public void updateEmp(String task_id,String empid) throws Exception {
        String[] aa = empid.split(", ");
        String temp = null;
        for(int i = 0;i<aa.length;i++){
            String te="'"+aa[i]+"'";
            temp = te+","+temp;
            System.out.println(temp);
        }
        String sql = "update jmp_tb_task set  status=2 where task_id =? and empid in ("+temp+") and review=1";
        jt.update(sql,new Object[]{task_id,empid});
    }

这样传参有什么问题,为什么就是不执行

拼成string字符串的时候最后一个不应该加逗号,否则就成了 in (1,2,3,)这样肯定会报错

in()表示里面是个集合或者范围,传多个参数就行“,”隔开,或者传个集合进去就可以了