首次提交

This commit is contained in:
32503
2025-05-08 10:10:04 +08:00
parent c4e3063749
commit 0551bbd5fe
37 changed files with 2503 additions and 0 deletions

17
config-dev Normal file
View File

@ -0,0 +1,17 @@
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://10.125.164.54:41967
name: demok8s
contexts:
- context:
cluster: demok8s
user: cluster-admin
name: default
current-context: default
kind: Config
users:
- name: cluster-admin
user:
token: b69792983bfe0ec502e081ad8a31f9e2

17
config-master Normal file
View File

@ -0,0 +1,17 @@
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://10.172.48.16:44039
name: demok8s
contexts:
- context:
cluster: demok8s
user: cluster-admin
name: default
current-context: default
kind: Config
users:
- name: cluster-admin
user:
token: 2c00232d4e3b1498008315e8ab14283c

17
config-sim Normal file
View File

@ -0,0 +1,17 @@
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://10.172.48.16:44039
name: demok8s
contexts:
- context:
cluster: demok8s
user: cluster-admin
name: default
current-context: default
kind: Config
users:
- name: cluster-admin
user:
token: 2c00232d4e3b1498008315e8ab14283c

17
config-uat Normal file
View File

@ -0,0 +1,17 @@
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://10.125.164.111:42733;https://10.125.164.158:41745;https://10.125.164.8:43001
name: demok8s
contexts:
- context:
cluster: demok8s
user: cluster-admin
name: default
current-context: default
kind: Config
users:
- name: cluster-admin
user:
token: ae123cd22080c2712d08cb31633a2fa6

81
deployment-dev.yaml Normal file
View File

@ -0,0 +1,81 @@
# 接口版本
apiVersion: apps/v1
# 接口类型
kind: Deployment
metadata:
name: sys-manager-ebtp-project
namespace: default
labels:
app: sys-manager-ebtp-project
# 必选,详细定义
spec:
# pod 副本数量
replicas: 1
# 滚动升级配置信息
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
# 选择器匹配pod模板
selector:
matchLabels:
app: sys-manager-ebtp-project
template:
metadata:
labels:
# 模板名称
app: sys-manager-ebtp-project
annotations:
prometheus.io/port: '18012'
prometheus.io/jl-pod: 'true'
# 定义容器模板,该模板可以包含多个容器
spec:
# 必选Pod中容器列表
containers:
- name: sys-manager-ebtp-project
image: harbor.dcos.guangzhou.unicom.local/eshop/sys-manager-ebtp-project:latest
# 需要暴露的端口库号列表
ports:
- containerPort: 18012
# 容器运行前需设置的环境变量列表
env:
# Apollo 配置中心变量设置
- name: APOLLO_CONFIGSERVICE
value: http://10.242.37.148:6001
- name: APP_NAME
value: sys_manager_ebtp_project_dev
- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
value: skywalking-oap-cluster.skywalking:11800
- name: SW_AGENT_NAME
value: sys-manager-ebtp-project
- name: MY_POD_IP #自动获取pod ip作为agent id
valueFrom:
fieldRef:
fieldPath: status.podIP
---
kind: Service
apiVersion: v1
metadata:
name: sys-manager-ebtp-project
namespace: default
labels:
app: sys-manager-ebtp-project
annotations:
lb.cke.tg.unicom/target-vports: 18012-18012
prometheus.io/port: '18012'
prometheus.io/jl-svc: 'true'
spec:
ports:
- port: 18012
targetPort: 18012
selector:
app: sys-manager-ebtp-project
status:
loadBalancer: {}
---

112
deployment-master.yaml Normal file
View File

@ -0,0 +1,112 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: sys_manager_ebtp_project #[1] Deployment名称可填写微服务名称
namespace: default
labels:
app: sys_manager_ebtp_project
spec:
replicas: 10
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
selector:
matchLabels:
app: sys-manager-ebtp-project #[2] 选择器匹配时标签名称,可填写微服务名称
template:
metadata:
labels:
app: sys-manager-ebtp-project #[3] 模板名称,可填写微服务名称
annotations:
prometheus.io/port: '18012'
prometheus.io/jl-pod: 'true'
spec:
volumes:
- name: log
hostPath:
path: /var/lib/docker/log/349553515466-prod/default-group/30days
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- sys-manager-ebtp-project
topologyKey: "kubernetes.io/hostname"
containers:
- name: sys-manager-ebtp-project #[6] 必选,容器名称,可填写微服务名称
image: harbor.dcos.xixian.unicom.local/eshop/sys-manager-ebtp-project:latest #[7] 镜像名称请把sys-manager-ebtp-project替换为服务名称
args: ["java","-Djava.security.egd=file:/dev/./urandom","-javaagent:/pinpoint/pinpoint-bootstrap-2.0.3.jar","-Dpinpoint.agentId=$(MY_POD_IP)","-Dpinpoint.applicationName=$(APP_NAME)","-Dpinpoint.licence=$(AGENT_LICENCE)","-jar","/app.jar"]
volumeMounts:
- name: log
mountPath: /log
ports:
- containerPort: 18012 #[8] 容器需要监听的端口号与配置文件中的server.port参数相同与参数[4]相同
livenessProbe:
failureThreshold: 3
httpGet:
port: 18012 #[11] pod存活检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同
path: /actuator/health
scheme: HTTP
initialDelaySeconds: 300
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 2
readinessProbe:
failureThreshold: 1
httpGet:
port: 18012 #[12] pod就绪检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同
path: /actuator/health
scheme: HTTP
periodSeconds: 5
successThreshold: 2
timeoutSeconds: 2
resources:
requests:
cpu: 1000m
memory: 2Gi
limits:
cpu: 3000m
memory: 6Gi
env:
- name: APP_NAME
value: biz_ebtp_project #24位长度限制统一去掉service
- name: AGENT_LICENCE
value: 527BFA7B28577578
- name: APOLLO_CONFIGSERVICE
value: http://apollo-configservice:8080
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: JAVA_TOOL_OPTIONS
value: -XX:+UnlockExperimentalVMOptions
-XX:+UseContainerSupport
-XX:+UseCGroupMemoryLimitForHeap
-XX:InitialRAMPercentage=40.0
-XX:MinRAMPercentage=20.0
-XX:MaxRAMPercentage=80.0
---
kind: Service
apiVersion: v1
metadata:
name: sys-manager-ebtp-project-svc # [11] service的名字格式为“服务名-svc”
namespace: default
labels:
service: sys-manager-ebtp-project-svc # [12] service的标签可与参数[11]相同
annotations:
prometheus.io/port: '18012' #[13] prometheus自动发现service的端口也是该微服务所使用的端口与参数[4]相同
prometheus.io/jl-svc: 'true'
spec:
ports:
- port: 18012 #[15] 与参数4相同
targetPort: 18012 #[16] 与参数4相同
selector:
app: sys-manager-ebtp-project #[17] 该service对应Deployment的名字与参数[1]相同
---

113
deployment-sim.yaml Normal file
View File

