Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aas
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dingjy
aas
Commits
77724859
Commit
77724859
authored
Feb 27, 2024
by
宋新宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改缓存key
parent
79d7114e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
AttributeController.java
...ain/java/com/lwby/aas/controller/AttributeController.java
+1
-1
BaseHelper.java
src/main/java/com/lwby/aas/handle/BaseHelper.java
+6
-2
TestHandle.java
src/main/java/com/lwby/aas/handle/TestHandle.java
+1
-1
No files found.
src/main/java/com/lwby/aas/controller/AttributeController.java
View file @
77724859
...
...
@@ -80,7 +80,7 @@ public class AttributeController extends BaseHelper {
//匹配设备ID
for
(
DeviceType
type:
DeviceType
.
values
()){
deviceIdKey
=
type
.
getDeviceId
(
clientInfo
);
if
(
null
!=
deviceIdKey
&&
null
!=
(
deliveryDeviceInfo
=
getForRedis
(
assembleKey
(
deviceIdKey
,
platformId
)))){
if
(
null
!=
deviceIdKey
&&
null
!=
(
deliveryDeviceInfo
=
getForRedis
(
assembleKey
(
deviceIdKey
,
platformId
,
type
)))){
deviceType
=
type
;
clientInfo
.
setOaid
(
deliveryDeviceInfo
.
getOaid
());
//回补OAID
break
;
...
...
src/main/java/com/lwby/aas/handle/BaseHelper.java
View file @
77724859
package
com
.
lwby
.
aas
.
handle
;
import
cn.hutool.crypto.SecureUtil
;
import
com.lwby.aas.DeviceType
;
import
com.lwby.aas.po.AppChannel
;
import
com.lwby.aas.vo.DeliveryDeviceInfo
;
import
org.apache.commons.lang3.time.FastDateFormat
;
...
...
@@ -19,8 +20,11 @@ public class BaseHelper {
public
static
final
FastDateFormat
DATE_BOTTOM_FORMAT
=
FastDateFormat
.
getInstance
(
"yyyy_MM_dd"
,
TimeZone
.
getTimeZone
(
ZoneId
.
of
(
"Asia/Shanghai"
)));
public
String
assembleKey
(
String
deviceId
,
int
platformId
)
{
return
String
.
format
(
"getClickByIdfaAndPlatformId:%s:%d"
,
SecureUtil
.
md5
(
deviceId
),
platformId
);
public
String
assembleKey
(
String
deviceId
,
int
platformId
,
DeviceType
type
)
{
if
(
DeviceType
.
IP
==
type
)
{
return
String
.
format
(
"mck:%s:%d"
,
SecureUtil
.
md5
(
deviceId
),
platformId
);
}
return
String
.
format
(
"getClickByIdfaAndPlatformId_%s_%d"
,
SecureUtil
.
md5
(
deviceId
),
platformId
);
}
/**
...
...
src/main/java/com/lwby/aas/handle/TestHandle.java
View file @
77724859
...
...
@@ -63,7 +63,7 @@ public class TestHandle extends BaseHelper{
//匹配设备ID
for
(
DeviceType
type:
DeviceType
.
values
()){
deviceIdKey
=
type
.
getDeviceId
(
clientInfo
);
if
(
null
!=
deviceIdKey
&&
null
!=
(
deliveryDeviceInfo
=
getForRedis
(
assembleKey
(
deviceIdKey
,
platformId
)))){
if
(
null
!=
deviceIdKey
&&
null
!=
(
deliveryDeviceInfo
=
getForRedis
(
assembleKey
(
deviceIdKey
,
platformId
,
type
)))){
deviceType
=
type
;
clientInfo
.
setOaid
(
deliveryDeviceInfo
.
getOaid
());
//回补OAID
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment