|
@@ -1,6 +1,7 @@
|
|
|
package com.citu.module.menduner.system.service.share;
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.citu.module.menduner.common.util.LoginUserContext;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.share.ShareDO;
|
|
|
import com.citu.module.menduner.system.dal.mysql.share.ShareMapper;
|
|
@@ -29,7 +30,7 @@ public class ShareServiceImpl implements ShareService {
|
|
|
if (null == share) {
|
|
|
return null;
|
|
|
}
|
|
|
- return share.getShareValue();
|
|
|
+ return JSON.parseObject(share.getShareValue(), Map.class);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -42,8 +43,8 @@ public class ShareServiceImpl implements ShareService {
|
|
|
//TODO 分享过期的处理
|
|
|
|
|
|
// 生成一个唯一的ID
|
|
|
- long id = IdUtil.getSnowflakeNextId();
|
|
|
- return share(Long.toString(id), map, expireTime);
|
|
|
+ long id = System.currentTimeMillis();
|
|
|
+ return share(String.valueOf(id), map, expireTime);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -52,7 +53,7 @@ public class ShareServiceImpl implements ShareService {
|
|
|
.shareKey(key)
|
|
|
.userId(LoginUserContext.getUserId2())
|
|
|
.enterpriseId(LoginUserContext.getEnterpriseId4())
|
|
|
- .shareValue(map)
|
|
|
+ .shareValue(JSON.toJSONString(map))
|
|
|
.expireTime(expireTime)
|
|
|
.build()
|
|
|
);
|