private
Result<List<ProductCategory>> getProductCategoryList(HttpServletRequest request) {
Shop currentShop = (Shop) request.getSession().getAttribute(
"currentShop"
);
List<ProductCategory> list =
null
;
if
(currentShop !=
null
&& currentShop.getShopId() >
0
) {
list = productCategoryService.getProductCategoryList(currentShop.getShopId());
return
new
Result<List<ProductCategory>>(
true
, list);
}
else
{
ProductCategoryStateEnum ps = ProductCategoryStateEnum.INNER_ERROR;
return
new
Result<List<ProductCategory>>(
false
, ps.getState(), ps.getStateInfo());
}
}