|
|
|
@ -11,9 +11,12 @@ import com.spring.common.exception.XJException; |
|
|
|
import com.spring.common.utils.Constant; |
|
|
|
import com.spring.common.utils.PageUtils; |
|
|
|
import com.spring.common.utils.Query; |
|
|
|
import com.spring.modules.base.data.SysUserEntityData; |
|
|
|
import com.spring.modules.base.data.*; |
|
|
|
import com.spring.modules.base.entity.AccessSiteData; |
|
|
|
import com.spring.modules.base.entity.PlmFieldFunctionList; |
|
|
|
import com.spring.modules.base.service.BaseService; |
|
|
|
import com.spring.modules.factory.dao.AccessSiteMapper; |
|
|
|
import com.spring.modules.project.data.PlmProjectInfoData; |
|
|
|
import com.spring.modules.sys.service.*; |
|
|
|
import com.spring.modules.sys.dao.SysUserDao; |
|
|
|
import com.spring.modules.sys.entity.SysUserEntity; |
|
|
|
@ -24,17 +27,17 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
|
|
@Service("sysUserService") |
|
|
|
public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> implements SysUserService { |
|
|
|
@Autowired |
|
|
|
private SysUserRoleService sysUserRoleService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private BaseService baseService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SysRoleService sysRoleService; |
|
|
|
|
|
|
|
@ -129,8 +132,30 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void deleteBatch(Long[] userId) { |
|
|
|
SysUserEntity sysUserEntity = baseMapper.selectById(userId[0]); |
|
|
|
String username = sysUserEntity.getUsername(); |
|
|
|
String site = sysUserEntity.getSite(); |
|
|
|
sysUserDao.deleteBatchIds(Arrays.asList(userId)); |
|
|
|
userJobService.deleteUserJobInfo(userId); |
|
|
|
RoleData roleData = new RoleData(); |
|
|
|
roleData.setSite(site); |
|
|
|
roleData.setUsername(username); |
|
|
|
baseService.deleteAccessRoleWithUsername(roleData); |
|
|
|
PlmFieldListData fieldListData = new PlmFieldListData(); |
|
|
|
fieldListData.setUsername(username); |
|
|
|
baseService.deleteAccessFieldWithUsername(fieldListData); |
|
|
|
BuData buData = new BuData(); |
|
|
|
buData.setUsername(username); |
|
|
|
buData.setSite(site); |
|
|
|
baseService.deleteAccessBuWithUsername(buData); |
|
|
|
PlmProjectInfoData projectInfoData = new PlmProjectInfoData(); |
|
|
|
projectInfoData.setUsername(username); |
|
|
|
projectInfoData.setSite(site); |
|
|
|
baseService.deleteAccessProjectWithUsername(projectInfoData); |
|
|
|
SiteVoData siteVoData = new SiteVoData(); |
|
|
|
siteVoData.setUsername(username); |
|
|
|
siteVoData.setSiteID(site); |
|
|
|
baseService.deleteAccessSiteWithUsername(siteVoData); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
|