@ -0,0 +1,113 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: sys_manager_ebtp_project #[1] Deployment名称可填写微服务名称
namespace: default
labels:
app: sys_manager_ebtp_project
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
selector:
matchLabels:
app: sys-manager-ebtp-project #[2] 选择器匹配时标签名称,可填写微服务名称
template:
metadata:
labels:
app: sys-manager-ebtp-project #[3] 模板名称,可填写微服务名称
annotations:
prometheus.io/port: '18012'
prometheus.io/jl-pod: 'true'
spec:
volumes:
- name: log
hostPath:
path: /var/lib/docker/log/349553515466-preprod/default-group/all
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- sys-manager-ebtp-project
topologyKey: "kubernetes.io/hostname"
containers:
- name: sys-manager-ebtp-project #[6] 必选,容器名称,可填写微服务名称
image: harbor.dcos.guangzhou.unicom.local/eshop/sys-manager-ebtp-project:latest #[7] 镜像名称请把sys-manager-ebtp-project替换为服务名称
args: ["java","-Djava.security.egd=file:/dev/./urandom", "-javaagent:/pinpoint/tianyan-springboot-agent/pinpoint-bootstrap-1.8.0.jar", "-Dpinpoint.agentId=$(MY_POD_IP)", "-Dpinpoint.applicationName=$(APP_NAME)", "-Dpinpoint.licence=$(AGENT_LICENCE_DEV)", "-jar", "/app.jar"]
volumeMounts:
- name: log
mountPath: /log
ports:
- containerPort: 18012
livenessProbe:
failureThreshold: 3
httpGet:
port: 18012
path: /actuator/health
scheme: HTTP
initialDelaySeconds: 300
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 2
readinessProbe:
failureThreshold: 1
httpGet:
port: 18012
path: /actuator/health
scheme: HTTP
periodSeconds: 5
successThreshold: 2
timeoutSeconds: 2
resources:
requests:
cpu: 1000m
memory: 2Gi
limits:
cpu: 3000m
memory: 6Gi
env:
- name: APP_NAME
value: biz_ebtp_project_sim
- name: AGENT_LICENCE
value: 527BFA7B28577578
- name: APOLLO_CONFIGSERVICE
value: http://apollo-configservice:8080
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: JAVA_TOOL_OPTIONS
value:
-XX:+UnlockExperimentalVMOptions
-XX:+UseContainerSupport
-XX:+UseCGroupMemoryLimitForHeap
-XX:InitialRAMPercentage=40.0
-XX:MinRAMPercentage=20.0
-XX:MaxRAMPercentage=80.0
---
kind: Service
apiVersion: v1
metadata:
name: sys-manager-ebtp-project-svc # [11] service的名字格式为“服务名-svc”
namespace: default
labels:
service: sys-manager-ebtp-project-svc # [12] service的标签可与参数[11]相同
annotations:
prometheus.io/port: '18012' #[13] prometheus自动发现service的端口也是该微服务所使用的端口与参数[4]相同
prometheus.io/jl-svc: 'true'
spec:
ports:
- port: 18012 #[15] 与参数4相同
targetPort: 18012 #[16] 与参数4相同
selector:
app: sys-manager-ebtp-project #[17] 该service对应Deployment的名字与参数[1]相同
---

105
deployment-uat.yaml Normal file
View File

@ -0,0 +1,105 @@
# 接口版本
apiVersion: apps/v1
# 接口类型
kind: Deployment
metadata:
name: sys_manager_ebtp_project
namespace: default
labels:
app: sys_manager_ebtp_project
# 必选,详细定义
spec:
# pod 副本数量
replicas: 1
# 滚动升级配置信息
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
# 选择器匹配pod模板
selector:
matchLabels:
app: sys-manager-ebtp-project
template:
metadata:
labels:
# 模板名称
app: sys-manager-ebtp-project
annotations:
prometheus.io/port: '18012'
prometheus.io/jl-pod: 'true'
# 定义容器模板,该模板可以包含多个容器
spec:
# 挂载日志存储
volumes:
- name: log
hostPath: #以下三选一
path: /var/lib/docker/log/349553515466-uat/default-group/all #uat环境
# 必选Pod中容器列表
containers:
- name: sys-manager-ebtp-project
image: harbor.dcos.guangzhou.unicom.local/eshop/sys-manager-ebtp-project:latest
# 在容器中挂载日志存储区
volumeMounts:
- name: log
mountPath: /log
# 需要暴露的端口库号列表
ports:
- containerPort: 18012
resources:
requests:
cpu: 2000m
memory: 4Gi
limits:
cpu: 4000m
memory: 8Gi
# 容器运行前需设置的环境变量列表
env:
# Apollo 配置中心变量设置
- name: APOLLO_CONFIGSERVICE
value: http://apollo-configservice:8080
- name: APP_NAME
value: sys_manager_ebtp_project_uat
- name: MY_POD_IP #自动获取pod ip作为agent id
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
value: skywalking-oap-cluster.skywalking:11800
- name: SW_AGENT_NAME
value: sys_manager_ebtp_project
- name: JAVA_TOOL_OPTIONS
value: -XX:+UnlockExperimentalVMOptions
-XX:+UseContainerSupport
-XX:+UseCGroupMemoryLimitForHeap
-XX:InitialRAMPercentage=40.0
-XX:MinRAMPercentage=20.0
-XX:MaxRAMPercentage=80.0
---
kind: Service
apiVersion: v1
metadata:
name: sys-manager-ebtp-project
namespace: default
labels:
app: sys-manager-ebtp-project
annotations:
# lb.cke.tg.unicom/target-vports: 18012-18012
prometheus.io/port: '18012'
prometheus.io/jl-svc: 'true'
spec:
ports:
- port: 18012
targetPort: 18012
selector:
app: sys-manager-ebtp-project
status:
loadBalancer: {}
---

61
pom.xml Normal file
View File

@ -0,0 +1,61 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.chinaunicom.ebtp</groupId>
<artifactId>mall-ebtp-cloud-parent</artifactId>
<version>2.4.1-zyhy-SNAPSHOT</version>
</parent>
<groupId>com.chinaunicom.mall.ebtp</groupId>
<artifactId>sys_manager_ebtp_project</artifactId>
<version>0.0.1</version>
<name>sys_manager_ebtp_project</name>
<dependencies>
<dependency>
<groupId>com.chinaunicom.mall.ebtp</groupId>
<artifactId>uboot-core</artifactId>
<version>2.4.1-zyhy-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven-snapshot-local</id>
<name>maven-snapshot-local</name>
<url>http://ccp.tianti.tg.unicom.local/artifactory/tianti-maven-snapshot-local/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/mapper/*Mapper.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,40 @@
package com.chinaunicom.mall.ebtp.project;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import io.micrometer.core.instrument.MeterRegistry;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication(exclude = {
DataSourceAutoConfiguration.class,
DruidDataSourceAutoConfigure.class
})
@EnableFeignClients
@MapperScan({"com.chinaunicom.mall.ebtp.project.**.dao"})
@ComponentScan("com.chinaunicom.mall.ebtp.*")
public class SysManagerEbtpProjectApplication {
public static void main(String[] args) {
SpringApplication.run(SysManagerEbtpProjectApplication.class, args);
}
/**
* Grafana 注册项
*
* @param applicationName 应用名称, 用于grafana应用列表
* @return
*/
@Bean
public MeterRegistryCustomizer<MeterRegistry> configurer(
@Value("${spring.application.name}") String applicationName) {
return (registry) -> registry.config().commonTags("application", applicationName);
}
}

View File

@ -0,0 +1,35 @@
package com.chinaunicom.mall.ebtp.project.dict.column;
/**
* 字段常量 DictProvincesCode
*
* @author daixc
* @date 2021/04/06
*/
public class DictProvincesCodeField {
private DictProvincesCodeField(){
}
/**
* 编号
*/
public static final String ID = "id";
/**
* 省份编码
*/
public static final String PROVINCES_NUMBER = "provinces_number";
/**
* 省份名称
*/
public static final String PROVINCES_NAME = "provinces_name";
/**
* 省份名称缩写
*/
public static final String PROVINCES_CODE = "provinces_code";
}

View File

