add firm
parent
4cfdee9a3a
commit
7f4984655b
|
@ -21,6 +21,7 @@ import org.slf4j.LoggerFactory;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.validation.Validator;
|
||||
|
@ -241,8 +242,12 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean registerUser(SysUser user) {
|
||||
return userMapper.insertUser(user) > 0;
|
||||
Assert.state(userMapper.insertUser(user) > 0,StringUtils.format("添加{}失败",user.getUserName()));
|
||||
user.setRoleId(3L);
|
||||
this.insertUserRole(user);//新增用户角色 默认给公司角色
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue