| | |
| | | import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; |
| | | import cn.iocoder.yudao.module.system.dal.mysql.dept.DeptMapper; |
| | | import cn.iocoder.yudao.module.system.dal.redis.RedisKeyConstants; |
| | | import cn.iocoder.yudao.framework.operatelog.core.util.OperateLogUtils; |
| | | import com.google.common.annotations.VisibleForTesting; |
| | | import com.mzt.logapi.starter.annotation.LogRecord; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | |
| | | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| | | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| | | import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; |
| | | import static cn.iocoder.yudao.module.system.enums.LogRecordConstants.*; |
| | | |
| | | /** |
| | | * 部门 Service 实现类 |
| | |
| | | } |
| | | |
| | | @Override |
| | | @LogRecord(type = SYSTEM_DEPT_TYPE, subType = SYSTEM_DEPT_IMPORT_SUB_TYPE, bizNo = "0", |
| | | success = SYSTEM_DEPT_IMPORT_SUCCESS) |
| | | public DeptImportRespVO importDeptList(List<DeptImportExcelVO> importDepts, boolean isUpdateSupport) { |
| | | if (CollUtil.isEmpty(importDepts)) { |
| | | throw exception(DEPT_IMPORT_LIST_IS_EMPTY); |
| | |
| | | fullPathDeptIdMap.put(myFullPath, newDept.getId()); |
| | | } |
| | | |
| | | // 记录导入结果汇总,供 @LogRecord 的 success 文案引用 |
| | | OperateLogUtils.putImportSummary(respVO.getCreateDeptNames(), respVO.getUpdateDeptNames(), |
| | | respVO.getFailureDeptNames()); |
| | | return respVO; |
| | | } |
| | | |