Browse Source

引入ipu-cache替换wade-cache,使用ipu-cache的ICache替换ipu-server-web的ICache

weihf 6 years ago
parent
commit
a0da43b40f

+ 8 - 4
display-server/pom.xml.boot

@ -214,7 +214,11 @@
214 214
					</exclusion>
215 215
				</exclusions>
216 216
			</dependency>
217
217
            <dependency>
218
			<groupId>com.ai.ipu</groupId>
219
			<artifactId>ipu-cache</artifactId>
220
			<version>${ipu}</version>
221
		    </dependency>
218 222
			<dependency>
219 223
				<!-- 不推荐使用,推荐使用wade-mobile-data -->
220 224
				<groupId>com.ai.wade</groupId>
@ -332,12 +336,12 @@
332 336
			<artifactId>ipu-file-system</artifactId>
333 337
		</dependency>
334 338
		<dependency>
335
			<groupId>com.ai.wade</groupId>
336
			<artifactId>wade-data</artifactId>
339
			<groupId>com.ai.ipu</groupId>
340
			<artifactId>ipu-cache</artifactId>
337 341
		</dependency>
338 342
		<dependency>
339 343
			<groupId>com.ai.wade</groupId>
340
			<artifactId>wade-cache</artifactId>
344
			<artifactId>wade-data</artifactId>
341 345
		</dependency>
342 346
		<dependency>
343 347
			<groupId>com.ai.wade</groupId>

+ 7 - 2
display-server/pom.xml.tomcat

@ -79,13 +79,18 @@
79 79
			<artifactId>ipu-file-system</artifactId>
80 80
		</dependency>
81 81
		<dependency>
82
			    <groupId>com.ai.ipu</groupId>
83
			    <artifactId>ipu-cache</artifactId>
84
			    <version>${ipu}</version>
85
		    </dependency>
86
		<dependency>
82 87
			<groupId>com.ai.wade</groupId>
83 88
			<artifactId>wade-data</artifactId>
84 89
		</dependency>
85
		<dependency>
90
		<!--<dependency>
86 91
			<groupId>com.ai.wade</groupId>
87 92
			<artifactId>wade-cache</artifactId>
88
		</dependency>
93
		</dependency>-->
89 94
		<dependency>
90 95
			<groupId>com.ai.wade</groupId>
91 96
			<artifactId>wade-database</artifactId>

+ 2 - 2
display-server/src/main/java/com/ai/server/bean/LoginBean.java

@ -3,7 +3,7 @@ package com.ai.server.bean;
3 3
import java.util.Map;
4 4
import java.util.concurrent.ConcurrentHashMap;
5 5

6
import com.ai.ipu.server.cache.intf.ICache;
6
import com.ai.ipu.cache.ICache;
7 7
import com.ai.ipu.server.frame.session.ISession;
8 8
import com.ai.ipu.server.util.MobileUtility;
9 9
import com.ai.server.core.bean.IpuAppBean;
@ -24,7 +24,7 @@ public class LoginBean extends IpuAppBean{
24 24
			String account = param.getString("ACCOUNT");
25 25
			String sessionId = uniqueAccounts.get(account);
26 26
			
27
			ICache cache = IpuSessionManager.getSessionCache();
27
			ICache cache = IpuSessionManager.getInstance().getSessionCache();
28 28
			ISession session = (ISession)cache.get(sessionId);
29 29
			if (sessionId != null && session != null) {
30 30
				cache.remove(sessionId);//删除旧的Session

+ 3 - 4
display-server/src/main/java/com/ai/server/bean/SceneBean.java

@ -5,9 +5,8 @@ import java.util.Map;
5 5
import java.util.Random;
6 6
import java.util.concurrent.ConcurrentHashMap;
7 7

8
import com.ai.ipu.server.cache.intf.ICache;
8
import com.ai.ipu.cache.ICache;
9 9
import com.ai.ipu.server.frame.session.ISession;
10
import com.ai.ipu.server.frame.session.impl.AbstractSessionManager;
11 10
import com.ai.ipu.server.util.MobileUtility;
12 11
import com.ai.server.core.bean.IpuAppBean;
13 12
import com.ai.server.core.context.IpuContextData;
@ -30,7 +29,7 @@ public class SceneBean extends IpuAppBean {
30 29
        if (loginResult) {
31 30
            String account = param.getString("ACCOUNT");
32 31
            String sessionIdOld = uniqueAccounts.get(account);
33
            ICache cache = AbstractSessionManager.getSessionCache();
32
            ICache cache = IpuSessionManager.getInstance().getSessionCache();
34 33
            ISession session = (ISession) cache.get(sessionIdOld);
35 34
            if (sessionIdOld != null && session != null) {
36 35
                cache.remove(sessionIdOld);// 删除旧的session
@ -53,7 +52,7 @@ public class SceneBean extends IpuAppBean {
53 52
    public IData checkSessionAvailable(IData param) throws Exception {
54 53
        IData result = new DataMap();
55 54
        String sessionId = param.getString(Constant.Session.SESSION_ID);
56
        ICache cache = AbstractSessionManager.getSessionCache();
55
        ICache cache = IpuSessionManager.getInstance().getSessionCache();
57 56
        ISession session = (ISession) cache.get(sessionId);
58 57
        if (sessionId != null && session != null) {
59 58
            result.put("sessionAvailable", true);