From 7656519f5b0712404a29ebd8d57b71a66a00245e Mon Sep 17 00:00:00 2001 From: luozhun <2025254074@qq.com> Date: Thu, 19 Dec 2024 14:29:26 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../changhu/pojo/dto/ServiceProjectDTO.java | 6 ++ .../main/resources/mapper/OpenApiMapper.xml | 71 ++++++++++--------- 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/ServiceProjectDTO.java b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/ServiceProjectDTO.java index 504fd30..78e6bf6 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/ServiceProjectDTO.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/ServiceProjectDTO.java @@ -1,6 +1,7 @@ package com.changhu.pojo.dto; import com.alibaba.fastjson2.annotation.JSONField; +import com.changhu.common.db.enums.EducationLevel; import com.changhu.common.db.enums.ServiceProjectType; import com.changhu.common.db.enums.Sex; import com.changhu.pojo.model.LegalPersonInfo; @@ -81,6 +82,9 @@ public class ServiceProjectDTO { static class SecurityUserInfo { @Schema(description = "id") private Long snowFlakeId; + @JSONField(serializeUsing = MinioPrefixSerializer.class) + @Schema(description = "照片") + private String photo; @Schema(description = "名字") private String name; @Schema(description = "手机号") @@ -103,5 +107,7 @@ public class ServiceProjectDTO { private String remark; @Schema(description = "创建时间") private String createTime; + @Schema(description = "文化程度") + private EducationLevel educationLevel; } } diff --git a/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml b/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml index 450b185..6d49de7 100644 --- a/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml @@ -43,42 +43,43 @@ property="securityUserList" /> Date: Thu, 19 Dec 2024 14:36:07 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../support/fastjson2/serializer/MinioPrefixSerializer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/policeSecurityServer/src/main/java/com/changhu/support/fastjson2/serializer/MinioPrefixSerializer.java b/policeSecurityServer/src/main/java/com/changhu/support/fastjson2/serializer/MinioPrefixSerializer.java index 5142540..5487958 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/fastjson2/serializer/MinioPrefixSerializer.java +++ b/policeSecurityServer/src/main/java/com/changhu/support/fastjson2/serializer/MinioPrefixSerializer.java @@ -1,5 +1,6 @@ package com.changhu.support.fastjson2.serializer; +import cn.hutool.core.util.StrUtil; import cn.hutool.extra.spring.SpringUtil; import com.alibaba.fastjson2.JSONWriter; import com.alibaba.fastjson2.writer.ObjectWriter; @@ -22,6 +23,8 @@ public class MinioPrefixSerializer implements ObjectWriter { @Override public void write(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) { - jsonWriter.writeString(minioPrefix + object); + if (object instanceof String path && StrUtil.isNotEmpty(path)) { + jsonWriter.writeString(minioPrefix + object); + } } } From 0fb7c94c07cbb25e46f430b04538d7034755acbc Mon Sep 17 00:00:00 2001 From: luozhun <2025254074@qq.com> Date: Thu, 19 Dec 2024 15:17:00 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java | 2 ++ .../src/main/resources/mapper/OpenApiMapper.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java index 8183797..c1784a8 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java @@ -43,6 +43,8 @@ public class SecurityUnitUseStatisticsDTO { @Schema(description = "公安单位id") private Long policeUnitId; + @Schema(description = "公安代为代码") + private String policeUnitCode; @Schema(description = "公安单位名称") private String policeUnitName; diff --git a/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml b/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml index 6d49de7..f6030a5 100644 --- a/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml @@ -110,6 +110,7 @@ ad4.name as 'streetName', eu.address as 'address', pu.snow_flake_id as 'policeUnitId', + pu.code as 'policeUnitCode', pu.name as 'policeUnitName', json_arrayagg( json_object( From 8ce3ce3f6bd8f055e9a4fe9055735b1013592e3b Mon Sep 17 00:00:00 2001 From: luozhun <2025254074@qq.com> Date: Thu, 19 Dec 2024 15:36:50 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/OpenApiMapper.xml | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml b/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml index f6030a5..191b8a5 100644 --- a/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml @@ -196,20 +196,21 @@