admin
2021-04-03 32d6c2ea8039b4771fd6b1ded8b022733e32352f
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
50
51
52
53
54
55
package com.yeshi.buwan.util;
 
import com.yeshi.buwan.domain.system.DetailSystem;
import com.yeshi.buwan.domain.system.SystemInfo;
 
import javax.servlet.http.HttpSession;
 
public class SystemUtil {
 
    public static long getDetailSystemId() {
        return 44L;
    }
 
    public static DetailSystem getDetailSystem() {
        return new DetailSystem(44 + "");
    }
 
    /**
     * 获取默认版本
     *
     * @return
     */
    public static int getDefaultVersion() {
        return 1;
    }
 
 
    /**
     * 获取system
     *
     * @param session
     * @return
     */
    public static SystemInfo getAdminSelectedSystem(HttpSession session) {
        SystemInfo systemInfo = (SystemInfo) session.getAttribute("SELECTED-SYSTEM");
        return systemInfo;
    }
 
 
    public static String getAdminSelectedSystemId(HttpSession session) {
        return getAdminSelectedSystem(session).getId();
    }
 
    /**
     * 保存System
     *
     * @param session
     * @param systemInfo
     */
    public static void saveAdminSelectedSystem(HttpSession session, SystemInfo systemInfo) {
        session.setAttribute("SELECTED-SYSTEM", systemInfo);
    }
 
 
}