|
@@ -53,7 +53,7 @@ public class AppSiteServiceImpl extends ServiceImpl<AppSiteMapper, AppSite> impl
|
|
|
//根据当前登录的orgcode去查询所属部门id
|
|
|
SysDepart departById = sysDepartMapper.findByOrgCode(sysUser.getOrgCode());
|
|
|
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.getOrgCategory().equals("30")||departById.getOrgCategory().equals("20"))) throw new JeecgBootException("商户部门类型错误", SC_INTERNAL_SERVER_ERROR_500);
|
|
|
BeanUtils.copyProperties(siteCuDTO, site);
|
|
|
if (null == site.getOrgCode())
|
|
|
throw new JeecgBootException("商户部门编码不能为空", SC_INTERNAL_SERVER_ERROR_500);
|
|
@@ -64,11 +64,6 @@ public class AppSiteServiceImpl extends ServiceImpl<AppSiteMapper, AppSite> impl
|
|
|
if (saveSiteResult < 1) {
|
|
|
throw new JeecgBootException("商户信息保存失败", SC_INTERNAL_SERVER_ERROR_500);
|
|
|
}
|
|
|
- departById.setAddress(site.getProvince()+site.getCity()+site.getArea()+site.getAddress());
|
|
|
- int updateById = sysDepartMapper.updateById(departById);
|
|
|
- if (updateById < 1) {
|
|
|
- throw new JeecgBootException("商户部门信息更新失败");
|
|
|
- }
|
|
|
// 所有操作成功完成后返回 true
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
@@ -98,8 +93,6 @@ public class AppSiteServiceImpl extends ServiceImpl<AppSiteMapper, AppSite> impl
|
|
|
if (null == dbSite) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
|
|
|
AppSiteDTO appSiteDTO = new AppSiteDTO();
|
|
|
BeanUtils.copyProperties(dbSite, appSiteDTO);
|
|
|
- LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
-// checkPermission(dbSite,sysUser);
|
|
|
return appSiteDTO;
|
|
|
}
|
|
|
|