@ -0,0 +1,105 @@
package com.chinaunicom.mall.ebtp.project.dict.controller;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictProject;
import com.chinaunicom.mall.ebtp.project.dict.service.IDictProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
/**
* 字典查询
*
* @author daixc
* @date 2020/11/02
*/
@RestController
@Api(tags = "字典查询")
@RequestMapping("/v1/dictProject")
public class DictProjectController{
@Resource
private IDictProjectService dictProjectService;
/**
* 插入新数据
*
* @param dictProject 字典对象
*
* @return 返回结果
*/
@ApiOperation("插入新数据")
@PostMapping("")
public BaseResponse<Boolean> insert(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid DictProject dictProject){
boolean save = dictProjectService.save(dictProject);
return BaseResponse.success(save);
}
/**
* 修改数据
*
* @param dictProject 字典对象
*
* @return 返回结果
*/
@ApiOperation("修改数据")
@PostMapping("/update")
public BaseResponse<Boolean> update(@ApiParam(value = "对象数据", required = true) @RequestBody DictProject dictProject){
return BaseResponse.success(dictProjectService.updateById(dictProject));
}
/**
* 查询数据
*
* @param id ID
*
* @return 返回结果
*/
@ApiOperation("查询数据")
@GetMapping("/{id}")
public BaseResponse<DictProject> get(@ApiParam(value = "主键id", required = true) @PathVariable String id){
DictProject dictProject = dictProjectService.getById(id);
return BaseResponse.success(dictProject);
}
/**
* 查询字典数据
* @param parentCode 字典父类code
* @param toParentCode 字典父类对应的父类code
* @return 返回结果
*/
@ApiOperation("查询数据集合")
@GetMapping("/getDictList")
public BaseResponse<List<DictProject>> getDictList(@ApiParam(value = "字典父类code", required = true)String parentCode,
@ApiParam(value = "字典父类对应的父类code", required = true)String toParentCode){
return BaseResponse.success(dictProjectService.getDictList(parentCode,toParentCode));
}
/**
* 字典缓存查询数据
* @return 返回结果
*/
@ApiOperation("字典缓存查询数据")
@GetMapping("/refreshDictCache")
public BaseResponse<Map<String,List<DictProject>>> refreshDictCache(){
return BaseResponse.success(dictProjectService.refreshDictCache());
}
}

View File

@ -0,0 +1,98 @@
package com.chinaunicom.mall.ebtp.project.dict.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictProvincesCode;
import com.chinaunicom.mall.ebtp.project.dict.service.IDictProvincesCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
/**
* 省份对应缩写字典表
* @author daixc
* @date 2021/
*/
@RestController
@Api(tags = "省份对应缩写字典表")
@RequestMapping("/v1/dictprovincescode")
public class DictProvincesCodeController{
@Resource
private IDictProvincesCodeService idictProvincesCodeService;
/**
* 插入新数据
* @param dictProvincesCode 省分代码实体
* @return 返回结果
*/
@ApiOperation("插入新数据")
@PostMapping("")
public BaseResponse<Boolean> insert(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid DictProvincesCode dictProvincesCode){
boolean save = idictProvincesCodeService.save(dictProvincesCode);
return BaseResponse.success(save);
}
/**
* 修改数据
* @param dictProvincesCode 省分代码实体
* @return 返回结果
*/
@ApiOperation("修改数据")
@PostMapping("/update")
public BaseResponse<Boolean> update(@ApiParam(value = "对象数据", required = true) @RequestBody DictProvincesCode dictProvincesCode){
return BaseResponse.success(idictProvincesCodeService.updateById(dictProvincesCode));
}
/**
* 查询数据
* @param id 主键id
* @return 返回结果
*/
@ApiOperation("查询数据")
@GetMapping("/{id}")
public BaseResponse<DictProvincesCode> get(@ApiParam(value = "主键id", required = true) @PathVariable Integer id){
DictProvincesCode dictProvincesCode = idictProvincesCodeService.getById(id);
return BaseResponse.success(dictProvincesCode);
}
/**
* 根据省分编码查询数据
* @param provincesNumber 省分编码
* @return 返回结果
*/
@ApiOperation("根据省分编码查询数据")
@GetMapping("getByProvincesNumber/{provincesNumber}")
public BaseResponse<DictProvincesCode> getByProvincesNumber(@ApiParam(value = "主键id", required = true) @PathVariable String provincesNumber){
DictProvincesCode dictProvincesCode = idictProvincesCodeService.getByProvincesNumber(provincesNumber);
return BaseResponse.success(dictProvincesCode);
}
/**
* 查询所有数据
*
* @return 返回结果
*/
@ApiOperation("查询所有数据")
@GetMapping("queryAll")
public BaseResponse<List<DictProvincesCode>> queryAll(@RequestParam(value = "childCompany", required = false) Boolean childCompany) {
LambdaQueryWrapper<DictProvincesCode> wrapper = Wrappers.lambdaQuery();
wrapper.eq(childCompany != null, DictProvincesCode::getChildCompany, childCompany);
return BaseResponse.success(idictProvincesCodeService.list(wrapper));
}
}

View File

@ -0,0 +1,92 @@
package com.chinaunicom.mall.ebtp.project.dict.controller;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictRegion;
import com.chinaunicom.mall.ebtp.project.dict.service.IDictRegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
/**
* 全国行政区域信息
* @author daixc
* @date 2020/10/29
*/
@RestController
@Api(tags = "全国行政区划表")
@RequestMapping("/v1/dictRegion")
public class DictRegionController{
@Resource
private IDictRegionService idictRegionService;
/**
* 插入新数据
*
* @param dictRegion 字典信息
*
* @return 返回结果
*/
@ApiOperation("插入新数据")
@PostMapping("")
public BaseResponse<Boolean> insert(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid DictRegion dictRegion){
boolean save = idictRegionService.save(dictRegion);
return BaseResponse.success(save);
}
/**
* 修改数据
*
* @param dictRegion 字典信息
*
* @return 返回结果
*/
@ApiOperation("修改数据")
@PostMapping("/update")
public BaseResponse<Boolean> update(@ApiParam(value = "对象数据", required = true) @RequestBody DictRegion dictRegion){
return BaseResponse.success(idictRegionService.updateById(dictRegion));
}
/**
* 查询数据
*
* @param id id值
*
* @return 返回结果
*/
@ApiOperation("查询数据")
@GetMapping("/{id}")
public BaseResponse<DictRegion> get(@ApiParam(value = "主键id", required = true) @PathVariable String id){
DictRegion dictRegion = idictRegionService.getById(id);
return BaseResponse.success(dictRegion);
}
/**
* 查询数据
*
* @param pId 父类id值
*
* @return 返回结果
*/
@ApiOperation("查询数据")
@GetMapping("/getChild")
public BaseResponse<List<DictRegion>> getChild(@ApiParam(value = "主键id", required = true) @RequestParam(name = "pId") String pId){
List<DictRegion> dictRegion = idictRegionService.getChild(pId);
return BaseResponse.success(dictRegion);
}
}

View File

@ -0,0 +1,16 @@
package com.chinaunicom.mall.ebtp.project.dict.dao;
import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictProject;
/**
* 字典表mapper
* @author daixc
* @date 2020/11/03
*/
public interface DictProjectMapper extends IBaseMapper<DictProject> {
}

View File

@ -0,0 +1,10 @@
package com.chinaunicom.mall.ebtp.project.dict.dao;
import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictProvincesCode;
public interface DictProvincesCodeMapper extends IBaseMapper<DictProvincesCode> {
}

View File

@ -0,0 +1,10 @@
package com.chinaunicom.mall.ebtp.project.dict.dao;
import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictRegion;
public interface DictRegionMapper extends IBaseMapper<DictRegion> {
}

View File

@ -0,0 +1,25 @@
<?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.chinaunicom.mall.ebtp.project.dict.dao.DictProjectMapper">
<resultMap id="BaseResultMap"
type="com.chinaunicom.mall.ebtp.project.dict.entity.DictProject">
<result column="id" jdbcType="INTEGER" property="id"/>
<result column="code" jdbcType="VARCHAR" property="code"/>
<result column="dic_name" jdbcType="VARCHAR" property="dicName"/>
<result column="parent_code" jdbcType="VARCHAR" property="parentCode"/>
<result column="parent_type" jdbcType="VARCHAR" property="parentType"/>
<result column="use_flag" jdbcType="VARCHAR" property="useFlag"/>
<result column="default_flag" jdbcType="VARCHAR" property="defaultFlag"/>
<result column="order_flag" jdbcType="INTEGER" property="orderFlag"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
</resultMap>
<!--逻辑删除方法 此方法为代码生成器生成 不允许修改 如有特殊需求 请自行新建SQL语句-->
<update id="deleteOff" parameterType="java.lang.Integer">
update dict_project
set
delete_flag="deleted"
where ID=#{id}
</update>
</mapper>

