This commit is contained in:
why 2023-04-20 10:50:52 +08:00
commit ee21da44a6
42 changed files with 300 additions and 1321 deletions

View File

@ -56,5 +56,8 @@ public interface CommonConstant {
* 系统管理模块 application name * 系统管理模块 application name
*/ */
String KN_SYSTEM_MANAGER_MODULE_NAME = "system-manager"; String KN_SYSTEM_MANAGER_MODULE_NAME = "system-manager";
String KN_VORDM_SETTING = "kn-setting"; /**
* 爬虫代理模块 application name
*/
String VORDM_PROXY_CRAWL_MODULE_NAME = "vordm-crawl";
} }

View File

@ -63,5 +63,9 @@ public class Contact implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableField(exist = false)
private String verify;
@TableField(exist = false)
private String key;
} }

View File

@ -155,4 +155,7 @@ public class DisasterInfo implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String chiefName;
} }

View File

@ -92,5 +92,9 @@ public class Tool implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableField(exist = false) @TableField(exist = false)
private String checked; private String checked;
/**
* 贡献者
*/
private String showName;
} }

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>kn-service-api</artifactId>
<groupId>com.kening.platform</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>kn-setting-api</artifactId>
<dependencies>
<dependency>
<groupId>com.kening.platform</groupId>
<artifactId>kn-common</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</project>

View File

@ -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<DictBiz> 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<String> 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<String> result = getDictClient().getValue(code, dictKey);
return result.getData();
});
}
/**
* 获取字典集合
*
* @param code 字典编号
* @return List<DictBiz>
*/
public static List<DictBiz> getList(String code) {
String keyPrefix = DICT_LIST.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
return CacheUtil.get(DICT_CACHE, keyPrefix, code, () -> {
R<List<DictBiz>> result = getDictClient().getList(code);
return result.getData();
});
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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<DictBiz> getById(@RequestParam("id") Long id);
/**
* 获取字典表对应值
*
* @param code 字典编号
* @param dictKey 字典序号
* @return
*/
@GetMapping(GET_VALUE)
R<String> getValue(@RequestParam("code") String code, @RequestParam("dictKey") String dictKey);
/**
* 获取字典表
*
* @param code 字典编号
* @return
*/
@GetMapping(GET_LIST)
R<List<DictBiz>> getList(@RequestParam("code") String code);
}

View File

@ -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<DictBiz> getById(Long id) {
return R.fail("获取数据失败");
}
@Override
public R<String> getValue(String code, String dictKey) {
return R.fail("获取数据失败");
}
@Override
public R<List<DictBiz>> getList(String code) {
return R.fail("获取数据失败");
}
}

View File

@ -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<DictBizVO> {
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<DictBizVO> children;
@Override
public List<DictBizVO> getChildren() {
if (this.children == null) {
this.children = new ArrayList<>();
}
return this.children;
}
/**
* 上级字典
*/
private String parentName;
}

View File

@ -14,7 +14,6 @@
<version>${revision}</version> <version>${revision}</version>
<modules> <modules>
<module>biz-vordm-api</module> <module>biz-vordm-api</module>
<module>kn-setting-api</module>
</modules> </modules>
<packaging>pom</packaging> <packaging>pom</packaging>
<description>微服务API集合</description> <description>微服务API集合</description>

View File

@ -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/biz-vordm.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"]

View File

