提交 | 用户 | 时间
|
1ac2bc
|
1 |
package cn.stylefeng.guns.workflow.core.cache; |
懒 |
2 |
|
|
3 |
import cn.stylefeng.guns.base.auth.context.LoginContextHolder; |
|
4 |
|
|
5 |
import java.util.Map; |
|
6 |
import java.util.concurrent.ConcurrentHashMap; |
|
7 |
|
|
8 |
/** |
|
9 |
* 指定下一代办人的临时缓存 |
|
10 |
* |
|
11 |
* @author fengshuonan |
|
12 |
* @date 2019-09-05-14:18 |
|
13 |
*/ |
|
14 |
public class TempAssignCache { |
|
15 |
|
|
16 |
private static Map<Long, String> map = new ConcurrentHashMap<>(); |
|
17 |
|
|
18 |
/** |
|
19 |
* 设置代办人 |
|
20 |
* |
|
21 |
* @author fengshuonan |
|
22 |
* @Date 2019-09-05 14:21 |
|
23 |
*/ |
|
24 |
public static String set(String assign) { |
|
25 |
Long userId = LoginContextHolder.getContext().getUserId(); |
|
26 |
return map.put(userId, assign); |
|
27 |
} |
|
28 |
|
|
29 |
/** |
|
30 |
* 获取代办人 |
|
31 |
* |
|
32 |
* @author fengshuonan |
|
33 |
* @Date 2019-09-05 14:21 |
|
34 |
*/ |
|
35 |
public static String get() { |
|
36 |
Long userId = LoginContextHolder.getContext().getUserId(); |
|
37 |
return map.get(userId); |
|
38 |
} |
|
39 |
|
|
40 |
} |