785834757 1 год назад
Родитель
Сommit
96b458cb3f
29 измененных файлов с 936 добавлено и 27 удалено
  1. 10 0
      commons/src/main/java/com/jzg/commons/config/MyBatisPlusConfig.java
  2. 3 3
      commons/src/main/java/com/jzg/commons/constants/PtlApiType.java
  3. 17 4
      commons/src/main/java/com/jzg/commons/entity/agreement/po/PtlInsAttributionTemplate.java
  4. 16 2
      commons/src/main/java/com/jzg/commons/entity/agreement/vo/PtlInsAttributionTemplateSaveVo.java
  5. 80 7
      commons/src/main/java/com/jzg/commons/entity/agreement/vo/PtlInsAttributionTemplateVo.java
  6. 0 1
      platform/pom.xml
  7. 44 0
      platform/src/main/java/com/jzg/controller/AttributionTemplateController.java
  8. 1 0
      platform/src/main/java/com/jzg/service/EsmInsCompanyService.java
  9. 1 1
      platform/src/main/java/com/jzg/service/PtlInsAttributionTemplateService.java
  10. 7 0
      platform/src/main/java/com/jzg/service/impl/EsmInsCompanyServiceImpl.java
  11. 16 9
      platform/src/main/java/com/jzg/service/impl/PtlInsAttributionTemplateServiceImpl.java
  12. 3 0
      platform/src/main/resources/application.yml
  13. 32 0
      tenant/insurance/pom.xml
  14. 31 0
      tenant/insurance/yongcheng/pom.xml
  15. 19 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/YongchengApplication.java
  16. 23 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/api/ApiComponents.java
  17. 66 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/aspect/AsyncLoggingAspect.java
  18. 31 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/config/WebClientConfig.java
  19. 40 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/controller/QuoteController.java
  20. 71 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/Accident.java
  21. 37 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/AccidentResponse.java
  22. 38 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/AccidentalDrivingQueryVo.java
  23. 22 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/AuthorityDataXml.java
  24. 78 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/ResponseYwCvrg.java
  25. 77 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/YcConfigureParameters.java
  26. 103 0
      tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/utils/RequestApiComponents.java
  27. 34 0
      tenant/insurance/yongcheng/src/main/resources/application.yml
  28. 35 0
      tenant/insurance/yongcheng/src/main/resources/logback-spring.xml
  29. 1 0
      tenant/pom.xml

+ 10 - 0
commons/src/main/java/com/jzg/commons/config/MyBatisPlusConfig.java

@@ -1,6 +1,10 @@
 package com.jzg.commons.config;
 
 
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
+import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler;
+import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
 import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
@@ -50,4 +54,10 @@ public class MyBatisPlusConfig {
         interceptor.addInnerInterceptor(paginationInnerInterceptor());
         return interceptor;
     }
+
+    @Bean
+    public ConfigurationCustomizer configurationCustomizer() {
+        return configuration -> configuration.getTypeHandlerRegistry()
+                .register(Fastjson2TypeHandler.class);
+    }
 }

+ 3 - 3
commons/src/main/java/com/jzg/commons/constants/PtlApiType.java

