private DetachedCriteria makeCriteria(Map<String, Object> condition) {
        DetachedCriteria criteria = DetachedCriteria.forClass(Module.class);

        if (condition == null) {
            return criteria;
        }

        if (condition.containsKey("module_type")) {
            criteria.add(Restrictions.eq("moduleType", condition.get("module_type")));
        }

        if (condition.containsKey("module_name")) {
            criteria.add(Restrictions.ilike("moduleName", condition.get("module_name").toString(), MatchMode.ANYWHERE));
        }

        return criteria;
    }