mirror of
https://gitee.com/EMF/solon-manager.git
synced 2025-12-06 16:58:28 +08:00
146 lines
3.6 KiB
Java
146 lines
3.6 KiB
Java
package vip.fuck.sm.controller;
|
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
import io.swagger.annotations.Api;
|
|
import org.noear.solon.annotation.Controller;
|
|
import org.noear.solon.annotation.Get;
|
|
import org.noear.solon.annotation.Mapping;
|
|
import org.noear.solon.core.handle.ModelAndView;
|
|
import org.noear.solon.validation.annotation.Valid;
|
|
|
|
|
|
/**
|
|
* 视图
|
|
*
|
|
* @author xian.zi.ming@qq.com fuck.vip
|
|
* @version V1.0
|
|
* @date 2020年3月18日
|
|
*/
|
|
@Api(tags = "视图")
|
|
@Controller
|
|
@Mapping("")
|
|
@Valid
|
|
public class IndexController {
|
|
|
|
@Get @Mapping ("/index/login")
|
|
public ModelAndView login1(){
|
|
return this.loginIndex();
|
|
}
|
|
@Get @Mapping ( "/login")
|
|
public ModelAndView login2(){
|
|
return this.loginIndex();
|
|
}
|
|
@Get @Mapping ( "/")
|
|
public ModelAndView login3(){
|
|
return this.loginIndex();
|
|
}
|
|
|
|
public ModelAndView loginIndex() {
|
|
if (StpUtil.isLogin()) {
|
|
return new ModelAndView("/home.html");
|
|
}
|
|
return new ModelAndView("login.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/home")
|
|
public ModelAndView home() {
|
|
return this.loginIndex();
|
|
}
|
|
|
|
@Get @Mapping ("/index/users/password")
|
|
public ModelAndView updatePassword() {
|
|
return new ModelAndView("users/update_password.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/users/info")
|
|
public ModelAndView userDetail() {
|
|
return new ModelAndView("users/user_edit.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/menus")
|
|
public ModelAndView menusList() {
|
|
|
|
return new ModelAndView("menus/menu_list.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/roles")
|
|
public ModelAndView roleList() {
|
|
return new ModelAndView("roles/role_list.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/users")
|
|
public ModelAndView userList() {
|
|
return new ModelAndView("users/user_list.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/logs")
|
|
public ModelAndView logList() {
|
|
return new ModelAndView("logs/log_list.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/depts")
|
|
public ModelAndView deptList() {
|
|
return new ModelAndView("depts/dept_list.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/403")
|
|
public ModelAndView error403() {
|
|
return new ModelAndView("error/403.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/404")
|
|
public ModelAndView error404() {
|
|
return new ModelAndView("error/404.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/500")
|
|
public ModelAndView error405() {
|
|
return new ModelAndView("error/500.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/main")
|
|
public ModelAndView indexHome() {
|
|
return new ModelAndView( "main.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/about")
|
|
public ModelAndView about() {
|
|
return new ModelAndView("about.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/build")
|
|
public ModelAndView build() {
|
|
return new ModelAndView("build.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/sysContent")
|
|
public ModelAndView sysContent() {
|
|
return new ModelAndView("syscontent/list.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/sysDict")
|
|
public ModelAndView sysDict() {
|
|
return new ModelAndView("sysdict/list.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/sysGenerator")
|
|
public ModelAndView sysGenerator() {
|
|
return new ModelAndView("generator/list.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/sysJob")
|
|
public ModelAndView sysJob() {
|
|
return new ModelAndView("sysjob/list.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/sysJobLog")
|
|
public ModelAndView sysJobLog() {
|
|
return new ModelAndView("sysjoblog/list.html");
|
|
}
|
|
|
|
@Get @Mapping ("/index/sysFiles")
|
|
public ModelAndView sysFiles() {
|
|
return new ModelAndView("sysfiles/list.html");
|
|
}
|
|
}
|