Commit e6e832e1 authored by 董建华's avatar 董建华

注册增加签署协议

parent eaddfac7
...@@ -56,9 +56,10 @@ public class LoginModule implements ILoginModule { ...@@ -56,9 +56,10 @@ public class LoginModule implements ILoginModule {
VerifyStrategyFactory.get(type).verify(user, verify); VerifyStrategyFactory.get(type).verify(user, verify);
LoginProperties loginProperties = LoginProperties.builder() LoginProperties loginProperties = LoginProperties.builder()
.createdFrom(user.getRegisteredFrom()) .createdFrom(1L)
.appChannel(appChannel) .appChannel(appChannel)
.channelId(channelId) .channelId(channelId)
.merchantName("xyqb")
.build(); .build();
AuthBean session = sessionService.createSession(user, loginProperties); AuthBean session = sessionService.createSession(user, loginProperties);
return LoginVo.builder() return LoginVo.builder()
......
...@@ -24,7 +24,7 @@ public class BlackHoleRegisteredEventListener implements ApplicationListener<Reg ...@@ -24,7 +24,7 @@ public class BlackHoleRegisteredEventListener implements ApplicationListener<Reg
private String routingKey; private String routingKey;
@Resource @Resource
private RabbitTemplate registeredNotifyBlackHoleRabbitTemplate; private RabbitTemplate registeredNotifyBlackHoleRabbitTemplate;
long [] templateIds = {8l,280l};
@Override @Override
public void onApplicationEvent(RegisterEvent event) { public void onApplicationEvent(RegisterEvent event) {
UserRegisterParam userRegisterParam = event.getUserRegisterParam(); UserRegisterParam userRegisterParam = event.getUserRegisterParam();
...@@ -34,18 +34,21 @@ public class BlackHoleRegisteredEventListener implements ApplicationListener<Reg ...@@ -34,18 +34,21 @@ public class BlackHoleRegisteredEventListener implements ApplicationListener<Reg
String dateStr = signDate.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日")); String dateStr = signDate.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日"));
int day = signDate.getDayOfMonth(); int day = signDate.getDayOfMonth();
// 信用钱包服务与隐私协议 // 信用钱包服务与隐私协议
long templateId = 8; for (long id : templateIds) {
JSONObject fields = new JSONObject(); JSONObject fields = new JSONObject();
fields.put("phoneNo", user.getPhoneNo()); fields.put("phoneNo", user.getPhoneNo());
fields.put("genarateDateStr", dateStr); fields.put("genarateDateStr", dateStr);
fields.put("day", day); fields.put("day", day);
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("userId", user.getId()); json.put("userId", user.getId());
json.put("mustReal", false); json.put("mustReal", false);
json.put("templateId", templateId); json.put("templateId", id);
json.put("fields", fields); json.put("fields", fields);
JSONArray array = new JSONArray(); JSONArray array = new JSONArray();
array.add(json); array.add(json);
registeredNotifyBlackHoleRabbitTemplate.convertAndSend(exchange, routingKey, array.toString()); registeredNotifyBlackHoleRabbitTemplate.convertAndSend(exchange, routingKey, array.toString());
}
} }
} }
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