功能:在保险、规则、交易、积分和短信模块中实现初始功能和基础组件。

This commit is contained in:
abcv7
2026-03-03 04:04:22 +08:00
parent e050eb3317
commit e156d625bf
1999 changed files with 146080 additions and 63 deletions
@@ -0,0 +1,25 @@
<?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>sfbx-insurance</artifactId>
<groupId>com.itheima.sfbx</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>insurance-interface</artifactId>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.itheima.sfbx</groupId>
<artifactId>framework-feign</artifactId>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,13 @@
package com.itheima.sfbx.instance.config;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;
/**
* @ClassName InsuranceFeignConfig.java
* @Description feign的最优化配置
*/
@EnableFeignClients(basePackages = "com.itheima.sfbx.instance.feign")
@Configuration
public class InsuranceFeignConfig {
}
@@ -0,0 +1,47 @@
package com.itheima.sfbx.instance.feign;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO;
import com.itheima.sfbx.framework.commons.dto.log.LogBusinessVO;
import com.itheima.sfbx.instance.hystrix.AnalysisBusinessHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import java.util.List;
/**
* AnalysisBusinessFeign
*
* @author: wgl
* @describe: 统计分析:业务数据统计分析feign服务
* @date: 2022/12/28 10:10
*/
@FeignClient(value = "insurance-mgt",fallback = AnalysisBusinessHystrix.class)
public interface AnalysisBusinessFeign {
/**
* 统计昨日保单数量DTO
* @return
*/
@PutMapping("analysis-feign/analysis-insurance")
AnalysisCustomerInsuranceDTO countCustomerInstance();
/**
* 统计:投保人性别统计
* @return
*/
@PutMapping("analysis-feign/analysis-warranty-sex")
AnalysisCustomerSexDTO countWarrantySex();
/**
* 投保统计:投保分类类型统计及投保数量统计
* @return
*/
@PutMapping("analysis-feign/analysis-customer-insurance-type")
List<AnalysisInsuranceTypeDTO> countCustomerInstanceType();
}
@@ -0,0 +1,26 @@
package com.itheima.sfbx.instance.feign;
import com.itheima.sfbx.framework.commons.dto.report.CategoryReportVO;
import com.itheima.sfbx.instance.hystrix.AnalysisBusinessHystrix;
import com.itheima.sfbx.instance.hystrix.CategoryHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* @Description:保险分类响应接口
*/
@FeignClient(value = "insurance-mgt",fallback = CategoryHystrix.class)
public interface CategoryFeign {
/***
* @description 多条件查询保险分类列表
* @param categoryVO 保险分类VO对象
* @return List<CategoryVO>
*/
@PostMapping("category-feign/list")
public List<CategoryReportVO> categoryList(@RequestBody CategoryReportVO categoryVO);
}
@@ -0,0 +1,35 @@
package com.itheima.sfbx.instance.feign;
import com.itheima.sfbx.framework.commons.dto.analysis.InsureCategoryDTO;
import com.itheima.sfbx.framework.commons.dto.analysis.SaleReportDTO;
import com.itheima.sfbx.instance.hystrix.SaleReportHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import java.util.List;
/**
* @ClassName SaleReportFeign.java
* @Description 日投保明细服务接口
*/
@FeignClient(value = "insurance-mgt",fallback = SaleReportHystrix.class)
public interface SaleReportFeign {
/**
* 计划任务:日投保额度明细
* @param reportTime 统计时间
* @return 是否执行成功
*/
@PostMapping("sale-report-feign/do-insure-detail-day/{reportTime}")
SaleReportDTO doInsureDetailDay(@PathVariable("reportTime")String reportTime);
/**
* 计划任务:统计日投保分类明细
* @param reportTime 统计时间
* @return 是否执行成功
*/
@PostMapping("sale-report-feign/do-insure-category/{reportTime}")
List<InsureCategoryDTO> doInsureCategory(@PathVariable("reportTime")String reportTime);
}
@@ -0,0 +1,46 @@
package com.itheima.sfbx.instance.feign;
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO;
import com.itheima.sfbx.instance.hystrix.WarrantyHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import java.util.List;
/**
* WarrantyFeign
*/
@FeignClient(value = "insurance-mgt",fallback = WarrantyHystrix.class)
public interface WarrantyFeign {
/**
* 系统监听:清理合同保单
* @return
*/
@PostMapping("warranty-feign/clean-warranty/{warrantyNo}")
public Boolean cleanWarranty(@PathVariable("warrantyNo") String warrantyNo);
/**
* 计划任务:周期代扣
* @return
*/
@PostMapping("warranty-feign/periodic-pay")
public Boolean periodicPay();
/**
* 系统监听:同步合同支付结果
* @param orderNo WarrantyOrderVO的订单编号
* @return
*/
@PostMapping("warranty-feign/sync-payment/{orderNo}/{tradeState}")
public Boolean syncPayment(@PathVariable("orderNo") String orderNo,@PathVariable("tradeState") String tradeState);
}
@@ -0,0 +1,37 @@
package com.itheima.sfbx.instance.hystrix;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO;
import com.itheima.sfbx.framework.commons.dto.log.LogBusinessVO;
import com.itheima.sfbx.instance.feign.AnalysisBusinessFeign;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* AnalysisBusinessHystrix
*
* @author: wgl
* @describe: 业务部分统计分析
* @date: 2022/12/28 10:10
*/
@Component
public class AnalysisBusinessHystrix implements AnalysisBusinessFeign {
@Override
public AnalysisCustomerInsuranceDTO countCustomerInstance() {
return null;
}
@Override
public AnalysisCustomerSexDTO countWarrantySex() {
return null;
}
@Override
public List<AnalysisInsuranceTypeDTO> countCustomerInstanceType() {
return null;
}
}
@@ -0,0 +1,21 @@
package com.itheima.sfbx.instance.hystrix;
import com.itheima.sfbx.framework.commons.dto.report.CategoryReportVO;
import com.itheima.sfbx.instance.feign.CategoryFeign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* @Description:保险分类响应接口
*/
public class CategoryHystrix implements CategoryFeign {
@Override
public List<CategoryReportVO> categoryList(CategoryReportVO categoryVO) {
return null;
}
}
@@ -0,0 +1,24 @@
package com.itheima.sfbx.instance.hystrix;
import com.itheima.sfbx.framework.commons.dto.analysis.InsureCategoryDTO;
import com.itheima.sfbx.framework.commons.dto.analysis.SaleReportDTO;
import com.itheima.sfbx.instance.feign.SaleReportFeign;
import java.util.List;
/**
* @ClassName SaleReportFeignHystrix.java
* @Description TODO
*/
public class SaleReportHystrix implements SaleReportFeign {
@Override
public SaleReportDTO doInsureDetailDay(String reportTime) {
return null;
}
@Override
public List<InsureCategoryDTO> doInsureCategory(String reportTime) {
return null;
}
}
@@ -0,0 +1,36 @@
package com.itheima.sfbx.instance.hystrix;
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO;
import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO;
import com.itheima.sfbx.instance.feign.AnalysisBusinessFeign;
import com.itheima.sfbx.instance.feign.WarrantyFeign;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* WarrantyFeign
*/
@Component
public class WarrantyHystrix implements WarrantyFeign {
@Override
public Boolean cleanWarranty(String warrantyNo) {
return null;
}
@Override
public Boolean periodicPay() {
return null;
}
@Override
public Boolean syncPayment(String orderNo, String tradeState) {
return null;
}
}