Commit b9b372a7 by zhengxj

finish 修复bug16915 on 20190315 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18557 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 94d1c2fd
...@@ -18,10 +18,12 @@ import com.glsx.common.constants.ResultCodeEnum; ...@@ -18,10 +18,12 @@ import com.glsx.common.constants.ResultCodeEnum;
import com.glsx.common.constants.ResultObject; import com.glsx.common.constants.ResultObject;
import com.glsx.common.utils.StringUtils; import com.glsx.common.utils.StringUtils;
import com.glsx.usercenter.mapper.SysOrganizationMapper; import com.glsx.usercenter.mapper.SysOrganizationMapper;
import com.glsx.usercenter.mapper.SysUserOrgMapper;
import com.glsx.usercenter.pojo.menu.SysOrganization; import com.glsx.usercenter.pojo.menu.SysOrganization;
import com.glsx.usercenter.pojo.menu.SysOrganizationExample; import com.glsx.usercenter.pojo.menu.SysOrganizationExample;
import com.glsx.usercenter.pojo.menu.SysOrganizationExample.Criteria; import com.glsx.usercenter.pojo.menu.SysOrganizationExample.Criteria;
import com.glsx.usercenter.pojo.user.SysUser; import com.glsx.usercenter.pojo.user.SysUser;
import com.glsx.usercenter.pojo.user.SysUserOrg;
import com.glsx.usercenter.service.ISysOrganizationService; import com.glsx.usercenter.service.ISysOrganizationService;
/** /**
...@@ -37,6 +39,9 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{ ...@@ -37,6 +39,9 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{
@Autowired @Autowired
private SysOrganizationMapper orgDao; private SysOrganizationMapper orgDao;
@Autowired
private SysUserOrgMapper sysUserOrgDao;
/** /**
* SysOrganization selectDetailById(Integer id); * SysOrganization selectDetailById(Integer id);
...@@ -70,7 +75,7 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{ ...@@ -70,7 +75,7 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{
* *
*/ */
@Override @Override
public ResultObject insertSelective(SysOrganization record) { public ResultObject insertSelective(SysOrganization record,Integer userId) {
List<SysOrganization> list = null; List<SysOrganization> list = null;
boolean isExceedLevel = false; boolean isExceedLevel = false;
...@@ -109,8 +114,14 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{ ...@@ -109,8 +114,14 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{
// } // }
// record.setLabel(label); // record.setLabel(label);
} }
orgDao.insertSelective(record); orgDao.insertSelective(record);
// 记录用户的组织
SysUserOrg sysUserOrg=new SysUserOrg();
sysUserOrg.setOrgId(record.getId());
sysUserOrg.setOrgName(sysUserOrg.getOrgName());
sysUserOrg.setUserId(userId);
sysUserOrgDao.insertSelective(sysUserOrg );
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg()); return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg());
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!