| | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.*; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.BladeUser; |
| | |
| | | import org.springblade.core.tool.constant.RoleConstant; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.system.cache.DictCache; |
| | | import org.springblade.system.entity.Dept; |
| | | import org.springblade.system.enums.DictEnum; |
| | | import org.springblade.system.service.IDeptService; |
| | |
| | | @NonDS |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/dept") |
| | | @RequestMapping("/blade-system/dept") |
| | | @Api(value = "部门", tags = "部门") |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public class DeptController{ |
| | |
| | | CacheUtil.clear(SYS_CACHE); |
| | | // 返回懒加载树更新节点所需字段 |
| | | Kv kv = Kv.create().set("id", String.valueOf(dept.getId())).set("tenantId", dept.getTenantId()) |
| | | .set("deptCategoryName", DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory())); |
| | | .set("deptCategoryName", DictCache.getValue(DictEnum.ORG_CATEGORY.getName(), dept.getDeptCategory())); |
| | | return R.data(kv); |
| | | } |
| | | return R.fail("操作失败"); |