Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
marketing
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
marketing
Commits
42febe05
Commit
42febe05
authored
Mar 13, 2024
by
dingjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
0295c3b0
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
18 additions
and
29 deletions
+18
-29
AttributionStatus.java
src/main/java/com/lwby/marketing/att/AttributionStatus.java
+1
-1
CallBackType.java
...ain/java/com/lwby/marketing/att/bystory/CallBackType.java
+1
-1
DyStoryUniversalProcess.java
...m/lwby/marketing/att/bystory/DyStoryUniversalProcess.java
+1
-1
ParameterSetupStoryNovelFlow.java
...ting/att/bystory/handle/ParameterSetupStoryNovelFlow.java
+2
-4
PaySpduFlow.java
...va/com/lwby/marketing/att/bystory/handle/PaySpduFlow.java
+5
-11
StoreDyStoryAttributionFlow.java
...eting/att/bystory/handle/StoreDyStoryAttributionFlow.java
+1
-1
UploadCallFlow.java
...com/lwby/marketing/att/bystory/handle/UploadCallFlow.java
+2
-6
NovelUniversalProcess.java
...a/com/lwby/marketing/att/novel/NovelUniversalProcess.java
+2
-1
ChannelAttributionFlow.java
...by/marketing/att/novel/handle/ChannelAttributionFlow.java
+1
-1
CrossPlatformAttributionFlow.java
...keting/att/novel/handle/CrossPlatformAttributionFlow.java
+1
-1
StoreAttributionFlow.java
...lwby/marketing/att/novel/handle/StoreAttributionFlow.java
+1
-1
No files found.
src/main/java/com/lwby/marketing/att/
novel/
AttributionStatus.java
→
src/main/java/com/lwby/marketing/att/AttributionStatus.java
View file @
42febe05
package
com
.
lwby
.
marketing
.
att
.
novel
;
package
com
.
lwby
.
marketing
.
att
;
public
enum
AttributionStatus
{
public
enum
AttributionStatus
{
ACTIVE_CALLBACK
(
2
,
"激活回传"
),
ACTIVE_CALLBACK
(
2
,
"激活回传"
),
...
...
src/main/java/com/lwby/marketing/att/bystory/CallBackType.java
View file @
42febe05
package
com
.
lwby
.
marketing
.
att
.
bystory
;
package
com
.
lwby
.
marketing
.
att
.
bystory
;
import
com.lwby.marketing.att.
novel.
AttributionStatus
;
import
com.lwby.marketing.att.AttributionStatus
;
/**
/**
* @author songxinyu
* @author songxinyu
...
...
src/main/java/com/lwby/marketing/att/bystory/DyStoryUniversalProcess.java
View file @
42febe05
...
@@ -5,7 +5,7 @@ import com.alicp.jetcache.anno.CacheRefresh;
...
@@ -5,7 +5,7 @@ import com.alicp.jetcache.anno.CacheRefresh;
import
com.alicp.jetcache.anno.CacheType
;
import
com.alicp.jetcache.anno.CacheType
;
import
com.alicp.jetcache.anno.Cached
;
import
com.alicp.jetcache.anno.Cached
;
import
com.lwby.marketing.att.UniversalProcess
;
import
com.lwby.marketing.att.UniversalProcess
;
import
com.lwby.marketing.att.
novel.
AttributionStatus
;
import
com.lwby.marketing.att.AttributionStatus
;
import
com.lwby.marketing.att.novel.AttributionType
;
import
com.lwby.marketing.att.novel.AttributionType
;
import
com.lwby.marketing.vo.DeliveryDeviceInfo
;
import
com.lwby.marketing.vo.DeliveryDeviceInfo
;
import
com.lwby.marketing.vo.StoryNovelAction
;
import
com.lwby.marketing.vo.StoryNovelAction
;
...
...
src/main/java/com/lwby/marketing/att/bystory/handle/ParameterSetupStoryNovelFlow.java
View file @
42febe05
...
@@ -39,14 +39,12 @@ public class ParameterSetupStoryNovelFlow extends NodeFlow<StoryNovelAction> {
...
@@ -39,14 +39,12 @@ public class ParameterSetupStoryNovelFlow extends NodeFlow<StoryNovelAction> {
StoryLogin
storyLogin
=
up
.
get
(
StoryLogin
.
class
,
assembleKey
(
openId
));
StoryLogin
storyLogin
=
up
.
get
(
StoryLogin
.
class
,
assembleKey
(
openId
));
action
.
setStoryLogin
(
storyLogin
);
action
.
setStoryLogin
(
storyLogin
);
//NovelAction对像参数填充
//
Story
NovelAction对像参数填充
action
.
setPlatformId
(
platformId
);
action
.
setPlatformId
(
platformId
);
action
.
setUserId
(
action
.
getUserId
());
action
.
setUserId
(
action
.
getUserId
());
action
.
setCurrentDateStr
(
DateTimUtils
.
getCurrentDateString
());
action
.
setCurrentDateStr
(
DateTimUtils
.
getCurrentDateString
());
action
.
setChannelId
(
action
.
getClientInfo
().
getChannel
());
action
.
setChannelId
(
action
.
getClientInfo
().
getChannel
());
//非商店吊起参数设置
//非商店吊起参数设置
if
(
Objects
.
nonNull
(
storyLogin
))
{
if
(
Objects
.
nonNull
(
storyLogin
))
{
deliveryDeviceInfo
=
new
DeliveryDeviceInfo
();
deliveryDeviceInfo
=
new
DeliveryDeviceInfo
();
...
...
src/main/java/com/lwby/marketing/att/bystory/handle/PaySpduFlow.java
View file @
42febe05
package
com
.
lwby
.
marketing
.
att
.
bystory
.
handle
;
package
com
.
lwby
.
marketing
.
att
.
bystory
.
handle
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.lwby.marketing.att.
novel.
AttributionStatus
;
import
com.lwby.marketing.att.AttributionStatus
;
import
com.lwby.marketing.att.novel.AttributionType
;
import
com.lwby.marketing.att.novel.AttributionType
;
import
com.lwby.marketing.att.bystory.DyStoryUniversalProcess
;
import
com.lwby.marketing.att.bystory.DyStoryUniversalProcess
;
import
com.lwby.marketing.flow.NodeSwitchFlow
;
import
com.lwby.marketing.flow.NodeSwitchFlow
;
...
@@ -27,18 +27,13 @@ public class PaySpduFlow extends NodeSwitchFlow<StoryNovelAction> {
...
@@ -27,18 +27,13 @@ public class PaySpduFlow extends NodeSwitchFlow<StoryNovelAction> {
@Resource
@Resource
DyStoryUniversalProcess
up
;
DyStoryUniversalProcess
up
;
@Override
public
void
process
(
StoryNovelAction
action
)
{
process0
(
action
,
AttributionType
.
CHANNEL
);
}
@Override
@Override
public
boolean
checked
(
StoryNovelAction
action
)
{
public
boolean
checked
(
StoryNovelAction
action
)
{
return
action
.
getType
()
==
2
;
return
action
.
getType
()
==
2
;
}
}
public
void
process0
(
StoryNovelAction
action
,
AttributionType
type
)
{
@Override
public
void
process
(
StoryNovelAction
action
)
{
int
platformId
=
action
.
getPlatformId
();
int
platformId
=
action
.
getPlatformId
();
int
channelId
=
action
.
getChannelId
();
int
channelId
=
action
.
getChannelId
();
String
shaveMakeCall
=
up
.
getAttributeRuleByPlatformIdAndChannelId
(
platformId
,
channelId
);
String
shaveMakeCall
=
up
.
getAttributeRuleByPlatformIdAndChannelId
(
platformId
,
channelId
);
...
@@ -77,9 +72,9 @@ public class PaySpduFlow extends NodeSwitchFlow<StoryNovelAction> {
...
@@ -77,9 +72,9 @@ public class PaySpduFlow extends NodeSwitchFlow<StoryNovelAction> {
}
}
//总数
//总数
String
channelTotal
=
up
.
getTotalCountKey
(
type
,
action
.
getPlatformId
(),
action
.
getChannelId
(),
goodId
,
sprDedu
,
action
.
getCurrentDateStr
());
String
channelTotal
=
up
.
getTotalCountKey
(
AttributionType
.
CHANNEL
,
action
.
getPlatformId
(),
action
.
getChannelId
(),
goodId
,
sprDedu
,
action
.
getCurrentDateStr
());
//回传
//回传
String
channelCallback
=
up
.
getCallbackCountKey
(
type
,
action
.
getPlatformId
(),
action
.
getChannelId
(),
goodId
,
sprDedu
,
action
.
getCurrentDateStr
());
String
channelCallback
=
up
.
getCallbackCountKey
(
AttributionType
.
CHANNEL
,
action
.
getPlatformId
(),
action
.
getChannelId
(),
goodId
,
sprDedu
,
action
.
getCurrentDateStr
());
long
channelTotalCount
=
up
.
incrby
(
channelTotal
,
0
,
60
*
60
*
24
);
long
channelTotalCount
=
up
.
incrby
(
channelTotal
,
0
,
60
*
60
*
24
);
long
channelCallbackCount
=
up
.
incrby
(
channelCallback
,
0
,
60
*
60
*
24
);
long
channelCallbackCount
=
up
.
incrby
(
channelCallback
,
0
,
60
*
60
*
24
);
...
@@ -99,7 +94,6 @@ public class PaySpduFlow extends NodeSwitchFlow<StoryNovelAction> {
...
@@ -99,7 +94,6 @@ public class PaySpduFlow extends NodeSwitchFlow<StoryNovelAction> {
"PaySpduFlow.process0.deduction doing dynamic, platformId = {}, channel = {}, sprDedu = {}, goodId = {}, channelTotalCount = {}, channelCallbackCount = {}, v = {}"
,
"PaySpduFlow.process0.deduction doing dynamic, platformId = {}, channel = {}, sprDedu = {}, goodId = {}, channelTotalCount = {}, channelCallbackCount = {}, v = {}"
,
platformId
,
channelId
,
sprDedu
,
goodId
,
channelTotalCount
,
channelCallbackCount
,
0
);
platformId
,
channelId
,
sprDedu
,
goodId
,
channelTotalCount
,
channelCallbackCount
,
0
);
}
}
}
}
private
boolean
isCallback
(
long
channelTotalCount
,
long
channelCallbackCount
,
Integer
sprDedu
)
{
private
boolean
isCallback
(
long
channelTotalCount
,
long
channelCallbackCount
,
Integer
sprDedu
)
{
...
...
src/main/java/com/lwby/marketing/att/bystory/handle/StoreDyStoryAttributionFlow.java
View file @
42febe05
package
com
.
lwby
.
marketing
.
att
.
bystory
.
handle
;
package
com
.
lwby
.
marketing
.
att
.
bystory
.
handle
;
import
com.lwby.marketing.att.
novel.
AttributionStatus
;
import
com.lwby.marketing.att.AttributionStatus
;
import
com.lwby.marketing.att.bystory.CallBackType
;
import
com.lwby.marketing.att.bystory.CallBackType
;
import
com.lwby.marketing.att.bystory.DyStoryUniversalProcess
;
import
com.lwby.marketing.att.bystory.DyStoryUniversalProcess
;
import
com.lwby.marketing.flow.NodeFlow
;
import
com.lwby.marketing.flow.NodeFlow
;
...
...
src/main/java/com/lwby/marketing/att/bystory/handle/UploadCallFlow.java
View file @
42febe05
...
@@ -20,15 +20,11 @@ public class UploadCallFlow extends NodeFlow<StoryNovelAction> {
...
@@ -20,15 +20,11 @@ public class UploadCallFlow extends NodeFlow<StoryNovelAction> {
@Override
@Override
public
void
process
(
StoryNovelAction
action
)
{
public
void
process
(
StoryNovelAction
action
)
{
process0
(
action
,
CallBackType
.
getCallBackTypeByType
(
action
.
getType
()
));
CallBackType
type
=
CallBackType
.
getCallBackTypeByType
(
action
.
getType
(
));
}
private
void
process0
(
StoryNovelAction
action
,
CallBackType
callBackTypeByType
)
{
boolean
success
=
action
.
getMedia
().
notify
(
action
);
boolean
success
=
action
.
getMedia
().
notify
(
action
);
if
(
success
)
{
if
(
success
)
{
up
.
notifyResult
(
action
,
callBackTypeByType
.
getTopic
(),
up
.
notifyResult
(
action
,
type
.
getTopic
(),
type
.
getStatus
());
callBackTypeByType
.
getStatus
());
up
.
set
(
up
.
getFirstCheckerKey
(
action
),
60
*
60
*
24
,
"1"
);
up
.
set
(
up
.
getFirstCheckerKey
(
action
),
60
*
60
*
24
,
"1"
);
}
}
}
}
...
...
src/main/java/com/lwby/marketing/att/novel/NovelUniversalProcess.java
View file @
42febe05
package
com
.
lwby
.
marketing
.
att
.
novel
;
package
com
.
lwby
.
marketing
.
att
.
novel
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.lwby.marketing.att.AttributionStatus
;
import
com.lwby.marketing.att.UniversalProcess
;
import
com.lwby.marketing.att.UniversalProcess
;
import
com.lwby.marketing.vo.NovelAction
;
import
com.lwby.marketing.vo.NovelAction
;
import
com.lwby.marketing.vo.DeliveryDeviceInfo
;
import
com.lwby.marketing.vo.DeliveryDeviceInfo
;
...
@@ -42,7 +43,7 @@ public class NovelUniversalProcess extends UniversalProcess {
...
@@ -42,7 +43,7 @@ public class NovelUniversalProcess extends UniversalProcess {
ddi
.
setDevice_status
(
exists
(
PRIZE_FLOW_PREFIX
.
concat
(
String
.
valueOf
(
ddi
.
getUserId
())))
?
2
:
0
);
ddi
.
setDevice_status
(
exists
(
PRIZE_FLOW_PREFIX
.
concat
(
String
.
valueOf
(
ddi
.
getUserId
())))
?
2
:
0
);
String
jsonString
=
JSONObject
.
toJSONString
(
ddi
);
String
jsonString
=
JSONObject
.
toJSONString
(
ddi
);
ListenableFuture
<
SendResult
<
String
,
String
>>
active_result
=
kafkaTemplate
.
send
(
"ocpc_result
_test
"
,
jsonString
);
ListenableFuture
<
SendResult
<
String
,
String
>>
active_result
=
kafkaTemplate
.
send
(
"ocpc_result"
,
jsonString
);
active_result
.
addCallback
(
active_result
.
addCallback
(
result
->
log
.
info
(
"归因成功[{}],归因类型[{}]"
,
jsonString
,
status
.
desc
),
result
->
log
.
info
(
"归因成功[{}],归因类型[{}]"
,
jsonString
,
status
.
desc
),
ex
->
log
.
error
(
"归因失败[{}],归因类型[{}]"
,
jsonString
,
status
.
desc
,
ex
)
ex
->
log
.
error
(
"归因失败[{}],归因类型[{}]"
,
jsonString
,
status
.
desc
,
ex
)
...
...
src/main/java/com/lwby/marketing/att/novel/handle/ChannelAttributionFlow.java
View file @
42febe05
package
com
.
lwby
.
marketing
.
att
.
novel
.
handle
;
package
com
.
lwby
.
marketing
.
att
.
novel
.
handle
;
import
com.lwby.marketing.att.
novel.
AttributionStatus
;
import
com.lwby.marketing.att.AttributionStatus
;
import
com.lwby.marketing.att.novel.AttributionType
;
import
com.lwby.marketing.att.novel.AttributionType
;
import
com.lwby.marketing.att.novel.NovelUniversalProcess
;
import
com.lwby.marketing.att.novel.NovelUniversalProcess
;
import
com.lwby.marketing.flow.NodeSwitchFlow
;
import
com.lwby.marketing.flow.NodeSwitchFlow
;
...
...
src/main/java/com/lwby/marketing/att/novel/handle/CrossPlatformAttributionFlow.java
View file @
42febe05
...
@@ -3,7 +3,7 @@ package com.lwby.marketing.att.novel.handle;
...
@@ -3,7 +3,7 @@ package com.lwby.marketing.att.novel.handle;
import
com.alicp.jetcache.anno.CacheRefresh
;
import
com.alicp.jetcache.anno.CacheRefresh
;
import
com.alicp.jetcache.anno.CacheType
;
import
com.alicp.jetcache.anno.CacheType
;
import
com.alicp.jetcache.anno.Cached
;
import
com.alicp.jetcache.anno.Cached
;
import
com.lwby.marketing.att.
novel.
AttributionStatus
;
import
com.lwby.marketing.att.AttributionStatus
;
import
com.lwby.marketing.att.novel.AttributionType
;
import
com.lwby.marketing.att.novel.AttributionType
;
import
com.lwby.marketing.att.novel.NovelUniversalProcess
;
import
com.lwby.marketing.att.novel.NovelUniversalProcess
;
import
com.lwby.marketing.flow.NodeSwitchFlow
;
import
com.lwby.marketing.flow.NodeSwitchFlow
;
...
...
src/main/java/com/lwby/marketing/att/novel/handle/StoreAttributionFlow.java
View file @
42febe05
package
com
.
lwby
.
marketing
.
att
.
novel
.
handle
;
package
com
.
lwby
.
marketing
.
att
.
novel
.
handle
;
import
com.lwby.marketing.att.
novel.
AttributionStatus
;
import
com.lwby.marketing.att.AttributionStatus
;
import
com.lwby.marketing.att.novel.DeviceType
;
import
com.lwby.marketing.att.novel.DeviceType
;
import
com.lwby.marketing.att.novel.NovelUniversalProcess
;
import
com.lwby.marketing.att.novel.NovelUniversalProcess
;
import
com.lwby.marketing.flow.NodeFlow
;
import
com.lwby.marketing.flow.NodeFlow
;
...
...
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