Skip to content

Commit

Permalink
修复删除没有上级机构的机构时候报空指针的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
fengxiang1990 committed Nov 18, 2015
1 parent 2d93685 commit b3612e8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
package com.thinkgem.jeesite.modules.sys.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;
Expand Down Expand Up @@ -36,8 +37,11 @@ public List<Office> findList(Boolean isAll){

@Transactional(readOnly = true)
public List<Office> findList(Office office){
office.setParentIds(office.getParentIds()+"%");
return dao.findByParentIdsLike(office);
if(office != null){
office.setParentIds(office.getParentIds()+"%");
return dao.findByParentIdsLike(office);
}
return new ArrayList<Office>();
}

@Transactional(readOnly = false)
Expand Down

0 comments on commit b3612e8

Please sign in to comment.