XMTT лет назад: 5
Родитель
Сommit
13f39fd879

+ 2 - 2
src/main/java/com/ekexiu/project/msconsole/system/service/SysService.java

72
72
73
    @Path("/user")
73
    @Path("/user")
74
    @Get
74
    @Get
75
    public SessionUser get(@LoginUser SessionUser user) {
75
    public SessionUser get(@LoginUser(false) SessionUser user) {
76
        return user;
76
        return user;
77
    }
77
    }
78
78
84
        for (; ; ) {
84
        for (; ; ) {
85
            double random = ((Math.random() * 9 + 1) * 100000);
85
            double random = ((Math.random() * 9 + 1) * 100000);
86
            account = Double.toString(random);
86
            account = Double.toString(random);
87
            Hospital hospital1 = hospitalDao.queryByAccount(con, account, id);
87
            Hospital hospital1 = hospitalDao.queryByAccount(con, account.substring(0,6), id);
88
            if (hospital1 == null) {
88
            if (hospital1 == null) {
89
                break;
89
                break;
90
            }
90
            }

+ 1 - 2
src/main/java/com/ekexiu/project/msconsole/system/vo/SessionUser.java

21
21
22
    @Override
22
    @Override
23
    public boolean hasAuthority(int i) {
23
    public boolean hasAuthority(int i) {
24
        return false;
24
        return true;
25
    }
25
    }
26
26
27
    @Override
28
    public String getId() {
27
    public String getId() {
29
        return id;
28
        return id;
30
    }
29
    }

+ 7 - 0
src/main/webapp/WEB-INF/web.xml

26
        <servlet-name>ajax</servlet-name>
26
        <servlet-name>ajax</servlet-name>
27
        <url-pattern>/ajax/*</url-pattern>
27
        <url-pattern>/ajax/*</url-pattern>
28
    </servlet-mapping>
28
    </servlet-mapping>
29
    <session-config>
30
        <cookie-config>
31
            <name>JSES_MS_M</name>
32
            <http-only>true</http-only>
33
            <path>/</path>
34
        </cookie-config>
35
    </session-config>
29
</web-app>
36
</web-app>