飞书事件变更,mq更新
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.mapper.EnterpriseUserMapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -44,4 +45,11 @@ public class EnterpriseUserDAO {
|
||||
}
|
||||
enterpriseUserMapper.deleteUser(excludeUserIds);
|
||||
}
|
||||
|
||||
public Integer deleteUserByUserId(String userId){
|
||||
if(StringUtils.isBlank(userId)){
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return enterpriseUserMapper.deleteUserByUserId(userId);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.entity.EnterpriseUserRoleDO;
|
||||
import com.cool.store.entity.SysRoleDO;
|
||||
import com.cool.store.enums.DataSourceEnum;
|
||||
@@ -43,4 +44,11 @@ public class EnterpriseUserRoleDAO {
|
||||
return enterpriseUserRoleMapper.deleteUserInRole(userId, dataSourceEnum.getCode(), excludeRoleId);
|
||||
}
|
||||
|
||||
public Integer deleteUserRole(String userId){
|
||||
if(StringUtils.isBlank(userId)){
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return enterpriseUserRoleMapper.deleteUserRole(userId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.entity.UserRegionMappingDO;
|
||||
import com.cool.store.enums.DataSourceEnum;
|
||||
import com.cool.store.mapper.UserRegionMappingMapper;
|
||||
@@ -51,4 +52,11 @@ public class UserRegionMappingDAO {
|
||||
return userRegionMappingMapper.deleteRegionUserByExcludeUserIds(excludeUserIds);
|
||||
}
|
||||
|
||||
public Integer deleteUserRegionByUserId(String userId){
|
||||
if(StringUtils.isBlank(userId)){
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return userRegionMappingMapper.deleteUserRegionByUserId(userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,4 +38,11 @@ public interface EnterpriseUserMapper {
|
||||
* @return
|
||||
*/
|
||||
int deleteUser(@Param("excludeUserIds") List<String> excludeUserIds);
|
||||
|
||||
/**
|
||||
* 删除用户
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Integer deleteUserByUserId(@Param("userId") String userId);
|
||||
}
|
||||
@@ -26,13 +26,27 @@ public interface EnterpriseUserRoleMapper {
|
||||
int updateByPrimaryKeySelective(EnterpriseUserRoleDO record);
|
||||
|
||||
/**
|
||||
* 删除用户角色
|
||||
* 删除角色下的用户
|
||||
* @param roleId
|
||||
* @param type
|
||||
* @param userIds
|
||||
* @param excludeUserIds
|
||||
* @return
|
||||
*/
|
||||
int deleteRoleInUser(@Param("roleId") String roleId, @Param("type") Integer type, @Param("excludeUserIds") List<String> excludeUserIds);
|
||||
|
||||
/**
|
||||
* 删除用户下的角色
|
||||
* @param userId
|
||||
* @param type
|
||||
* @param excludeRoleId
|
||||
* @return
|
||||
*/
|
||||
int deleteUserInRole(@Param("userId") String userId, @Param("type") Integer type, @Param("excludeRoleId") String excludeRoleId);
|
||||
|
||||
/**
|
||||
* 删除用户所有角色
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Integer deleteUserRole(@Param("userId") String userId);
|
||||
}
|
||||
@@ -47,4 +47,11 @@ public interface UserRegionMappingMapper {
|
||||
* @return
|
||||
*/
|
||||
Integer deleteRegionUserByExcludeUserIds(@Param("excludeUserIds") List<String> excludeUserIds);
|
||||
|
||||
/**
|
||||
* 删除用户所在的区域
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Integer deleteUserRegionByUserId(@Param("userId") String userId);
|
||||
}
|
||||
@@ -242,4 +242,8 @@
|
||||
<update id="deleteUser">
|
||||
update enterprise_user set deleted = 1 where user_id not in <foreach collection="excludeUserIds" open="(" close=")" separator="," item="userId">#{userId}</foreach>
|
||||
</update>
|
||||
|
||||
<update id="deleteUserByUserId">
|
||||
update enterprise_user set deleted = 1 where user_id = #{userId}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -91,4 +91,8 @@
|
||||
<update id="deleteUserInRole">
|
||||
update enterprise_user_role set deleted = 1 where role_id != #{excludeRoleId} and user_id = #{userId} and type = #{type}
|
||||
</update>
|
||||
|
||||
<update id="deleteUserRole">
|
||||
update enterprise_user_role set deleted = 1 where user_id = #{userId}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -119,4 +119,8 @@
|
||||
update user_region_mapping set deleted = 1 where user_id not in <foreach collection="excludeUserIds" open="(" close=")" separator="," item="userId">#{userId}</foreach>
|
||||
</update>
|
||||
|
||||
<update id="deleteUserRegionByUserId">
|
||||
update user_region_mapping set deleted = 1 where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user