| | |
| | | return ResponseValue.error("分类名称已存在"); |
| | | } |
| | | |
| | | // int result = this.baseCategoryService.add(param,this.getCurrentUser()); |
| | | int result = this.baseCategoryService.add(param); |
| | | int result = this.baseCategoryService.add(param, this.getCurrentUser()); |
| | | if(result>0) return ResponseValue.success(1); |
| | | return ResponseValue.error("新增失败!"); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/list") |
| | | public ResponseValue queryBaseCategoryList(BaseCategoryParam param) { |
| | | // S_user_core currentUser = this.getCurrentUser(); |
| | | // if (currentUser == null) { |
| | | // return ResponseValue.error("登录用户信息不存在"); |
| | | // } |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | | } |
| | | GenericPager<BaseCategory> pager = this.baseCategoryService.queryBaseCategoryList(param); |
| | | return ResponseValue.success(pager); |
| | | } |
| | |
| | | if (category != null) { |
| | | return ResponseValue.error("分类名称已存在"); |
| | | } |
| | | // S_user_core currentUser = this.getCurrentUser(); |
| | | // if (currentUser == null) { |
| | | // return ResponseValue.error("登录用户信息不存在"); |
| | | // } |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | | } |
| | | int num = this.baseCategoryService.updateBaseCategory(baseCategory); |
| | | return num>0 ? ResponseValue.success(1):ResponseValue.error("编辑失败!"); |
| | | } |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * |
| | | * @author 卢庆阳 |
| | | * @date 2023/9/27 |
| | | */ |
| | |
| | | if (baseCategory.getId() == null) { |
| | | return ResponseValue.error("分类id为空"); |
| | | } |
| | | //S_user_core currentUser = this.getCurrentUser(); |
| | | int num = this.baseCategoryService.updateById(baseCategory); |
| | | int num = this.baseCategoryService.updateById(baseCategory,this.getCurrentUser()); |
| | | |
| | | return num>0 ? ResponseValue.success(1):ResponseValue.error("删除失败!"); |
| | | } |
| | | |
| | | /** |
| | | * 根据节点id查询节点详情 |
| | | * |
| | | * @author 卢庆阳 |
| | | * @date 2023/9/26 |
| | | */ |