View File

@ -0,0 +1,20 @@
<?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.chinaunicom.mall.ebtp.project.dict.dao.DictProvincesCodeMapper">
<resultMap id="BaseResultMap"
type="com.chinaunicom.mall.ebtp.project.dict.entity.DictProvincesCode">
<result column="id" jdbcType="INTEGER" property="id"/>
<result column="provinces_number" jdbcType="VARCHAR" property="provincesNumber"/>
<result column="provinces_name" jdbcType="VARCHAR" property="provincesName"/>
<result column="provinces_code" jdbcType="VARCHAR" property="provincesCode"/>
</resultMap>
<!--逻辑删除方法 此方法为代码生成器生成 不允许修改 如有特殊需求 请自行新建SQL语句-->
<update id="deleteOff" parameterType="java.lang.Long">
update dict_provinces_code
set
delete_flag="deleted"
where ID=#{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@ -0,0 +1,20 @@
<?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.chinaunicom.mall.ebtp.project.dict.dao.DictRegionMapper">
<resultMap id="BaseResultMap"
type="com.chinaunicom.mall.ebtp.project.dict.entity.DictRegion">
<result column="id" jdbcType="VARCHAR" property="id"/>
<result column="p_id" jdbcType="VARCHAR" property="pId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="level" jdbcType="VARCHAR" property="level"/>
</resultMap>
<!--逻辑删除方法 此方法为代码生成器生成 不允许修改 如有特殊需求 请自行新建SQL语句-->
<update id="deleteOff" parameterType="java.lang.String">
update dict_region
set
delete_flag="deleted"
where ID=#{id}
</update>
</mapper>

View File

@ -0,0 +1,80 @@
package com.chinaunicom.mall.ebtp.project.dict.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 实体类 DictProject
*
* @author daixc
* @date 2020/11/02
*/
@Data
@Accessors(chain = true)
@ApiModel
@TableName(value = "dict_project", autoResultMap = true)
public class DictProject implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 字典code
*/
@ApiModelProperty(value = "字典code")
private String code;
/**
* 字典名称
*/
@ApiModelProperty(value = "字典名称")
private String dicName;
/**
* 父类code
*/
@ApiModelProperty(value = "父类code")
private String parentCode;
/**
* 父类类型
*/
@ApiModelProperty(value = "父类类型")
private String parentType;
/**
* 是否应用
*/
@ApiModelProperty(value = "是否应用")
private String useFlag;
/**
* 是否默认
*/
@ApiModelProperty(value = "是否默认")
private String defaultFlag;
/**
* 排序
*/
@ApiModelProperty(value = "排序")
private Integer orderFlag;
/**
* 描述
*/
@ApiModelProperty(value = "描述")
private String description;
}

View File

@ -0,0 +1,69 @@
package com.chinaunicom.mall.ebtp.project.dict.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 实体类 DictProvincesCode
*
* @author daixc
*/
@Data
@Accessors(chain = true)
@ApiModel
@TableName(value = "dict_provinces_code", autoResultMap = true)
public class DictProvincesCode implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 省份编码
*/
@ApiModelProperty(value = "省份编码")
private String provincesNumber;
/**
* 省份名称
*/
@ApiModelProperty(value = "省份名称")
private String provincesName;
/**
* 省份名称缩写
*/
@ApiModelProperty(value = "省份名称缩写")
private String provincesCode;
/**
* 省份名称
*/
@ApiModelProperty(value = "省份名称")
private String provincesRemark;
/**
* 省份地市编码
*/
@ApiModelProperty(value = "省份地市编码")
private String provinces;
;
/**
* 公司级别
*/
@ApiModelProperty(value = "公司级别")
private Integer childCompany;
}

View File

@ -0,0 +1,54 @@
package com.chinaunicom.mall.ebtp.project.dict.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 全国行政区域实体类 DictRegion
*
* @author daixc
* @date 2020/10/29
*/
@Data
@Accessors(chain = true)
@ApiModel("全国行政区域实体类")
@TableName(value = "dict_region", autoResultMap = true)
public class DictRegion implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@ApiModelProperty(value = "id")
private String id;
/**
* 上级id
*/
@ApiModelProperty(value = "上级id")
private String pId;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
private String name;
/**
* 类型0-省1-市2-县
*/
@ApiModelProperty(value = "类型0-省1-市2-县")
private String level;
/**
* 缩写
*/
@ApiModelProperty(value = "缩写")
private String ab;
}

View File

@ -0,0 +1,40 @@
package com.chinaunicom.mall.ebtp.project.dict.service;
import com.chinaunicom.mall.ebtp.common.base.service.IBaseService;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictProject;
import java.util.List;
import java.util.Map;
/**
* 对数据表 dict_project 操作的 service
* @author daixc
* @date 2020/11/03
*/
public interface IDictProjectService extends IBaseService<DictProject>{
/**
* 字典缓存查询数据
* @return 返回结果
*/
Map<String,List<DictProject>> refreshDictCache();
/**
* 查询字典数据
* @param parentCode 字典父类code
* @param toParentCode 字典父类对应的父类code
* @return 返回结果
*/
List<DictProject> getDictList(String parentCode, String toParentCode);
/**
* 查询字典数据
* @param parentCode 字典父类code
* @param toParentCode 字典父类对应的父类code
* @param code 字典code
* @return 返回结果
*/
DictProject getDict(String code, String parentCode, String toParentCode);
}

View File

@ -0,0 +1,20 @@
package com.chinaunicom.mall.ebtp.project.dict.service;
import com.chinaunicom.mall.ebtp.common.base.service.IBaseService;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictProvincesCode;
/**
* 对数据表 dict_provinces_code 操作的 service
* @author Auto create
*
*/
public interface IDictProvincesCodeService extends IBaseService<DictProvincesCode>{
/**
* 根据省分编号获取省分信息
* @param provincesNumber 省分编码
* @return 返回结果
*/
DictProvincesCode getByProvincesNumber(String provincesNumber);
}

View File

@ -0,0 +1,24 @@
package com.chinaunicom.mall.ebtp.project.dict.service;
import com.chinaunicom.mall.ebtp.common.base.service.IBaseService;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictRegion;
import java.util.List;
/**
* 对数据表 dict_region 操作的 service
* @author Auto create
*
*/
public interface IDictRegionService extends IBaseService<DictRegion>{
/**
* 查询子元素
* @param pId 父ID
* @return
*/
List<DictRegion> getChild(String pId);
}

View File

