From 9abf5b429eb1d0c813cb6444d93b02fc384beaf7 Mon Sep 17 00:00:00 2001 From: whq <460794335@qq.com> Date: Wed, 19 Apr 2023 19:01:07 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=88=AC=E8=99=AB=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constant/CommonConstant.java | 5 +- kn-service-api/kn-setting-api/pom.xml | 23 --- .../kening/setting/cache/DictBizCache.java | 133 ------------- .../com/kening/setting/entity/DictBiz.java | 109 ----------- .../com/kening/setting/enums/DictBizEnum.java | 39 ---- .../kening/setting/feign/IDictBizClient.java | 72 ------- .../setting/feign/IDictBizClientFallback.java | 46 ----- .../java/com/kening/setting/vo/DictBizVO.java | 71 ------- kn-service-api/pom.xml | 1 - kn-service/biz-vordm/pom.xml | 81 ++++++++ kn-service/kn-setting/pom.xml | 22 --- .../kening/setting/SettingApplication.java | 16 -- .../kening/setting/config/VoRdmConfig.java | 15 -- .../setting/controller/DictBizController.java | 179 ------------------ .../kening/setting/mapper/DictBizMapper.java | 64 ------- .../kening/setting/mapper/DictBizMapper.xml | 51 ----- .../setting/service/IDictBizService.java | 101 ---------- .../service/impl/DictBizServiceImpl.java | 121 ------------ .../setting/wrapper/DictBizWrapper.java | 61 ------ .../src/main/resources/application-dev.yml | 5 - .../src/main/resources/application-prod.yml | 5 - .../src/main/resources/application-test.yml | 5 - .../src/main/resources/application.yml | 13 -- kn-service/pom.xml | 84 +------- kn-service/vordm-crawl/pom.xml | 74 ++++++++ .../kening/crawl/CrawlProxyApplication.java | 13 ++ .../src/main/resources/application-dev.yaml | 0 .../src/main/resources/application-prod.yaml | 0 .../src/main/resources/application.yaml | 12 ++ 29 files changed, 186 insertions(+), 1235 deletions(-) delete mode 100644 kn-service-api/kn-setting-api/pom.xml delete mode 100644 kn-service-api/kn-setting-api/src/main/java/com/kening/setting/cache/DictBizCache.java delete mode 100644 kn-service-api/kn-setting-api/src/main/java/com/kening/setting/entity/DictBiz.java delete mode 100644 kn-service-api/kn-setting-api/src/main/java/com/kening/setting/enums/DictBizEnum.java delete mode 100644 kn-service-api/kn-setting-api/src/main/java/com/kening/setting/feign/IDictBizClient.java delete mode 100644 kn-service-api/kn-setting-api/src/main/java/com/kening/setting/feign/IDictBizClientFallback.java delete mode 100644 kn-service-api/kn-setting-api/src/main/java/com/kening/setting/vo/DictBizVO.java delete mode 100644 kn-service/kn-setting/pom.xml delete mode 100644 kn-service/kn-setting/src/main/java/com/kening/setting/SettingApplication.java delete mode 100644 kn-service/kn-setting/src/main/java/com/kening/setting/config/VoRdmConfig.java delete mode 100644 kn-service/kn-setting/src/main/java/com/kening/setting/controller/DictBizController.java delete mode 100644 kn-service/kn-setting/src/main/java/com/kening/setting/mapper/DictBizMapper.java delete mode 100644 kn-service/kn-setting/src/main/java/com/kening/setting/mapper/DictBizMapper.xml delete mode 100644 kn-service/kn-setting/src/main/java/com/kening/setting/service/IDictBizService.java delete mode 100644 kn-service/kn-setting/src/main/java/com/kening/setting/service/impl/DictBizServiceImpl.java delete mode 100644 kn-service/kn-setting/src/main/java/com/kening/setting/wrapper/DictBizWrapper.java delete mode 100644 kn-service/kn-setting/src/main/resources/application-dev.yml delete mode 100644 kn-service/kn-setting/src/main/resources/application-prod.yml delete mode 100644 kn-service/kn-setting/src/main/resources/application-test.yml delete mode 100644 kn-service/kn-setting/src/main/resources/application.yml create mode 100644 kn-service/vordm-crawl/pom.xml create mode 100644 kn-service/vordm-crawl/src/main/java/com/kening/crawl/CrawlProxyApplication.java create mode 100644 kn-service/vordm-crawl/src/main/resources/application-dev.yaml create mode 100644 kn-service/vordm-crawl/src/main/resources/application-prod.yaml create mode 100644 kn-service/vordm-crawl/src/main/resources/application.yaml diff --git a/kn-common/src/main/java/org/springblade/common/constant/CommonConstant.java b/kn-common/src/main/java/org/springblade/common/constant/CommonConstant.java index e17fb0a..9d43d7b 100644 --- a/kn-common/src/main/java/org/springblade/common/constant/CommonConstant.java +++ b/kn-common/src/main/java/org/springblade/common/constant/CommonConstant.java @@ -56,5 +56,8 @@ public interface CommonConstant { * 系统管理模块 application name */ String KN_SYSTEM_MANAGER_MODULE_NAME = "system-manager"; - String KN_VORDM_SETTING = "kn-setting"; + /** + * 爬虫代理模块 application name + */ + String VORDM_PROXY_CRAWL_MODULE_NAME = "vordm-crawl"; } diff --git a/kn-service-api/kn-setting-api/pom.xml b/kn-service-api/kn-setting-api/pom.xml deleted file mode 100644 index ce8e3be..0000000 --- a/kn-service-api/kn-setting-api/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - kn-service-api - com.kening.platform - ${revision} - - 4.0.0 - - kn-setting-api - - - - - com.kening.platform - kn-common - ${revision} - - - - diff --git a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/cache/DictBizCache.java b/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/cache/DictBizCache.java deleted file mode 100644 index 0b8f553..0000000 --- a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/cache/DictBizCache.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.kening.setting.cache; - -import com.kening.setting.entity.DictBiz; -import com.kening.setting.enums.DictBizEnum; -import com.kening.setting.feign.IDictBizClient; -import org.springblade.core.cache.utils.CacheUtil; -import org.springblade.core.secure.utils.AuthUtil; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.SpringUtil; -import org.springblade.core.tool.utils.StringPool; - -import java.util.List; - -import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE; - -/** - * 业务字典缓存工具类 - * - * @author Chill - */ -public class DictBizCache { - - private static final String DICT_ID = "dictBiz:id"; - private static final String DICT_VALUE = "dictBiz:value"; - private static final String DICT_LIST = "dictBiz:list"; - - private static IDictBizClient dictClient; - - private static IDictBizClient getDictClient() { - if (dictClient == null) { - dictClient = SpringUtil.getBean(IDictBizClient.class); - } - return dictClient; - } - - /** - * 获取字典实体 - * - * @param id 主键 - * @return DictBiz - */ - public static DictBiz getById(Long id) { - String keyPrefix = DICT_ID.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); - return CacheUtil.get(DICT_CACHE, keyPrefix, id, () -> { - R result = getDictClient().getById(id); - return result.getData(); - }); - } - - /** - * 获取字典值 - * - * @param code 字典编号枚举 - * @param dictKey Integer型字典键 - * @return String - */ - public static String getValue(DictBizEnum code, Integer dictKey) { - return getValue(code.getName(), dictKey); - } - - - /** - * 获取字典值 - * - * @param code 字典编号 - * @param dictKey Integer型字典键 - * @return String - */ - public static String getValue(String code, Integer dictKey) { - String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); - return CacheUtil.get(DICT_CACHE, keyPrefix + code + StringPool.COLON, String.valueOf(dictKey), () -> { - R result = getDictClient().getValue(code, String.valueOf(dictKey)); - return result.getData(); - }); - } - - /** - * 获取字典值 - * - * @param code 字典编号枚举 - * @param dictKey String型字典键 - * @return String - */ - public static String getValue(DictBizEnum code, String dictKey) { - return getValue(code.getName(), dictKey); - } - - /** - * 获取字典值 - * - * @param code 字典编号 - * @param dictKey String型字典键 - * @return String - */ - public static String getValue(String code, String dictKey) { - String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); - return CacheUtil.get(DICT_CACHE, keyPrefix + code + StringPool.COLON, dictKey, () -> { - R result = getDictClient().getValue(code, dictKey); - return result.getData(); - }); - } - - /** - * 获取字典集合 - * - * @param code 字典编号 - * @return List - */ - public static List getList(String code) { - String keyPrefix = DICT_LIST.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); - return CacheUtil.get(DICT_CACHE, keyPrefix, code, () -> { - R> result = getDictClient().getList(code); - return result.getData(); - }); - } - -} diff --git a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/entity/DictBiz.java b/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/entity/DictBiz.java deleted file mode 100644 index 8affff9..0000000 --- a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/entity/DictBiz.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.kening.setting.entity; - -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * 实体类 - * - * @author Chill - */ -@Data -@TableName("blade_dict_biz") -@ApiModel(value = "DictBiz对象", description = "DictBiz对象") -public class DictBiz implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键 - */ - @JsonSerialize(using = ToStringSerializer.class) - @ApiModelProperty(value = "主键") - @TableId(value = "id", type = IdType.ASSIGN_ID) - private Long id; - - /** - * 租户ID - */ - @ApiModelProperty(value = "租户ID") - private String tenantId; - - /** - * 父主键 - */ - @JsonSerialize(using = ToStringSerializer.class) - @ApiModelProperty(value = "父主键") - private Long parentId; - - /** - * 字典码 - */ - @ApiModelProperty(value = "字典码") - private String code; - - /** - * 字典值 - */ - @ApiModelProperty(value = "字典值") - private String dictKey; - - /** - * 字典名称 - */ - @ApiModelProperty(value = "字典名称") - private String dictValue; - - /** - * 排序 - */ - @ApiModelProperty(value = "排序") - private Integer sort; - - /** - * 字典备注 - */ - @ApiModelProperty(value = "字典备注") - private String remark; - - /** - * 是否已封存 - */ - @ApiModelProperty(value = "是否已封存") - private Integer isSealed; - - /** - * 是否已删除 - */ - @TableLogic - @ApiModelProperty(value = "是否已删除") - private Integer isDeleted; - - -} diff --git a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/enums/DictBizEnum.java b/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/enums/DictBizEnum.java deleted file mode 100644 index abea0d7..0000000 --- a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/enums/DictBizEnum.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.kening.setting.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 业务字典枚举类 - * - * @author Chill - */ -@Getter -@AllArgsConstructor -public enum DictBizEnum { - - /** - * 测试 - */ - TEST("test"), - ; - - final String name; - -} diff --git a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/feign/IDictBizClient.java b/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/feign/IDictBizClient.java deleted file mode 100644 index 0d3f3ea..0000000 --- a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/feign/IDictBizClient.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.kening.setting.feign; - - -import com.kening.setting.entity.DictBiz; -import org.springblade.core.tool.api.R; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestParam; - -import java.util.List; - -/** - * Feign接口类 - * - * @author Chill - */ -@FeignClient( - value = "kn-system-biz-dict", - fallback = com.kening.setting.feign.IDictBizClientFallback.class -) -public interface IDictBizClient { - - String API_PREFIX = "/client"; - String GET_BY_ID = API_PREFIX + "/dict-biz/get-by-id"; - String GET_VALUE = API_PREFIX + "/dict-biz/get-value"; - String GET_LIST = API_PREFIX + "/dict-biz/get-list"; - - /** - * 获取字典实体 - * - * @param id 主键 - * @return - */ - @GetMapping(GET_BY_ID) - R getById(@RequestParam("id") Long id); - - /** - * 获取字典表对应值 - * - * @param code 字典编号 - * @param dictKey 字典序号 - * @return - */ - @GetMapping(GET_VALUE) - R getValue(@RequestParam("code") String code, @RequestParam("dictKey") String dictKey); - - /** - * 获取字典表 - * - * @param code 字典编号 - * @return - */ - @GetMapping(GET_LIST) - R> getList(@RequestParam("code") String code); - -} diff --git a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/feign/IDictBizClientFallback.java b/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/feign/IDictBizClientFallback.java deleted file mode 100644 index 8dfe6de..0000000 --- a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/feign/IDictBizClientFallback.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.kening.setting.feign; - -import com.kening.setting.entity.DictBiz; -import org.springblade.core.tool.api.R; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * Feign失败配置 - * - * @author Chill - */ -@Component -public class IDictBizClientFallback implements IDictBizClient { - @Override - public R getById(Long id) { - return R.fail("获取数据失败"); - } - - @Override - public R getValue(String code, String dictKey) { - return R.fail("获取数据失败"); - } - - @Override - public R> getList(String code) { - return R.fail("获取数据失败"); - } -} diff --git a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/vo/DictBizVO.java b/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/vo/DictBizVO.java deleted file mode 100644 index 90207b5..0000000 --- a/kn-service-api/kn-setting-api/src/main/java/com/kening/setting/vo/DictBizVO.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.kening.setting.vo; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import com.kening.setting.entity.DictBiz; -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.springblade.core.tool.node.INode; - -import java.util.ArrayList; -import java.util.List; - -/** - * 视图实体类 - * - * @author Chill - */ -@Data -@EqualsAndHashCode(callSuper = true) -@ApiModel(value = "DictBizVO对象", description = "DictBizVO对象") -public class DictBizVO extends DictBiz implements INode { - private static final long serialVersionUID = 1L; - /** - * 主键ID - */ - @JsonSerialize(using = ToStringSerializer.class) - private Long id; - - /** - * 父节点ID - */ - @JsonSerialize(using = ToStringSerializer.class) - private Long parentId; - - /** - * 子孙节点 - */ - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List children; - - @Override - public List getChildren() { - if (this.children == null) { - this.children = new ArrayList<>(); - } - return this.children; - } - - /** - * 上级字典 - */ - private String parentName; -} diff --git a/kn-service-api/pom.xml b/kn-service-api/pom.xml index 7aa4fae..9c7c75f 100644 --- a/kn-service-api/pom.xml +++ b/kn-service-api/pom.xml @@ -14,7 +14,6 @@ ${revision} biz-vordm-api - kn-setting-api pom 微服务API集合 diff --git a/kn-service/biz-vordm/pom.xml b/kn-service/biz-vordm/pom.xml index d09ca7f..e41a563 100644 --- a/kn-service/biz-vordm/pom.xml +++ b/kn-service/biz-vordm/pom.xml @@ -17,6 +17,87 @@ biz-vordm-api ${revision} + + org.hdrhistogram + HdrHistogram + 2.1.12 + + + org.javassist + javassist + 3.25.0-GA + + + org.springblade + blade-core-boot + + + com.oracle + ojdbc7 + + + HdrHistogram + org.hdrhistogram + + + javassist + org.javassist + + + com.microsoft.sqlserver + mssql-jdbc + + + org.postgresql + postgresql + + + fastjson + com.alibaba + + + + + org.springblade + blade-starter-oss + + + esdk-obs-java + com.huaweicloud + + + + + io.minio + minio + + + org.springframework + spring-mock + 2.0.8 + + + com.alibaba + fastjson + + + org.springblade + blade-starter-swagger + + + org.springblade + blade-starter-tenant + + + + org.springframework.boot + spring-boot-starter-mail + + + + org.springframework.boot + spring-boot-starter-thymeleaf + diff --git a/kn-service/kn-setting/pom.xml b/kn-service/kn-setting/pom.xml deleted file mode 100644 index c4112c2..0000000 --- a/kn-service/kn-setting/pom.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - kn-service - com.kening.platform - ${revision} - - 4.0.0 - - kn-setting - - - com.kening.platform - kn-setting-api - ${revision} - - - - - diff --git a/kn-service/kn-setting/src/main/java/com/kening/setting/SettingApplication.java b/kn-service/kn-setting/src/main/java/com/kening/setting/SettingApplication.java deleted file mode 100644 index c571c80..0000000 --- a/kn-service/kn-setting/src/main/java/com/kening/setting/SettingApplication.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.kening.setting; - -import org.springblade.common.constant.CommonConstant; -import org.springblade.core.launch.BladeApplication; -import org.springframework.cloud.client.SpringCloudApplication; - -/** - * @author wanghongqing - * @date 2023/3/21 14:24 - **/ -@SpringCloudApplication -public class SettingApplication { - public static void main(String[] args) { - BladeApplication.run(CommonConstant.KN_VORDM_SETTING, SettingApplication.class, args); - } -} diff --git a/kn-service/kn-setting/src/main/java/com/kening/setting/config/VoRdmConfig.java b/kn-service/kn-setting/src/main/java/com/kening/setting/config/VoRdmConfig.java deleted file mode 100644 index 6810001..0000000 --- a/kn-service/kn-setting/src/main/java/com/kening/setting/config/VoRdmConfig.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.kening.setting.config; - -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; - -/** - * @author wanghongqing - * @date 2023/3/21 14:32 - **/ -@Configuration -@ComponentScan({"org.springblade", "com.kening.setting"}) -@MapperScan({"org.springblade.**.mapper.**", "com.kening.**.mapper.**"}) -public class VoRdmConfig { -} diff --git a/kn-service/kn-setting/src/main/java/com/kening/setting/controller/DictBizController.java b/kn-service/kn-setting/src/main/java/com/kening/setting/controller/DictBizController.java deleted file mode 100644 index a5b304e..0000000 --- a/kn-service/kn-setting/src/main/java/com/kening/setting/controller/DictBizController.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.kening.setting.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import com.kening.setting.entity.DictBiz; -import com.kening.setting.service.IDictBizService; -import com.kening.setting.vo.DictBizVO; -import com.kening.setting.wrapper.DictBizWrapper; -import io.swagger.annotations.*; -import lombok.AllArgsConstructor; -import org.springblade.core.boot.ctrl.BladeController; -import org.springblade.core.cache.utils.CacheUtil; -import org.springblade.core.mp.support.Condition; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tenant.annotation.NonDS; -import org.springblade.core.tool.api.R; -import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; - -import javax.validation.Valid; -import java.util.List; -import java.util.Map; - -import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE; - -/** - * 控制器 - * - * @author Chill - */ -@NonDS -@RestController -@AllArgsConstructor -@RequestMapping("/dict-biz") -@Api(value = "业务字典", tags = "业务字典") -public class DictBizController extends BladeController { - - private final IDictBizService dictService; - - /** - * 详情 - */ - @GetMapping("/detail") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入dict") - public R detail(DictBiz dict) { - DictBiz detail = dictService.getOne(Condition.getQueryWrapper(dict)); - return R.data(DictBizWrapper.build().entityVO(detail)); - } - - /** - * 列表 - */ - @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string") - }) - @ApiOperationSupport(order = 2) - @ApiOperation(value = "列表", notes = "传入dict") - public R> list(@ApiIgnore @RequestParam Map dict) { - List list = dictService.list(Condition.getQueryWrapper(dict, DictBiz.class).lambda().orderByAsc(DictBiz::getSort)); - return R.data(DictBizWrapper.build().listNodeVO(list)); - } - - /** - * 顶级列表 - */ - @GetMapping("/parent-list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string") - }) - @ApiOperationSupport(order = 3) - @ApiOperation(value = "列表", notes = "传入dict") - public R> parentList(@ApiIgnore @RequestParam Map dict, Query query) { - return R.data(dictService.parentList(dict, query)); - } - - /** - * 子列表 - */ - @GetMapping("/child-list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "parentId", value = "字典名称", paramType = "query", dataType = "string") - }) - @ApiOperationSupport(order = 4) - @ApiOperation(value = "列表", notes = "传入dict") - public R> childList(@ApiIgnore @RequestParam Map dict, @RequestParam(required = false, defaultValue = "-1") Long parentId) { - return R.data(dictService.childList(dict, parentId)); - } - - /** - * 获取字典树形结构 - */ - @GetMapping("/tree") - @ApiOperationSupport(order = 5) - @ApiOperation(value = "树形结构", notes = "树形结构") - public R> tree() { - List tree = dictService.tree(); - return R.data(tree); - } - - /** - * 获取字典树形结构 - */ - @GetMapping("/parent-tree") - @ApiOperationSupport(order = 5) - @ApiOperation(value = "树形结构", notes = "树形结构") - public R> parentTree() { - List tree = dictService.parentTree(); - return R.data(tree); - } - - /** - * 新增或修改 - */ - @PostMapping("/submit") - @ApiOperationSupport(order = 6) - @ApiOperation(value = "新增或修改", notes = "传入dict") - public R submit(@Valid @RequestBody DictBiz dict) { - CacheUtil.clear(DICT_CACHE); - return R.status(dictService.submit(dict)); - } - - - /** - * 删除 - */ - @PostMapping("/remove") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { - CacheUtil.clear(DICT_CACHE); - return R.status(dictService.removeDict(ids)); - } - - /** - * 获取字典 - */ - @GetMapping("/dictionary") - @ApiOperationSupport(order = 8) - @ApiOperation(value = "获取字典", notes = "获取字典") - public R> dictionary(String code) { - List tree = dictService.getList(code); - return R.data(tree); - } - - /** - * 获取字典树 - */ - @GetMapping("/dictionary-tree") - @ApiOperationSupport(order = 9) - @ApiOperation(value = "获取字典树", notes = "获取字典树") - public R> dictionaryTree(String code) { - List tree = dictService.getList(code); - return R.data(DictBizWrapper.build().listNodeVO(tree)); - } - - -} diff --git a/kn-service/kn-setting/src/main/java/com/kening/setting/mapper/DictBizMapper.java b/kn-service/kn-setting/src/main/java/com/kening/setting/mapper/DictBizMapper.java deleted file mode 100644 index d79cfbf..0000000 --- a/kn-service/kn-setting/src/main/java/com/kening/setting/mapper/DictBizMapper.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.kening.setting.mapper; - - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.kening.setting.entity.DictBiz; -import com.kening.setting.vo.DictBizVO; - -import java.util.List; - -/** - * Mapper 接口 - * - * @author Chill - */ -public interface DictBizMapper extends BaseMapper { - - /** - * 获取字典表对应中文 - * - * @param code 字典编号 - * @param dictKey 字典序号 - * @return - */ - String getValue(String code, String dictKey); - - /** - * 获取字典表 - * - * @param code 字典编号 - * @return - */ - List getList(String code); - - /** - * 获取树形节点 - * - * @return - */ - List tree(); - - /** - * 获取树形节点 - * - * @return - */ - List parentTree(); - -} diff --git a/kn-service/kn-setting/src/main/java/com/kening/setting/mapper/DictBizMapper.xml b/kn-service/kn-setting/src/main/java/com/kening/setting/mapper/DictBizMapper.xml deleted file mode 100644 index a023b60..0000000 --- a/kn-service/kn-setting/src/main/java/com/kening/setting/mapper/DictBizMapper.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/kn-service/kn-setting/src/main/java/com/kening/setting/service/IDictBizService.java b/kn-service/kn-setting/src/main/java/com/kening/setting/service/IDictBizService.java deleted file mode 100644 index 8b0fe59..0000000 --- a/kn-service/kn-setting/src/main/java/com/kening/setting/service/IDictBizService.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.kening.setting.service; - - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; -import com.kening.setting.entity.DictBiz; -import com.kening.setting.vo.DictBizVO; -import org.springblade.core.mp.support.Query; - -import java.util.List; -import java.util.Map; - -/** - * 服务类 - * - * @author Chill - */ -public interface IDictBizService extends IService { - - /** - * 树形结构 - * - * @return - */ - List tree(); - - /** - * 树形结构 - * - * @return - */ - List parentTree(); - - /** - * 获取字典表对应中文 - * - * @param code 字典编号 - * @param dictKey 字典序号 - * @return - */ - String getValue(String code, String dictKey); - - /** - * 获取字典表 - * - * @param code 字典编号 - * @return - */ - List getList(String code); - - /** - * 新增或修改 - * - * @param dict - * @return - */ - boolean submit(DictBiz dict); - - /** - * 删除字典 - * - * @param ids - * @return - */ - boolean removeDict(String ids); - - /** - * 顶级列表 - * - * @param dict - * @param query - * @return - */ - IPage parentList(Map dict, Query query); - - /** - * 子列表 - * - * @param dict - * @param parentId - * @return - */ - List childList(Map dict, Long parentId); - -} diff --git a/kn-service/kn-setting/src/main/java/com/kening/setting/service/impl/DictBizServiceImpl.java b/kn-service/kn-setting/src/main/java/com/kening/setting/service/impl/DictBizServiceImpl.java deleted file mode 100644 index 7c949e9..0000000 --- a/kn-service/kn-setting/src/main/java/com/kening/setting/service/impl/DictBizServiceImpl.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.kening.setting.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.kening.setting.cache.DictBizCache; -import com.kening.setting.entity.DictBiz; -import com.kening.setting.mapper.DictBizMapper; -import com.kening.setting.service.IDictBizService; -import com.kening.setting.vo.DictBizVO; -import com.kening.setting.wrapper.DictBizWrapper; -import org.springblade.common.constant.CommonConstant; -import org.springblade.core.cache.utils.CacheUtil; -import org.springblade.core.log.exception.ServiceException; -import org.springblade.core.mp.support.Condition; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tool.constant.BladeConstant; -import org.springblade.core.tool.node.ForestNodeMerger; -import org.springblade.core.tool.utils.Func; -import org.springblade.core.tool.utils.StringPool; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE; - -/** - * 服务实现类 - * - * @author Chill - */ -@Service -public class DictBizServiceImpl extends ServiceImpl implements IDictBizService { - - @Override - public List tree() { - return ForestNodeMerger.merge(baseMapper.tree()); - } - - @Override - public List parentTree() { - return ForestNodeMerger.merge(baseMapper.parentTree()); - } - - @Override - public String getValue(String code, String dictKey) { - return Func.toStr(baseMapper.getValue(code, dictKey), StringPool.EMPTY); - } - - @Override - public List getList(String code) { - return baseMapper.getList(code); - } - - @Override - public boolean submit(DictBiz dict) { - LambdaQueryWrapper lqw = Wrappers.query().lambda().eq(DictBiz::getCode, dict.getCode()).eq(DictBiz::getDictKey, dict.getDictKey()); - Integer cnt = baseMapper.selectCount((Func.isEmpty(dict.getId())) ? lqw : lqw.notIn(DictBiz::getId, dict.getId())); - if (cnt > 0) { - throw new ServiceException("当前字典键值已存在!"); - } - // 修改顶级字典后同步更新下属字典的编号 - if (Func.isNotEmpty(dict.getId()) && dict.getParentId().longValue() == BladeConstant.TOP_PARENT_ID) { - DictBiz parent = DictBizCache.getById(dict.getId()); - this.update(Wrappers.update().lambda().set(DictBiz::getCode, dict.getCode()).eq(DictBiz::getCode, parent.getCode()).ne(DictBiz::getParentId, BladeConstant.TOP_PARENT_ID)); - } - if (Func.isEmpty(dict.getParentId())) { - dict.setParentId(BladeConstant.TOP_PARENT_ID); - } - dict.setIsDeleted(BladeConstant.DB_NOT_DELETED); - CacheUtil.clear(DICT_CACHE); - return saveOrUpdate(dict); - } - - @Override - public boolean removeDict(String ids) { - Integer cnt = baseMapper.selectCount(Wrappers.query().lambda().in(DictBiz::getParentId, Func.toLongList(ids))); - if (cnt > 0) { - throw new ServiceException("请先删除子节点!"); - } - return removeByIds(Func.toLongList(ids)); - } - - @Override - public IPage parentList(Map dict, Query query) { - IPage page = this.page(Condition.getPage(query), Condition.getQueryWrapper(dict, DictBiz.class).lambda().eq(DictBiz::getParentId, CommonConstant.TOP_PARENT_ID).orderByAsc(DictBiz::getSort)); - return DictBizWrapper.build().pageVO(page); - } - - @Override - public List childList(Map dict, Long parentId) { - if (parentId < 0) { - return new ArrayList<>(); - } - dict.remove("parentId"); - DictBiz parentDict = DictBizCache.getById(parentId); - List list = this.list(Condition.getQueryWrapper(dict, DictBiz.class).lambda().ne(DictBiz::getId, parentId).eq(DictBiz::getCode, parentDict.getCode()).orderByAsc(DictBiz::getSort)); - return DictBizWrapper.build().listNodeVO(list); - } - -} diff --git a/kn-service/kn-setting/src/main/java/com/kening/setting/wrapper/DictBizWrapper.java b/kn-service/kn-setting/src/main/java/com/kening/setting/wrapper/DictBizWrapper.java deleted file mode 100644 index 6a242f9..0000000 --- a/kn-service/kn-setting/src/main/java/com/kening/setting/wrapper/DictBizWrapper.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the dreamlu.net developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: Chill 庄骞 (smallchill@163.com) - */ -package com.kening.setting.wrapper; - -import com.kening.setting.cache.DictBizCache; -import com.kening.setting.entity.DictBiz; -import com.kening.setting.vo.DictBizVO; -import org.springblade.core.mp.support.BaseEntityWrapper; -import org.springblade.core.tool.constant.BladeConstant; -import org.springblade.core.tool.node.ForestNodeMerger; -import org.springblade.core.tool.utils.BeanUtil; -import org.springblade.core.tool.utils.Func; - -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - - -/** - * 包装类,返回视图层所需的字段 - * - * @author Chill - */ -public class DictBizWrapper extends BaseEntityWrapper { - - public static DictBizWrapper build() { - return new DictBizWrapper(); - } - - @Override - public DictBizVO entityVO(DictBiz dict) { - DictBizVO dictVO = Objects.requireNonNull(BeanUtil.copy(dict, DictBizVO.class)); - if (Func.equals(dict.getParentId(), BladeConstant.TOP_PARENT_ID)) { - dictVO.setParentName(BladeConstant.TOP_PARENT_NAME); - } else { - DictBiz parent = DictBizCache.getById(dict.getParentId()); - dictVO.setParentName(parent.getDictValue()); - } - return dictVO; - } - - public List listNodeVO(List list) { - List collect = list.stream().map(dict -> BeanUtil.copy(dict, DictBizVO.class)).collect(Collectors.toList()); - return ForestNodeMerger.merge(collect); - } - -} diff --git a/kn-service/kn-setting/src/main/resources/application-dev.yml b/kn-service/kn-setting/src/main/resources/application-dev.yml deleted file mode 100644 index 3aef9ec..0000000 --- a/kn-service/kn-setting/src/main/resources/application-dev.yml +++ /dev/null @@ -1,5 +0,0 @@ -spring: - datasource: - url: ${kn.datasource.vordm.url} - username: ${kn.datasource.vordm.username} - password: ${kn.datasource.vordm.password} diff --git a/kn-service/kn-setting/src/main/resources/application-prod.yml b/kn-service/kn-setting/src/main/resources/application-prod.yml deleted file mode 100644 index 3aef9ec..0000000 --- a/kn-service/kn-setting/src/main/resources/application-prod.yml +++ /dev/null @@ -1,5 +0,0 @@ -spring: - datasource: - url: ${kn.datasource.vordm.url} - username: ${kn.datasource.vordm.username} - password: ${kn.datasource.vordm.password} diff --git a/kn-service/kn-setting/src/main/resources/application-test.yml b/kn-service/kn-setting/src/main/resources/application-test.yml deleted file mode 100644 index 3aef9ec..0000000 --- a/kn-service/kn-setting/src/main/resources/application-test.yml +++ /dev/null @@ -1,5 +0,0 @@ -spring: - datasource: - url: ${kn.datasource.vordm.url} - username: ${kn.datasource.vordm.username} - password: ${kn.datasource.vordm.password} diff --git a/kn-service/kn-setting/src/main/resources/application.yml b/kn-service/kn-setting/src/main/resources/application.yml deleted file mode 100644 index ed591cc..0000000 --- a/kn-service/kn-setting/src/main/resources/application.yml +++ /dev/null @@ -1,13 +0,0 @@ -server: - port: 8106 - -#mybatis-plus配置 -mybatis-plus: - mapper-locations: classpath:com/kening/**/mapper/*Mapper.xml - #实体扫描,多个package用逗号或者分号分隔 - typeAliasesPackage: com.kening.**.entity - -#swagger扫描路径配置 -swagger: - base-packages: - - com.kening.setting diff --git a/kn-service/pom.xml b/kn-service/pom.xml index c10d910..e1b2c42 100644 --- a/kn-service/pom.xml +++ b/kn-service/pom.xml @@ -5,7 +5,8 @@ 4.0.0 biz-vordm - + vordm-crawl + @@ -21,91 +22,10 @@ 微服务集合 - - org.hdrhistogram - HdrHistogram - 2.1.12 - - - org.javassist - javassist - 3.25.0-GA - com.kening.platform kn-launcher - - org.springblade - blade-core-boot - - - com.oracle - ojdbc7 - - - HdrHistogram - org.hdrhistogram - - - javassist - org.javassist - - - com.microsoft.sqlserver - mssql-jdbc - - - org.postgresql - postgresql - - - fastjson - com.alibaba - - - - - org.springblade - blade-starter-oss - - - esdk-obs-java - com.huaweicloud - - - - - io.minio - minio - - - org.springframework - spring-mock - 2.0.8 - - - com.alibaba - fastjson - - - org.springblade - blade-starter-swagger - - - org.springblade - blade-starter-tenant - - - - org.springframework.boot - spring-boot-starter-mail - - - - org.springframework.boot - spring-boot-starter-thymeleaf - diff --git a/kn-service/vordm-crawl/pom.xml b/kn-service/vordm-crawl/pom.xml new file mode 100644 index 0000000..0222113 --- /dev/null +++ b/kn-service/vordm-crawl/pom.xml @@ -0,0 +1,74 @@ + + + + kn-service + com.kening.platform + ${revision} + + 4.0.0 + + vordm-crawl + + + 8 + 8 + UTF-8 + + + + + com.kening.platform + kn-launcher + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-undertow + + + wildfly-common + org.wildfly.common + + + + + com.itmuch + spring-cloud-wii + 2.2.6.RELEASE + + + de.codecentric + spring-boot-admin-starter-client + + + + org.springframework.cloud + spring-cloud-starter-netflix-hystrix + + + commons-logging + commons-logging + + + HdrHistogram + org.hdrhistogram + + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + diff --git a/kn-service/vordm-crawl/src/main/java/com/kening/crawl/CrawlProxyApplication.java b/kn-service/vordm-crawl/src/main/java/com/kening/crawl/CrawlProxyApplication.java new file mode 100644 index 0000000..43d2acc --- /dev/null +++ b/kn-service/vordm-crawl/src/main/java/com/kening/crawl/CrawlProxyApplication.java @@ -0,0 +1,13 @@ +package com.kening.crawl; + +import org.springblade.core.launch.BladeApplication; +import org.springframework.cloud.client.SpringCloudApplication; +import org.springframework.context.annotation.ComponentScan; + +@SpringCloudApplication +@ComponentScan({"org.springblade", "com.kening.crawl"}) +public class CrawlProxyApplication { + public static void main(String[] args) { + BladeApplication.run("vordm-crawl", CrawlProxyApplication.class, args); + } +} diff --git a/kn-service/vordm-crawl/src/main/resources/application-dev.yaml b/kn-service/vordm-crawl/src/main/resources/application-dev.yaml new file mode 100644 index 0000000..e69de29 diff --git a/kn-service/vordm-crawl/src/main/resources/application-prod.yaml b/kn-service/vordm-crawl/src/main/resources/application-prod.yaml new file mode 100644 index 0000000..e69de29 diff --git a/kn-service/vordm-crawl/src/main/resources/application.yaml b/kn-service/vordm-crawl/src/main/resources/application.yaml new file mode 100644 index 0000000..68512b0 --- /dev/null +++ b/kn-service/vordm-crawl/src/main/resources/application.yaml @@ -0,0 +1,12 @@ +server: + port: 8989 + +spring: + cloud: + gateway: + discovery: + locator: + enabled: true + loadbalancer: + retry: + enabled: true From 57f56c4d923a698bf575946ccaa86ff4c1bea852 Mon Sep 17 00:00:00 2001 From: whq <460794335@qq.com> Date: Wed, 19 Apr 2023 19:05:19 +0800 Subject: [PATCH 2/6] Dockerfile --- kn-service/biz-vordm/Dockerfile | 15 +++++++++++++++ kn-service/vordm-crawl/Dockerfile | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 kn-service/biz-vordm/Dockerfile create mode 100644 kn-service/vordm-crawl/Dockerfile diff --git a/kn-service/biz-vordm/Dockerfile b/kn-service/biz-vordm/Dockerfile new file mode 100644 index 0000000..68d10bc --- /dev/null +++ b/kn-service/biz-vordm/Dockerfile @@ -0,0 +1,15 @@ +FROM bladex/alpine-java:openjdk8-openj9_cn_slim + +LABEL maintainer=whq<460794335@qq.com> + +RUN mkdir -p /kn/vordm + +WORKDIR /kn/vordm + +EXPOSE 8282 + +ADD ./target/kn-system.jar ./app.jar + +ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] + +CMD ["--spring.profiles.active=test"] diff --git a/kn-service/vordm-crawl/Dockerfile b/kn-service/vordm-crawl/Dockerfile new file mode 100644 index 0000000..623911e --- /dev/null +++ b/kn-service/vordm-crawl/Dockerfile @@ -0,0 +1,15 @@ +FROM bladex/alpine-java:openjdk8-openj9_cn_slim + +LABEL maintainer=whq<460794335@qq.com> + +RUN mkdir -p /kn/vordm + +WORKDIR /kn/vordm + +EXPOSE 8989 + +ADD ./target/kn-system.jar ./app.jar + +ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] + +CMD ["--spring.profiles.active=test"] From 9e4e7c1ba2d2e68a1325e358502010ab8681bc8e Mon Sep 17 00:00:00 2001 From: whq <460794335@qq.com> Date: Wed, 19 Apr 2023 19:08:51 +0800 Subject: [PATCH 3/6] Dockerfile --- kn-service/biz-vordm/Dockerfile | 2 +- kn-service/vordm-crawl/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kn-service/biz-vordm/Dockerfile b/kn-service/biz-vordm/Dockerfile index 68d10bc..ee2b05c 100644 --- a/kn-service/biz-vordm/Dockerfile +++ b/kn-service/biz-vordm/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /kn/vordm EXPOSE 8282 -ADD ./target/kn-system.jar ./app.jar +ADD ./target/biz-vordm.jar ./app.jar ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] diff --git a/kn-service/vordm-crawl/Dockerfile b/kn-service/vordm-crawl/Dockerfile index 623911e..a8eeb9b 100644 --- a/kn-service/vordm-crawl/Dockerfile +++ b/kn-service/vordm-crawl/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /kn/vordm EXPOSE 8989 -ADD ./target/kn-system.jar ./app.jar +ADD ./target/vordm-crawl.jar ./app.jar ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] From e18b864ee3a396c6d2d8a595cb9072c86b879171 Mon Sep 17 00:00:00 2001 From: yyhouc <792163605@qq.com> Date: Wed, 19 Apr 2023 21:00:42 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=AE=8C=E6=88=90tool=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=EF=BC=8C=E5=AE=8C=E6=88=90contact=20=E5=AE=8C=E6=88=90=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AE=A1=E6=A0=B8=E5=8A=A0=E5=85=A5=E5=88=86?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/kening/vordm/entity/Contact.java | 4 ++++ .../main/java/com/kening/vordm/entity/DisasterInfo.java | 4 ++++ .../src/main/java/com/kening/vordm/entity/Tool.java | 4 ++++ .../com/kening/vordm/controller/ContactController.java | 1 + .../kening/vordm/controller/DisasterInfoController.java | 7 +++++++ .../java/com/kening/vordm/controller/ToolController.java | 3 +++ .../java/com/kening/vordm/mapper/DisasterInfoMapper.xml | 8 +++++++- .../org/springblade/auth/SystemManagerApplication.java | 2 +- .../auth/system/controller/DictBizController.java | 1 - 9 files changed, 31 insertions(+), 3 deletions(-) diff --git a/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/Contact.java b/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/Contact.java index 4ef6699..ef835f5 100644 --- a/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/Contact.java +++ b/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/Contact.java @@ -63,5 +63,9 @@ public class Contact implements Serializable { @TableField(exist = false) private static final long serialVersionUID = 1L; + @TableField(exist = false) + private String verify; + @TableField(exist = false) + private String key; } diff --git a/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/DisasterInfo.java b/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/DisasterInfo.java index e6e720b..c439b5c 100644 --- a/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/DisasterInfo.java +++ b/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/DisasterInfo.java @@ -144,4 +144,8 @@ public class DisasterInfo implements Serializable { @TableField(exist = false) private static final long serialVersionUID = 1L; + private Long chiefId; + + private String chiefName; + } diff --git a/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/Tool.java b/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/Tool.java index d3bfc9a..d901118 100644 --- a/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/Tool.java +++ b/kn-service-api/biz-vordm-api/src/main/java/com/kening/vordm/entity/Tool.java @@ -85,5 +85,9 @@ public class Tool implements Serializable { private static final long serialVersionUID = 1L; @TableField(exist = false) private String checked; + /** + * 贡献者 + */ + private String showName; } diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/ContactController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/ContactController.java index 772d5ad..13fc70d 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/ContactController.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/ContactController.java @@ -70,6 +70,7 @@ public class ContactController{ @ApiOperation(value = "提交", notes = "传入Contact") @PostMapping("/submit") public R submit(@ApiParam(value = "Contact对象", required = true) @RequestBody Contact contact) { + contact.setContactDate(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")); return R.status(contactService.saveOrUpdate(contact)); } diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DisasterInfoController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DisasterInfoController.java index ba96113..b6564e9 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DisasterInfoController.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DisasterInfoController.java @@ -16,6 +16,7 @@ import com.kening.vordm.vo.UserTenantVo; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; @@ -329,4 +330,10 @@ public class DisasterInfoController { Boolean flag=disasterInfoService.updateById(disasterInfo); return R.data(flag); } + @ApiOperationSupport(order = 6) + @ApiOperation(value = "提交", notes = "传入Tool") + @PostMapping("/submit") + public R submit(@ApiParam(value = "Tool对象", required = true) @RequestBody DisasterInfo disasterInfo) { + return R.status(disasterInfoService.saveOrUpdate(disasterInfo)); + } } diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/ToolController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/ToolController.java index f2efdf0..fb16c3d 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/ToolController.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/ToolController.java @@ -38,6 +38,9 @@ public class ToolController{ if(!StringUtils.isEmpty(tool.getToolName())){ queryWrapper.like("tool_name", tool.getToolName()); } + if(!StringUtils.isEmpty(tool.getLabel())){ + queryWrapper.like("label", tool.getLabel()); + } String checkd = tool.getChecked(); if(checkd != null && checkd.equals("1")){ queryWrapper.isNull("review_time"); diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.xml b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.xml index 32ae215..7c07277 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.xml +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/mapper/DisasterInfoMapper.xml @@ -143,7 +143,10 @@ d.disaster_keyword, d.upload_time, d.geometry, - d.respond_status + d.respond_status, + d.chief_id, + d.chief_name + From guest_manage_disaster_ref ud join guest_info u on u.id = ud.sponsor_id JOIN @@ -158,6 +161,9 @@ d.respond_status = 2 or d.respond_status = 3 + + d.chief_id = #{callForHelpVo.chiefId} + order by d.upload_time desc diff --git a/kn-sys-manager/src/main/java/org/springblade/auth/SystemManagerApplication.java b/kn-sys-manager/src/main/java/org/springblade/auth/SystemManagerApplication.java index b873e06..bc1cc0a 100644 --- a/kn-sys-manager/src/main/java/org/springblade/auth/SystemManagerApplication.java +++ b/kn-sys-manager/src/main/java/org/springblade/auth/SystemManagerApplication.java @@ -18,7 +18,7 @@ import org.springframework.context.annotation.ComponentScan; public class SystemManagerApplication { public static void main(String[] args) { - BladeApplication.run("glj-"+CommonConstant.KN_SYSTEM_MANAGER_MODULE_NAME, SystemManagerApplication.class, args); + BladeApplication.run("yyhouc-"+CommonConstant.KN_SYSTEM_MANAGER_MODULE_NAME, SystemManagerApplication.class, args); } } diff --git a/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java b/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java index 29d1e5d..b0ab17b 100644 --- a/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java +++ b/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java @@ -57,7 +57,6 @@ public class DictBizController { DictBiz detail = dictService.getOne(Condition.getQueryWrapper(dict)); return R.data(DictBizWrapper.build().entityVO(detail)); } - /** * 列表 */ From 559553b29d13f231dcaf9f92c9a39ddbb75316db Mon Sep 17 00:00:00 2001 From: glj Date: Thu, 20 Apr 2023 09:04:40 +0800 Subject: [PATCH 5/6] =?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 --- .../com/kening/vordm/controller/EntityDataController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/EntityDataController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/EntityDataController.java index 172628f..65a8f69 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/EntityDataController.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/EntityDataController.java @@ -50,5 +50,13 @@ public class EntityDataController { public R saveEntityData(EntityDataUserVo entityDataUserVo) { return R.data(entityDataService.saveEntityData(entityDataUserVo)); } + + @GetMapping("/updateByIdEntityDataStatus") + public R updateByIdEntityDataStatus(Long id,Integer status) { + EntityData entityData = new EntityData(); + entityData.setId(id); + entityData.setStatus(status); + return R.data(entityDataService.updateById(entityData)); + } } From 836a19065c41b9f58aa9a6f3ca315ac10e126969 Mon Sep 17 00:00:00 2001 From: whq <460794335@qq.com> Date: Thu, 20 Apr 2023 09:32:37 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/mapper/CenterDisasterInfoMapper.xml | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 kn-service/biz-vordm/src/main/java/mapper/CenterDisasterInfoMapper.xml diff --git a/kn-service/biz-vordm/src/main/java/mapper/CenterDisasterInfoMapper.xml b/kn-service/biz-vordm/src/main/java/mapper/CenterDisasterInfoMapper.xml deleted file mode 100644 index f0e16d8..0000000 --- a/kn-service/biz-vordm/src/main/java/mapper/CenterDisasterInfoMapper.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id,disaster_type,disaster_keyword, - disaster_time,upload_time,geometry, - disaster_level,disaster_country,respond_status, - visit_count,download_count,spider_type, - tempend_time,temp_start_time,create_time, - vordm_id,respond_time,sponsor_organization, - dict_value,disaster_img,size, - news,user_name,status, - apply_time,review_time,email - -