xuhy
2023-03-16 7d914d51a902b3013a8ae27ee48239821d766e4d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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";
    }
 
}