@ -0,0 +1,76 @@
package com.chinaunicom.mall.ebtp.project.dict.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.project.dict.dao.DictProjectMapper;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictProject;
import com.chinaunicom.mall.ebtp.project.dict.service.IDictProjectService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 对数据表 dict_project 操作的 serviceImpl
* @author daixc
* @date 2020/11/03
*/
@Service
public class DictProjectServiceImpl extends BaseServiceImpl<DictProjectMapper,DictProject> implements IDictProjectService {
private static final String COMMON_STR = "=";
private static final String USE_FLAG_YES = "0";
/**
* 字典缓存查询数据
*/
@Override
public Map<String,List<DictProject>> refreshDictCache(){
QueryWrapper<DictProject> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("use_flag",USE_FLAG_YES);
queryWrapper.orderByAsc("id").orderByAsc("order_flag");
List<DictProject> dictProjects = this.list(queryWrapper);
return dictProjects.stream().collect(Collectors.groupingBy(DictProject::getParentType));
}
/**
* 查询字典集合
* @param parentCode 字典父类code
* @param toParentCode 字典父类对应的父类code
* @return
*/
@Override
public List<DictProject> getDictList(String parentCode, String toParentCode) {
QueryWrapper<DictProject> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("use_flag", USE_FLAG_YES);
queryWrapper.eq("parent_type", parentCode + COMMON_STR + toParentCode);
queryWrapper.orderByAsc("order_flag");
return this.list(queryWrapper);
}
@Override
public DictProject getDict(String code, String parentCode, String toParentCode) {
DictProject dictProject = null;
List<DictProject> dictProjectList = getDictList(parentCode,toParentCode);
if(null != dictProjectList && !dictProjectList.isEmpty()){
dictProject = dictProjectList.stream().filter(n -> n.getCode().equals(code)).collect(Collectors.toList()).get(0);
}
return dictProject;
}
}

View File

@ -0,0 +1,27 @@
package com.chinaunicom.mall.ebtp.project.dict.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.project.dict.column.DictProvincesCodeField;
import com.chinaunicom.mall.ebtp.project.dict.dao.DictProvincesCodeMapper;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictProvincesCode;
import com.chinaunicom.mall.ebtp.project.dict.service.IDictProvincesCodeService;
import org.springframework.stereotype.Service;
/**
* 对数据表 dict_provinces_code 操作的 serviceImpl
* @author Auto create
*
*/
@Service
public class DictProvincesCodeServiceImpl extends BaseServiceImpl<DictProvincesCodeMapper, DictProvincesCode> implements IDictProvincesCodeService {
@Override
public DictProvincesCode getByProvincesNumber(String provincesNumber) {
QueryWrapper<DictProvincesCode> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(DictProvincesCodeField.PROVINCES_NUMBER,provincesNumber);
return this.getOne(queryWrapper);
}
}

View File

@ -0,0 +1,35 @@
package com.chinaunicom.mall.ebtp.project.dict.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.project.dict.dao.DictRegionMapper;
import com.chinaunicom.mall.ebtp.project.dict.entity.DictRegion;
import com.chinaunicom.mall.ebtp.project.dict.service.IDictRegionService;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 对数据表 dict_region 操作的 serviceImpl
* @author Auto create
*
*/
@Service
public class DictRegionServiceImpl extends BaseServiceImpl<DictRegionMapper,DictRegion> implements IDictRegionService {
/**
* 父类ID默认值
*/
private static final String P_ID = "0";
@Override
public List<DictRegion> getChild(String pId) {
QueryWrapper<DictRegion> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("p_id", StringUtils.isNotBlank(pId)?pId : P_ID);
queryWrapper.orderByAsc("id");
return this.list(queryWrapper);
}
}

View File

@ -0,0 +1,177 @@
server:
port: 18012
servlet:
context-path: /
seata:
service:
vgroup-mapping:
sys-manager-ebtp-project-service-group: default
grouplist:
default: 10.242.37.148:18035
# 对应 apollo 配置中心的应用名
app:
id: sys-manager-ebtp-project
# Apollo 配置信息
apollo:
meta: http://10.242.37.148:6001/
bootstrap:
namespace: application
enabled: true
eagerLoad:
enabled: true
spring:
aop:
auto: true #开启spring的aop配置
proxy-target-class: true
application:
name: sys-manager-ebtp-project
shardingsphere:
datasource:
names: ds0
ds0:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: mall
password: unicom
jdbc-url: jdbc:mysql://10.125.160.26:3306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
url: jdbc:mysql://10.125.160.26:3306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
filters: stat,wall,log4j
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
props:
sql:
show: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
serialization:
write-dates-as-timestamps: false
# 天宫Kafka增加了安全认证需要配置安全属性
kafka:
bootstrap-servers: 10.125.164.192:32005,10.125.164.193:32005,10.125.164.194:32005
template:
default-topic: jl_test
# 生产者配置参数
producer:
client-id: core-service-ebtp-crypt
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123";
# 消费者配置参数
consumer:
group-id: core-service-ebtp-crypt-consumer
auto-offset-reset: latest
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123";
# 天宫 redis 需要使用哨兵进行访问
redis:
sentinel:
master: eshop-redis
nodes: 10.125.164.124:32718, 10.125.164.118:32716, 10.125.164.121:32716
password: Unicom#135
# 天宫Eureka配置
eureka:
client:
service-url:
defaultZone: http://eureka-1-svc:8080/eureka, http://eureka-2-svc:8080/eureka, http://eureka-3-svc:8080/eureka
instance:
prefer-ip-address: true
instance-id: http://10.242.37.148:${server.port}
# 这是客户端的注册地址, eureka 会通过这个地址建立管道
ip-address: 10.242.37.148
mybatis-plus:
configuration:
# 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射
map-underscore-to-camel-case: true
auto-mapping-behavior: full
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml
global-config:
# 逻辑删除配置
db-config:
# logic-delete-field: flag # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2) @TableLogic
logic-not-delete-value: normal # 逻辑删除标记:正常数据
logic-delete-value: deleted # 逻辑删除标记:已删除的数据
type-aliases-package: com.chinaunicom.mall.ebtp.project
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
strategy: SEMAPHORE
thread:
timeoutInMilliseconds: 200000 #熔断超时时间
circuitBreaker:
sleepWindowInMilliseconds: 20000
forceClosed: true
ribbon:
ReadTimeout: 20000 #请求处理的超时时间
ConnectTimeout: 20000 #请求连接超时时间
MaxAutoRetries: 0 #对当前实例的重试次数
MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1
mconfig:
swagger-ui-open: true
exception-handle-enabled: true
seata-open-enabled: false
work-id: 1 #终端ID
datacenter-id: 1 #数据中心ID
host-name: http://10.242.37.148/
service-name-purp: mall-purp #采购系统委托项目微服务
service-name-wfap: mall-wfap #重新评审 流程微服务
service-name-resu: mall-resu #重新评审 项目中心查询服务
service-price-query: biz-service-price-query #商城询价服务
service-price-usercenter: core-service-usercenter-public #用户中心服务
#内部服务
service-name-archive: biz-service-ebtp-archive #归档服务
service-name-auction: biz-service-ebtp-auction #竞拍服务API
service-name-calibration: biz-service-ebtp-calibration #标段定标接口
service-name-bid: biz-service-ebtp-bid #标段出始化流程
service-name-process: biz-service-ebtp-process #标段出始化流程
service-name-resps: biz-service-ebtp-resps #标段应答文件
service-name-rsms: biz-service-ebtp-rsms #评审微服务
service-name-tender: biz-service-ebtp-tender #标段投标微服务
wfSectionNo: '080'
wfSectionName: 标段重新评审审批单
# 用户暴露给 prometheus 的健康数据
management:
endpoints:
web:
exposure:
include: "*"
cors:
allowed-origins: "*"
allowed-methods: "*"

View File

