Commit 695a7a6a authored by zhangfeng's avatar zhangfeng

积分规则触发

parent d6505e50
......@@ -55,7 +55,7 @@ public class RecommendStrategy extends AbstractScoreRuleStrategy {
map.put("userId", userId);
map.put("userNameZh", message.getUserNameZh());
map.put("userNameEn", message.getUserNameEn());
String desensitizedPhoneNumber = message.getPhone().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
String desensitizedPhoneNumber = memberUserDO.getMobile().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
map.put("phone", desensitizedPhoneNumber);
memberUserScoreApi.operateScore(MemberUserScoreOperateReqDTO.builder()
......@@ -65,6 +65,7 @@ public class RecommendStrategy extends AbstractScoreRuleStrategy {
.ruleId(scoreRuleDO.getId())
.uniqueId(userId + "_" + message.getRecommendUserId())
.expireDays(scoreRuleDO.getScorePeriod())
.extParam(map)
.build());
} catch (Exception e) {
log.error("Recommend listener: operateScore error", e);
......
......@@ -27,8 +27,8 @@ public class RegisterStrategy extends AbstractScoreRuleStrategy {
@Resource
private MemberUserService memberUserService;
public RegisterStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService,MemberUserScoreApi memberUserScoreApi) {
super(scoreRuleService, memberUserScoreLogService, memberUserService,memberUserScoreApi);
public RegisterStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService, MemberUserScoreApi memberUserScoreApi) {
super(scoreRuleService, memberUserScoreLogService, memberUserService, memberUserScoreApi);
}
@Override
......@@ -68,6 +68,7 @@ public class RegisterStrategy extends AbstractScoreRuleStrategy {
.ruleId(scoreRuleDO.getId())
.uniqueId(String.valueOf(userId))
.expireDays(scoreRuleDO.getScorePeriod())
.extParam(map)
.build());
} catch (Exception e) {
log.error("Register listener: operateScore error", e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment