| | |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.ctuser.dao.mapper.CtUseroleMapper; |
| | | import cn.huge.module.ctuser.domain.po.CtUsepost; |
| | | import cn.huge.module.ctuser.domain.po.CtUserole; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | public List<String> listRoleCode(String userId){ |
| | | return mapper.listRoleCode(userId); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户编号物理删除 |
| | | * @param userId 用户编号 |
| | | */ |
| | | public void deleteByUserId(String userId){ |
| | | try{ |
| | | QueryWrapper<CtUserole> ctUseroleQueryWrapper = new QueryWrapper<>(); |
| | | ctUseroleQueryWrapper.eq("user_id", userId); |
| | | mapper.delete(ctUseroleQueryWrapper); |
| | | }catch (Exception e){ |
| | | log.error("[CtUseroleService.deleteByUserId]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CtUseroleService.deleteByUserId", e); |
| | | } |
| | | } |
| | | } |