@Override public List<AutoWidget> getAutoWidgets(int widgetTypeId) { AutoWidgetExample query = new AutoWidgetExample(); if (widgetTypeId > 0) { query.createCriteria().andTypeEqualTo(widgetTypeId); } List<AutoWidget> list = autoWidgetMapper.selectByExample(query); return list; }
@Override public SearchItem getSearchItem() { // 获取配件搜索项 List<AutoBrand> brands = autoBrandMapper.selectByExample(null); List<AutoType> types = autoTypeMapper.selectByExample(null); List<AutoWidgetType> widgetTypes = autoWidgetTypeMapper.selectByExample(null); List<AutoWidget> widgets = autoWidgetMapper.selectByExample(null); SearchItem searchItem = new SearchItem(brands, types, widgetTypes, widgets); return searchItem; }
@Override public AutoWidget getAutoWidgetByKey(int widgetId) { return autoWidgetMapper.selectByPrimaryKey(widgetId); }