Commit d66b84c2 authored by licc's avatar licc

用户注册 接口提交 2

parent 8470e7ae
...@@ -6,6 +6,7 @@ import cn.wisenergy.model.app.*; ...@@ -6,6 +6,7 @@ import cn.wisenergy.model.app.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -46,6 +47,7 @@ public class LoginManager { ...@@ -46,6 +47,7 @@ public class LoginManager {
* @param user 用户信息 * @param user 用户信息
* @return true or false * @return true or false
*/ */
@Transactional(rollbackFor = Exception.class)
public boolean initUserInfo(User user, List<TeamUserInfo> list) { public boolean initUserInfo(User user, List<TeamUserInfo> list) {
String userId = user.getUserId(); String userId = user.getUserId();
String yearMonth = DateUtil.convertDateToStr(new Date(), "yyyy-MM"); String yearMonth = DateUtil.convertDateToStr(new Date(), "yyyy-MM");
......
...@@ -67,7 +67,6 @@ public class LoginServiceImpl implements LoginService { ...@@ -67,7 +67,6 @@ public class LoginServiceImpl implements LoginService {
user.setUserLevel(0); user.setUserLevel(0);
String inviteCode = ShareCodeUtil.idToCode(Long.parseLong(userVo.getUserId())); String inviteCode = ShareCodeUtil.idToCode(Long.parseLong(userVo.getUserId()));
user.setInviteCode(inviteCode); user.setInviteCode(inviteCode);
if (StringUtils.isBlank(userVo.getBeInvitedCode())) { if (StringUtils.isBlank(userVo.getBeInvitedCode())) {
user.setBeInvitedCode("1"); user.setBeInvitedCode("1");
List<TeamUserInfo> list = new ArrayList<>(); List<TeamUserInfo> list = new ArrayList<>();
......
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