zhongrj
2023-12-08 95b938586c9a6b0fe0d57157a999a999c33a0c48
适配多个校区
25 files modified
161 ■■■■ changed files
pom.xml 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/architecture/controller/ArchitectureController.java 13 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/architecture/mapper/ArchitectureMapper.java 13 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/architecture/mapper/ArchitectureMapper.xml 10 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/architecture/service/IArchitectureService.java 11 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/architecture/service/impl/ArchitectureServiceImpl.java 15 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/hd/entity/Hd.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/life/controller/LifeController.java 6 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/life/mapper/LifeMapper.java 5 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/life/mapper/LifeMapper.xml 11 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/life/service/ILifeService.java 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/life/service/impl/LifeServiceImpl.java 9 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/mechanism/controller/MechanismController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/mechanism/entity/Mechanism.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/road/controller/RoadController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/road/entity/Road.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/road/mapper/RoadMapper.java 4 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/road/mapper/RoadMapper.xml 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/road/service/IRoadService.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/road/service/impl/RoadServiceImpl.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sp/entity/Sp.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/tagging/entity/Tagging.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/vr/entity/Vr.java 5 ●●●●● patch | view | raw | blame | history
src/main/resources/application-prod.yml 4 ●●●● patch | view | raw | blame | history
src/main/resources/application-test.yml 4 ●●●● patch | view | raw | blame | history
pom.xml
@@ -10,7 +10,7 @@
    <version>2.8.2.RELEASE</version>
    <properties>
        <bladex.project.id>blade-api</bladex.project.id>
        <bladex.project.id>zhxy</bladex.project.id>
        <bladex.project.version>2.8.2.RELEASE</bladex.project.version>
        <java.version>1.8</java.version>
