puzhibing
2023-03-18 b397b0aefc81cb0475d347ebad16e565254c06e2
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/THomePageController.java
New file
@@ -0,0 +1,49 @@
package com.stylefeng.guns.modular.system.controller.general;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.modular.system.service.IUserService;
import com.stylefeng.guns.modular.system.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Objects;
/**
 * 控制器
 *
 * @author fengshuonan
 * @Date 2023-03-14 15:15:19
 */
@Controller
@RequestMapping("/tHomePage")
public class THomePageController extends BaseController {
    @Autowired
    private IUserService userService;
    private String PREFIX = "/system/tHomePage/";
    /**
     * 跳转到地图
     */
    @RequestMapping("/map")
    public String map() {
        return PREFIX + "tHomePageMap.html";
    }
    /**
     * 跳转到地图
     */
    @RequestMapping("/statistics")
    public String statistics(Model model) {
        model.addAttribute("txt",new SimpleDateFormat("yyyy年MM月dd日").format(new Date()) + DateUtil.getWeekDay(new Date()) + ",欢迎" +
                Objects.requireNonNull(ShiroKit.getUser()).getName() + "登录");
        return PREFIX + "tHomePageStatistics.html";
    }
}