往sql语句中拼接数据

public void twxxList() {
			String twbh = getPara("data");
			if(twbh!=null &&!"".contentEquals(twbh)) {
			   twbh="and twbh='"+twbh+"'"; 
			  }else {
			   twbh="";
			  }
			  
		List<Record> record1 = Db.find("select * from chengyang_scbjt where 1=1 "+twbh+" ");
		//List<Record> record1 = Db.find("select * from chengyang_scbjt  ");

		renderJson(record1);
		
	}

  1

猜你喜欢

转载自www.cnblogs.com/snail8698428/p/11908786.html