@@ -7,10 +7,10 @@ import lombok.Getter;
 @AllArgsConstructor
 public enum PtlApiType {
 
-    API(1, "api对接"),
-    PYTHON(2, "python对接");
+    API("1", "api对接"),
+    PYTHON("2", "python对接");
 
-    private final int code;
+    private final String code;
 
     private final String desc;
 

+ 17 - 4
commons/src/main/java/com/jzg/commons/entity/agreement/po/PtlInsAttributionTemplate.java

@@ -5,11 +5,13 @@ import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler;
 import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
 import com.jzg.commons.entity.agreement.vo.PtlInsAttributionTemplateSaveVo;
 import com.jzg.commons.util.idgen.IdGenerate;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
+import org.apache.ibatis.type.JdbcType;
 
 import java.io.Serializable;
 
@@ -20,6 +22,8 @@ import java.io.Serializable;
  */
 @Data
 @Schema(description = "保险公司归属信息模板配置")
+@NoArgsConstructor
+@TableName(autoResultMap = true)
 public class PtlInsAttributionTemplate implements Serializable {
     /**
      *
@@ -27,11 +31,17 @@ public class PtlInsAttributionTemplate implements Serializable {
     @TableId(value = "id")
     private String id;
 
+    @TableField(value = "title")
+    private String title;
+
+    @TableField(value = "name")
+    private String name;
+
     /**
      * api类型(1、api对接,2、python对接)
      */
     @TableField(value = "api_type")
-    private Integer apiType;
+    private String apiType;
 
     /**
      * 保险公司ID
@@ -53,16 +63,19 @@ public class PtlInsAttributionTemplate implements Serializable {
 
 
 
+
     public PtlInsAttributionTemplate(PtlInsAttributionTemplateSaveVo ptlInsAttributionTemplateSaveVo,String esmInsCompanyName) {
-        if(!ptlInsAttributionTemplateSaveVo.getId().equals("")) {
-            this.id = ptlInsAttributionTemplateSaveVo.getId();
-        }else{
+        if((ptlInsAttributionTemplateSaveVo.getId() == null) || ptlInsAttributionTemplateSaveVo.getId().equals("")) {
             this.id = IdGenerate.nextId();
+        }else{
+            this.id = ptlInsAttributionTemplateSaveVo.getId();
         }
         this.apiType = ptlInsAttributionTemplateSaveVo.getApiType();
         this.insCompanyId = ptlInsAttributionTemplateSaveVo.getInsCompanyId();
         this.insCompanyName = esmInsCompanyName;
         this.fields = JSON.parseArray(JSON.toJSONString(ptlInsAttributionTemplateSaveVo.getFields()));
+        this.title = ptlInsAttributionTemplateSaveVo.getTitle();
+        this.name = ptlInsAttributionTemplateSaveVo.getName();
     }
 
 }

+ 16 - 2
commons/src/main/java/com/jzg/commons/entity/agreement/vo/PtlInsAttributionTemplateSaveVo.java

@@ -7,6 +7,7 @@ import com.jzg.commons.entity.agreement.po.PtlInsAttributionTemplate;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
+import java.util.ArrayList;
 import java.util.List;
 
 @Data
@@ -15,8 +16,14 @@ public class PtlInsAttributionTemplateSaveVo{
     @Schema(description = "id")
     private String id;
 
+    @Schema(description = "标题")
+    private String title;
+
+    @Schema(description = "名称")
+    private String name;
+
     @Schema(description = "api类型")
-    private Integer apiType;
+    private String apiType;
 
     @Schema(description = "保险公司ID")
     private String insCompanyId;
@@ -58,7 +65,10 @@ public class PtlInsAttributionTemplateSaveVo{
      * 将python的连接 转换到api内
      */
     public void converApi(){
-        if(this.apiType == PtlApiType.PYTHON.getCode()){
+        if(this.api==null){
+            this.api = new ArrayList<>();
+        }
+        if(this.apiType.equals(PtlApiType.PYTHON.getCode())){
             if(this.attributionConfig!=null && !"".equals(this.attributionConfig)){
                 this.api.add(new PtlCrawlerApiSaveVo(1,this.attributionConfig));
             }
@@ -89,4 +99,8 @@ public class PtlInsAttributionTemplateSaveVo{
         }
     }
 
+    public PtlInsAttributionTemplateSaveVo(){
+        this.api = new ArrayList<>();
+        this.fields = new ArrayList<>();
+    }
 }

+ 80 - 7
commons/src/main/java/com/jzg/commons/entity/agreement/vo/PtlInsAttributionTemplateVo.java

@@ -2,6 +2,7 @@ package com.jzg.commons.entity.agreement.vo;
 
 import com.alibaba.fastjson.JSONObject;
 import com.jzg.commons.core.base.PageRequest;
+import com.jzg.commons.entity.agreement.po.PtlCrawlerApi;
 import com.jzg.commons.entity.agreement.po.PtlInsAttributionTemplate;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
@@ -10,17 +11,21 @@ import java.util.ArrayList;
 import java.util.List;
 
 @Data
-public class PtlInsAttributionTemplateVo extends PageRequest {
+public class PtlInsAttributionTemplateVo{
 
     /**
      *
      */
     private String id;
 
+    private String title;
+
+    private String name;
+
     /**
      * api类型(1、api对接,2、python对接)
      */
-    private Integer apiType;
+    private String apiType;
 
     /**
      * 保险公司ID
@@ -37,6 +42,36 @@ public class PtlInsAttributionTemplateVo extends PageRequest {
      */
     private List<Field> fields;
 
+    private List<PtlCrawlerApi> api;
+
+
+    @Schema(description = "归属配置")
+    private String attributionConfig;
+
+    @Schema(description = "报价")
+    private String quotation;
+
+    @Schema(description = "影像上传")
+    private String imageUpload;
+
+    @Schema(description = "核保")
+    private String insurance;
+
+    @Schema(description = "缴费查询")
+    private String paymentQuery;
+
+    @Schema(description = "保单下载")
+    private String policyDownload;
+
+    @Schema(description = "非车险查询")
+    private String nonCarInsurance;
+
+    @Schema(description = "人工核保状态刷新")
+    private String manualStatusRefresh;
+
+    @Schema(description = "撤销订单")
+    private String revokeOrder;
+
     @Data
     public static class Field{
         @Schema(description = "字段类型")
@@ -63,14 +98,52 @@ public class PtlInsAttributionTemplateVo extends PageRequest {
             vo.setApiType(ptlInsAttributionTemplate.getApiType());
             vo.setInsCompanyId(ptlInsAttributionTemplate.getInsCompanyId());
             vo.setInsCompanyName(ptlInsAttributionTemplate.getInsCompanyName());
+            vo.setTitle(ptlInsAttributionTemplate.getTitle());
+            vo.setName(ptlInsAttributionTemplate.getName());
             List<Field> fields = new ArrayList<>();
-            ptlInsAttributionTemplate.getFields().forEach(field->{
-                fields.add(JSONObject.parseObject(field.toString(), Field.class));
-            });
-            vo.setFields(fields);
-            vos.add(vo);
+            if(ptlInsAttributionTemplate.getFields() != null) {
+                ptlInsAttributionTemplate.getFields().forEach(field -> {
+                    fields.add(JSONObject.parseObject(field.toString(), Field.class));
+                });
+                vo.setFields(fields);
+                vos.add(vo);
+            }
         });
         return vos;
     }
 
+    public void setApi(List<PtlCrawlerApi> ptlCrawlerApiList){
+        ptlCrawlerApiList.forEach(ptlCrawlerApi -> {
+            switch(ptlCrawlerApi.getApiType()){
+                case 1:
+                    this.attributionConfig = ptlCrawlerApi.getUrl();
+                    break;
+                case 2:
+                    this.quotation = ptlCrawlerApi.getUrl();
+                    break;
+                case 3:
+                    this.imageUpload = ptlCrawlerApi.getUrl();
+                    break;
+                case 4:
+                    this.insurance = ptlCrawlerApi.getUrl();
+                    break;
+                case 5:
+                    this.paymentQuery = ptlCrawlerApi.getUrl();
+                    break;
+                case 6:
+                    this.policyDownload = ptlCrawlerApi.getUrl();
+                    break;
+                case 7:
+                    this.nonCarInsurance = ptlCrawlerApi.getUrl();
+                    break;
+                case 8:
+                    this.manualStatusRefresh = ptlCrawlerApi.getUrl();
+                    break;
+                case 9:
+                    this.revokeOrder = ptlCrawlerApi.getUrl();
+                    break;
+            }
+        });
+    }
+
 }

+ 0 - 1
platform/pom.xml

@@ -26,7 +26,6 @@
 <!--            <version>2.2.8.RELEASE</version>-->
 <!--        </dependency>-->
 
-
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>

+ 44 - 0
platform/src/main/java/com/jzg/controller/AttributionTemplateController.java

@@ -0,0 +1,44 @@
+package com.jzg.controller;
+
+import com.jzg.commons.core.page.HttpResult;
+import com.jzg.commons.entity.agreement.po.PtlInsAttributionTemplate;
+import com.jzg.commons.entity.agreement.vo.PtlInsAttributionTemplateQueryVo;
+import com.jzg.commons.entity.agreement.vo.PtlInsAttributionTemplateSaveVo;
+import com.jzg.commons.entity.agreement.vo.PtlInsAttributionTemplateVo;
+import com.jzg.service.PtlInsAttributionTemplateService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+@RestController
+@RequestMapping("/manager/attributionTemplate")
+@Tag(name="账号归属配置")
+public class AttributionTemplateController {
+
+    @Autowired
+    private PtlInsAttributionTemplateService ptlInsAttributionTemplateService;
+
+    /**
+     * 分页查询
+     * @param ptlInsAttributionTemplateVo
+     * @return
+     */
+    @Operation(summary = "获取账号归属配置",description = "获取账号归属配置")
+    @PostMapping(value = "getList")
+    public HttpResult<List<PtlInsAttributionTemplateVo>> getList(@RequestBody PtlInsAttributionTemplateQueryVo ptlInsAttributionTemplateVo){
+        return HttpResult.ok(ptlInsAttributionTemplateService.getList(ptlInsAttributionTemplateVo));
+    }
+
+    @Operation(summary = "提交模板信息",description = "提交模板信息")
+    @PostMapping(value = "submit")
+    public HttpResult<Object> saveTemplate(@RequestBody List<PtlInsAttributionTemplateSaveVo> ptlInsAttributionTemplateSaveVo) {
+        ptlInsAttributionTemplateSaveVo.forEach(PtlInsAttributionTemplateSaveVo::converApi);
+        return ptlInsAttributionTemplateService.submit(ptlInsAttributionTemplateSaveVo) ? HttpResult.ok("提交模版信息成功") : HttpResult.error("提交模版信息失败");
+    }
+
+}

+ 1 - 0
platform/src/main/java/com/jzg/service/EsmInsCompanyService.java

@@ -37,6 +37,7 @@ public interface EsmInsCompanyService extends IService<EsmInsCompany> {
      * @return
      */
     EsmInsCompany isExists(String companyId);
+    EsmInsCompany isExistsByCompanyCode(String companyCode);
 
     EsmInsCompany findInsCompanyByName(String companyName);
 

+ 1 - 1
platform/src/main/java/com/jzg/service/PtlInsAttributionTemplateService.java

@@ -22,7 +22,7 @@ public interface PtlInsAttributionTemplateService extends IService<PtlInsAttribu
      * @param ptlInsAttributionTemplateVo
      * @return
      */
-    public List<PtlInsAttributionTemplate> getList(PtlInsAttributionTemplateQueryVo ptlInsAttributionTemplateVo);
+    public List<PtlInsAttributionTemplateVo> getList(PtlInsAttributionTemplateQueryVo ptlInsAttributionTemplateVo);
 
     /**
      * 保存 保险公司归属信息模版

+ 7 - 0
platform/src/main/java/com/jzg/service/impl/EsmInsCompanyServiceImpl.java

@@ -61,6 +61,13 @@ public class EsmInsCompanyServiceImpl extends ServiceImpl<EsmInsCompanyMapper, E
         return esmInsCompany;
     }
 
+    @Override
+    public EsmInsCompany isExistsByCompanyCode(String companyCode) {
+        EsmInsCompany esmInsCompany = baseMapper.selectOne(new LambdaQueryWrapper<EsmInsCompany>().eq(EsmInsCompany::getCompanyCode, companyCode));
+        AssertionUtils.isEmpty(esmInsCompany, "保险公司不存在");
+        return esmInsCompany;
+    }
+
     @Override
     public EsmInsCompany findInsCompanyByName(String companyName) {
         LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper<>();

+ 16 - 9
platform/src/main/java/com/jzg/service/impl/PtlInsAttributionTemplateServiceImpl.java

@@ -31,15 +31,17 @@ public class PtlInsAttributionTemplateServiceImpl extends ServiceImpl<PtlInsAttr
     PtlCrawlerApiService ptlCrawlerApiService;
 
     @Override
-    public List<PtlInsAttributionTemplate> getList(PtlInsAttributionTemplateQueryVo ptlInsAttributionTemplateVo) {
+    public List<PtlInsAttributionTemplateVo> getList(PtlInsAttributionTemplateQueryVo ptlInsAttributionTemplateVo) {
         LambdaQueryWrapper<PtlInsAttributionTemplate> wrapper = new LambdaQueryWrapper<PtlInsAttributionTemplate>()
                 .eq(PtlInsAttributionTemplate::getInsCompanyId,ptlInsAttributionTemplateVo.getCompanyId());
         List<PtlInsAttributionTemplate> list = baseMapper.selectList(wrapper);
         List<PtlInsAttributionTemplateVo> ptlInsAttributionTemplateVos = PtlInsAttributionTemplateVo.convert(list);
-        list.forEach(ptlInsAttributionTemplate -> {
-
+        ptlInsAttributionTemplateVos.forEach(vo -> {
+            List<PtlCrawlerApi> apiList = ptlCrawlerApiService.list(new LambdaQueryWrapper<PtlCrawlerApi>()
+                    .eq(PtlCrawlerApi::getTemplateId, vo.getId()));
+            vo.setApi(apiList);
         });
-        return list;
+        return ptlInsAttributionTemplateVos;
     }
 
     @Override
@@ -51,10 +53,10 @@ public class PtlInsAttributionTemplateServiceImpl extends ServiceImpl<PtlInsAttr
         ptlInsAttributionTemplateSaveVo.forEach(saveVo -> {
             EsmInsCompany esmInsCompany = esmInsCompanyService.isExists(saveVo.getInsCompanyId());
             PtlInsAttributionTemplate ptlInsAttributionTemplate = new PtlInsAttributionTemplate(saveVo, esmInsCompany.getCnName());
-            baseMapper.insert(ptlInsAttributionTemplate);
+            baseMapper.insertOrUpdate(ptlInsAttributionTemplate);
 
             // 保存请求链接
-            if (PtlApiType.PYTHON.getCode() == saveVo.getApiType()) {
+            if (PtlApiType.PYTHON.getCode().equals(saveVo.getApiType())) {
                 //先删除配置
                 ptlCrawlerApiService.remove(new LambdaQueryWrapper<PtlCrawlerApi>()
                         .eq(PtlCrawlerApi::getTemplateId, ptlInsAttributionTemplate.getId()));
@@ -69,12 +71,17 @@ public class PtlInsAttributionTemplateServiceImpl extends ServiceImpl<PtlInsAttr
     }
 
     private void validate(PtlInsAttributionTemplateSaveVo ptlInsAttributionTemplateSaveVo){
-        LambdaQueryWrapper<PtlInsAttributionTemplate> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(PtlInsAttributionTemplate::getInsCompanyId, ptlInsAttributionTemplateSaveVo.getInsCompanyId())
+        LambdaQueryWrapper wrapper = new LambdaQueryWrapper<PtlInsAttributionTemplate>()
+                .eq(PtlInsAttributionTemplate::getInsCompanyId, ptlInsAttributionTemplateSaveVo.getInsCompanyId())
                 .eq(PtlInsAttributionTemplate::getApiType, ptlInsAttributionTemplateSaveVo.getApiType());
         List<PtlInsAttributionTemplate> ptlInsAttributionTemplates = baseMapper.selectList(wrapper);
         if(!ptlInsAttributionTemplates.isEmpty()){
-            throw new ValidateException("一个保险公司,一种api方式只能配置一种");
+            ptlInsAttributionTemplates.forEach(ptlInsAttributionTemplate -> {
+                if(!ptlInsAttributionTemplate.getId().equals(ptlInsAttributionTemplateSaveVo.getId()))
+                {
+                    throw new ValidateException("一个保险公司,一种api方式只能配置一种");
+                }
+            });
         }
     }
 }

+ 3 - 0
platform/src/main/resources/application.yml

@@ -53,6 +53,9 @@ tenant:
     - sys_role_data_scope
     - sys_role_data_scope_link
     - sys_area
+    - ptl_ins_attribution_template
+    - esm_ins_company
+    - ptl_crawler_api
 
   ignoreLoginNames:
 

+ 32 - 0
tenant/insurance/pom.xml

@@ -0,0 +1,32 @@
+<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/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.jzg</groupId>
+        <artifactId>tenant</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>insurance</artifactId>
+    <packaging>pom</packaging>
+    <name>insurance Maven Webapp</name>
+    <url>http://maven.apache.org</url>
+    <modules>
+        <module>yongcheng</module>
+    </modules>
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-webflux</artifactId>
+            <version>3.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.projectreactor.netty</groupId>
+            <artifactId>reactor-netty-core</artifactId>
+        </dependency>
+
+
+    </dependencies>
+    <build>
+        <finalName>insurance</finalName>
+    </build>
+</project>

+ 31 - 0
tenant/insurance/yongcheng/pom.xml

@@ -0,0 +1,31 @@
+<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/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.jzg</groupId>
+        <artifactId>insurance</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>yongcheng</artifactId>
+    <packaging>jar</packaging>
+    <name>yongcheng Maven Webapp</name>
+    <url>http://maven.apache.org</url>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>3.8.1</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.dataformat</groupId>
+            <artifactId>jackson-dataformat-xml</artifactId>
+            <version>2.9.0</version>
+        </dependency>
+
+    </dependencies>
+    <build>
+        <finalName>yongcheng</finalName>
+    </build>
+</project>

+ 19 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/YongchengApplication.java

@@ -0,0 +1,19 @@
+package com.jzg.yongcheng;
+
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+
+
+@SpringBootApplication
+@ComponentScan(basePackages = {"com.jzg.commons","com.jzg.yongcheng"})
+@MapperScan("com.jzg.commons.mapper")
+public class YongchengApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(YongchengApplication.class, args);
+    }
+
+}

+ 23 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/api/ApiComponents.java

@@ -0,0 +1,23 @@
+package com.jzg.yongcheng.api;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.jzg.yongcheng.utils.RequestApiComponents;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import reactor.core.publisher.Mono;
+
+@Component
+public class ApiComponents {
+
+    @Autowired
+    RequestApiComponents requestApiComponents;
+
+    /**
+     * 报价
+     * @return
+     */
+    public String quote() throws JsonProcessingException {
+        Mono<ApiComponents> post = requestApiComponents.post("", ApiComponents.class);
+        return post.block().toString();
+    }
+}

+ 66 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/aspect/AsyncLoggingAspect.java

@@ -0,0 +1,66 @@
+package com.jzg.yongcheng.aspect;
+
+import com.alibaba.fastjson.JSONObject;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Component;
+import reactor.core.publisher.Mono;
+
+import java.util.concurrent.CompletableFuture;
+
+@Aspect
+@Component
+public class AsyncLoggingAspect {
+
+    private static final Logger logger = LoggerFactory.getLogger(AsyncLoggingAspect.class);
+
+    @Pointcut("execution(* com.jzg.*.controller..*(..))")
+    public void controllerMethods() {}
+
+    @Around("controllerMethods()")
+    public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
+        // 记录开始时间
+        long startTime = System.currentTimeMillis();
+
+        // 执行目标方法并获取返回的 Mono
+        Object result = joinPoint.proceed();
+
+        // 检查返回的是否是 Mono 类型
+        if (result instanceof Mono) {
+            // 如果是 Mono,异步记录日志并在操作完成后处理结果
+            logAsync(joinPoint, (Mono<?>) result);
+        } else {
+            // 如果不是 Mono,直接记录同步日志
+            logAsync(joinPoint, Mono.just(result));
+        }
+
+        // 记录响应时间
+        long elapsedTime = System.currentTimeMillis() - startTime;
+        logger.info("Method execution time: {} ms", elapsedTime);
+
+        return result;
+    }
+
+    // 异步执行日志记录
+    @Async
+    public CompletableFuture<Void> logAsync(ProceedingJoinPoint joinPoint, Mono<?> resultMono) {
+        //完成时记录日志
+        Object[] args = joinPoint.getArgs();
+        StringBuilder params = new StringBuilder();
+        for (Object arg : args) {
+            params.append(arg).append(" ");
+        }
+        return resultMono.doOnTerminate(() -> {
+            logger.info("Request to method: {}", joinPoint.getSignature().toShortString());
+            logger.info("Request parameters: {}", params.toString().trim());
+            resultMono.subscribe(result -> {
+                logger.info("Method result: {}", JSONObject.toJSONString(result));
+            });
+        }).then().toFuture();
+    }
+}

+ 31 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/config/WebClientConfig.java

@@ -0,0 +1,31 @@
+package com.jzg.yongcheng.config;
+
+import io.netty.channel.ChannelOption;
+import io.netty.handler.timeout.ReadTimeoutHandler;
+import org.springframework.context.annotation.Bean;
+import org.springframework.http.client.reactive.ReactorClientHttpConnector;
+import org.springframework.web.reactive.function.client.WebClient;
+import reactor.netty.http.client.HttpClient;
+import reactor.netty.resources.ConnectionProvider;
+import java.util.concurrent.TimeUnit;
+
+
+public class WebClientConfig {
+    @Bean
+    public WebClient webClient() {
+        // 配置连接池
+        ConnectionProvider connectionProvider = ConnectionProvider.create(
+                "myConnectionPool",
+                50
+        );
+
+        HttpClient httpClient = HttpClient.create(connectionProvider)
+                .tcpConfiguration(tcpClient ->
+                        tcpClient.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000)  // 设置连接超时时间
+                                .doOnConnected(conn -> conn.addHandlerLast(new ReadTimeoutHandler(5, TimeUnit.SECONDS)))  // 设置读取超时
+                );
+        return WebClient.builder()
+                .clientConnector(new ReactorClientHttpConnector(httpClient))
+                .build();
+    }
+}

+ 40 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/controller/QuoteController.java

@@ -0,0 +1,40 @@
+package com.jzg.yongcheng.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.jzg.commons.core.page.HttpResult;
+import com.jzg.yongcheng.entity.Accident;
+import com.jzg.yongcheng.entity.AccidentResponse;
+import com.jzg.yongcheng.entity.AccidentalDrivingQueryVo;
+import com.jzg.yongcheng.entity.YcConfigureParameters;
+import com.jzg.yongcheng.utils.RequestApiComponents;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Schedulers;
+
+import java.net.http.HttpResponse;
+
+@Tag(name="永城保险公司接口")
+@RestController
+@RequestMapping("/yc")
+public class QuoteController {
+
+    @Autowired
+    RequestApiComponents requestApiComponents;
+
+
+
+    //demo  测试
+    @PostMapping("/jyx")
+    public Mono<HttpResult<AccidentResponse>> quote(@RequestBody AccidentalDrivingQueryVo accidentalDrivingVo) throws JsonProcessingException {
+        String configStr = "{\"agentCode\":\"14B700P00020\",\"agentNme\":\"太原天勤保险代理有限公司\",\"agentType\":\"191010\",\"cBsnsTyp\":\"19002\",\"cChaType\":\"191010\",\"cCntrNme\":\"天勤\",\"cOprcde\":\"21489962X\",\"conferCode\":\"14B700P0002001\",\"custNature\":\"192099\",\"dptCde\":\"14B7\",\"operatorCode\":\"21489962X\",\"password\":\"tianqin2023@\",\"qlftNo\":\"202930000000800\",\"salesmanNo\":\"114000213\",\"userName\":\"tianqin\"}";
+        YcConfigureParameters ycConfigureParameters = JSONObject.parseObject(configStr, YcConfigureParameters.class);
+        Accident accident = Accident.buildPayParam(accidentalDrivingVo, ycConfigureParameters, null);
+        return Mono.fromCallable(() -> HttpResult.ok(requestApiComponents.post(accident, AccidentResponse.class)
+                .subscribeOn(Schedulers.boundedElastic()).block()));
+    }
+
+
+}

+ 71 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/Accident.java

@@ -0,0 +1,71 @@
+package com.jzg.yongcheng.entity;
+
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import jakarta.validation.Valid;
+import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
+
+@Data
+@JacksonXmlRootElement(localName = "tns:newQueryYwCvrg")
+public class Accident {
+
+    @JacksonXmlProperty(isAttribute = false, localName = "request")
+    private RequestLabel requestLabel;
+
+
+    @Data
+    public static class RequestLabel {
+        /**
+         * authorityData
+         */
+        @Valid
+        @JacksonXmlProperty(isAttribute = false, localName = "authorityData")
+        private AuthorityDataXml authorityData;
+
+
+        /**
+         * 机构号
+         * 两位,二级机构
+         */
+        @JacksonXmlProperty(localName = "deptcde")
+        private String deptcde;
+
+        /**
+         * 方案号
+         * 非必填
+         */
+        @JacksonXmlProperty(localName = "schemeNo")
+        private String schemeNo;
+
+        /**
+         * 座位数
+         */
+        @JacksonXmlProperty(localName = "seatsNum")
+        private String seatsNum;
+
+
+    }
+
+    /**
+     * 构造 请求参数
+     *
+     * @author: lig
+     * @date: 2023-02-15
+     */
+    public static Accident buildPayParam(AccidentalDrivingQueryVo accidentalDrivingVo, YcConfigureParameters ycConfigureParameters, String schemeNo) {
+        Accident m = new Accident();
+        RequestLabel r = new RequestLabel();
+        r.setAuthorityData(ycConfigureParameters.gainAuthorityDataXml());
+//        r.setDeptcde(ycConfigureParameters.getDptCde().substring(0, 2));
+        r.setDeptcde("14");
+        r.setSeatsNum("5");
+        if (StringUtils.isNotEmpty(schemeNo)) {
+            r.setSchemeNo(schemeNo);
+        }
+        m.setRequestLabel(r);
+        return m;
+    }
+
+
+}

+ 37 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/AccidentResponse.java

@@ -0,0 +1,37 @@
+package com.jzg.yongcheng.entity;
+
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import lombok.Data;
+
+@Data
+@JacksonXmlRootElement(localName = "packet")
+public class AccidentResponse {
+
+
+    @JacksonXmlProperty(localName = "head")
+    private Head head;
+    /**
+     *
+     */
+    @JacksonXmlProperty(localName = "responseYwCvrg")
+    private ResponseYwCvrg responseYwCvrg;
+
+
+    @Data
+    public static class Head {
+        @JacksonXmlProperty(localName = "responseCompleteMessageStatus")
+        private ResponseCompleteMessageStatus responseCompleteMessageStatus;
+    }
+
+    @Data
+    public static class ResponseCompleteMessageStatus {
+        @JacksonXmlProperty(localName = "messageStatusCode")
+        private String messageStatusCode;
+        @JacksonXmlProperty(localName = "messageStatusDescription")
+        private String messageStatusDescription;
+
+    }
+
+
+}

+ 38 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/AccidentalDrivingQueryVo.java

@@ -0,0 +1,38 @@
+package com.jzg.yongcheng.entity;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class AccidentalDrivingQueryVo implements Serializable {
+
+
+    private static final long serialVersionUID = 6098565535096545432L;
+
+    @NotNull(message = "保险公司编号必填")
+    @NotEmpty(message = "保险公司编号不能为空")
+    @Schema(description = "保险公司编号")
+    private String companyCode;
+
+    @Schema(description = "座位数")
+    private int seatNum;
+
+    @NotNull(message = "协议ID必填")
+    @Schema(description = "协议ID")
+    private String agreementId;
+
+    @Schema(description = "方案号")
+    private String code;
+
+    @Schema(description = "使用性质")
+    private String cUsageCde;
+
+    @Schema(description = "投保类型")
+    private String cProdNo;
+
+
+}

+ 22 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/AuthorityDataXml.java

@@ -0,0 +1,22 @@
+package com.jzg.yongcheng.entity;
+
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+
+@Data
+public class AuthorityDataXml {
+
+
+    //用户名   永诚所提供的接口权限账号
+    @JacksonXmlProperty(localName = "userName")
+    @Value("${yc.api.userName}")
+    private String userName;
+
+    //密码    永诚所提供的接口权限密码
+    @Value("${yc.api.password}")
+    @JacksonXmlProperty(localName = "password")
+    private String password;
+
+
+}

+ 78 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/ResponseYwCvrg.java

@@ -0,0 +1,78 @@
+package com.jzg.yongcheng.entity;
+
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ResponseYwCvrg {
+
+
+    @JacksonXmlElementWrapper(useWrapping = false)
+    @JacksonXmlProperty(localName = "cvrgList")
+    private List<CvrgList> cvrgList;
+
+
+    @Data
+    public static class CvrgList {
+
+        /**
+         * 座位数
+         */
+        @JacksonXmlProperty(localName = "cauthorizedSeat")
+        private String cauthorizedSeat;
+
+        /**
+         * 险别代码
+         */
+        @JacksonXmlProperty(localName = "cInsuranceCode")
+        private String cInsuranceCode;
+
+        /**
+         * 险别名称
+         */
+        @JacksonXmlProperty(localName = "cInsuranceLiability")
+        private String cInsuranceLiability;
+
+        /**
+         * 方案名称
+         */
+        @JacksonXmlProperty(localName = "cInsuranceType")
+        private String cInsuranceType;
+
+        /**
+         * 方案号
+         */
+        @JacksonXmlProperty(localName = "cInsuranceTypeCode")
+        private String cInsuranceTypeCode;
+
+        /**
+         * 每车保额
+         */
+        @JacksonXmlProperty(localName = "nInsuranceAmountCar")
+        private String nInsuranceAmountCar;
+
+        /**
+         * 每座保额
+         */
+        @JacksonXmlProperty(localName = "nInsuranceAmountSeat")
+        private String nInsuranceAmountSeat;
+
+        /**
+         * 责任保费
+         */
+        @JacksonXmlProperty(localName = "nLiabilityPremium")
+        private String nLiabilityPremium;
+
+        /**
+         * 限购份数
+         */
+        @JacksonXmlProperty(localName = "nPurchaseLimitsNum")
+        private String nPurchaseLimitsNum;
+
+    }
+
+
+}

+ 77 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/entity/YcConfigureParameters.java

@@ -0,0 +1,77 @@
+package com.jzg.yongcheng.entity;
+
+
+import lombok.Data;
+
+@Data
+public class YcConfigureParameters {
+
+    //机构代码(dptCde)
+    private String dptCde;
+    //渠道编码(agentCode)
+    private String agentCode;
+    //协议编码(conferCode)
+    private String conferCode;
+    //渠道分类(agentType)
+    private String agentType;
+    //代理人名称(agentNme)
+    private String agentNme;
+    //代理人资格证号(qlftNo)
+    private String qlftNo;
+    //录入人(operatorCode)
+    private String operatorCode;
+    //业务员代码(salesmanNo)
+    private String salesmanNo;
+    //新业务来源(CChaType)
+    private String CChaType;
+    //客户性质(custNature)
+    private String custNature;
+    //操作人员代码(cOprcde)
+    private String cOprcde;
+    //业务来源(cBsnsTyp)
+    private String cBsnsTyp;
+    //用户名
+    private String userName;
+    //密码
+    private String password;
+    //投保联系人  ≤5个字
+    private String cCntrNme;
+
+
+
+    /**
+     * 获取渠道
+     */
+//    public Agent gainAgent() {
+//        Agent agent = new Agent();
+//        agent.setAgentCode(agentCode);
+//        agent.setConferCode(conferCode);
+//        agent.setAgentType(agentType);
+//        agent.setAgentNme(agentNme);
+//        agent.setQlftNo(qlftNo);
+//        agent.setCustNature(custNature);
+//        agent.setAgentProfId(qlftNo);
+//        agent.setSubCoNo(conferCode);
+//        return agent;
+//    }
+
+    /**
+     * @description: 获取验证数据
+     * @author: lig
+     * @date: 2023年02月07日 0007
+     */
+    public AuthorityDataXml gainAuthorityDataXml() {
+        AuthorityDataXml authorityDataXml = new AuthorityDataXml();
+        authorityDataXml.setUserName(getUserName());
+        authorityDataXml.setPassword(getPassword());
+        return authorityDataXml;
+    }
+    public AuthorityDataXml gainAuthorityDataXml(YcConfigureParameters ycConfigureParamete) {
+        AuthorityDataXml authorityDataXml = new AuthorityDataXml();
+        authorityDataXml.setUserName(ycConfigureParamete.getUserName());
+        authorityDataXml.setPassword(ycConfigureParamete.getPassword());
+        return authorityDataXml;
+    }
+
+
+}

+ 103 - 0
tenant/insurance/yongcheng/src/main/java/com/jzg/yongcheng/utils/RequestApiComponents.java

@@ -0,0 +1,103 @@
+package com.jzg.yongcheng.utils;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.*;
+import com.fasterxml.jackson.dataformat.xml.XmlMapper;
+import com.jzg.commons.exception.SystemException;
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.stereotype.Component;
+import org.springframework.web.reactive.function.client.WebClient;
+import reactor.core.publisher.Mono;
+
+@Component
+public class RequestApiComponents {
+
+    private WebClient webClient;
+
+    @Autowired
+    private WebClient.Builder webClientBuilder;
+
+    private ObjectMapper gainXmlMapper() {
+        ObjectMapper xmlMapper = new XmlMapper();
+        xmlMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+        xmlMapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
+        xmlMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+        xmlMapper.setPropertyNamingStrategy(PropertyNamingStrategy.UPPER_CAMEL_CASE);
+        xmlMapper.enable(MapperFeature.USE_STD_BEAN_NAMING);
+        xmlMapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
+        return xmlMapper;
+    }
+
+    public <Q, S> Mono<S> post(Q q, Class<S> tClass) throws JsonProcessingException {
+        String url = "http://39.98.214.159/yongcheng/NewQueryYwCvrgWebService";
+        // 设置请求头
+        HttpHeaders httpHeaders = new HttpHeaders();
+        httpHeaders.set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36");
+        httpHeaders.setContentType(MediaType.parseMediaType("text/xml;charset=UTF-8"));
+        webClient = webClientBuilder.baseUrl(url)
+                .defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_XML_VALUE)
+                .defaultHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36")
+                .build();
+
+        // 构造 SOAP XML 请求体
+        String xmlString = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tns=\"http://newWS.front" +
+                ".app.echannel.ebiz.alltrust.com/\">";
+        xmlString += "<soapenv:Body>";
+        xmlString += gainXmlMapper().writeValueAsString(q); // 将请求对象转换为 XML 字符串
+        xmlString += "</soapenv:Body>\n" +
+                "</soapenv:Envelope>";
+
+        // 使用 WebClient 发起请求
+        return webClient
+                .post()
+                .bodyValue(xmlString)  // 设置请求体
+                .retrieve()  // 发起请求
+                .bodyToMono(String.class)  // 将响应转换为 Mono<String>
+                .map(responseBody -> {
+                    // 处理响应
+                    String responseStringMsg = StringEscapeUtils.unescapeXml(responseBody);
+                    String cleanStr = cleanResponseStr(responseStringMsg);
+
+                    if (!cleanStr.contains("<")) {
+                        return (S) cleanStr;
+                    }
+
+                    // 将响应的 XML 字符串反序列化成目标对象
+                    try {
+                        S bean = gainXmlMapper().readValue(cleanStr, tClass);
+                        if (bean == null) {
+                            throw new SystemException("请求失败");
+                        }
+                        return bean;
+                    } catch (JsonProcessingException e) {
+                        throw new SystemException("解析响应失败", e.getMessage());
+                    }
+                });
+    }
+
+
+    public static String cleanResponseStr(String responseData) {
+        String rStr = "";
+        String str = "";
+        if (responseData.indexOf("<response>") > 0) {
+            rStr = responseData.substring(responseData.indexOf("<response>") + 10, responseData.indexOf("</response>"));
+        } else if (responseData.indexOf("<return>") > 0) {
+            rStr = responseData.substring(responseData.indexOf("<return>") + 8, responseData.indexOf("</return>"));
+        }
+        if (StringUtils.isEmpty(rStr)) {
+            rStr = responseData.substring(responseData.indexOf("<response>") + 10, responseData.indexOf("</response>"));
+        }
+        String lRStr = rStr.replaceAll("&lt;", "<");
+        str = lRStr.replaceAll("&gt;", ">");
+
+        return str.trim();
+    }
+
+
+
+}