@ -0,0 +1,203 @@
server:
port: 18012
servlet:
context-path: /
seata:
service:
vgroup-mapping:
sys-manager-ebtp-project-ceshi-service-group: seata-server-jl
grouplist:
default: 10.242.37.148:18035
spring:
aop:
auto: true #开启spring的aop配置
proxy-target-class: true
application:
name: sys-manager-ebtp-project
shardingsphere:
datasource:
names: ds0
ds0:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: mall
password: Unicom160_30
jdbc-url: jdbc:mysql://10.125.160.30:3306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
url: jdbc:mysql://10.125.160.30:3306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
filters: stat,wall,log4j
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
props:
sql:
show: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
serialization:
write-dates-as-timestamps: false
# 天宫Kafka增加了安全认证需要配置安全属性
kafka:
bootstrap-servers: 10.125.164.192:32005,10.125.164.193:32005,10.125.164.194:32005
template:
default-topic: jl_test
# 生产者配置参数
producer:
client-id: core-service-ebtp-crypt
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123";
# 消费者配置参数
consumer:
group-id: core-service-ebtp-crypt-consumer
auto-offset-reset: latest
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123";
# 天宫 redis 需要使用哨兵进行访问
redis:
sentinel:
master: eshop-redis
nodes: 10.125.164.124:32718, 10.125.164.118:32716, 10.125.164.121:32716
password: Unicom#135
database:
idempotent: 0
sharding: 1
cache: 2
backup: 3
# 天宫Eureka配置
eureka:
client:
service-url:
defaultZone: http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka
instance:
prefer-ip-address: true
ip-address: 125.32.114.204
hostname: 125.32.114.204
instance-id: 125.32.114.204:${server.port}
mybatis-plus:
configuration:
# 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射
map-underscore-to-camel-case: true
auto-mapping-behavior: full
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml
global-config:
# 逻辑删除配置
db-config:
# logic-delete-field: flag # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2) @TableLogic
logic-delete-value: 0 # 逻辑已删除值
logic-not-delete-value: 1 # 逻辑未删除值
check:
porject:
name-value: 33333
num-value: 33333
length: 2000
checkBoolen: false
tokentime:
timeLimit: 5000
onof: 0
checkprivateKey : MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAk7N3OeQS9WJa/v5dX/s9/DCKpJ8kOjR1Zrh1X+TF98udqGbGBWmiyVk2SqGPA4Q9kUCWw46CocjE047gx5AFrQIDAQABAkAIHG/stvCvlxImNLPOBI8X3VaPycmEhML5vCF9/aM9g1SuFa298Q5W8FqAmm8SE5lRpw2yyToWtLbufJtAa7wFAiEAxViJBkLU4wfPCwiPiAn17owXbocC9rj3fAzEH9DYDdcCIQC/mZp4ujO035Qqw2QQeFWpDc/vITx1OTWaxq6/LvvwGwIgXTZLSmzItw9aKOD7QotJ4UnES41zxetp4er5u/leA3MCIGcRw2ZEjII1b+hdOdweT75kfsId9/77apm7Xc/c/4yXAiEAnBrCiVXRNN+slO0MYaxynr4eIiPG/EjYBYxXlwBpeOc=
checkpublicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJOzdznkEvViWv7+XV/7PfwwiqSfJDo0dWa4dV/kxffLnahmxgVposlZNkqhjwOEPZFAlsOOgqHIxNOO4MeQBa0CAwEAAQ==
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
strategy: SEMAPHORE
thread:
timeoutInMilliseconds: 600000 #熔断超时时间
circuitBreaker:
sleepWindowInMilliseconds: 20000
forceClosed: true
ribbon:
ReadTimeout: 60000 #请求处理的超时时间
ConnectTimeout: 20000 #请求连接超时时间
MaxAutoRetries: 0 #对当前实例的重试次数
MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1
mconfig:
swagger-ui-open: true
exception-handle-enabled: true
seata-open-enabled: false
work-id: 1
datacenter-id: 5
host-name: http://10.242.37.148/
service-name-purp: mall-purp #采购系统委托项目微服务
service-name-wfap: mall-wfap #重新评审 流程微服务
service-name-resu: mall-resu #重新评审 项目中心查询服务
service-price-query : biz-service-price-query #商城询价服务
service-price-usercenter: core-service-usercenter-public #用户中心服务
#内部服务
service-name-archive: biz-service-ebtp-archive #归档服务
service-name-auction: biz-service-ebtp-auction #竞拍服务API
service-name-calibration: biz-service-ebtp-calibration #标段定标接口
service-name-bid: biz-service-ebtp-bid #标段出始化流程
service-name-process: biz-service-ebtp-process #标段出始化流程
service-name-resps : biz-service-ebtp-resps #标段应答文件
service-name-rsms : biz-service-ebtp-rsms #评审微服务
service-name-tender : biz-service-ebtp-tender #标段投标微服务
service-name-evaluation : biz-service-ebtp-evaluation
service-name-open : biz-service-ebtp-opening
service-name-notification : core-service-notification-center
wfSectionNo: '080'
wfSectionName: 标段重新评审审批单
rsa:
field:
pivate_key: MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBALYmN7QH5Bh3mjeeNOZzvhvgXJq3PKteb5vO7EtyM7C1IGg60CLePc1zISF5m48F7VIORtj48w4Ci0S/5oYxkjv2GTIhiPHD9GV1HsakpNTl475VZiVIfuDsTujghUZH9CW0UZB37yTI0njQBhsyjpTswKaUGb1LRZoqUcj1w4mFAgMBAAECgYEAmG93YoTQEOHXAAC4iLwIN1AWb6w1a70GbkBHZARY2eNbEZ9WnDedRRi6e0dINfNh3q/v/pio3+qlHo3yoA9QLs68YW8yy1xgGqTBsFMhn8Zh1KQ7Alle0+KJdytvpfvf6/YwW6oUk2Y44vm6nVa8EjXKYqloV/PROMa0uTYWUQECQQDvMk/XJ1wjG42IoyLxVSfsMfSCelJvYBYxaFfNPxOYWdOfSSEnAj7QNkDnhuDrLbbsnyy3KvLnUqkILU8fuZLhAkEAwvH5MRwSXpjwZY8xFCLv4YShDB6pG8l4rScjzV5B8SL2DhE/evha5obMO5d+iB73JBP03W6juSCilksy5zovJQJBAI+/Q54ASG3MzCTWLVStIV3fs5qKGmpWa1/r3gA5rPP836G1GBhSUB9ey2iYdSjAg1L2Ya/+PpXn5i9E0200X+ECQQCCQ05QEoHz1B5Ovq/81JuWBhnXD2XQu393tH+n6yQFDWd9XukcMngLMmemKkTSkF50LSGiFRwxyCzcYMNS3v5BAkEA5t2hOtPieYU9SrFENtgQTvtU7WmUumS0mTsDnnGUKsx2hMn8acKPVOskT+VzGg4A2kDoKo+5C9LQp1lc/RkI6A==
# 用户暴露给 prometheus 的健康数据
management:
endpoints:
web:
exposure:
include: "*"
cors:
allowed-origins: "*"
allowed-methods: "*"
health:
mongo:
enabled: false
client:
notification-url: http://10.242.31.158:8806/auth/sso/cloudPortal?return=https://uat-uscm.chinaunicom.cn:18022/redirect?page=subscription?id={{id}}&source=supplier
clientHttpUrl: http://10.242.31.158:8100/auth/oauth/token?grant_type=client_credentials&client_id=bVS46ElU&client_secret=58ea04ba02475c8da2321cc99849d2a10f15b749
allow:
apis:
- ^POST\./?v1/.*$
- ^GET\./?v1/.*$

View File

