Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
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
haoban3.0
haoban-manage3.0
Commits
e2ba18b3
Commit
e2ba18b3
authored
Oct 16, 2024
by
xiongjiangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排序
parent
1b8d6ea3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
14 deletions
+113
-14
GroupChatActivityDataController.java
.../web/controller/chat/GroupChatActivityDataController.java
+43
-14
GroupChatActivityRewardLogVO.java
...oban/manage/web/vo/chat/GroupChatActivityRewardLogVO.java
+70
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatActivityDataController.java
View file @
e2ba18b3
...
...
@@ -229,6 +229,10 @@ public class GroupChatActivityDataController {
//查询奖励配置
GroupChatActivityDTO
groupChatActivityDTO
=
getActivityDetail
(
inviterDetailReq
.
getEnterpriseId
(),
Long
.
parseLong
(
inviterDetailReq
.
getChatActivityId
()));
boolean
isSettingIntegral
=
isSettingRewardType
(
groupChatActivityDTO
,
RewardResultTypeEnum
.
integral
.
getType
());
boolean
isSettingGrowth
=
isSettingRewardType
(
groupChatActivityDTO
,
RewardResultTypeEnum
.
growth
.
getType
());
boolean
isSettingCoupon
=
isSettingRewardType
(
groupChatActivityDTO
,
RewardResultTypeEnum
.
coupon
.
getType
());
List
<
String
>
fieldList
=
new
ArrayList
<>();
List
<
String
>
indexList
=
new
ArrayList
<>();
fieldList
.
add
(
"name"
);
...
...
@@ -252,14 +256,21 @@ public class GroupChatActivityDataController {
fieldList
.
add
(
"newMemberNum"
);
indexList
.
add
(
"新增会员数"
);
if
(
isSettingIntegral
)
{
fieldList
.
add
(
"integralCnt"
);
indexList
.
add
(
"奖励积分"
);
}
if
(
isSettingGrowth
)
{
fieldList
.
add
(
"growCnt"
);
indexList
.
add
(
"奖励成长值"
);
}
if
(
isSettingCoupon
)
{
fieldList
.
add
(
"cardCnt"
);
indexList
.
add
(
"奖励卡券数"
);
}
task
.
setFileName
(
"社群邀请有礼-"
+
groupChatActivityDTO
.
getActivityName
()
+
"-参与客户"
);
task
.
setChannelName
(
"社群邀请有礼-"
+
groupChatActivityDTO
.
getActivityName
()
+
"-参与客户"
);
...
...
@@ -448,20 +459,9 @@ public class GroupChatActivityDataController {
//查询奖励配置
GroupChatActivityDTO
groupChatActivityDTO
=
getActivityDetail
(
rewardLogReq
.
getEnterpriseId
(),
rewardLogReq
.
getChatActivityId
());
//获取所有奖励类型
Set
<
Integer
>
rewardTypeList
=
Sets
.
newHashSet
();
Map
<
Integer
,
List
<
GroupChatActivityRewardDTO
>>
rewardMap
=
groupChatActivityDTO
.
getRewardMap
();
rewardMap
.
forEach
((
key
,
value
)
->
{
value
.
forEach
(
groupChatActivityRewardDTO
->
{
groupChatActivityRewardDTO
.
getDetailList
().
forEach
(
groupChatActivityRewardDetailDTO
->
{
rewardTypeList
.
add
(
groupChatActivityRewardDetailDTO
.
getRewardType
());
});
});
});
boolean
isSettingIntegral
=
rewardTypeList
.
contains
(
RewardResultTypeEnum
.
integral
.
getType
());
boolean
isSettingGrowth
=
rewardTypeList
.
contains
(
RewardResultTypeEnum
.
growth
.
getType
());
boolean
isSettingCoupon
=
rewardTypeList
.
contains
(
RewardResultTypeEnum
.
coupon
.
getType
());
boolean
isSettingIntegral
=
isSettingRewardType
(
groupChatActivityDTO
,
RewardResultTypeEnum
.
integral
.
getType
());
boolean
isSettingGrowth
=
isSettingRewardType
(
groupChatActivityDTO
,
RewardResultTypeEnum
.
growth
.
getType
());
boolean
isSettingCoupon
=
isSettingRewardType
(
groupChatActivityDTO
,
RewardResultTypeEnum
.
coupon
.
getType
());
List
<
String
>
fieldList
=
new
ArrayList
<>();
List
<
String
>
indexList
=
new
ArrayList
<>();
...
...
@@ -536,6 +536,7 @@ public class GroupChatActivityDataController {
int
integral
=
0
;
int
growth
=
0
;
List
<
String
>
cardList
=
Lists
.
newArrayList
();
List
<
GroupChatActivityRewardLogVO
.
CouponInfo
>
couponInfoList
=
Lists
.
newArrayList
();
for
(
GroupChatActivityRewardDetailLogDTO
groupChatActivityRewardDetailLogDTO
:
groupChatActivityRewardLogDTO
.
getRewardDetailLogDTOList
())
{
if
(
groupChatActivityRewardDetailLogDTO
.
getRewardType
().
equals
(
RewardResultTypeEnum
.
integral
.
getType
()))
{
integral
+=
Integer
.
parseInt
(
groupChatActivityRewardDetailLogDTO
.
getRewardValue
());
...
...
@@ -551,11 +552,18 @@ public class GroupChatActivityDataController {
card
+=
groupChatActivityRewardDetailLogDTO
.
getRewardRemark
()
+
")"
;
}
cardList
.
add
(
card
);
GroupChatActivityRewardLogVO
.
CouponInfo
couponInfo
=
new
GroupChatActivityRewardLogVO
.
CouponInfo
();
couponInfo
.
setCouponCardId
(
groupChatActivityRewardDetailLogDTO
.
getRewardValue
());
couponInfo
.
setCouponName
(
groupChatActivityRewardDetailLogDTO
.
getRewardName
());
couponInfo
.
setSuccessFlag
(
groupChatActivityRewardDetailLogDTO
.
getSuccessFlag
());
couponInfo
.
setFailReason
(
groupChatActivityRewardDetailLogDTO
.
getRewardRemark
());
couponInfoList
.
add
(
couponInfo
);
}
}
groupChatActivityRewardLogVO
.
setIntegral
(
integral
);
groupChatActivityRewardLogVO
.
setGrowth
(
growth
);
groupChatActivityRewardLogVO
.
setCardInfo
(
StringUtils
.
join
(
cardList
,
"、"
));
groupChatActivityRewardLogVO
.
setCouponInfoList
(
couponInfoList
);
}
return
groupChatActivityRewardLogVO
;
}).
collect
(
Collectors
.
toList
());
...
...
@@ -646,4 +654,25 @@ public class GroupChatActivityDataController {
.
getActivityDetail
(
enterpriseId
,
chatActivityId
);
return
serviceActivityDetail
.
getResult
();
}
/**
* 是否配置指定奖项、
*
* @param groupChatActivityDTO
* @param rewardType
* @return
*/
private
boolean
isSettingRewardType
(
GroupChatActivityDTO
groupChatActivityDTO
,
Integer
rewardType
){
//获取所有奖励类型
Set
<
Integer
>
rewardTypeList
=
Sets
.
newHashSet
();
Map
<
Integer
,
List
<
GroupChatActivityRewardDTO
>>
rewardMap
=
groupChatActivityDTO
.
getRewardMap
();
rewardMap
.
forEach
((
key
,
value
)
->
{
value
.
forEach
(
groupChatActivityRewardDTO
->
{
groupChatActivityRewardDTO
.
getDetailList
().
forEach
(
groupChatActivityRewardDetailDTO
->
{
rewardTypeList
.
add
(
groupChatActivityRewardDetailDTO
.
getRewardType
());
});
});
});
return
rewardTypeList
.
contains
(
rewardType
);
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/chat/GroupChatActivityRewardLogVO.java
View file @
e2ba18b3
...
...
@@ -83,6 +83,68 @@ public class GroupChatActivityRewardLogVO implements Serializable {
*/
private
String
cardInfo
;
/**
* 卡券信息
*/
private
List
<
CouponInfo
>
couponInfoList
;
public
static
class
CouponInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
3497165176440213961L
;
/**
* 卡券名称
*/
private
String
couponName
;
/**
* 奖励id
*/
private
String
couponCardId
;
/**
* 奖励关联业务日志id
*/
private
String
failReason
;
/**
* 操作奖励是否成功 1是 0否
*/
private
Integer
successFlag
;
public
String
getCouponName
()
{
return
couponName
;
}
public
void
setCouponName
(
String
couponName
)
{
this
.
couponName
=
couponName
;
}
public
String
getCouponCardId
()
{
return
couponCardId
;
}
public
void
setCouponCardId
(
String
couponCardId
)
{
this
.
couponCardId
=
couponCardId
;
}
public
String
getFailReason
()
{
return
failReason
;
}
public
void
setFailReason
(
String
failReason
)
{
this
.
failReason
=
failReason
;
}
public
Integer
getSuccessFlag
()
{
return
successFlag
;
}
public
void
setSuccessFlag
(
Integer
successFlag
)
{
this
.
successFlag
=
successFlag
;
}
}
public
Long
getChatActivityRewardLogId
()
{
return
chatActivityRewardLogId
;
}
...
...
@@ -186,4 +248,12 @@ public class GroupChatActivityRewardLogVO implements Serializable {
public
void
setCardInfo
(
String
cardInfo
)
{
this
.
cardInfo
=
cardInfo
;
}
public
List
<
CouponInfo
>
getCouponInfoList
()
{
return
couponInfoList
;
}
public
void
setCouponInfoList
(
List
<
CouponInfo
>
couponInfoList
)
{
this
.
couponInfoList
=
couponInfoList
;
}
}
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