+ 34 - 0
tenant/insurance/yongcheng/src/main/resources/application.yml

@@ -0,0 +1,34 @@
+server:
+  port: 9100
+spring:
+  main:
+    allow-bean-definition-overriding: true
+  redis:
+    redisson:
+      address: redis://192.168.0.250:6379
+      password: 123456
+      database: 0
+
+  datasource:
+      url: jdbc:mysql://39.98.239.48:3366/platform?serverTimezone=Asia/Shanghai&allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true
+      username: root
+      password: '@RqGHG#KZ*C9ytkQ'
+      driverClassName: com.mysql.cj.jdbc.Driver
+
+mybatis-plus:
+  mapper-locations: classpath*:/mapper/*Mapper.xml
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+config:
+  sso: 0
+
+
+minio:
+  url: http://test-api.baoxianzhanggui.com
+  access-key: N8hf40VDM3Uf2xJ5vnvE
+  secret-key: CDe1raroqIMo5R2KhHl6ZQbJOhdq0mrtCI78g3vq
+  bucket-name: jzg
+
+logging:
+  config: classpath:logback-spring.xml
+

+ 35 - 0
tenant/insurance/yongcheng/src/main/resources/logback-spring.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <!-- 定义 Graylog GELF appender -->
+<!--    <appender name="GELF" class="de.siegmar.logbackgelf.GelfUdpAppender">-->
+<!--        &lt;!&ndash; Graylog server 的主机名或 IP 地址 &ndash;&gt;-->
+<!--        <graylogHost>192.168.0.250</graylogHost>-->
+<!--        &lt;!&ndash; Graylog 服务器端口,通常为 12201(UDP)或 12202(TCP) &ndash;&gt;-->
+<!--        <graylogPort>12201</graylogPort>-->
+<!--        &lt;!&ndash; 可选项:指定协议,默认使用 UDP &ndash;&gt;-->
+<!--        <transport>UDP</transport>-->
+<!--        &lt;!&ndash; 发送日志时是否压缩 &ndash;&gt;-->
+<!--        <compress>true</compress>-->
+<!--        &lt;!&ndash; 是否在 GELF 消息中加入时间戳 &ndash;&gt;-->
+<!--        <includeTimestamp>true</includeTimestamp>-->
+<!--        &lt;!&ndash; 日志内容最大字节数 &ndash;&gt;-->
+<!--        <maxMessageSize>32768</maxMessageSize>-->
+<!--        &lt;!&ndash; 设置自定义字段 &ndash;&gt;-->
+<!--        <additionalFields>-->
+<!--        </additionalFields>-->
+<!--    </appender>-->
+
+    <!-- 控制台输出日志,非必须,可以根据需要选择性启用 -->
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <layout class="ch.qos.logback.classic.layout.TTLLLayout">
+            <Pattern>%d{yyyy-MM-dd HH:mm:ss} - %msg%n</Pattern>
+        </layout>
+    </appender>
+
+    <!-- 输出到控制台 -->
+    <root level="INFO">
+<!--        <appender-ref ref="GELF"/>-->
+        <appender-ref ref="STDOUT"/>
+    </root>
+
+</configuration>

+ 1 - 0
tenant/pom.xml

@@ -13,6 +13,7 @@
     <modules>
         <module>organization</module>
         <module>openfeign</module>
+        <module>insurance</module>
     </modules>
     <dependencies>
         <dependency>