@ -0,0 +1,150 @@
server:
port: 18012
servlet:
context-path: /
spring:
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
aop:
auto: true #开启spring的aop配置
proxy-target-class: true
application:
name: sys-manager-ebtp-project
shardingsphere:
datasource:
names: ds0
ds0:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: Unicom@2024
jdbc-url: jdbc:mysql://59.110.10.99:53306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
url: jdbc:mysql://59.110.10.99:53306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
filters: stat,wall,log4j
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
props:
sql:
show: false
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
serialization:
write-dates-as-timestamps: false
# 天宫Kafka增加了安全认证需要配置安全属性
kafka:
bootstrap-servers: 10.172.48.110:32050,10.172.48.109:32050,10.172.48.111:32050
template:
default-topic: jl_eshop
# 生产者配置参数
producer:
client-id: core-service-ebtp-crypt
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="eshop-kafka" password="Unicom#135";
# 消费者配置参数
consumer:
group-id: core-service-ebtp-crypt-consumer
auto-offset-reset: latest
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="eshop-kafka" password="Unicom#135";
# 生产区 redis 配置
redis:
sentinel:
master: mymaster
nodes: 10.60.161.59:26379, 10.60.161.59:26380, 10.60.161.59:26381
password: pass
mybatis-plus:
configuration:
# 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射
map-underscore-to-camel-case: true
auto-mapping-behavior: full
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml
global-config:
# 逻辑删除配置
db-config:
logic-not-delete-value: normal # 逻辑删除标记:正常数据
logic-delete-value: deleted # 逻辑删除标记:已删除的数据
type-aliases-package: com.chinaunicom.mall.ebtp.project
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
strategy: SEMAPHORE
thread:
timeoutInMilliseconds: 200000 #熔断超时时间
circuitBreaker:
sleepWindowInMilliseconds: 20000
forceClosed: true
ribbon:
ReadTimeout: 20000 #请求处理的超时时间
ConnectTimeout: 20000 #请求连接超时时间
MaxAutoRetries: 0 #对当前实例的重试次数
MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1
mconfig:
swagger-ui-open: true
exception-handle-enabled: true
seata-open-enabled: false
work-id: 1 #终端ID
datacenter-id: 1 #数据中心ID
host-name: http://10.238.25.112/
service-name-purp: mall-purp #采购系统委托项目微服务
service-name-wfap: mall-wfap #重新评审 流程微服务
service-name-resu: mall-resu #重新评审 项目中心查询服务
service-price-query: biz-service-price-query #商城询价服务
service-price-usercenter: core-service-usercenter-public #用户中心服务
#内部服务
service-name-archive: biz-service-ebtp-archive #归档服务
service-name-auction: biz-service-ebtp-auction #竞拍服务API
service-name-calibration: biz-service-ebtp-calibration #标段定标接口
service-name-bid: biz-service-ebtp-bid #标段出始化流程
service-name-process: biz-service-ebtp-process #标段出始化流程
service-name-resps: biz-service-ebtp-resps #标段应答文件
service-name-rsms: biz-service-ebtp-rsms #评审微服务
service-name-tender: biz-service-ebtp-tender #标段投标微服务
wfSectionNo: '080'
wfSectionName: 标段重新评审审批单
# 用户暴露给 prometheus 的健康数据
management:
endpoints:
web:
exposure:
include: "*"
cors:
allowed-origins: "*"
allowed-methods: "*"

View File

@ -0,0 +1,176 @@
server:
port: 18012
servlet:
context-path: /
seata:
service:
vgroup-mapping:
sys-manager-ebtp-project-service-group: seata-server-jl
registry:
type: eureka
eureka:
serviceUrl: http://eureka-1-svc:8080/eureka,http://eureka-2-svc:8080/eureka,http://eureka-3-svc:8080/eureka
# 对应 apollo 配置中心的应用名
app:
id: sys-manager-ebtp-project
# Apollo 配置信息
apollo:
meta: http://10.242.31.54:6001
bootstrap:
namespace: application
enabled: true
eagerLoad:
enabled: true
spring:
aop:
auto: true #开启spring的aop配置
proxy-target-class: true
application:
name: sys-manager-ebtp-project
shardingsphere:
datasource:
names: ds0
ds0:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: mall
password: unicom
jdbc-url: jdbc:mysql://10.125.160.37:3306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
url: jdbc:mysql://10.125.160.37:3306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
filters: stat,wall,log4j
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
props:
sql:
show: false
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
serialization:
write-dates-as-timestamps: false
# 天宫Kafka增加了安全认证需要配置安全属性
kafka:
bootstrap-servers: 10.125.164.24:32002,10.125.164.192:32096,10.125.164.89:32002
template:
default-topic: jl_eshop
# 生产者配置参数
producer:
client-id: core-service-ebtp-crypt
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="eshop-kafka-sim" password="Unicom#135";
# 消费者配置参数
consumer:
group-id: core-service-ebtp-crypt-consumer
auto-offset-reset: latest
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="eshop-kafka-sim" password="Unicom#135";
# 生产区 redis 配置
redis:
sentinel:
master: eshop-redis-sim
nodes: 10.125.164.24:32510,10.125.164.90:32515,10.125.164.89:32516
password: Unicom#135
# 天宫Eureka配置
eureka:
client:
service-url:
defaultZone: http://eureka-1-svc:8080/eureka,http://eureka-2-svc:8080/eureka,http://eureka-3-svc:8080/eureka
instance:
prefer-ip-address: true
instance-ip: ${spring.cloud.client.ip-address}:${server.port}
mybatis-plus:
configuration:
# 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射
map-underscore-to-camel-case: true
auto-mapping-behavior: full
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml
global-config:
# 逻辑删除配置
db-config:
logic-not-delete-value: normal # 逻辑删除标记:正常数据
logic-delete-value: deleted # 逻辑删除标记:已删除的数据
type-aliases-package: com.chinaunicom.mall.ebtp.project
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
strategy: SEMAPHORE
thread:
timeoutInMilliseconds: 200000 #熔断超时时间
circuitBreaker:
sleepWindowInMilliseconds: 20000
forceClosed: true
ribbon:
ReadTimeout: 20000 #请求处理的超时时间
ConnectTimeout: 20000 #请求连接超时时间
MaxAutoRetries: 0 #对当前实例的重试次数
MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1
mconfig:
swagger-ui-open: true
exception-handle-enabled: true
seata-open-enabled: false
work-id: 1 #终端ID
datacenter-id: 1 #数据中心ID
host-name: http://10.242.31.54/
service-name-purp: mall-purp #采购系统委托项目微服务
service-name-wfap: mall-wfap #重新评审 流程微服务
service-name-resu: mall-resu #重新评审 项目中心查询服务
service-price-query: biz-service-price-query #商城询价服务
service-price-usercenter: core-service-usercenter-public #用户中心服务
#内部服务
service-name-archive: biz-service-ebtp-archive #归档服务
service-name-auction: biz-service-ebtp-auction #竞拍服务API
service-name-calibration: biz-service-ebtp-calibration #标段定标接口
service-name-bid: biz-service-ebtp-bid #标段出始化流程
service-name-process: biz-service-ebtp-process #标段出始化流程
service-name-resps: biz-service-ebtp-resps #标段应答文件
service-name-rsms: biz-service-ebtp-rsms #评审微服务
service-name-tender: biz-service-ebtp-tender #标段投标微服务
wfSectionNo: '080'
wfSectionName: 标段重新评审审批单
# 用户暴露给 prometheus 的健康数据
management:
endpoints:
web:
exposure:
include: "*"
cors:
allowed-origins: "*"
allowed-methods: "*"

View File