@ -17,6 +17,87 @@
<artifactId>biz-vordm-api</artifactId> <artifactId>biz-vordm-api</artifactId>
<version>${revision}</version> <version>${revision}</version>
</dependency> </dependency>
<dependency>
<groupId>org.hdrhistogram</groupId>
<artifactId>HdrHistogram</artifactId>
<version>2.1.12</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.25.0-GA</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-boot</artifactId>
<exclusions>
<exclusion>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
</exclusion>
<exclusion>
<artifactId>HdrHistogram</artifactId>
<groupId>org.hdrhistogram</groupId>
</exclusion>
<exclusion>
<artifactId>javassist</artifactId>
<groupId>org.javassist</groupId>
</exclusion>
<exclusion>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
</exclusion>
<exclusion>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</exclusion>
<exclusion>
<artifactId>fastjson</artifactId>
<groupId>com.alibaba</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-oss</artifactId>
<exclusions>
<exclusion>
<artifactId>esdk-obs-java</artifactId>
<groupId>com.huaweicloud</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.8</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-swagger</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-tenant</artifactId>
</dependency>
<!--邮件发送依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<!--thymeleaf-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -70,6 +70,7 @@ public class ContactController{
@ApiOperation(value = "提交", notes = "传入Contact") @ApiOperation(value = "提交", notes = "传入Contact")
@PostMapping("/submit") @PostMapping("/submit")
public R submit(@ApiParam(value = "Contact对象", required = true) @RequestBody Contact contact) { public R submit(@ApiParam(value = "Contact对象", required = true) @RequestBody Contact contact) {
contact.setContactDate(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")); contact.setContactDate(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
return R.status(contactService.saveOrUpdate(contact)); return R.status(contactService.saveOrUpdate(contact));
} }

View File

@ -16,6 +16,7 @@ import com.kening.vordm.vo.UserTenantVo;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
@ -55,7 +56,7 @@ public class DisasterInfoController {
@GetMapping("/saveGuestManageDisasterRef") @GetMapping("/saveGuestManageDisasterRef")
public R saveGuestManageDisasterRef(Long disasterId, Long managerId) { public R saveGuestManageDisasterRef(Long disasterId, Long managerId) {
LambdaQueryWrapper<GuestManageDisasterRef> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GuestManageDisasterRef> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(GuestManageDisasterRef::getDisasterId,disasterId); queryWrapper.eq(GuestManageDisasterRef::getDisasterId, disasterId);
GuestManageDisasterRef one = guestManageDisasterRefService.getOne(queryWrapper); GuestManageDisasterRef one = guestManageDisasterRefService.getOne(queryWrapper);
one.setManagerId(managerId); one.setManagerId(managerId);
one.setApplyTime(new Date()); one.setApplyTime(new Date());
@ -185,11 +186,11 @@ public class DisasterInfoController {
@GetMapping("/homeDisasterInfo") @GetMapping("/homeDisasterInfo")
public R<IPage<DisasterInfoVo>> gethomeDisasterInfo(Query query, @RequestParam Map<String, String> params) { public R<IPage<DisasterInfoVo>> gethomeDisasterInfo(Query query, @RequestParam Map<String, String> params) {
String dateType = String.valueOf(params.get("dateType")); String dateType = String.valueOf(params.get("dateType"));
if(StringUtils.isNotBlank(dateType) && !"4".equals(dateType) && !"null".equals(dateType)){ if (StringUtils.isNotBlank(dateType) && !"4".equals(dateType) && !"null".equals(dateType)) {
LocalDate date = LocalDate.now(); LocalDate date = LocalDate.now();
//如果有时间类型 //如果有时间类型
switch (dateType){ switch (dateType) {
case "1" : case "1":
//Latest week 上一周 //Latest week 上一周
date = LocalDate.now().minusWeeks(1); date = LocalDate.now().minusWeeks(1);
break; break;
@ -204,32 +205,32 @@ public class DisasterInfoController {
default: default:
break; break;
} }
return R.data(disasterInfoVoService.page(Condition.getPage(query),Wrappers.<DisasterInfoVo>lambdaQuery() return R.data(disasterInfoVoService.page(Condition.getPage(query), Wrappers.<DisasterInfoVo>lambdaQuery()
.eq(DisasterInfoVo::getRespondStatus, Integer.valueOf(params.get("respondStatus"))) .eq(DisasterInfoVo::getRespondStatus, Integer.valueOf(params.get("respondStatus")))
.ge(DisasterInfoVo::getDisasterTime,date) .ge(DisasterInfoVo::getDisasterTime, date)
.le(DisasterInfoVo::getDisasterTime,LocalDate.now()) .le(DisasterInfoVo::getDisasterTime, LocalDate.now())
.eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))),DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType"))) .eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))), DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType")))
// .and(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))) // .and(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea")))
// ,Wrappers->Wrappers.like(DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))).or().like(DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("affectedArea")))) // ,Wrappers->Wrappers.like(DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))).or().like(DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("affectedArea"))))
.like(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))), DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))) .like(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))), DisasterInfoVo::getDisasterCountry, String.valueOf(params.get("affectedArea")))
// .eq("type".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterType,String.valueOf(params.get("leftVal"))) // .eq("type".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterType,String.valueOf(params.get("leftVal")))
// .eq("country".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("leftVal"))) // .eq("country".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("leftVal")))
// .eq("sponsorOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("leftVal"))) // .eq("sponsorOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("leftVal")))
// .inSql("responseOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getId,"select t.disaster_id from guest_manage_disaster_ref t " + // .inSql("responseOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getId,"select t.disaster_id from guest_manage_disaster_ref t " +
// " where t.response_organization = " + params.get("leftVal")) // " where t.response_organization = " + params.get("leftVal"))
.orderByDesc("Visits".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getVisitCount) .orderByDesc("Visits".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getVisitCount)
.orderByDesc("Downloads".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getDownloadCount) .orderByDesc("Downloads".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getDownloadCount)
.orderByDesc(DisasterInfoVo::getVordmId) .orderByDesc(DisasterInfoVo::getVordmId)
)); ));
} }
if("4".equals(dateType)){ if ("4".equals(dateType)) {
//自定义时间 //自定义时间
return R.data(disasterInfoVoService.page(Condition.getPage(query),Wrappers.<DisasterInfoVo>lambdaQuery() return R.data(disasterInfoVoService.page(Condition.getPage(query), Wrappers.<DisasterInfoVo>lambdaQuery()
.eq(DisasterInfoVo::getRespondStatus, Integer.valueOf(params.get("respondStatus"))) .eq(DisasterInfoVo::getRespondStatus, Integer.valueOf(params.get("respondStatus")))
.ge(DisasterInfoVo::getDisasterTime,LocalDate.parse(String.valueOf(params.get("startTime")))) .ge(DisasterInfoVo::getDisasterTime, LocalDate.parse(String.valueOf(params.get("startTime"))))
.le(DisasterInfoVo::getDisasterTime,LocalDate.parse(String.valueOf(params.get("endTime")))) .le(DisasterInfoVo::getDisasterTime, LocalDate.parse(String.valueOf(params.get("endTime"))))
.eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))),DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType"))) .eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))), DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType")))
.like(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))), DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))) .like(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))), DisasterInfoVo::getDisasterCountry, String.valueOf(params.get("affectedArea")))
// .and(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))) // .and(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea")))
// ,Wrappers->Wrappers.like(DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))).or().like(DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("affectedArea")))) // ,Wrappers->Wrappers.like(DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))).or().like(DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("affectedArea"))))
// .eq("type".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterType,String.valueOf(params.get("leftVal"))) // .eq("type".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterType,String.valueOf(params.get("leftVal")))
@ -237,16 +238,16 @@ public class DisasterInfoController {
// .eq("sponsorOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("leftVal"))) // .eq("sponsorOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("leftVal")))
// .inSql("responseOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getId,"select t.disaster_id from guest_manage_disaster_ref t " + // .inSql("responseOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getId,"select t.disaster_id from guest_manage_disaster_ref t " +
// " where t.response_organization = " + params.get("leftVal")) // " where t.response_organization = " + params.get("leftVal"))
.orderByDesc("Visits".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getVisitCount) .orderByDesc("Visits".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getVisitCount)
.orderByDesc("Downloads".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getDownloadCount) .orderByDesc("Downloads".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getDownloadCount)
.orderByDesc(DisasterInfoVo::getVordmId) .orderByDesc(DisasterInfoVo::getVordmId)
)); ));
} else{ } else {
//没有时间相关的 //没有时间相关的
return R.data(disasterInfoVoService.page(Condition.getPage(query),Wrappers.<DisasterInfoVo>lambdaQuery() return R.data(disasterInfoVoService.page(Condition.getPage(query), Wrappers.<DisasterInfoVo>lambdaQuery()
.eq(DisasterInfoVo::getRespondStatus, Integer.valueOf(params.get("respondStatus"))) .eq(DisasterInfoVo::getRespondStatus, Integer.valueOf(params.get("respondStatus")))
.eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))),DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType"))) .eq(StringUtils.isNotBlank(String.valueOf(params.get("disasterType"))) && !"null".equals(String.valueOf(params.get("disasterType"))), DisasterInfoVo::getDisasterType, String.valueOf(params.get("disasterType")))
.like(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))), DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))) .like(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))), DisasterInfoVo::getDisasterCountry, String.valueOf(params.get("affectedArea")))
// .and(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea"))) // .and(StringUtils.isNotBlank(String.valueOf(params.get("affectedArea"))) && !"null".equals(String.valueOf(params.get("affectedArea")))
// ,Wrappers->Wrappers.like(DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))).or().like(DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("affectedArea")))) // ,Wrappers->Wrappers.like(DisasterInfoVo::getDisasterCountry,String.valueOf(params.get("affectedArea"))).or().like(DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("affectedArea"))))
// .eq("type".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterType,String.valueOf(params.get("leftVal"))) // .eq("type".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getDisasterType,String.valueOf(params.get("leftVal")))
@ -254,8 +255,8 @@ public class DisasterInfoController {
// .eq("sponsorOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("leftVal"))) // .eq("sponsorOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getSponsorOrganization,String.valueOf(params.get("leftVal")))
// .inSql("responseOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getId,"select t.disaster_id from guest_manage_disaster_ref t " + // .inSql("responseOrganization".equals(String.valueOf(params.get("leftType"))) && !"null".equals(String.valueOf(params.get("leftType"))),DisasterInfoVo::getId,"select t.disaster_id from guest_manage_disaster_ref t " +
// " where t.response_organization = " + params.get("leftVal")) // " where t.response_organization = " + params.get("leftVal"))
.orderByDesc("Visits".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getVisitCount) .orderByDesc("Visits".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getVisitCount)
.orderByDesc("Downloads".equals(String.valueOf(params.get("order"))),DisasterInfoVo::getDownloadCount) .orderByDesc("Downloads".equals(String.valueOf(params.get("order"))), DisasterInfoVo::getDownloadCount)
.orderByDesc(DisasterInfoVo::getVordmId) .orderByDesc(DisasterInfoVo::getVordmId)
)); ));
} }
@ -320,7 +321,7 @@ public class DisasterInfoController {
* call for help * call for help
*/ */
@PostMapping("Call-for-help") @PostMapping("Call-for-help")
public R<Boolean> insertRespondInfo(@RequestBody CallForHelpVo callForHelpVo ){ public R<Boolean> insertRespondInfo(@RequestBody CallForHelpVo callForHelpVo) {
GuestInfo guestInfo = new GuestInfo(); GuestInfo guestInfo = new GuestInfo();
BeanUtil.copyProperties(callForHelpVo, guestInfo); BeanUtil.copyProperties(callForHelpVo, guestInfo);
guestInfo.setId(IdWorker.getId()); guestInfo.setId(IdWorker.getId());
@ -341,48 +342,59 @@ public class DisasterInfoController {
@PostMapping("review") @PostMapping("review")
public R<Boolean> review( @RequestBody DisasterInfo disasterInfo){ public R<Boolean> review(@RequestBody DisasterInfo disasterInfo) {
Boolean flag=disasterInfoService.updateById(disasterInfo); Boolean flag = disasterInfoService.updateById(disasterInfo);
return R.data(flag); 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));
}
/** /**
* 后台管理系统-控制台灾害各项统计 * 后台管理系统-控制台灾害各项统计
*
* @return * @return
*/ */
@GetMapping("/statistics") @GetMapping("/statistics")
public R statistics(){ public R statistics() {
return R.data(disasterInfoService.statistics()); return R.data(disasterInfoService.statistics());
} }
/** /**
* 批量更新灾害的chief管理者 * 批量更新灾害的chief管理者
*
* @param disasterInfoList * @param disasterInfoList
* @return * @return
*/ */
@PutMapping("/updateBatch") @PutMapping("/updateBatch")
public R updateBatch(@RequestBody List<DisasterInfo> disasterInfoList){ public R updateBatch(@RequestBody List<DisasterInfo> disasterInfoList) {
return R.status(disasterInfoService.updateBatchById(disasterInfoList)); return R.status(disasterInfoService.updateBatchById(disasterInfoList));
} }
/** /**
* 批量更新灾害的chief管理者 * 批量更新灾害的chief管理者
*
* @param disasterInfoList * @param disasterInfoList
* @return * @return
*/ */
@PutMapping("/removeManage") @PutMapping("/removeManage")
public R removeManage(@RequestBody List<DisasterInfo> disasterInfoList){ public R removeManage(@RequestBody List<DisasterInfo> disasterInfoList) {
return R.status(disasterInfoService.removeManage(disasterInfoList)); return R.status(disasterInfoService.removeManage(disasterInfoList));
} }
/** /**
* 判断用户是否管理当前灾害 * 判断用户是否管理当前灾害
* @param userId 用户Id *
* @param userId 用户Id
* @param disasterId 灾害Id * @param disasterId 灾害Id
* @return * @return
*/ */
@GetMapping("/getByUserDisasterInfo") @GetMapping("/getByUserDisasterInfo")
public R getByUserDisasterInfo(Long userId,Long disasterId){ public R getByUserDisasterInfo(Long userId, Long disasterId) {
return R.data(disasterInfoService.getByUserDisasterInfo(userId,disasterId)); return R.data(disasterInfoService.getByUserDisasterInfo(userId, disasterId));
} }
} }

View File

@ -50,5 +50,13 @@ public class EntityDataController {
public R saveEntityData(EntityDataUserVo entityDataUserVo) { public R saveEntityData(EntityDataUserVo entityDataUserVo) {
return R.data(entityDataService.saveEntityData(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));
}
} }

View File

@ -38,6 +38,9 @@ public class ToolController{
if(!StringUtils.isEmpty(tool.getToolName())){ if(!StringUtils.isEmpty(tool.getToolName())){
queryWrapper.like("tool_name", tool.getToolName()); queryWrapper.like("tool_name", tool.getToolName());
} }
if(!StringUtils.isEmpty(tool.getLabel())){
queryWrapper.like("label", tool.getLabel());
}
String checkd = tool.getChecked(); String checkd = tool.getChecked();
if(checkd != null && checkd.equals("1")){ if(checkd != null && checkd.equals("1")){
queryWrapper.isNull("review_time"); queryWrapper.isNull("review_time");

View File

@ -26,15 +26,22 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
di.id ,di.disaster_type,di.disaster_keyword, di
.
id
,di.disaster_type,di.disaster_keyword,
di.disaster_time,di.upload_time,di.geometry, di.disaster_time,di.upload_time,di.geometry,
di.disaster_level,di.disaster_country,di.respond_status, di.disaster_level,di.disaster_country,di.respond_status,
di.visit_count,di.spider_type,di.tempend_time, di.visit_count,di.spider_type,di.tempend_time,
di.temp_start_time,di.create_time,di.vordm_id, di.temp_start_time,di.create_time,di.vordm_id,
di.respond_time,di.download_count,di.sponsor_organization di.respond_time,di.download_count,di.sponsor_organization
</sql> </sql>
<sql id="Home_Disaster_Info"> <sql id="Home_Disaster_Info">
d.disaster_type ,d.disaster_time,d.disaster_country, d
.
disaster_type
,d.disaster_time,d.disaster_country,
m.organization m.organization
</sql> </sql>
@ -157,6 +164,8 @@
<select id="page" parameterType="com.kening.vordm.vo.CallForHelpVo" resultType="com.kening.vordm.vo.CallForHelpVo"> <select id="page" parameterType="com.kening.vordm.vo.CallForHelpVo" resultType="com.kening.vordm.vo.CallForHelpVo">
SELECT SELECT
d.chief_id,
d.chief_name,
u.username , u.username ,
u.last_name AS lastName, u.last_name AS lastName,
u.first_name AS firstName, u.first_name AS firstName,
@ -210,6 +219,9 @@
<if test="email != null and email != ''"> <if test="email != null and email != ''">
email = #{email} email = #{email}
</if> </if>
<if test="callForHelpVo.chiefId != null">
d.chief_id = #{callForHelpVo.chiefId}
</if>
</where> </where>
</select> </select>

View File

@ -1,48 +0,0 @@
<?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="com.kening.vordm.mapper.CenterDisasterInfoMapper">
<resultMap id="BaseResultMap" type="com.kening.vordm.vo.CenterDisasterInfo">
<result property="id" column="id" jdbcType="BIGINT"/>
<result property="disasterType" column="disaster_type" jdbcType="VARCHAR"/>
<result property="disasterKeyword" column="disaster_keyword" jdbcType="VARCHAR"/>
<result property="disasterTime" column="disaster_time" jdbcType="DATE"/>
<result property="uploadTime" column="upload_time" jdbcType="TIMESTAMP"/>
<result property="geometry" column="geometry" jdbcType="VARCHAR"/>
<result property="disasterLevel" column="disaster_level" jdbcType="VARCHAR"/>
<result property="disasterCountry" column="disaster_country" jdbcType="VARCHAR"/>
<result property="respondStatus" column="respond_status" jdbcType="SMALLINT"/>
<result property="visitCount" column="visit_count" jdbcType="INTEGER"/>
<result property="downloadCount" column="download_count" jdbcType="INTEGER"/>
<result property="spiderType" column="spider_type" jdbcType="INTEGER"/>
<result property="tempendTime" column="tempend_time" jdbcType="TIMESTAMP"/>
<result property="tempStartTime" column="temp_start_time" jdbcType="TIMESTAMP"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="vordmId" column="vordm_id" jdbcType="VARCHAR"/>
<result property="respondTime" column="respond_time" jdbcType="TIMESTAMP"/>
<result property="sponsorOrganization" column="sponsor_organization" jdbcType="VARCHAR"/>
<result property="dictValue" column="dict_value" jdbcType="VARCHAR"/>
<result property="disasterImg" column="disaster_img" jdbcType="VARCHAR"/>
<result property="size" column="size" jdbcType="DECIMAL"/>
<result property="news" column="news" jdbcType="VARCHAR"/>
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="INTEGER"/>
<result property="applyTime" column="apply_time" jdbcType="TIMESTAMP"/>
<result property="reviewTime" column="review_time" jdbcType="TIMESTAMP"/>
<result property="email" column="email" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
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
</sql>
</mapper>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>kn-service</artifactId>
<groupId>com.kening.platform</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>kn-setting</artifactId>
<dependencies>
<dependency>
<groupId>com.kening.platform</groupId>
<artifactId>kn-setting-api</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</project>

View File

@ -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);
}
}

View File

@ -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 {
}

View File

@ -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<DictBizVO> 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<DictBizVO>> list(@ApiIgnore @RequestParam Map<String, Object> dict) {
List<DictBiz> 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<IPage<DictBizVO>> parentList(@ApiIgnore @RequestParam Map<String, Object> 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<List<DictBizVO>> childList(@ApiIgnore @RequestParam Map<String, Object> 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<List<DictBizVO>> tree() {
List<DictBizVO> tree = dictService.tree();
return R.data(tree);
}
/**
* 获取字典树形结构
*/
@GetMapping("/parent-tree")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "树形结构", notes = "树形结构")
public R<List<DictBizVO>> parentTree() {
List<DictBizVO> 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<List<DictBiz>> dictionary(String code) {
List<DictBiz> tree = dictService.getList(code);
return R.data(tree);
}
/**
* 获取字典树
*/
@GetMapping("/dictionary-tree")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "获取字典树", notes = "获取字典树")
public R<List<DictBizVO>> dictionaryTree(String code) {
List<DictBiz> tree = dictService.getList(code);
return R.data(DictBizWrapper.build().listNodeVO(tree));
}
}

View File

@ -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<DictBiz> {
/**
* 获取字典表对应中文
*
* @param code 字典编号
* @param dictKey 字典序号
* @return
*/
String getValue(String code, String dictKey);
/**
* 获取字典表
*
* @param code 字典编号
* @return
*/
List<DictBiz> getList(String code);
/**
* 获取树形节点
*
* @return
*/
List<DictBizVO> tree();
/**
* 获取树形节点
*
* @return
*/
List<DictBizVO> parentTree();
}

View File

@ -1,51 +0,0 @@
<?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="com.kening.setting.mapper.DictBizMapper">
<!-- 通用查询映射结果 -->
<resultMap id="dictResultMap" type="com.kening.setting.entity.DictBiz">
<id column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>
<result column="parent_id" property="parentId"/>
<result column="code" property="code"/>
<result column="dict_key" property="dictKey"/>
<result column="dict_value" property="dictValue"/>
<result column="sort" property="sort"/>
<result column="remark" property="remark"/>
<result column="is_deleted" property="isDeleted"/>
</resultMap>
<resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
<id column="id" property="id"/>
<result column="parent_id" property="parentId"/>
<result column="title" property="title"/>
<result column="value" property="value"/>
<result column="key" property="key"/>
</resultMap>
<select id="getValue" resultType="java.lang.String">
select
dict_value
from blade_dict_biz where code = #{param1} and dict_key = #{param2} and is_deleted = 0
</select>
<!-- oracle 版本 -->
<!--<select id="getValue" resultType="java.lang.String">
select
dict_value
from blade_dict_biz where code = #{param1, jdbcType=VARCHAR} and dict_key = #{param2} and dict_key >= 0 rownum 1
</select>-->
<select id="getList" resultMap="dictResultMap">
select id, parent_id, code, dict_key, dict_value, sort, remark from blade_dict_biz where code = #{param1} and parent_id > 0 and is_sealed = 0 and is_deleted = 0
</select>
<select id="tree" resultMap="treeNodeResultMap">
select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict_biz where is_deleted = 0
</select>
<select id="parentTree" resultMap="treeNodeResultMap">
select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict_biz where is_deleted = 0 and parent_id = 0
</select>
</mapper>

View File

@ -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<DictBiz> {
/**
* 树形结构
*
* @return
*/
List<DictBizVO> tree();
/**
* 树形结构
*
* @return
*/
List<DictBizVO> parentTree();
/**
* 获取字典表对应中文
*
* @param code 字典编号
* @param dictKey 字典序号
* @return
*/
String getValue(String code, String dictKey);
/**
* 获取字典表
*
* @param code 字典编号
* @return
*/
List<DictBiz> getList(String code);
/**
* 新增或修改
*
* @param dict
* @return
*/
boolean submit(DictBiz dict);
/**
* 删除字典
*
* @param ids
* @return
*/
boolean removeDict(String ids);
/**
* 顶级列表
*
* @param dict
* @param query
* @return
*/
IPage<DictBizVO> parentList(Map<String, Object> dict, Query query);
/**
* 子列表
*
* @param dict
* @param parentId
* @return
*/
List<DictBizVO> childList(Map<String, Object> dict, Long parentId);
}

View File

@ -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<DictBizMapper, DictBiz> implements IDictBizService {
@Override
public List<DictBizVO> tree() {
return ForestNodeMerger.merge(baseMapper.tree());
}
@Override
public List<DictBizVO> 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<DictBiz> getList(String code) {
return baseMapper.getList(code);
}
@Override
public boolean submit(DictBiz dict) {
LambdaQueryWrapper<DictBiz> lqw = Wrappers.<DictBiz>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.<DictBiz>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.<DictBiz>query().lambda().in(DictBiz::getParentId, Func.toLongList(ids)));
if (cnt > 0) {
throw new ServiceException("请先删除子节点!");
}
return removeByIds(Func.toLongList(ids));
}
@Override
public IPage<DictBizVO> parentList(Map<String, Object> dict, Query query) {
IPage<DictBiz> 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<DictBizVO> childList(Map<String, Object> dict, Long parentId) {
if (parentId < 0) {
return new ArrayList<>();
}
dict.remove("parentId");
DictBiz parentDict = DictBizCache.getById(parentId);
List<DictBiz> 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);
}
}

View File

@ -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<DictBiz, DictBizVO> {
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<DictBizVO> listNodeVO(List<DictBiz> list) {
List<DictBizVO> collect = list.stream().map(dict -> BeanUtil.copy(dict, DictBizVO.class)).collect(Collectors.toList());
return ForestNodeMerger.merge(collect);
}
}

View File

@ -1,5 +0,0 @@
spring:
datasource:
url: ${kn.datasource.vordm.url}
username: ${kn.datasource.vordm.username}
password: ${kn.datasource.vordm.password}

View File

@ -1,5 +0,0 @@
spring:
datasource:
url: ${kn.datasource.vordm.url}
username: ${kn.datasource.vordm.username}
password: ${kn.datasource.vordm.password}

View File

@ -1,5 +0,0 @@
spring:
datasource:
url: ${kn.datasource.vordm.url}
username: ${kn.datasource.vordm.username}
password: ${kn.datasource.vordm.password}

View File

@ -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

View File

@ -5,7 +5,8 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<modules> <modules>
<module>biz-vordm</module> <module>biz-vordm</module>
<!-- <module>kn-setting</module>--> <module>vordm-crawl</module>
<!-- <module>kn-setting</module>-->
</modules> </modules>
<parent> <parent>
@ -21,91 +22,10 @@
<description>微服务集合</description> <description>微服务集合</description>
<dependencies> <dependencies>
<dependency>
<groupId>org.hdrhistogram</groupId>
<artifactId>HdrHistogram</artifactId>
<version>2.1.12</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.25.0-GA</version>
</dependency>
<dependency> <dependency>
<groupId>com.kening.platform</groupId> <groupId>com.kening.platform</groupId>
<artifactId>kn-launcher</artifactId> <artifactId>kn-launcher</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-boot</artifactId>
<exclusions>
<exclusion>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
</exclusion>
<exclusion>
<artifactId>HdrHistogram</artifactId>
<groupId>org.hdrhistogram</groupId>
</exclusion>
<exclusion>
<artifactId>javassist</artifactId>
<groupId>org.javassist</groupId>
</exclusion>
<exclusion>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
</exclusion>
<exclusion>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</exclusion>
<exclusion>
<artifactId>fastjson</artifactId>
<groupId>com.alibaba</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-oss</artifactId>
<exclusions>
<exclusion>
<artifactId>esdk-obs-java</artifactId>
<groupId>com.huaweicloud</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.8</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-swagger</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-tenant</artifactId>
</dependency>
<!--邮件发送依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<!--thymeleaf-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -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/vordm-crawl.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"]

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>kn-service</artifactId>
<groupId>com.kening.platform</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>vordm-crawl</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.kening.platform</groupId>
<artifactId>kn-launcher</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</exclusion>
<exclusion>
<artifactId>wildfly-common</artifactId>
<groupId>org.wildfly.common</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.itmuch</groupId>
<artifactId>spring-cloud-wii</artifactId>
<version>2.2.6.RELEASE</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
</dependency>
<!--Hystrix-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<artifactId>HdrHistogram</artifactId>
<groupId>org.hdrhistogram</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Nacos -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -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);
}
}

View File

@ -0,0 +1,12 @@
server:
port: 8989
spring:
cloud:
gateway:
discovery:
locator:
enabled: true
loadbalancer:
retry:
enabled: true

View File

@ -18,7 +18,7 @@ import org.springframework.context.annotation.ComponentScan;
public class SystemManagerApplication { public class SystemManagerApplication {
public static void main(String[] args) { 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);
} }
} }

View File

@ -57,7 +57,6 @@ public class DictBizController {
DictBiz detail = dictService.getOne(Condition.getQueryWrapper(dict)); DictBiz detail = dictService.getOne(Condition.getQueryWrapper(dict));
return R.data(DictBizWrapper.build().entityVO(detail)); return R.data(DictBizWrapper.build().entityVO(detail));
} }
/** /**
* 列表 * 列表
*/ */