You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
767 B
24 lines
767 B
package web.controller;
|
|
|
|
import db.form.DBAction;
|
|
import db.model.bilibili.MenuModel;
|
|
import org.hibernate.criterion.DetachedCriteria;
|
|
import org.hibernate.criterion.Order;
|
|
import org.hibernate.criterion.Property;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
@Controller
|
|
@RequestMapping("/menu")
|
|
public class MenuController extends BiliController<MenuModel> {
|
|
|
|
@Override
|
|
public boolean checkAction(DBAction action) {
|
|
return DBAction.R.equals(action);
|
|
}
|
|
|
|
@Override
|
|
protected DetachedCriteria getDetachedCriteria(MenuModel queryCommand) {
|
|
return super.getDetachedCriteria(queryCommand).add(Property.forName("menuLevel").eq(0)).addOrder(Order.asc("sort"));
|
|
}
|
|
}
|
|
|