|
@@ -49,7 +49,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.getOrgCategory().equals("30")||departById.getOrgCategory().equals("20"))) throw new JeecgBootException("商户部门类型错误", SC_INTERNAL_SERVER_ERROR_500);
|
|
|
+ if (!(departById.getOrgCategory().equals("21")||departById.getOrgCategory().equals("20"))) throw new JeecgBootException("商户部门类型错误", SC_INTERNAL_SERVER_ERROR_500);
|
|
|
BeanUtils.copyProperties(siteCuDTO, site);
|
|
|
if (null == departById.getOrgCode())
|
|
|
throw new JeecgBootException("商户部门编码不能为空", SC_INTERNAL_SERVER_ERROR_500);
|
|
@@ -72,6 +72,7 @@ public class AppSiteServiceImpl extends ServiceImpl<AppSiteMapper, AppSite> impl
|
|
|
public Boolean editSite(AppSiteDTO siteCuDTO) {
|
|
|
AppSite site = new AppSite();
|
|
|
BeanUtils.copyProperties(siteCuDTO, site);
|
|
|
+ LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
if (null == site.getType()) throw new JeecgBootException("场地类型不能为空", SC_INTERNAL_SERVER_ERROR_500);
|
|
|
AppSite dbSite = baseMapper.selectById(site.getId());
|
|
|
if (null == dbSite) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
|
|
@@ -113,7 +114,6 @@ public class AppSiteServiceImpl extends ServiceImpl<AppSiteMapper, AppSite> impl
|
|
|
public Boolean deleteSiteById(String id) {
|
|
|
AppSite dbSite = baseMapper.selectById(id);
|
|
|
if (null == dbSite) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
|
|
|
- LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
// checkPermission(dbSite,sysUser);
|
|
|
int deleteSiteResult = baseMapper.deleteById(id);
|
|
|
if (deleteSiteResult < 1) {
|