Commit 35692258 authored by xixinzhao's avatar xixinzhao

注册用户默认加入用户组

parent 4c7238e4
......@@ -66,6 +66,9 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
@Autowired
CommerceInfoServiceImpl commerceInfoService;
@Value("${hygf.user.group.id}")
private long userGroupId;
/**
* 分页查询
*/
......@@ -252,9 +255,13 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
if (userResult == null || userResult.getResult() == null) {
throw new BadRequest("单位注册失败");
}
String[] userIds = { userResult.getResult().getUserId() };
// String[] userIds = { userResult.getResult().getUserId() };
regUnitInfo.setAdminUserId(userResult.getResult().getUserId());
regUnitInfo.setAmosCompanySeq(companyInfo.getSequenceNbr());
List<String> userId = new ArrayList<>();
userId.add(userResult.getResult().getUserId());
// 将创建用户加入用户组
Privilege.groupUserClient.create(userGroupId, userId);
} catch (Exception e) {
// 删除已经创建的 企业信息
if (companyInfo != null && companyInfo.getSequenceNbr() != null) {
......
......@@ -106,4 +106,6 @@ sms.huawei.signature=华为云短信测试
# 电站审核pageId
power.station.examine.pageId=1680853427061551106
# 电站审核计划id
power.station.examine.planId=c4ed1873-0dc6-4518-a7a9-dbc588ef35e5
\ No newline at end of file
power.station.examine.planId=c4ed1873-0dc6-4518-a7a9-dbc588ef35e5
# 用户组userGroupId
hygf.user.group.id=1679755750924120066
\ No newline at end of file
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