zhangxin пре 2 дана
родитељ
комит
36ae3212e6

+ 4 - 4
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppSiteMapper.xml

@@ -21,16 +21,16 @@
             ORDER BY b.good_rate DESC
         </if>
         <if test="venueType != null and venueType == '1-1'">
-            AND c.org_category = 2
+            AND c.org_category = 20
         </if>
         <if test="venueType != null and venueType == '1-2'">
-            AND c.org_category = 2 ORDER BY  b.good_rate DESC
+            AND c.org_category = 20 ORDER BY  b.good_rate DESC
         </if>
         <if test="venueType != null and venueType == '2-1'">
-            AND c.org_category = 3
+            AND c.org_category = 21
         </if>
         <if test="venueType != null and venueType == '2-2'">
-            AND c.org_category = 3 ORDER BY  b.good_rate DESC
+            AND c.org_category = 21 ORDER BY  b.good_rate DESC
         </if>
     </select>
 

+ 2 - 2
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppSiteServiceImpl.java

@@ -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) {