City.java 527 字节
package com.air.model;

import java.util.List;

import com.air.model.base.BaseCity;
import com.jfinal.kit.StrKit;

@SuppressWarnings("serial")
public class City extends BaseCity<City> {
	public static final City dao = new City();

	public String table() {
		return "WDS_"+getClass().getSimpleName();
	}

	public List<City> search(String code) {
		if (StrKit.isBlank(code) || code.length() < 2) {
			return null;
		}

		String sql = "select * from " + table() + " where cityCode like '%" + code + "%'";
		return find(sql);
	}
}