1.优化
Showing
7 changed files
with
104 additions
and
59 deletions
... | @@ -17,12 +17,14 @@ import lombok.extern.slf4j.Slf4j; | ... | @@ -17,12 +17,14 @@ import lombok.extern.slf4j.Slf4j; |
17 | import org.slf4j.Logger; | 17 | import org.slf4j.Logger; |
18 | import org.slf4j.LoggerFactory; | 18 | import org.slf4j.LoggerFactory; |
19 | import org.springframework.beans.factory.annotation.Autowired; | 19 | import org.springframework.beans.factory.annotation.Autowired; |
20 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | ||
20 | import org.springframework.stereotype.Service; | 21 | import org.springframework.stereotype.Service; |
21 | import org.springframework.util.CollectionUtils; | 22 | import org.springframework.util.CollectionUtils; |
22 | import org.springframework.util.StringUtils; | 23 | import org.springframework.util.StringUtils; |
23 | 24 | ||
24 | import java.sql.Timestamp; | 25 | import java.sql.Timestamp; |
25 | import java.util.*; | 26 | import java.util.*; |
27 | import java.util.concurrent.ThreadPoolExecutor; | ||
26 | 28 | ||
27 | /** | 29 | /** |
28 | * 权益处理 | 30 | * 权益处理 |
... | @@ -34,8 +36,6 @@ import java.util.*; | ... | @@ -34,8 +36,6 @@ import java.util.*; |
34 | @Slf4j | 36 | @Slf4j |
35 | public class RightsOperationServiceImpl implements RightsOperationService { | 37 | public class RightsOperationServiceImpl implements RightsOperationService { |
36 | 38 | ||
37 | private static final Logger LOG = LoggerFactory.getLogger(RightsOperationServiceImpl.class); | ||
38 | |||
39 | @Autowired | 39 | @Autowired |
40 | private RightsHistoryService rightsHistoryService; | 40 | private RightsHistoryService rightsHistoryService; |
41 | @Autowired | 41 | @Autowired |
... | @@ -49,6 +49,9 @@ public class RightsOperationServiceImpl implements RightsOperationService { | ... | @@ -49,6 +49,9 @@ public class RightsOperationServiceImpl implements RightsOperationService { |
49 | @Autowired | 49 | @Autowired |
50 | private CouponService couponService; | 50 | private CouponService couponService; |
51 | 51 | ||
52 | @Autowired | ||
53 | private ThreadPoolTaskExecutor threadPoolTaskExecutor; | ||
54 | |||
52 | /** | 55 | /** |
53 | * 系统手动发放 | 56 | * 系统手动发放 |
54 | * 实现步骤: | 57 | * 实现步骤: |
... | @@ -72,12 +75,14 @@ public class RightsOperationServiceImpl implements RightsOperationService { | ... | @@ -72,12 +75,14 @@ public class RightsOperationServiceImpl implements RightsOperationService { |
72 | @Override | 75 | @Override |
73 | public void grantRights(Map<RightType, Object> tempRightsMap) { | 76 | public void grantRights(Map<RightType, Object> tempRightsMap) { |
74 | 77 | ||
75 | // this.threadPoolTaskExecutor.execute(()-> { | 78 | this.threadPoolTaskExecutor.execute(()-> { |
76 | // 2.创建权益历史对象 | 79 | // 2.创建权益历史对象 |
77 | List<RightsHistory> rightsList = this.getRightHistory(tempRightsMap); | 80 | List<RightsHistory> rightsList = this.getRightHistory(tempRightsMap); |
78 | // 3.保存权益历史 | 81 | if (!CollectionUtils.isEmpty(rightsList)) { |
79 | this.doInsertTrRightHistory(rightsList); | 82 | // 3.保存权益历史 |
80 | // }); | 83 | this.doInsertTrRightHistory(rightsList); |
84 | } | ||
85 | }); | ||
81 | 86 | ||
82 | // 1.权益下发 | 87 | // 1.权益下发 |
83 | this.refresh(tempRightsMap); | 88 | this.refresh(tempRightsMap); |
... | @@ -91,17 +96,18 @@ public class RightsOperationServiceImpl implements RightsOperationService { | ... | @@ -91,17 +96,18 @@ public class RightsOperationServiceImpl implements RightsOperationService { |
91 | private List<RightsHistory> getRightHistory(Map<RightType, Object> tempRightsMap) { | 96 | private List<RightsHistory> getRightHistory(Map<RightType, Object> tempRightsMap) { |
92 | List<TempRights> values = (List<TempRights>)tempRightsMap.get(RightType.RIGHTS); | 97 | List<TempRights> values = (List<TempRights>)tempRightsMap.get(RightType.RIGHTS); |
93 | List<RightsHistory> rightsHistoryList = new ArrayList<>(); | 98 | List<RightsHistory> rightsHistoryList = new ArrayList<>(); |
94 | 99 | if (!CollectionUtils.isEmpty(values)) { | |
95 | values.forEach(value -> { | 100 | values.forEach(value -> { |
96 | RightsHistory rightsHistory = new RightsHistory(); | 101 | RightsHistory rightsHistory = new RightsHistory(); |
97 | rightsHistory.setSendTime(TimestampUtil.now()); | 102 | rightsHistory.setSendTime(TimestampUtil.now()); |
98 | rightsHistory.setRightsId(value.getId()); | 103 | rightsHistory.setRightsId(value.getId()); |
99 | rightsHistory.setMemberId(value.getMemberId()); | 104 | rightsHistory.setMemberId(value.getMemberId()); |
100 | rightsHistory.setExpireTime(value.getExpireTime()); | 105 | rightsHistory.setExpireTime(value.getExpireTime()); |
101 | String memberCode = value.getMemberCode(); | 106 | String memberCode = value.getMemberCode(); |
102 | rightsHistory.setMemberCode(memberCode); | 107 | rightsHistory.setMemberCode(memberCode); |
103 | rightsHistoryList.add(rightsHistory); | 108 | rightsHistoryList.add(rightsHistory); |
104 | }); | 109 | }); |
110 | } | ||
105 | 111 | ||
106 | return rightsHistoryList; | 112 | return rightsHistoryList; |
107 | } | 113 | } | ... | ... |
... | @@ -210,9 +210,9 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -210,9 +210,9 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
210 | @Override | 210 | @Override |
211 | public ResultInfo dealTask(String content) { | 211 | public ResultInfo dealTask(String content) { |
212 | 212 | ||
213 | DataSyncMsg dataSyncMsg = JSONUtil.parseMsg2Object(content, DataSyncMsg.class); | 213 | DataSyncMsg dataSyncMsg = JSONUtil.parseMsg2Object(content, DataSyncMsg.class); |
214 | Integer event = dataSyncMsg.getEvent(); | ||
214 | DataSyncMsg.MsgData msgData = dataSyncMsg.getMsg(); | 215 | DataSyncMsg.MsgData msgData = dataSyncMsg.getMsg(); |
215 | Integer event = msgData.getEvent(); | ||
216 | String memberCode = msgData.getMemberCode(); | 216 | String memberCode = msgData.getMemberCode(); |
217 | Long memberId = msgData.getMemberId(); | 217 | Long memberId = msgData.getMemberId(); |
218 | if (StringUtils.isNotBlank(memberCode)) { | 218 | if (StringUtils.isNotBlank(memberCode)) { |
... | @@ -234,7 +234,7 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -234,7 +234,7 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
234 | boolean checkResult = this.checkTaskCompletion(memberId, taskList, event, msgData); | 234 | boolean checkResult = this.checkTaskCompletion(memberId, taskList, event, msgData); |
235 | if (checkResult) { | 235 | if (checkResult) { |
236 | // 5.权益区分(积分、权益、成长值) | 236 | // 5.权益区分(积分、权益、成长值) |
237 | Map<RightType,Object> tempRightsMap = this.distinguishRight(memberId, taskList, msgData); | 237 | Map<RightType,Object> tempRightsMap = this.distinguishRight(memberId, taskList, msgData, dataSyncMsg); |
238 | 238 | ||
239 | // 6.风控检查 | 239 | // 6.风控检查 |
240 | boolean result = this.checkRiskManagement(memberId,tempRightsMap); | 240 | boolean result = this.checkRiskManagement(memberId,tempRightsMap); |
... | @@ -307,7 +307,7 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -307,7 +307,7 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
307 | * @param taskList 任务列表 | 307 | * @param taskList 任务列表 |
308 | * @return Map<RightType,Object> 权益分类 | 308 | * @return Map<RightType,Object> 权益分类 |
309 | */ | 309 | */ |
310 | private Map<RightType,Object> distinguishRight(Long memberId,List<Task> taskList,DataSyncMsg.MsgData msgData) { | 310 | private Map<RightType,Object> distinguishRight(Long memberId, List<Task> taskList, DataSyncMsg.MsgData msgData, DataSyncMsg dataSyncMsg) { |
311 | 311 | ||
312 | Map<RightType,Object> map = new HashMap<>(); | 312 | Map<RightType,Object> map = new HashMap<>(); |
313 | 313 | ||
... | @@ -315,15 +315,17 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -315,15 +315,17 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
315 | for (Task task : taskList) { | 315 | for (Task task : taskList) { |
316 | 316 | ||
317 | // 积分 | 317 | // 积分 |
318 | List<TempPoints> tempPointsList = this.getTempPoints(memberId,msgData,task); | 318 | List<TempPoints> tempPointsList = this.getTempPoints(memberId, msgData, task, dataSyncMsg); |
319 | map.put(RightType.POINTS,tempPointsList); | 319 | if (!CollectionUtils.isEmpty(tempPointsList)) |
320 | map.put(RightType.POINTS,tempPointsList); | ||
320 | 321 | ||
321 | // 成长值 | 322 | // 成长值 |
322 | List<TempExp> tempExpList = this.getTempExp(memberId,msgData,task); | 323 | List<TempExp> tempExpList = this.getTempExp(memberId,msgData,task, dataSyncMsg); |
323 | map.put(RightType.EXP,tempExpList); | 324 | if (!CollectionUtils.isEmpty(tempExpList)) |
325 | map.put(RightType.EXP,tempExpList); | ||
324 | 326 | ||
325 | // 权益 | 327 | // 权益 |
326 | map = this.getTempRight(memberId,task,map); | 328 | map = this.getTempRight(memberId, task, map); |
327 | 329 | ||
328 | } | 330 | } |
329 | 331 | ||
... | @@ -417,8 +419,13 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -417,8 +419,13 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
417 | this.getTempRightType(memberDTO,rights3Id,rights3Amount,rightsSendStrategy,tempCouponList,rightsList); | 419 | this.getTempRightType(memberDTO,rights3Id,rights3Amount,rightsSendStrategy,tempCouponList,rightsList); |
418 | } | 420 | } |
419 | // 优惠券 | 421 | // 优惠券 |
420 | map.put(RightType.COUPON,tempCouponList); | 422 | if (!CollectionUtils.isEmpty(tempCouponList)) { |
421 | map.put(RightType.RIGHTS,rightsList); | 423 | map.put(RightType.COUPON,tempCouponList); |
424 | } | ||
425 | // 权益 | ||
426 | if (!CollectionUtils.isEmpty(rightsList)) { | ||
427 | map.put(RightType.RIGHTS,rightsList); | ||
428 | } | ||
422 | return map; | 429 | return map; |
423 | } | 430 | } |
424 | 431 | ||
... | @@ -500,23 +507,30 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -500,23 +507,30 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
500 | * @param task | 507 | * @param task |
501 | * @return | 508 | * @return |
502 | */ | 509 | */ |
503 | private List<TempExp> getTempExp(Long memberId , DataSyncMsg.MsgData msgData,Task task) { | 510 | private List<TempExp> getTempExp(Long memberId, DataSyncMsg.MsgData msgData, Task task, DataSyncMsg dataSyncMsg) { |
504 | TempExp tempExp = new TempExp(); | 511 | Long rewardExp = task.getRewardExp(); |
505 | tempExp.setMemberId(memberId); | 512 | if (Objects.nonNull(rewardExp) && rewardExp > 0L) { |
506 | tempExp.setAppCode(msgData.getAppCode()); | 513 | |
507 | tempExp.setMemberId(memberId); | 514 | TempExp tempExp = new TempExp(); |
508 | tempExp.setMemberCode(msgData.getMemberCode()); | 515 | tempExp.setMemberId(memberId); |
509 | tempExp.setItemId(msgData.getItemId()); | 516 | tempExp.setAppCode(msgData.getAppCode()); |
510 | tempExp.setAccountId(msgData.getAccountId()); | 517 | tempExp.setMemberId(memberId); |
511 | tempExp.setRewardExp(task.getRewardExp()); | 518 | tempExp.setMemberCode(msgData.getMemberCode()); |
512 | tempExp.setDeviceType(msgData.getDeviceType()); | 519 | tempExp.setItemId(msgData.getItemId()); |
513 | tempExp.setEvtType(msgData.getEvent()); | 520 | tempExp.setAccountId(msgData.getAccountId()); |
514 | tempExp.setOrderId(msgData.getOrderId()); | 521 | tempExp.setRewardExp(task.getRewardExp()); |
515 | tempExp.setMediaId(msgData.getMediaId()); | 522 | tempExp.setDeviceType(dataSyncMsg.getDeviceType()); |
516 | tempExp.setActivityId(msgData.getOrderId()); | 523 | tempExp.setEvtType(dataSyncMsg.getEvent()); |
517 | Integer rightsSendStrategy = task.getRightsSendStrategy(); | 524 | tempExp.setOrderId(msgData.getOrderId()); |
518 | tempExp.setRightsSendStrategy(Objects.isNull(rightsSendStrategy) ? 0 : rightsSendStrategy); | 525 | tempExp.setMediaId(msgData.getMediaId()); |
519 | return Arrays.asList(tempExp); | 526 | tempExp.setActivityId(msgData.getOrderId()); |
527 | Integer rightsSendStrategy = task.getRightsSendStrategy(); | ||
528 | tempExp.setRightsSendStrategy(Objects.isNull(rightsSendStrategy) ? 0 : rightsSendStrategy); | ||
529 | return Arrays.asList(tempExp); | ||
530 | |||
531 | } | ||
532 | |||
533 | return null; | ||
520 | 534 | ||
521 | } | 535 | } |
522 | 536 | ||
... | @@ -525,7 +539,7 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -525,7 +539,7 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
525 | * @param task | 539 | * @param task |
526 | * @return | 540 | * @return |
527 | */ | 541 | */ |
528 | private List<TempPoints> getTempPoints(Long memberId,DataSyncMsg.MsgData msgData,Task task) { | 542 | private List<TempPoints> getTempPoints(Long memberId, DataSyncMsg.MsgData msgData, Task task, DataSyncMsg dataSyncMsg) { |
529 | 543 | ||
530 | // 积分: 数值、过期时间、积分类型(定值、随机)、随机积分最大值 | 544 | // 积分: 数值、过期时间、积分类型(定值、随机)、随机积分最大值 |
531 | Long rewardPoints = task.getRewardPoints(); | 545 | Long rewardPoints = task.getRewardPoints(); |
... | @@ -548,14 +562,14 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -548,14 +562,14 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
548 | tempPoints.setAppCode(msgData.getAppCode()); | 562 | tempPoints.setAppCode(msgData.getAppCode()); |
549 | tempPoints.setPoints(rewardPoints); | 563 | tempPoints.setPoints(rewardPoints); |
550 | tempPoints.setPointsType(pointsType); | 564 | tempPoints.setPointsType(pointsType); |
551 | tempPoints.setDeviceType(msgData.getDeviceType()); | 565 | tempPoints.setDeviceType(dataSyncMsg.getDeviceType()); |
552 | tempPoints.setExpireTime(expireTime); | 566 | tempPoints.setExpireTime(expireTime); |
553 | tempPoints.setOrderId(msgData.getOrderId()); | 567 | tempPoints.setOrderId(msgData.getOrderId()); |
554 | tempPoints.setActivityId(msgData.getOrderId()); | 568 | tempPoints.setActivityId(msgData.getOrderId()); |
555 | tempPoints.setMediaId(msgData.getMediaId()); | 569 | tempPoints.setMediaId(msgData.getMediaId()); |
556 | tempPoints.setItemId(msgData.getItemId()); | 570 | tempPoints.setItemId(msgData.getItemId()); |
557 | tempPoints.setAccountId(msgData.getAccountId()); | 571 | tempPoints.setAccountId(msgData.getAccountId()); |
558 | tempPoints.setEvtType(msgData.getEvent()); | 572 | tempPoints.setEvtType(dataSyncMsg.getEvent()); |
559 | Integer rightsSendStrategy = task.getRightsSendStrategy(); | 573 | Integer rightsSendStrategy = task.getRightsSendStrategy(); |
560 | tempPoints.setRightsSendStrategy(Objects.isNull(rightsSendStrategy) ? 0 : rightsSendStrategy); | 574 | tempPoints.setRightsSendStrategy(Objects.isNull(rightsSendStrategy) ? 0 : rightsSendStrategy); |
561 | return Arrays.asList(tempPoints); | 575 | return Arrays.asList(tempPoints); |
... | @@ -871,7 +885,7 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -871,7 +885,7 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
871 | * @param taskTemplate 任务模板 | 885 | * @param taskTemplate 任务模板 |
872 | * @return List<task> 任务列表 | 886 | * @return List<task> 任务列表 |
873 | */ | 887 | */ |
874 | private List<Task> loadListTaskByTaskTemplate(TaskTemplate taskTemplate,DataSyncMsg dataSyncMsg) { | 888 | private List<Task> loadListTaskByTaskTemplate(TaskTemplate taskTemplate, DataSyncMsg dataSyncMsg) { |
875 | 889 | ||
876 | if (Objects.nonNull(taskTemplate)) { | 890 | if (Objects.nonNull(taskTemplate)) { |
877 | 891 | ||
... | @@ -880,7 +894,8 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -880,7 +894,8 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
880 | List<Task> taskList = this.taskService.findByTemplateId(taskTemplateId); | 894 | List<Task> taskList = this.taskService.findByTemplateId(taskTemplateId); |
881 | 895 | ||
882 | Integer type = taskTemplate.getType(); | 896 | Integer type = taskTemplate.getType(); |
883 | taskList = this.pickUpTask(taskList,dataSyncMsg,type); | 897 | taskList = this.pickUpTask(taskList, dataSyncMsg, type); |
898 | |||
884 | return taskList; | 899 | return taskList; |
885 | 900 | ||
886 | } | 901 | } |
... | @@ -932,13 +947,27 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -932,13 +947,27 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
932 | taskList1.add(task); | 947 | taskList1.add(task); |
933 | break; | 948 | break; |
934 | 949 | ||
950 | // 观影 | ||
951 | case TaskTemplateType.TYPE_2: | ||
952 | Integer view0 = (Integer)values_0.get(0); | ||
953 | Integer view1 = (Integer)values_0.get(1); | ||
954 | List<Integer> view0List = Arrays.asList(view0, view1); | ||
955 | String view_0 = values.toArray()[0].toString(); | ||
956 | Integer view0_ = Integer.valueOf(view_0); | ||
957 | boolean view = UcListUtils.compareIntegerList(view0_, view0List); | ||
958 | if (view) | ||
959 | taskList1.add(task); | ||
960 | break; | ||
961 | |||
935 | // 参加活动 | 962 | // 参加活动 |
936 | case TaskTemplateType.TYPE_3: | 963 | case TaskTemplateType.TYPE_3: |
937 | String activityCode = values_0.get(0).toString(); | 964 | /*String activityCode = values_0.get(0).toString(); |
938 | String activityCode_ = values.toArray()[0].toString(); | 965 | String activityCode_ = values.toArray()[0].toString(); |
939 | if (activityCode_.equalsIgnoreCase(activityCode)) { | 966 | if (activityCode_.equalsIgnoreCase(activityCode)) { |
940 | taskList1.add(task); | 967 | taskList1.add(task); |
941 | } | 968 | }*/ |
969 | if (values_0.containsAll(values)) | ||
970 | taskList1.add(task); | ||
942 | break; | 971 | break; |
943 | 972 | ||
944 | // 订购 | 973 | // 订购 |
... | @@ -1014,7 +1043,7 @@ public class TaskOperationServiceImpl implements TaskOperationService { | ... | @@ -1014,7 +1043,7 @@ public class TaskOperationServiceImpl implements TaskOperationService { |
1014 | * @param event 任务 | 1043 | * @param event 任务 |
1015 | * @return TaskTemplate 任务模板 | 1044 | * @return TaskTemplate 任务模板 |
1016 | */ | 1045 | */ |
1017 | private TaskTemplate getTaskTemplate(Integer event,DataSyncMsg msgData) { | 1046 | private TaskTemplate getTaskTemplate(Integer event, DataSyncMsg msgData) { |
1018 | DataSyncMsg.MsgData msg = msgData.getMsg(); | 1047 | DataSyncMsg.MsgData msg = msgData.getMsg(); |
1019 | 1048 | ||
1020 | if (Objects.nonNull(msg.getParam())) { | 1049 | if (Objects.nonNull(msg.getParam())) { | ... | ... |
... | @@ -422,10 +422,11 @@ public class UserOperationServiceImpl implements UserOperationService { | ... | @@ -422,10 +422,11 @@ public class UserOperationServiceImpl implements UserOperationService { |
422 | userWeixin.setStatus(SUBSCRIBE_STATUS); | 422 | userWeixin.setStatus(SUBSCRIBE_STATUS); |
423 | 423 | ||
424 | // 创建小屏账户同时创建会员 | 424 | // 创建小屏账户同时创建会员 |
425 | UserWeixinDTO userWeixinDTO1 = this.createWeixinUserAndMember(userWeixin, 1); | 425 | _userWeixinDTO = this.createWeixinUserAndMember(userWeixin, 1); |
426 | 426 | ||
427 | Long memberId = userWeixinDTO1.getMemberId(); | 427 | Long memberId = _userWeixinDTO.getMemberId(); |
428 | memberDTO = this.memberService.findById(memberId); | 428 | memberDTO = this.memberService.findById(memberId); |
429 | memberDTO.setVip(SUBSCRIBE_STATUS); | ||
429 | 430 | ||
430 | } else { | 431 | } else { |
431 | 432 | ... | ... |
... | @@ -6,6 +6,8 @@ import lombok.NoArgsConstructor; | ... | @@ -6,6 +6,8 @@ import lombok.NoArgsConstructor; |
6 | 6 | ||
7 | import javax.validation.constraints.NotNull; | 7 | import javax.validation.constraints.NotNull; |
8 | import java.io.Serializable; | 8 | import java.io.Serializable; |
9 | import java.sql.Timestamp; | ||
10 | import java.time.LocalDateTime; | ||
9 | 11 | ||
10 | /** | 12 | /** |
11 | * | 13 | * |
... | @@ -17,8 +19,14 @@ public class DataSyncMsg implements Serializable { | ... | @@ -17,8 +19,14 @@ public class DataSyncMsg implements Serializable { |
17 | 19 | ||
18 | // 事件类型(用户的实际操作) | 20 | // 事件类型(用户的实际操作) |
19 | @NotNull | 21 | @NotNull |
20 | private String eventType; | 22 | private String evt; |
21 | 23 | // 具体事件 行为事件类型 1:登录;2:观影;3:参与活动;4:订购;10:跨屏绑定;11:积分转移;30:积分兑换商品;98:系统操作;99:其他 | |
24 | private Integer event; | ||
25 | //设备类型 1:大屏;2:小屏(微信)3.小屏(xx) | ||
26 | @NotNull | ||
27 | private Integer deviceType; | ||
28 | // 发送时间 | ||
29 | private LocalDateTime time; | ||
22 | // 消息体 | 30 | // 消息体 |
23 | private MsgData msg; | 31 | private MsgData msg; |
24 | 32 | ... | ... |
This diff is collapsed.
Click to expand it.
... | @@ -18,7 +18,7 @@ public class TaskOperationServiceTest extends BaseTest { | ... | @@ -18,7 +18,7 @@ public class TaskOperationServiceTest extends BaseTest { |
18 | Long memberId = 3L; | 18 | Long memberId = 3L; |
19 | DataSyncMsg dataSyncMsg = new DataSyncMsg(); | 19 | DataSyncMsg dataSyncMsg = new DataSyncMsg(); |
20 | // dataSyncMsg.setEntityType(EntityType.MEMBER); | 20 | // dataSyncMsg.setEntityType(EntityType.MEMBER); |
21 | dataSyncMsg.setEventType(EventType.LOGIN.name()); | 21 | dataSyncMsg.setEvt(EventType.LOGIN.name()); |
22 | DataSyncMsg.MsgData msgData = new DataSyncMsg.MsgData(); | 22 | DataSyncMsg.MsgData msgData = new DataSyncMsg.MsgData(); |
23 | msgData.setEvent(1); | 23 | msgData.setEvent(1); |
24 | msgData.setRemarks("remark"); | 24 | msgData.setRemarks("remark"); | ... | ... |
... | @@ -20,7 +20,8 @@ public class MqTest extends BaseTest { | ... | @@ -20,7 +20,8 @@ public class MqTest extends BaseTest { |
20 | @Test | 20 | @Test |
21 | public void test(){ | 21 | public void test(){ |
22 | DataSyncMsg dataSyncMsg = new DataSyncMsg(); | 22 | DataSyncMsg dataSyncMsg = new DataSyncMsg(); |
23 | dataSyncMsg.setEventType(EventType.LOGIN.name()); | 23 | // dataSyncMsg.setEventType(EventType.LOGIN.name()); |
24 | dataSyncMsg.setEvt(EventType.LOGIN.name()); | ||
24 | DataSyncMsg.MsgData msgData = new DataSyncMsg.MsgData(); | 25 | DataSyncMsg.MsgData msgData = new DataSyncMsg.MsgData(); |
25 | msgData.setEvent(1); | 26 | msgData.setEvent(1); |
26 | msgData.setRemarks("remark"); | 27 | msgData.setRemarks("remark"); | ... | ... |
-
Please register or sign in to post a comment