22 changed files with 756 additions and 0 deletions
@ -0,0 +1,56 @@
|
||||
<?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>blade-service</artifactId> |
||||
<groupId>org.springblade</groupId> |
||||
<version>3.2.0.RELEASE</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
|
||||
<artifactId>logpm-data-sharing</artifactId> |
||||
|
||||
<properties> |
||||
<maven.compiler.source>8</maven.compiler.source> |
||||
<maven.compiler.target>8</maven.compiler.target> |
||||
</properties> |
||||
|
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-core-boot</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-starter-swagger</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-core-auto</artifactId> |
||||
<scope>provided</scope> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>logpm-basicdata-api</artifactId> |
||||
<version>3.2.0.RELEASE</version> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
<build> |
||||
<plugins> |
||||
<plugin> |
||||
<groupId>io.fabric8</groupId> |
||||
<artifactId>docker-maven-plugin</artifactId> |
||||
<configuration> |
||||
<skip>${docker.fabric.skip}</skip> |
||||
</configuration> |
||||
</plugin> |
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-antrun-plugin</artifactId> |
||||
</plugin> |
||||
</plugins> |
||||
</build> |
||||
|
||||
</project> |
@ -0,0 +1,16 @@
|
||||
package com.logpm.datasharing; |
||||
|
||||
import org.springblade.common.constant.ModuleNameConstant; |
||||
import org.springblade.core.cloud.client.BladeCloudApplication; |
||||
import org.springblade.core.launch.BladeApplication; |
||||
|
||||
/** |
||||
* @author zqb |
||||
*/ |
||||
@BladeCloudApplication |
||||
public class DataSharingApplication { |
||||
|
||||
public static void main(String[] args) { |
||||
BladeApplication.run(ModuleNameConstant.APPLICATION_DATA_SHARING_NAME, DataSharingApplication.class, args); |
||||
} |
||||
} |
@ -0,0 +1,40 @@
|
||||
/* |
||||
* 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.logpm.datasharing.config; |
||||
|
||||
|
||||
import com.logpm.datasharing.pros.DataSharingProperties; |
||||
import org.mybatis.spring.annotation.MapperScan; |
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties; |
||||
import org.springframework.cloud.openfeign.EnableFeignClients; |
||||
import org.springframework.context.annotation.ComponentScan; |
||||
import org.springframework.context.annotation.Configuration; |
||||
|
||||
/** |
||||
* 配置feign、mybatis包名、properties |
||||
* |
||||
* @author chaos |
||||
*/ |
||||
@Configuration(proxyBeanMethods = false) |
||||
@ComponentScan({"org.springblade", "com.logpm"}) |
||||
@EnableFeignClients({"org.springblade", "com.logpm"}) |
||||
@MapperScan({"org.springblade.**.mapper.**", "com.logpm.**.mapper.**"}) |
||||
@EnableConfigurationProperties(DataSharingProperties.class) |
||||
public class DataSharingConfiguration { |
||||
|
||||
|
||||
} |
@ -0,0 +1,50 @@
|
||||
/* |
||||
* 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.logpm.datasharing.controller; |
||||
|
||||
import com.logpm.datasharing.service.MerchantService; |
||||
import com.logpm.datasharing.vo.MerchantOrderVO; |
||||
import io.swagger.annotations.Api; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
/** |
||||
* 商家获取信息 控制器 |
||||
* |
||||
* @Author zqb |
||||
* @Date 2024/4/15 |
||||
**/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/merchant") |
||||
@Api(value = "商家获取货物信息", tags = "商家获取货物信息") |
||||
public class MerchantController extends BladeController { |
||||
|
||||
private final MerchantService merchantService; |
||||
|
||||
@GetMapping("goods") |
||||
public R<MerchantOrderVO> goods(@RequestParam("contract_number") String contract_number, @RequestParam("auth_key") String auth_key) { |
||||
return R.data(merchantService.goods(contract_number,auth_key)); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,27 @@
|
||||
package com.logpm.datasharing.dto; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* 订单信息 |
||||
* @author zhaoqiaobo |
||||
* @create 2024-04-15 |
||||
*/ |
||||
@Data |
||||
public class MerchantOrderDTO implements Serializable { |
||||
|
||||
@ApiModelProperty(value = "收件地址") |
||||
private String receiveAddress; |
||||
@ApiModelProperty(value = "是否零担订单") |
||||
private String zeroOrder; |
||||
@ApiModelProperty(value = "收件人电话") |
||||
private String receivePhone; |
||||
@ApiModelProperty(value = "订单合同号") |
||||
private String orderCode; |
||||
@ApiModelProperty(value = "订单总件数") |
||||
private String total; |
||||
|
||||
} |
@ -0,0 +1,60 @@
|
||||
/* |
||||
* 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.logpm.datasharing.launcher; |
||||
|
||||
import org.springblade.core.auto.service.AutoService; |
||||
import org.springblade.core.launch.constant.NacosConstant; |
||||
import org.springblade.core.launch.service.LauncherService; |
||||
import org.springblade.core.launch.utils.PropsUtil; |
||||
import org.springframework.boot.builder.SpringApplicationBuilder; |
||||
|
||||
import java.util.Properties; |
||||
|
||||
/** |
||||
* 启动参数拓展 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@AutoService(LauncherService.class) |
||||
public class DataSharingLauncherServiceImpl implements LauncherService { |
||||
|
||||
@Override |
||||
public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) { |
||||
Properties props = System.getProperties(); |
||||
// 开启多数据源
|
||||
PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "true"); |
||||
// 指定注册配置信息
|
||||
PropsUtil.setProperty(props, "spring.cloud.nacos.config.extension-configs[0].data-id", NacosConstant.dataId(appName, profile)); |
||||
PropsUtil.setProperty(props, "spring.cloud.nacos.config.extension-configs[0].group", NacosConstant.NACOS_CONFIG_GROUP); |
||||
PropsUtil.setProperty(props, "spring.cloud.nacos.config.extension-configs[0].refresh", NacosConstant.NACOS_CONFIG_REFRESH); |
||||
// 指定注册IP
|
||||
// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.ip", "127.0.0.1");
|
||||
// 指定注册端口
|
||||
// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.port", "8200");
|
||||
// 自定义命名空间
|
||||
// PropsUtil.setProperty(props, "spring.cloud.nacos.config.namespace", LauncherConstant.NACOS_NAMESPACE);
|
||||
// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.namespace", LauncherConstant.NACOS_NAMESPACE);
|
||||
// 自定义分组
|
||||
// PropsUtil.setProperty(props, "spring.cloud.nacos.config.group", NacosConstant.NACOS_CONFIG_GROUP);
|
||||
// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.group", NacosConstant.NACOS_CONFIG_GROUP);
|
||||
} |
||||
|
||||
@Override |
||||
public int getOrder() { |
||||
return 20; |
||||
} |
||||
} |
@ -0,0 +1,25 @@
|
||||
package com.logpm.datasharing.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.logpm.datasharing.dto.MerchantOrderDTO; |
||||
import com.logpm.datasharing.vo.MerchantPackageVO; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author zhaoqiaobo |
||||
* @create 2024-03-06 15:54 |
||||
*/ |
||||
@Mapper |
||||
public interface MerchantMapeer extends BaseMapper { |
||||
|
||||
|
||||
MerchantOrderDTO findMerchantOrder(@Param("contract_number") String contract_number, List<String> warehouseId); |
||||
|
||||
List<String> findWarehouseIdByAuthKey(@Param("authKey") String authKey); |
||||
|
||||
List<MerchantPackageVO> findPackage(@Param("contract_number") String contract_number); |
||||
|
||||
} |
@ -0,0 +1,58 @@
|
||||
<?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.logpm.datasharing.mapper.MerchantMapeer"> |
||||
|
||||
<select id="findMerchantOrder" resultType="com.logpm.datasharing.dto.MerchantOrderDTO"> |
||||
select t.customer_address receiveAddress, |
||||
t.customer_telephone receivePhone, |
||||
t.order_code orderCode, |
||||
t.is_zero zeroOrder, |
||||
t.total_number total |
||||
from logpm_distribution_stock_article t |
||||
where t.order_code = #{contract_number} |
||||
<if test="warehouseId != null and warehouseId.size() > 0"> |
||||
and t.warehouse_id in |
||||
<foreach collection="warehouseId" item="item" separator="," open="(" close=")"> |
||||
#{item} |
||||
</foreach> |
||||
</if> |
||||
</select> |
||||
<select id="findWarehouseIdByAuthKey" resultType="java.lang.String"> |
||||
select lbss.serve_warehouse_id |
||||
from logpm_basicdata_client t |
||||
left join logpm_basicdata_storage_services lbss on t.id = lbss.client_id |
||||
where t.client_code = #{authKey} |
||||
and t.is_deleted = 0 |
||||
</select> |
||||
<select id="findPackage" resultType="com.logpm.datasharing.vo.MerchantPackageVO"> |
||||
select |
||||
lww.shipper_address sendAddress, |
||||
ldpl.waybill_number waybillNumber, |
||||
ldpl.order_package_code orderPackageCode, |
||||
ldpl.order_package_status orderPackageStatus, |
||||
t.update_time updateTime, |
||||
ifnull(driver.lname,driver.ltname) distributionName, |
||||
ifnull(driver.lphone,driver.ltphone) distributionPhone |
||||
from logpm_distribution_stock_article t |
||||
left join logpm_distribution_reservation_stockarticle ldrs on ldrs.stock_article_id = t.id and ldrs.stock_article_status !=2 |
||||
left join logpm_distribution_reservation ldr on ldr.id = ldrs.reservation_id and ldr.reservation_status !=40 |
||||
join logpm_distribution_reservation_package ldrp |
||||
on ldrp.reservation_id = ldr.id and ldrp.packet_bar_status != 2 |
||||
|
||||
left join logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id |
||||
left join logpm_warehouse_waybill lww on lww.waybill_no = ldpl.waybill_number |
||||
left join logpm_distribution_signfor lds on lds.reservation_id = ldr.id |
||||
left join logpm_distribution_delivery_list lddl on lddl.id = lds.delivery_id |
||||
left join (select lddl.id, |
||||
group_concat(ldd.driver_name) lname, |
||||
group_concat(lddt.driver_name) ltname, |
||||
group_concat(ldd.driver_phone) lphone, |
||||
group_concat(lddt.driver_phone) ltphone |
||||
from logpm_distribution_delivery_list lddl |
||||
left join logpm_distribution_delivery_self ldd on ldd.delivery_id = lddl.id |
||||
left join logpm_distribution_delivery_tripartite lddt on lddt.delivery_id = lddl.id |
||||
group by lddl.id) driver on driver.id = lddl.id |
||||
where t.order_code = #{contract_number} |
||||
</select> |
||||
|
||||
</mapper> |
@ -0,0 +1,21 @@
|
||||
package com.logpm.datasharing.pros; |
||||
|
||||
import lombok.Data; |
||||
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||
|
||||
/** |
||||
* FactoryProperties |
||||
* |
||||
* @author pref |
||||
*/ |
||||
@Data |
||||
@ConfigurationProperties(prefix = "logpm") |
||||
public class DataSharingProperties { |
||||
/** |
||||
* 名称 |
||||
*/ |
||||
private String name; |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.logpm.datasharing.service; |
||||
|
||||
import com.logpm.datasharing.vo.MerchantOrderVO; |
||||
|
||||
/** |
||||
* @author zhaoqiaobo |
||||
* @create 2024-04-15 |
||||
*/ |
||||
public interface MerchantService { |
||||
|
||||
/** |
||||
* 根据合同编号查询商品信息。 |
||||
* |
||||
* @param contract_number 合同编号,用于查询特定合同下的商品信息。 |
||||
* @return 返回一个包含商品信息的响应对象,具体商品信息封装在MerchantOrderVO中。 |
||||
*/ |
||||
MerchantOrderVO goods(String contractNumber, String authKey); |
||||
} |
@ -0,0 +1,48 @@
|
||||
package com.logpm.datasharing.service.impl; |
||||
|
||||
import cn.hutool.core.bean.BeanUtil; |
||||
import cn.hutool.core.collection.CollUtil; |
||||
import cn.hutool.core.util.ObjectUtil; |
||||
import com.logpm.datasharing.dto.MerchantOrderDTO; |
||||
import com.logpm.datasharing.mapper.MerchantMapeer; |
||||
import com.logpm.datasharing.service.MerchantService; |
||||
import com.logpm.datasharing.vo.MerchantOrderPackageVO; |
||||
import com.logpm.datasharing.vo.MerchantOrderVO; |
||||
import com.logpm.datasharing.vo.MerchantPackageVO; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author zhaoqiaobo |
||||
* @create 2024-03-06 15:52 |
||||
*/ |
||||
@Service |
||||
@AllArgsConstructor |
||||
public class MerchantServiceImpl implements MerchantService { |
||||
|
||||
private final MerchantMapeer merchantMapeer; |
||||
|
||||
@Override |
||||
public MerchantOrderVO goods(String contract_number, String authKey) { |
||||
MerchantOrderDTO dto = null; |
||||
// 根据 authKey 获取仓库信息
|
||||
List<String> warehouseId = merchantMapeer.findWarehouseIdByAuthKey(authKey); |
||||
if (CollUtil.isNotEmpty(warehouseId)) { |
||||
// 根据合同编号获取合同信息
|
||||
dto = merchantMapeer.findMerchantOrder(contract_number, warehouseId); |
||||
if (ObjectUtil.isNotEmpty(dto)) { |
||||
// 零担订单
|
||||
// 定制品
|
||||
// 包件/库存品
|
||||
List<MerchantPackageVO> packageVO = merchantMapeer.findPackage(contract_number); |
||||
MerchantOrderPackageVO orderPackageVO = new MerchantOrderPackageVO(); |
||||
BeanUtil.copyProperties(dto, orderPackageVO); |
||||
orderPackageVO.setPackageInfor(packageVO); |
||||
return orderPackageVO; |
||||
} |
||||
} |
||||
return null; |
||||
} |
||||
} |
@ -0,0 +1,19 @@
|
||||
package com.logpm.datasharing.vo; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 订单信息 包件 |
||||
* @author zhaoqiaobo |
||||
* @create 2024-04-15 |
||||
*/ |
||||
@Data |
||||
public class MerchantOrderPackageVO extends MerchantOrderVO { |
||||
|
||||
@ApiModelProperty(value = "包件信息") |
||||
private List<MerchantPackageVO> packageInfor; |
||||
|
||||
} |
@ -0,0 +1,25 @@
|
||||
package com.logpm.datasharing.vo; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* 订单信息 |
||||
* @author zhaoqiaobo |
||||
* @create 2024-04-15 |
||||
*/ |
||||
@Data |
||||
public class MerchantOrderVO implements Serializable { |
||||
|
||||
@ApiModelProperty(value = "收件地址") |
||||
private String receiveAddress; |
||||
@ApiModelProperty(value = "收件人电话") |
||||
private String receivePhone; |
||||
@ApiModelProperty(value = "订单合同号") |
||||
private String orderCode; |
||||
@ApiModelProperty(value = "订单总件数") |
||||
private String total; |
||||
|
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.logpm.datasharing.vo; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 订单信息 包件 |
||||
* |
||||
* @author zhaoqiaobo |
||||
* @create 2024-04-15 |
||||
*/ |
||||
@Data |
||||
public class MerchantOrderZeroVO extends MerchantOrderVO { |
||||
|
||||
@ApiModelProperty(value = "零担在库数") |
||||
private String stockTotal; |
||||
|
||||
@ApiModelProperty(value = "零担配送信息") |
||||
private List<MerchantZeroDispatchVO> packageInfor; |
||||
|
||||
} |
@ -0,0 +1,32 @@
|
||||
package com.logpm.datasharing.vo; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* 订单包件信息 |
||||
* |
||||
* @author zhaoqiaobo |
||||
* @create 2024-04-15 |
||||
*/ |
||||
@Data |
||||
public class MerchantPackageVO implements Serializable { |
||||
|
||||
@ApiModelProperty(value = "发货地址") |
||||
private String sendAddress; |
||||
@ApiModelProperty(value = "快递单号【运单号】") |
||||
private String waybillNumber; |
||||
@ApiModelProperty(value = "包件码") |
||||
private String orderPackageCode; |
||||
@ApiModelProperty(value = "包件状态 20 入库 70 签收") |
||||
private String orderPackageStatus; |
||||
@ApiModelProperty(value = "更新时间") |
||||
private String updateTime; |
||||
@ApiModelProperty(value = "配送人姓名") |
||||
private String distributionName; |
||||
@ApiModelProperty(value = "配送人联系电话") |
||||
private String distributionPhone; |
||||
|
||||
} |
@ -0,0 +1,28 @@
|
||||
package com.logpm.datasharing.vo; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* 订单包件信息 |
||||
* |
||||
* @author zhaoqiaobo |
||||
* @create 2024-04-15 |
||||
*/ |
||||
@Data |
||||
public class MerchantZeroDispatchVO implements Serializable { |
||||
|
||||
@ApiModelProperty(value = "发货地址") |
||||
private String sendAddress; |
||||
@ApiModelProperty(value = "快递单号【运单号】") |
||||
private String waybillNumber; |
||||
@ApiModelProperty(value = "配送数量") |
||||
private String dispatchNumber; |
||||
@ApiModelProperty(value = "配送人姓名") |
||||
private String distributionName; |
||||
@ApiModelProperty(value = "配送人联系电话") |
||||
private String distributionPhone; |
||||
|
||||
} |
@ -0,0 +1,47 @@
|
||||
#服务器端口 |
||||
server: |
||||
port: 17010 |
||||
|
||||
#zb: |
||||
# enable: false |
||||
#数据源配置 |
||||
#spring: |
||||
# datasource: |
||||
# url: ${blade.datasource.dev.url} |
||||
# username: ${blade.datasource.dev.username} |
||||
# password: ${blade.datasource.dev.password} |
||||
|
||||
spring: |
||||
#排除DruidDataSourceAutoConfigure |
||||
autoconfigure: |
||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
||||
datasource: |
||||
dynamic: |
||||
druid: |
||||
#通用校验配置 |
||||
validation-query: select 1 |
||||
#启用sql日志拦截器 |
||||
proxy-filters: |
||||
- sqlLogInterceptor |
||||
#设置默认的数据源或者数据源组,默认值即为master |
||||
primary: master |
||||
datasource: |
||||
master: |
||||
druid: |
||||
#独立校验配置 |
||||
validation-query: select 1 |
||||
#oracle校验 |
||||
#validation-query: select 1 from dual |
||||
url: ${blade.datasource.datasharing.master.url} |
||||
username: ${blade.datasource.datasharing.master.username} |
||||
password: ${blade.datasource.datasharing.master.password} |
||||
slave: |
||||
druid: |
||||
#独立校验配置 |
||||
validation-query: select 1 |
||||
#oracle校验 |
||||
#validation-query: select 1 from dual |
||||
url: ${blade.datasource.datasharing.slave.url} |
||||
username: ${blade.datasource.datasharing.slave.username} |
||||
password: ${blade.datasource.datasharing.slave.password} |
||||
|
@ -0,0 +1,45 @@
|
||||
#服务器端口 |
||||
server: |
||||
port: 17010 |
||||
|
||||
#数据源配置 |
||||
#spring: |
||||
# datasource: |
||||
# url: ${blade.datasource.dev.url} |
||||
# username: ${blade.datasource.dev.username} |
||||
# password: ${blade.datasource.dev.password} |
||||
|
||||
spring: |
||||
#排除DruidDataSourceAutoConfigure |
||||
autoconfigure: |
||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
||||
datasource: |
||||
dynamic: |
||||
druid: |
||||
#通用校验配置 |
||||
validation-query: select 1 |
||||
#启用sql日志拦截器 |
||||
proxy-filters: |
||||
- sqlLogInterceptor |
||||
#设置默认的数据源或者数据源组,默认值即为master |
||||
primary: master |
||||
datasource: |
||||
master: |
||||
druid: |
||||
#独立校验配置 |
||||
validation-query: select 1 |
||||
#oracle校验 |
||||
#validation-query: select 1 from dual |
||||
url: ${blade.datasource.datasharing.master.url} |
||||
username: ${blade.datasource.datasharing.master.username} |
||||
password: ${blade.datasource.datasharing.master.password} |
||||
slave: |
||||
druid: |
||||
#独立校验配置 |
||||
validation-query: select 1 |
||||
#oracle校验 |
||||
#validation-query: select 1 from dual |
||||
url: ${blade.datasource.datasharing.slave.url} |
||||
username: ${blade.datasource.datasharing.slave.username} |
||||
password: ${blade.datasource.datasharing.slave.password} |
||||
|
@ -0,0 +1,45 @@
|
||||
#服务器端口 |
||||
server: |
||||
port: 17010 |
||||
|
||||
#数据源配置 |
||||
#spring: |
||||
# datasource: |
||||
# url: ${blade.datasource.dev.url} |
||||
# username: ${blade.datasource.dev.username} |
||||
# password: ${blade.datasource.dev.password} |
||||
|
||||
spring: |
||||
#排除DruidDataSourceAutoConfigure |
||||
autoconfigure: |
||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
||||
datasource: |
||||
dynamic: |
||||
druid: |
||||
#通用校验配置 |
||||
validation-query: select 1 |
||||
#启用sql日志拦截器 |
||||
proxy-filters: |
||||
- sqlLogInterceptor |
||||
#设置默认的数据源或者数据源组,默认值即为master |
||||
primary: master |
||||
datasource: |
||||
master: |
||||
druid: |
||||
#独立校验配置 |
||||
validation-query: select 1 |
||||
#oracle校验 |
||||
#validation-query: select 1 from dual |
||||
url: ${blade.datasource.datasharing.master.url} |
||||
username: ${blade.datasource.datasharing.master.username} |
||||
password: ${blade.datasource.datasharing.master.password} |
||||
slave: |
||||
druid: |
||||
#独立校验配置 |
||||
validation-query: select 1 |
||||
#oracle校验 |
||||
#validation-query: select 1 from dual |
||||
url: ${blade.datasource.datasharing.slave.url} |
||||
username: ${blade.datasource.datasharing.slave.username} |
||||
password: ${blade.datasource.datasharing.slave.password} |
||||
|
@ -0,0 +1,32 @@
|
||||
#mybatis-plus配置 |
||||
mybatis-plus: |
||||
mapper-locations: classpath:com/logpm/**/mapper/*Mapper.xml |
||||
#实体扫描,多个package用逗号或者分号分隔 |
||||
typeAliasesPackage: com.logpm.**.entity |
||||
|
||||
#swagger扫描路径配置 |
||||
swagger: |
||||
base-packages: |
||||
- org.springblade |
||||
- com.logpm |
||||
|
||||
#oss配置 |
||||
oss: |
||||
enabled: true |
||||
name: minio |
||||
tenant-mode: false |
||||
endpoint: http://8.137.14.82:9000 |
||||
access-key: minio |
||||
secret-key: 123123123 |
||||
bucket-name: bladex |
||||
|
||||
|
||||
logging: |
||||
config: classpath:logback.xml |
||||
|
||||
|
||||
spring: |
||||
main: |
||||
allow-circular-references: true |
||||
|
||||
|
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<configuration scan="false" debug="false"> |
||||
|
||||
<contextName>logback</contextName> |
||||
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/> |
||||
|
||||
<!-- 彩色日志依赖的渲染类 --> |
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/> |
||||
<conversionRule conversionWord="wex" |
||||
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/> |
||||
<conversionRule conversionWord="wEx" |
||||
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/> |
||||
<!-- 彩色日志格式 --> |
||||
<property name="CONSOLE_LOG_PATTERN" |
||||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> |
||||
<!-- 控制台输出 --> |
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern> |
||||
<charset>utf8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.path}</file> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<fileNamePattern>${log.path}.%d{yyyy-MM-dd}.zip</fileNamePattern> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern>%date %level [%thread] %logger{36} [%file : %line] %msg%n |
||||
</pattern> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<root level="info"> |
||||
<appender-ref ref="console"/> |
||||
<appender-ref ref="file"/> |
||||
</root> |
||||
|
||||
</configuration> |
Loading…
Reference in new issue