Bläddra i källkod

保存用户租户信息

tags/v2.3.0^2
chenjiandong 1 år sedan
förälder
incheckning
4adb7f7eab
2 ändrade filer med 5 tillägg och 3 borttagningar
  1. +3
    -1
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/ClientUserServiceImpl.java
  2. +2
    -2
      tuoheng_oidc_admin/src/main/resources/mapper/ClientUserMapper.xml

+ 3
- 1
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/ClientUserServiceImpl.java Visa fil

@@ -64,7 +64,9 @@ public class ClientUserServiceImpl implements ClientUserSevice {
}else {
userPo.setIsTenant(0);
UserPo po = clientUserMapper.getUserByUserName(createClientUserDto.getTenantName());
userPo.setTenantId(po.getId());
if(po != null){
userPo.setTenantId(po.getId());
}
}
}
//租户逻辑新增 end

+ 2
- 2
tuoheng_oidc_admin/src/main/resources/mapper/ClientUserMapper.xml Visa fil

@@ -3,8 +3,8 @@
<mapper namespace="com.tuoheng.mapper.ClientUserMapper">

<insert id="insertClientUser" parameterType="com.tuoheng.model.po.UserPo" keyProperty="id" useGeneratedKeys="true">
insert into users (username, password, create_user)
values (#{username}, #{password}, #{createUser})
insert into users (username, password, create_user, tenant_id, is_tenant)
values (#{username}, #{password}, #{createUser}, #{tenantId}, #{isTenant})
</insert>

<select id="judgeCreateByUserName" parameterType="java.lang.String" resultType="int">

Laddar…
Avbryt
Spara