管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-03-13 b2e4845b84b23aa3f9cc01141c74a8a27c56c17a
1
已修改3个文件
33 ■■■■ 文件已修改
data/db_cx.sql 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/all/BaseQueryController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/helper/RsaHelper.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/db_cx.sql
@@ -17,7 +17,10 @@
update lf.sys_layer set elev=118,cn_name='地面层' where id=427;
-- delete from lf.sys_layer where id=427;
select * from lf.sys_model -- delete from lf.sys_model
-- 28.178
select * from bd.dlg_25w_boul where ST_Intersects(geom, ST_Buffer(ST_GeomFromText('POINT (101.9281 36.58675)', 4490), 10, 'endcap=round join=round')) limit 20;
select * from bd.dlg_25w_boul where ST_DWithin(geom, ST_GeomFromText('POINT (101.9281 36.58675)', 4490), 10) = true limit 20;
src/main/java/com/lf/server/controller/all/BaseQueryController.java
@@ -141,6 +141,23 @@
    }
    @SysLog()
    @ApiOperation(value = "缓冲区查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "映射名称", dataType = "String", paramType = "query", example = "dlgagnp"),
            @ApiImplicitParam(name = "wkt", value = "WKT(著名文本)", dataType = "String", paramType = "query", example = ""),
            @ApiImplicitParam(name = "limit", value = "限制条数", dataType = "Integer", paramType = "query", example = "20")
    })
    @GetMapping(value = "/selectByBuffer")
    public ResponseMsg<List<Object>> selectByBuffer(String name, String wkt, Integer limit) {
        try {
            return success(0, null);
        } catch (Exception ex) {
            return fail(ex, null);
        }
    }
    @SysLog()
    @ApiOperation(value = "根据父ID分页查询并返回记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "metaid", value = "父ID", dataType = "String", paramType = "query", example = "0"),
src/main/java/com/lf/server/helper/RsaHelper.java
@@ -7,6 +7,7 @@
import javax.crypto.Cipher;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
@@ -15,11 +16,9 @@
import java.util.HashMap;
import java.util.Map;
/**
 * RSA工具类 默认长度为2048位
 * @author LinTao
 * @date 2022/2/13
 * RSA工具类
 * @author WWW
 */
public class RsaHelper {
    /**
@@ -171,7 +170,7 @@
     */
    public static String decrypt(String str) throws Exception {
        // 64位解码加密后的字符串
        byte[] inputByte = Base64.decodeBase64(str.getBytes("UTF-8"));
        byte[] inputByte = Base64.decodeBase64(str.getBytes(StandardCharsets.UTF_8));
        // Base64编码的私钥
        byte[] decoded = Base64.decodeBase64(getPrivateKey());
@@ -203,7 +202,7 @@
        Cipher cipher = Cipher.getInstance("RSA");
        cipher.init(Cipher.ENCRYPT_MODE, pubKey);
        String outStr = Base64.encodeBase64String(cipher.doFinal(str.getBytes("UTF-8")));
        String outStr = Base64.encodeBase64String(cipher.doFinal(str.getBytes(StandardCharsets.UTF_8)));
        return outStr;
    }