src/main/java/org/springblade/modules/architecture/controller/ArchitectureController.java
@@ -292,8 +292,8 @@
     * @return
     */
    @GetMapping("/selectArchALL")
    public R selectArchALL() {
        return R.data(architectureService.selectArchALL());
    public R selectArchALL(ArchitectureVO architecture) {
        return R.data(architectureService.selectArchALL(architecture));
    }
    /**
@@ -409,12 +409,13 @@
     * 校园搜索
     *
     * @param mechanismName 名称模糊查询
     * @param campus 所属校区
     * @return
     */
    @GetMapping("/selectLook")
    public R selectLook(String mechanismName) {
    public R selectLook(String mechanismName,String campus) {
        List list = new ArrayList();
        List<Map<Object, Object>> maps = architectureService.selectLook(mechanismName);
        List<Map<Object, Object>> maps = architectureService.selectLook(mechanismName,campus);
        //排除为null的数据
        List<Map<Object, Object>> list2 = maps.parallelStream().filter(Objects::nonNull).collect(Collectors.toList());
//        for (int i = 0; i < list2.size(); i++) {
@@ -432,7 +433,7 @@
     */
    @GetMapping("/url")
    public void url() throws IOException, ServerException, InsufficientDataException, NoSuchAlgorithmException, InternalException, InvalidResponseException, XmlParserException, InvalidKeyException, ErrorResponseException {
        List<Architecture> list = architectureService.selectArchALL();
        List<Architecture> list = architectureService.selectArchALL(null);
        for (Architecture architecture : list) {
            int index = architecture.getCodeurl().lastIndexOf(",") +1;
            String substring = architecture.getCodeurl().substring(index);
@@ -496,7 +497,7 @@
     */
    @GetMapping("/refreshCode")
    public void refreshCode() throws IOException, ServerException, InsufficientDataException, NoSuchAlgorithmException, InternalException, InvalidResponseException, XmlParserException, InvalidKeyException, ErrorResponseException {
        List<Architecture> list = architectureService.selectArchALL();
        List<Architecture> list = architectureService.selectArchALL(null);
        for (Architecture architecture : list) {
            int index = architecture.getCodeurl().lastIndexOf(",") +1;
            String substring = architecture.getCodeurl().substring(index);
src/main/java/org/springblade/modules/architecture/mapper/ArchitectureMapper.java
@@ -16,6 +16,7 @@
 */
package org.springblade.modules.architecture.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.architecture.entity.Architecture;
import org.springblade.modules.architecture.vo.ArchitectureVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -55,10 +56,18 @@
    Map<Object,Object> selectInArchite(String id);
    List selectArch();
    List<Architecture> selectArchALL();
    List<Architecture> selectArchALL(@Param("architecture") ArchitectureVO architecture);
    String selectIns(String id);
    List<Map<Object,Object>> selectAll(String mechanismName);
    List<Map<Object,Object>> selectLook(String mechanismName);
    /**
     * 校园搜索
     *
     * @param mechanismName 名称模糊查询
     * @param campus 所属校区
     * @return
     */
    List<Map<Object,Object>> selectLook(String mechanismName,@Param("campus") String campus);
    List<Map<Object,Object>> selectVideo();
}
src/main/java/org/springblade/modules/architecture/mapper/ArchitectureMapper.xml
@@ -87,10 +87,9 @@
        SELECT id,jd, wd, mechanismName AS mechanismname, tpUrl AS tpurl, codeUrl AS codeurl, introduce, panoramaurl,x
        FROM sys_architecture
        WHERE is_deleted = 0
        --         UNION
--         SELECT jd, wd, mechanismName AS mechanismname, tpUrl AS tpurl, codeUrl AS codeurl, introduce, panoramaurl
--         FROM sys_mechanism
--         WHERE is_deleted = 0
        <if test="architecture.campus!=null and architecture.campus!=''">
            and campus = #{architecture.campus}
        </if>
    </select>
    <select id="selectIns" resultType="java.lang.String">
@@ -160,6 +159,7 @@
               panoramaurl
        FROM sys_architecture
        WHERE mechanismName LIKE '%${mechanismName}%'
        and campus = #{campus}
          AND is_deleted = 0
        UNION
        SELECT mechanismName AS mechanismname,
@@ -180,6 +180,7 @@
               panoramaurl
        FROM sys_mechanism
        WHERE mechanismName LIKE '%${mechanismName}%'
        and campus = #{campus}
          AND is_deleted = 0
        UNION
        SELECT mechanismName AS mechanismname,
@@ -200,6 +201,7 @@
               panoramaurl
        FROM sys_life
        WHERE mechanismName LIKE '%${mechanismName}%'
        and campus = #{campus}
          AND is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/architecture/service/IArchitectureService.java
@@ -54,9 +54,16 @@
     */
    Map<Object,Object> selectInArchite(String id);
    List selectArch();
    List<Architecture> selectArchALL();
    List<Architecture> selectArchALL(ArchitectureVO architecture);
    String selectIns(String id);
    List<Map<Object,Object>> selectAll(String mechanismName);
    List<Map<Object,Object>> selectLook(String mechanismName);
    /**
     * 校园搜索
     *
     * @param mechanismName 名称模糊查询
     * @param campus 所属校区
     * @return
     */
    List<Map<Object,Object>> selectLook(String mechanismName,String campus);
    List<Map<Object,Object>> selectVideo();
}
src/main/java/org/springblade/modules/architecture/service/impl/ArchitectureServiceImpl.java
@@ -62,8 +62,8 @@
    }
    @Override
    public List<Architecture> selectArchALL() {
        return baseMapper.selectArchALL();
    public List<Architecture> selectArchALL(ArchitectureVO architecture) {
        return baseMapper.selectArchALL(architecture);
    }
    @Override
@@ -76,9 +76,16 @@
        return baseMapper.selectAll(mechanismName);
    }
    /**
     * 校园搜索
     *
     * @param mechanismName 名称模糊查询
     * @param campus 所属校区
     * @return
     */
    @Override
    public List<Map<Object, Object>> selectLook(String mechanismName) {
        return baseMapper.selectLook(mechanismName);
    public List<Map<Object, Object>> selectLook(String mechanismName,String campus) {
        return baseMapper.selectLook(mechanismName,campus);
    }
    @Override
src/main/java/org/springblade/modules/hd/entity/Hd.java
@@ -94,5 +94,11 @@
    private String url;
    private String mapname;
    /**
     * 所属校区
     */
    @ApiModelProperty(value = "所属校区")
    private String campus;
}
src/main/java/org/springblade/modules/life/controller/LifeController.java
@@ -185,12 +185,12 @@
    /**
     * 标签
     *
     * @param lifetype 生活设施类型
     * @param life 生活设施类型
     * @return
     */
    @GetMapping("/selectList")
    public R selectList(String lifetype) {
        return R.data(lifeService.selectList(lifetype));
    public R selectList(LifeVO life) {
        return R.data(lifeService.selectList(life));
    }
}
src/main/java/org/springblade/modules/life/mapper/LifeMapper.java
@@ -16,6 +16,7 @@
 */
package org.springblade.modules.life.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.life.entity.Life;
import org.springblade.modules.life.vo.LifeVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -38,6 +39,8 @@
     * @return
     */
    List<LifeVO> selectLifePage(IPage page, LifeVO life);
    List selectList(String lifetype);
    List selectList(@Param("life") LifeVO life);
}
src/main/java/org/springblade/modules/life/mapper/LifeMapper.xml
@@ -36,8 +36,15 @@
        select * from sys_life where is_deleted = 0
    </select>
    <!--查询设施集合-->
    <select id="selectList" resultType="java.util.HashMap">
        select jd,wd,mechanismName as mechanismname,tpUrl as tpurl,codeUrl as codeurl,introduce,x from sys_life where  lifetype=#{lifetype} and is_deleted = 0
        select
        jd,wd,mechanismName as mechanismname,tpUrl as tpurl,codeUrl as codeurl,introduce,x from
        sys_life
        where is_deleted = 0
        and lifetype=#{life.lifetype}
        <if test="life.campus!=null and life.campus!=''">
            and campus = #{life.campus}
        </if>
    </select>
</mapper>
src/main/java/org/springblade/modules/life/service/ILifeService.java
@@ -39,5 +39,11 @@
     * @return
     */
    IPage<LifeVO> selectLifePage(IPage<LifeVO> page, LifeVO life);
    List selectList(String lifetype);
    /**
     * 查询生活设施
     * @param life
     * @return
     */
    List selectList(LifeVO life);
}
src/main/java/org/springblade/modules/life/service/impl/LifeServiceImpl.java
@@ -40,9 +40,14 @@
        return page.setRecords(baseMapper.selectLifePage(page, life));
    }
    /**
     * 查询生活设施
     * @param life
     * @return
     */
    @Override
    public List selectList(String lifetype) {
        return baseMapper.selectList(lifetype);
    public List selectList(LifeVO life) {
        return baseMapper.selectList(life);
    }
}
src/main/java/org/springblade/modules/mechanism/controller/MechanismController.java
@@ -140,7 +140,7 @@
        String type = URLEncoder.encode(mechanism.getType(), "UTF-8");
        String mtype = URLEncoder.encode(mechanism.getMtype(), "UTF-8");
        String loutype = URLEncoder.encode(mechanism.getLoutype(), "UTF-8");
        String xtype = URLEncoder.encode(mechanism.getXtype(), "UTF-8");
        String campus = URLEncoder.encode(mechanism.getCampus(), "UTF-8");
        String heading = URLEncoder.encode(mechanism.getHeading(), "UTF-8");
        String pitch = URLEncoder.encode(mechanism.getPitch(), "UTF-8");
        String roll = URLEncoder.encode(mechanism.getRoll(), "UTF-8");
@@ -157,7 +157,7 @@
            "&type=" + type +
            "&mtype=" + mtype +
            "&loutype=" + loutype +
            "&xtype=" + xtype +
            "&campus=" + campus +
            "&heading=" + heading +
            "&pitch=" + pitch +
            "&roll=" + roll +
src/main/java/org/springblade/modules/mechanism/entity/Mechanism.java
@@ -117,7 +117,7 @@
     * 所属校区
     */
    @ApiModelProperty(value = "所属校区")
    private String xtype;
    private String campus;
    /**
     * 偏航角
     */
src/main/java/org/springblade/modules/road/controller/RoadController.java
@@ -134,8 +134,8 @@
     * @return
     */
    @GetMapping("/selectList")
    public R selectList() {
        return R.data(roadService.selectList());
    public R selectList(RoadVO road) {
        return R.data(roadService.selectList(road));
    }
src/main/java/org/springblade/modules/road/entity/Road.java
@@ -70,4 +70,9 @@
     * y轴
     */
    private String y;
    /**
     * 所属校区
     */
    @ApiModelProperty(value = "所属校区")
    private String campus;
}
src/main/java/org/springblade/modules/road/mapper/RoadMapper.java
@@ -16,6 +16,7 @@
 */
package org.springblade.modules.road.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.road.entity.Road;
import org.springblade.modules.road.vo.RoadVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -38,6 +39,7 @@
     * @return
     */
    List<RoadVO> selectRoadPage(IPage page, RoadVO road);
    List selectList();
    List selectList(@Param("road") RoadVO road);
}
src/main/java/org/springblade/modules/road/mapper/RoadMapper.xml
@@ -18,6 +18,10 @@
    <select id="selectList" resultType="java.util.HashMap">
        select roadName as roadname,jd,wd,x from sys_road
        where 1=1
        <if test="road.campus!=null and road.campus!=''">
            and campus = #{road.campus}
        </if>
    </select>
