Commit a3d9da50 authored by 李健华's avatar 李健华

注册方法事件发送判断

parent 17690c4a
......@@ -89,7 +89,7 @@ public class AppController implements IBaseController {
if (user == null) {
// 未注册过
isRegister = true;
user = userRegisterService.register(registerFrom, phoneNumber, idNo, name, channelId, createdFrom);
user = userRegisterService.register(registerFrom, phoneNumber, idNo, name, channelId, createdFrom, tenantId);
}
// 无论是否注册过都添加映射
oauthLoginInfoService.addLoginInfo(user, tenantId);
......
......@@ -61,6 +61,8 @@ public interface IUserRegisterService {
*/
User register(String phoneNo, Long channelId, Long registerFrom, String appChannel, Long btRegisterChannelId, String dimension);
User register(String phoneNo, Long channelId, Long registerFrom, String appChannel, Long btRegisterChannelId, String dimension, Integer tenantId);
/**
* 替换InnerController.saveMulti里的userService.registerAndReturn
* /innserapi/user/save_multi
......
......@@ -175,6 +175,27 @@ import java.util.UUID;
return user;
}
@Transactional(rollbackFor = Exception.class)
@Override
public User register(String phoneNo, Long channelId, Long registerFrom, String appChannel, Long btRegisterChannelId, String dimension, Integer tenantId) {
UserRegisterParam userRegisterParam = UserRegisterParam.builder()
.registerFrom(registerFrom)
.phoneNo(phoneNo)
.channelId(channelId)
.btRegisterChannelId(btRegisterChannelId)
.dimension(dimension)
.sendSuccessSms(true)
.sendAppSms(true)
.sendSuccessMq(true)
.build();
User user = saveUser(userRegisterParam);
if (tenantId == null || tenantId.equals(TenantUtil.TENANT_DEFAULT)) {
applicationEventPublisher.publishEvent(new RegisterEvent(this, userRegisterParam));
}
return user;
}
@Transactional(rollbackFor = Exception.class)
@Override
public User register(Long registeredFrom, Long channelId, String phoneNo, String name, String idNo, Address addressObj, String contacts, List<Contact> contactList, Long btRegisterChannelId) {
......
This diff is collapsed.
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