Browse Source

fix(system):
1.小程序查看场地修改

wzq 2 days ago
parent
commit
f93ed5abb1

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

@@ -181,7 +181,7 @@
             left JOIN nm_site s ON c.address_site_id = s.id
         WHERE 1=1 and c.del_flag = '0'
         <if test="dto.orgCode != null and dto.orgCode != ''">
-            AND c.org_code = #{ dto.orgCode }
+            AND c.org_code LIKE CONCAT(#{ dto.orgCode },'%')
         </if>
         <if test="dto.name != null and dto.name != ''">
             AND c.name LIKE CONCAT('%',#{ dto.name },'%')

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

@@ -1,6 +1,38 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.system.app.mapper.AppSiteMapper">
+<!--    <select id="getPlaceList" resultType="org.jeecg.modules.app.vo.PlaceVO">-->
+<!--        SELECT-->
+<!--        b.id,-->
+<!--        b.name AS name,-->
+<!--        b.good_rate AS goodRate,-->
+<!--        b.address,-->
+<!--        b.category_id,-->
+<!--        b.latitude,-->
+<!--        b.longitude,-->
+<!--        a.cover,-->
+<!--        a.type-->
+<!--        FROM-->
+<!--        nm_site_place a-->
+<!--        LEFT JOIN nm_site b ON a.site_id = b.id-->
+<!--        LEFT JOIN sys_depart c ON b.tenant_id = c.id-->
+<!--        WHERE 1 = 1 AND a.del_flag = 0-->
+<!--        <if test="venueType != null and venueType == '0-1'">-->
+<!--            ORDER BY b.good_rate DESC-->
+<!--        </if>-->
+<!--        <if test="venueType != null and venueType == '1-1'">-->
+<!--            AND c.org_category = 20-->
+<!--        </if>-->
+<!--        <if test="venueType != null and venueType == '1-2'">-->
+<!--            AND c.org_category = 20 ORDER BY  b.good_rate DESC-->
+<!--        </if>-->
+<!--        <if test="venueType != null and venueType == '2-1'">-->
+<!--            AND c.org_category = 21-->
+<!--        </if>-->
+<!--        <if test="venueType != null and venueType == '2-2'">-->
+<!--            AND c.org_category = 21 ORDER BY  b.good_rate DESC-->
+<!--        </if>-->
+<!--    </select>-->
     <select id="getPlaceList" resultType="org.jeecg.modules.app.vo.PlaceVO">
         SELECT
         b.id,
@@ -10,13 +42,12 @@
         b.category_id,
         b.latitude,
         b.longitude,
-        a.cover,
-        a.type
+        b.cover,
+        b.type
         FROM
-        nm_site_place a
-        LEFT JOIN nm_site b ON a.site_id = b.id
+        nm_site b
         LEFT JOIN sys_depart c ON b.tenant_id = c.id
-        WHERE 1 = 1 AND a.del_flag = 0
+        WHERE 1 = 1 AND b.del_flag = 0
         <if test="venueType != null and venueType == '0-1'">
             ORDER BY b.good_rate DESC
         </if>

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

@@ -1,6 +1,7 @@
 package org.jeecg.modules.system.app.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -838,9 +839,11 @@ public class AppSitePlaceServiceImpl extends ServiceImpl<AppSitePlaceMapper, App
 
         if (ObjectUtils.isNotEmpty(appSitePlace)) {
             schoolPlaceAddDTO
-                    .setCover(appSitePlace.getCover().split( ",")[0])
                     .setInsureIds(appSitePlace.getInsureIds())
                     .setReminder(appSitePlace.getReminder());
+            if (ObjectUtil.isNotEmpty(appSitePlace.getCover())) {
+                schoolPlaceAddDTO.setCover(appSitePlace.getCover().split( ",")[0]);
+            }
         }
 
         if ("admin".equals(loginUser.getRoleCode())) {
@@ -855,7 +858,7 @@ public class AppSitePlaceServiceImpl extends ServiceImpl<AppSitePlaceMapper, App
     public AppSitePlaceParkDTO queryPack(String siteId) {
         AppSitePlaceParkDTO appSitePlaceParkDTO = new AppSitePlaceParkDTO();
         AppSite site = appSiteMapper.selectById(siteId);
-        List<AppSitePlace> appSitePlaceList = this.baseMapper.selectList(Wrappers.<AppSitePlace>lambdaQuery().eq(AppSitePlace::getSiteId, site.getId()).eq(AppSitePlace::getType, 1));
+        List<AppSitePlace> appSitePlaceList = this.baseMapper.selectList(Wrappers.<AppSitePlace>lambdaQuery().eq(AppSitePlace::getSiteId, site.getId()).eq(AppSitePlace::getType, SitePlaceTypeEnum.PACKAGE.getCode()));
         if (ObjectUtils.isNotEmpty(appSitePlaceList)) {
             List<AppSiteCategoryRuleDTO> appSiteCategoryRuleDTOS = new ArrayList<>();
             if (CollUtil.isNotEmpty(appSitePlaceList)) {

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java

@@ -258,7 +258,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
 //                    }
 //                }
                 //创建学校场地表
-                if (Objects.equals(sysDepart.getOrgCategory(), "2")){
+                if (Objects.equals(sysDepart.getOrgCategory(), "20")){
                     AppSitePlace place = new AppSitePlace();
                     place
                             .setTenantId(sysDepart.getId())