@ -0,0 +1,177 @@
server:
port: 18012
servlet:
context-path: /
seata:
service:
vgroup-mapping:
sys-manager-ebtp-project-service-group: seata-server-jl
registry:
type: eureka
eureka:
serviceUrl: http://eureka-1:8080/eureka,http://eureka-2:8080/eureka,http://eureka-3:8080/eureka
# 对应 apollo 配置中心的应用名
app:
id: sys-manager-ebtp-project
# Apollo 配置信息
apollo:
meta: http://apollo-configservice:8080/
bootstrap:
namespace: application
enabled: true
eagerLoad:
enabled: true
spring:
aop:
auto: true #开启spring的aop配置
proxy-target-class: true
application:
name: sys-manager-ebtp-project
shardingsphere:
datasource:
names: ds0
ds0:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: mall
password: unicom
jdbc-url: jdbc:mysql://10.125.160.30:3306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
url: jdbc:mysql://10.125.160.30:3306/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
filters: stat,wall,log4j
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
props:
sql:
show: false
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
serialization:
write-dates-as-timestamps: false
# 天宫Kafka增加了安全认证需要配置安全属性
kafka:
bootstrap-servers: 10.125.164.192:32005,10.125.164.193:32005,10.125.164.194:32005
template:
default-topic: jl_test
# 生产者配置参数
producer:
client-id: core-service-ebtp-crypt
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123";
# 消费者配置参数
consumer:
group-id: core-service-ebtp-crypt-consumer
auto-offset-reset: latest
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-256
sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="jltest" password="Unicom#123";
# 天宫 redis 需要使用哨兵进行访问
redis:
sentinel:
master: eshop-redis
nodes: 10.125.164.124:32718, 10.125.164.118:32716, 10.125.164.121:32716
password: Unicom#135
# 天宫Eureka配置
eureka:
client:
service-url:
defaultZone: http://eureka-1:8080/eureka,http://eureka-2:8080/eureka,http://eureka-3:8080/eureka
instance:
prefer-ip-address: true
instance-ip: ${spring.cloud.client.ip-address}:${server.port}
mybatis-plus:
configuration:
# 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射
map-underscore-to-camel-case: true
auto-mapping-behavior: full
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml
global-config:
# 逻辑删除配置
db-config:
# logic-delete-field: flag # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2) @TableLogic
logic-not-delete-value: normal # 逻辑删除标记:正常数据
logic-delete-value: deleted # 逻辑删除标记:已删除的数据
type-aliases-package: com.chinaunicom.mall.ebtp.project
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
strategy: SEMAPHORE
thread:
timeoutInMilliseconds: 200000 #熔断超时时间
circuitBreaker:
sleepWindowInMilliseconds: 200000
forceClosed: true
ribbon:
ReadTimeout: 200000 #请求处理的超时时间
ConnectTimeout: 200000 #请求连接超时时间
MaxAutoRetries: 0 #对当前实例的重试次数
MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1
mconfig:
swagger-ui-open: true
exception-handle-enabled: true
seata-open-enabled: false
work-id: 1 #终端ID
datacenter-id: 1 #数据中心ID
host-name: http://10.242.31.158/
service-name-purp: mall-purp #采购系统委托项目微服务
service-name-wfap: mall-wfap #重新评审 流程微服务
service-name-resu: mall-resu #重新评审 项目中心查询服务
service-price-query: biz-service-price-query #商城询价服务
service-price-usercenter: core-service-usercenter-public #用户中心服务
#内部服务
service-name-archive: biz-service-ebtp-archive #归档服务
service-name-auction: biz-service-ebtp-auction #竞拍服务API
service-name-calibration: biz-service-ebtp-calibration #标段定标接口
service-name-bid: biz-service-ebtp-bid #标段出始化流程
service-name-process: biz-service-ebtp-process #标段出始化流程
service-name-resps: biz-service-ebtp-resps #标段应答文件
service-name-rsms: biz-service-ebtp-rsms #评审微服务
service-name-tender: biz-service-ebtp-tender #标段投标微服务
wfSectionNo: '080'
wfSectionName: 标段重新评审审批单
# 用户暴露给 prometheus 的健康数据
management:
endpoints:
web:
exposure:
include: "*"
cors:
allowed-origins: "*"
allowed-methods: "*"

View File

@ -0,0 +1,127 @@
# 对应 apollo 配置中心的应用名
app:
id: sys_manager_ebtp_project
# Apollo 配置信息
apollo:
bootstrap:
enabled: true
namespace: application
spring:
profiles:
active: master
jasypt:
encryptor:
bean: stringEncryptor
client:
notification-url: 1
clientHttpUrl: 1
check:
porject:
num-value: 1
name-value: 1
length: 1
checkBoolen: 1
user:
auth:
resource:
serviceId:mall-auth: 1
unifast:
sso:
getCode:
url: 1
redirectUrl: 1
clientId: 1
public-key: 1
jury:
loginCheck:
privateKey: 1
message:
privateKey: 1
callBackUrl: 1
appCode: 1
checkVerifycodeHttpUrl: 1
sendVerifycodeHttpUrl: 1
oss:
bucketName: 1
accessKeySecret: 1
accessKeyId: 1
endpoint: 1
KingSoftWps:
downloadUrl: 1
downloadUrl2: 1
publicKey: 1
privateKey: 1
host: 1
time_limit: 1
kswpsurl: 1
kswpsurl-preview: 1
tempDocFileId: 1
mconfig:
rsa:
field:
pivate_key: 1
wps:
bss:
appTokenUrl: 1
previewUrl: 1
editUrl: 1
url:
appTokenUrl: 1
previewUrl: 1
downFileUrl: 1
editUrl: 1
bssAppId: 1
bssAppSecret: 1
bssAppUrl: 1
appid: 1
appKey: 1
bss:
app-url: 1
app-url-test: 1
app-secret: 1
app-id: 1
feign:
name:
usercenter: 1
tender: 1
rsms: 1
strategy-center: 1
resps: 1
project: 2
process: 1
notification: 1
documentcenter: 2
service-name-wfap: 1
service-price-usercenter: 1
service-price-query: 1
service-name-notification: 1
service-name-resu: 1
service-name-purp: 1
service-name-tender: 1
service-name-rsms: 1
service-name-resps: 1
service-name-proces: 1
service-name-open: 1
service-name-bid: 1
service-name-evaluation: 1
service-name-calibration: 1
service-name-auction: 1
service-name-archive: 1

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="true">
<property name="logback.logdir" value="/log" />
<property name="logback.appname" value="${APP_NAME}" />
<contextName>${logback.appname}</contextName>
<!--输出到控制台 ConsoleAppender-->
<appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender">
<!--展示格式 layout-->
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${MY_POD_IP} %contextName [%thread] %-5level %logger{50}  - [ppTraceId: %X{PtxId}, ppSpanId: %X{PspanId}] - %msg%n</pattern>
</pattern>
</layout>
</appender>
<appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!--日志名称如果没有File 属性那么只会使用FileNamePattern的文件路径规则
如果同时有<File>和<FileNamePattern>,那么当天日志是<File>,明天会自动把今天
的日志改名为今天的日期。即,<File> 的日志都是当天的。
-->
<File>${logback.logdir}/${logback.appname}-${MY_POD_IP}.log</File>
<!--滚动策略,按照时间滚动 TimeBasedRollingPolicy-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--文件路径,定义了日志的切分方式——把每一天的日志归档到一个文件中,以防止日志填满整个磁盘空间-->
<FileNamePattern>${logback.logdir}/${logback.appname}-${MY_POD_IP}.%d{yyyy-MM-dd}.log</FileNamePattern>
<!--只保留最近3天的日志-->
<maxHistory>3</maxHistory>
<!--应用启动时删除超过时间范围的日志文件-->
<cleanHistoryOnStart>true</cleanHistoryOnStart>
<!--用来指定日志文件的上限大小,那么到了这个值,就会删除旧的日志-->
<!--<totalSizeCap>1GB</totalSizeCap>-->
</rollingPolicy>
<!--日志输出编码格式化-->
<encoder>
<charset>UTF-8</charset>
<pattern>%d ${MY_POD_IP} [%thread] %-5level %logger{64} %line - [ppTraceId: %X{PtxId}, ppSpanId: %X{PspanId}] - %msg%n</pattern>
</encoder>
</appender>
<!--指定最基础的日志输出级别-->
<root level="INFO">
<appender-ref ref="consoleLog"/>
<!--appender将会添加到这个logger-->
<appender-ref ref="fileInfoLog"/>
</root>
</configuration>

View File

@ -0,0 +1,7 @@
unifast.swagger.basePackage=com.chinaunicom.mall.ebtp.project
unifast.swagger.title=\u6D4B\u8BD5\u63A5\u53E3\u6587\u6863
unifast.swagger.contactName=\u5409\u6797\u9879\u76EE\u7EC4
unifast.swagger.contactUrl=http://chinaunicom.com
unifast.swagger.contactEmail=chinaunicom@chinaunicom.com
unifast.swagger.version=0.0.1
unifast.swagger.description=\u8BC4\u5BA1\u7ED3\u6784\u5316\u670D\u52A1