|
@@ -49,7 +49,9 @@ public class AppSiteServiceImpl extends ServiceImpl<AppSiteMapper, AppSite> impl
|
|
if (null == siteCuDTO.getType()) throw new JeecgBootException("商户类型不能为空", SC_INTERNAL_SERVER_ERROR_500);
|
|
if (null == siteCuDTO.getType()) throw new JeecgBootException("商户类型不能为空", SC_INTERNAL_SERVER_ERROR_500);
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
AppSite site = new AppSite();
|
|
AppSite site = new AppSite();
|
|
- SysDepart departById = sysDepartMapper.getDepartById(siteCuDTO.getTenantId());
|
|
|
|
|
|
+// SysDepart departById = sysDepartMapper.getDepartById(siteCuDTO.getTenantId());
|
|
|
|
+ //根据当前登录的orgcode去查询所属部门id
|
|
|
|
+ SysDepart departById = sysDepartMapper.findByOrgCode(sysUser.getOrgCode());
|
|
if (null == departById) throw new JeecgBootException("商户部门不存在", SC_INTERNAL_SERVER_ERROR_500);
|
|
if (null == departById) throw new JeecgBootException("商户部门不存在", SC_INTERNAL_SERVER_ERROR_500);
|
|
if (!departById.getOrgType().equals("3")) throw new JeecgBootException("商户部门类型错误", SC_INTERNAL_SERVER_ERROR_500);
|
|
if (!departById.getOrgType().equals("3")) throw new JeecgBootException("商户部门类型错误", SC_INTERNAL_SERVER_ERROR_500);
|
|
BeanUtils.copyProperties(siteCuDTO, site);
|
|
BeanUtils.copyProperties(siteCuDTO, site);
|