|  |  |  | 
|---|
|  |  |  | package com.matrix.system.hive.action; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.matrix.core.exception.GlobleException; | 
|---|
|  |  |  | import com.matrix.core.pojo.AjaxResult; | 
|---|
|  |  |  | import com.matrix.system.common.bean.SysUsers; | 
|---|
|  |  |  | import com.matrix.system.hive.action.util.QueryUtil; | 
|---|
|  |  |  | 
|---|
|  |  |  | AjaxResult addOrModify(ShoppingGoodsCategory shoppingGoodsCategory) { | 
|---|
|  |  |  | if (shoppingGoodsCategory.getId() != null) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 自己不能是自己的父节点 | 
|---|
|  |  |  | if (shoppingGoodsCategory.getParentId() != null && shoppingGoodsCategory.getParentId().equals(shoppingGoodsCategory.getId())) { | 
|---|
|  |  |  | throw new GlobleException("父级不能是自己"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return modify(goodsCategoryService, shoppingGoodsCategory, "商品类型"); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | QueryUtil.setQueryLimit(shoppingGoodsCategory); | 
|---|