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

注册增加签署协议

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