</mapper>
src/main/java/org/springblade/modules/road/service/IRoadService.java
@@ -39,5 +39,5 @@
     * @return
     */
    IPage<RoadVO> selectRoadPage(IPage<RoadVO> page, RoadVO road);
    List selectList();
    List selectList(RoadVO road);
}
src/main/java/org/springblade/modules/road/service/impl/RoadServiceImpl.java
@@ -41,8 +41,8 @@
    }
    @Override
    public List selectList() {
        return baseMapper.selectList();
    public List selectList(RoadVO road) {
        return baseMapper.selectList(road);
    }
}
src/main/java/org/springblade/modules/sp/entity/Sp.java
@@ -80,4 +80,9 @@
     * y轴
     */
    private String y;
    /**
     * 所属校区
     */
    @ApiModelProperty(value = "所属校区")
    private String campus;
}
src/main/java/org/springblade/modules/tagging/entity/Tagging.java
@@ -60,5 +60,10 @@
     * y轴
     */
    private String y;
    /**
     * 所属校区
     */
    @ApiModelProperty(value = "所属校区")
    private String campus;
}
src/main/java/org/springblade/modules/vr/entity/Vr.java
@@ -68,5 +68,10 @@
     * y轴
     */
    private String y;
    /**
     * 所属校区
     */
    @ApiModelProperty(value = "所属校区")
    private String campus;
}
src/main/resources/application-prod.yml
@@ -14,9 +14,9 @@
    #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
    #  commandTimeout: 5000
  datasource:
    url: jdbc:mysql://localhost:3306/bladex_boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    url: jdbc:mysql://localhost:3306/zhxy?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    username: root
    password: root
    password: Zhxy@2023
#第三方登陆
social:
src/main/resources/application-test.yml
@@ -17,9 +17,9 @@
#    url: jdbc:mysql://localhost:3306/bladex_boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
#    username: root
#    password: root
    url: jdbc:mysql://192.168.0.126:3306/zhxyys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    url: jdbc:mysql://127.0.0.1:3308/zhxyys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    username: root
    password: NCzhba@2022
    password: root
#第三方登陆
social: