Commit ac24031e authored by youc3576's avatar youc3576 Committed by linlinjava
Browse files

!4 修复一级类目无二级类目时 后台报数组越界异常

Merge pull request !4 from youc3576/master
parents 86b01d7e a34a95f8
...@@ -189,7 +189,7 @@ public class WxGoodsController { ...@@ -189,7 +189,7 @@ public class WxGoodsController {
if (cur.getPid() == 0) { if (cur.getPid() == 0) {
parent = cur; parent = cur;
children = categoryService.queryByPid(cur.getId()); children = categoryService.queryByPid(cur.getId());
cur = children.get(0); cur = children.size()>0?children.get(0):cur;
} else { } else {
parent = categoryService.findById(cur.getPid()); parent = categoryService.findById(cur.getPid());
children = categoryService.queryByPid(cur.getPid()); children = categoryService.queryByPid(cur.getPid());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment