Commit 695a7a6a authored by zhangfeng's avatar zhangfeng

积分规则触发

parent d6505e50
...@@ -55,7 +55,7 @@ public class RecommendStrategy extends AbstractScoreRuleStrategy { ...@@ -55,7 +55,7 @@ public class RecommendStrategy extends AbstractScoreRuleStrategy {
map.put("userId", userId); map.put("userId", userId);
map.put("userNameZh", message.getUserNameZh()); map.put("userNameZh", message.getUserNameZh());
map.put("userNameEn", message.getUserNameEn()); 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); map.put("phone", desensitizedPhoneNumber);
memberUserScoreApi.operateScore(MemberUserScoreOperateReqDTO.builder() memberUserScoreApi.operateScore(MemberUserScoreOperateReqDTO.builder()
...@@ -65,6 +65,7 @@ public class RecommendStrategy extends AbstractScoreRuleStrategy { ...@@ -65,6 +65,7 @@ public class RecommendStrategy extends AbstractScoreRuleStrategy {
.ruleId(scoreRuleDO.getId()) .ruleId(scoreRuleDO.getId())
.uniqueId(userId + "_" + message.getRecommendUserId()) .uniqueId(userId + "_" + message.getRecommendUserId())
.expireDays(scoreRuleDO.getScorePeriod()) .expireDays(scoreRuleDO.getScorePeriod())
.extParam(map)
.build()); .build());
} catch (Exception e) { } catch (Exception e) {
log.error("Recommend listener: operateScore error", e); log.error("Recommend listener: operateScore error", e);
......
...@@ -27,8 +27,8 @@ public class RegisterStrategy extends AbstractScoreRuleStrategy { ...@@ -27,8 +27,8 @@ public class RegisterStrategy extends AbstractScoreRuleStrategy {
@Resource @Resource
private MemberUserService memberUserService; private MemberUserService memberUserService;
public RegisterStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService,MemberUserScoreApi memberUserScoreApi) { public RegisterStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService, MemberUserScoreApi memberUserScoreApi) {
super(scoreRuleService, memberUserScoreLogService, memberUserService,memberUserScoreApi); super(scoreRuleService, memberUserScoreLogService, memberUserService, memberUserScoreApi);
} }
@Override @Override
...@@ -68,6 +68,7 @@ public class RegisterStrategy extends AbstractScoreRuleStrategy { ...@@ -68,6 +68,7 @@ public class RegisterStrategy extends AbstractScoreRuleStrategy {
.ruleId(scoreRuleDO.getId()) .ruleId(scoreRuleDO.getId())
.uniqueId(String.valueOf(userId)) .uniqueId(String.valueOf(userId))
.expireDays(scoreRuleDO.getScorePeriod()) .expireDays(scoreRuleDO.getScorePeriod())
.extParam(map)
.build()); .build());
} catch (Exception e) { } catch (Exception e) {
log.error("Register listener: operateScore error", 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