mirror of
https://github.com/abcv7/sfbx-cloud.git
synced 2026-08-16 19:49:49 +00:00
first commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
FROM openjdk:11-jdk
|
||||
LABEL maintainer="研究院研发组 <research@itcast.cn>"
|
||||
|
||||
# 时区修改为东八区
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
WORKDIR /insurance-app
|
||||
ARG PACKAGE_PATH=./target/insurance-app.jar
|
||||
ADD ${PACKAGE_PATH:-./} insurance-app.jar
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENV JAVA_OPTS="\
|
||||
-server \
|
||||
-Xms256m \
|
||||
-Xmx512m \
|
||||
-XX:MetaspaceSize=256m \
|
||||
-XX:MaxMetaspaceSize=512m"
|
||||
ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar $JAVA_OPTS insurance-app.jar"]
|
||||
@@ -0,0 +1,89 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>sfbx-insurance</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!--保险:小程序管理web-->
|
||||
<artifactId>insurance-app</artifactId>
|
||||
<name>insurance-app</name>
|
||||
<!-- FIXME change it to the project's website -->
|
||||
<url>http://www.example.com</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-task-executor</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-knife4j-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>insurance-service</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.yaml</include>
|
||||
<include>**/*.txt</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<finalName>insurance-app</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.itheima.sfbx.insurance;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 小程序端对于保险的启动类
|
||||
*/
|
||||
@SpringBootApplication(scanBasePackages = "com.itheima.sfbx")
|
||||
public class InsuranceAppStart {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(InsuranceAppStart.class);
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.itheima.sfbx.insurance.binding;
|
||||
|
||||
import com.itheima.sfbx.framework.rabbitmq.source.FileSource;
|
||||
import com.itheima.sfbx.framework.rabbitmq.source.WarrantySource;
|
||||
import org.springframework.cloud.stream.annotation.EnableBinding;
|
||||
|
||||
/**
|
||||
* @ClassName Binding.java
|
||||
* @Description 绑定文件发送者声明
|
||||
*/
|
||||
@EnableBinding({WarrantySource.class})
|
||||
public class SourceBinding {
|
||||
}
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.dto.security.UserVO;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.framework.commons.utils.SubjectContent;
|
||||
import com.itheima.sfbx.insurance.dto.*;
|
||||
import com.itheima.sfbx.insurance.service.IBrowsingHistoryService;
|
||||
import com.itheima.sfbx.insurance.service.ISearchRecordService;
|
||||
import com.itheima.sfbx.insurance.service.ISelfSelectionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName AppSelfSelectionController.java
|
||||
* @Description 自选
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "自选")
|
||||
@RestController
|
||||
@RequestMapping("app-self-selection")
|
||||
public class AppSelfSelectionController {
|
||||
|
||||
@Autowired
|
||||
private ISelfSelectionService selfSelectionService;
|
||||
|
||||
@Autowired
|
||||
private IBrowsingHistoryService browsingHistoryService;
|
||||
|
||||
@Autowired
|
||||
private ISearchRecordService searchRecordService;
|
||||
|
||||
|
||||
/***
|
||||
* @description 添加自选
|
||||
* @param selfSelectionVO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("selection-insure")
|
||||
@ApiOperation(value = "添加自选保险",notes = "添加自选保险")
|
||||
public ResponseResult<SelfSelectionVO> selfSelectionInsuer(@RequestBody SelfSelectionVO selfSelectionVO){
|
||||
SelfSelectionVO res = selfSelectionService.save(selfSelectionVO);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 删除自选
|
||||
* @param selfSelectionVO
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("selection-insure")
|
||||
@ApiOperation(value = "删除自选保险",notes = "删除自选保险")
|
||||
public ResponseResult<Boolean> delSelectionInsuer(@RequestBody SelfSelectionVO selfSelectionVO){
|
||||
Boolean flag = selfSelectionService.delete(selfSelectionVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 我的自选
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("find-self-selection-insure")
|
||||
@ApiOperation(value = "我的自选",notes = "我的自选")
|
||||
public ResponseResult<List<InsuranceTypeInfoVO>> findSelfSelectionInsure(){
|
||||
List<InsuranceTypeInfoVO> res = selfSelectionService.findMySelection(SubjectContent.getUserVO());
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***
|
||||
* @description 最近浏览
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("find-history")
|
||||
@ApiOperation(value = "最近的浏览",notes = "查询最近的浏览记录")
|
||||
public ResponseResult<List<InsuranceVO>> findMyHistory(){
|
||||
UserVO userVO = SubjectContent.getUserVO();
|
||||
List<InsuranceVO> res = searchRecordService.findMyHistory(userVO);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant;
|
||||
import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.CombinationInsuranceVO;
|
||||
import com.itheima.sfbx.insurance.dto.CombinationVO;
|
||||
import com.itheima.sfbx.insurance.dto.CombinationDetailVO;
|
||||
import com.itheima.sfbx.insurance.dto.InsuranceVO;
|
||||
import com.itheima.sfbx.insurance.service.ICombinationInsuranceService;
|
||||
import com.itheima.sfbx.insurance.service.ICombinationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName IndexController.java
|
||||
* @Description 保险方案详情
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险方案详情")
|
||||
@RestController
|
||||
@RequestMapping("combination-info")
|
||||
public class CombinationInfoController {
|
||||
|
||||
@Autowired
|
||||
private ICombinationInsuranceService combinationService;
|
||||
|
||||
/**
|
||||
* 首页保险方案查询
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("find-combination-index")
|
||||
@ApiOperation(value = "首页保险方案",notes = "首页保险方案")
|
||||
public ResponseResult<Page<CombinationInsuranceVO>> findCombinationIndex() {
|
||||
return ResponseResultBuild.successBuild(combinationService.findPage(CombinationInsuranceVO.builder().dataState(SuperConstant.DATA_STATE_0).build(),0,5));
|
||||
}
|
||||
|
||||
/**
|
||||
*保险方案详情页-->tab_combination-->tab_combination_insurance-->tab_insurance-->tab_insurance_plan-->tab_plan_safeguard
|
||||
*/
|
||||
@PostMapping("find-combination/{id}")
|
||||
@ApiOperation(value = "保险方案详情",notes = "保险方案详情")
|
||||
@ApiImplicitParam(name = "id",value = "保险方案id",required = true,dataType = "String")
|
||||
public ResponseResult<CombinationInsuranceVO> findCombination(@PathVariable("id") String id) {
|
||||
return ResponseResultBuild.successBuild(combinationService.findById(id));
|
||||
}
|
||||
}
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant;
|
||||
import com.itheima.sfbx.framework.commons.constant.category.CategoryConstant;
|
||||
import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant;
|
||||
import com.itheima.sfbx.framework.commons.dto.basic.TreeVO;
|
||||
import com.itheima.sfbx.framework.commons.utils.EmptyUtil;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.constant.InsuranceConstant;
|
||||
import com.itheima.sfbx.insurance.dto.BannerVO;
|
||||
import com.itheima.sfbx.insurance.dto.CategoryVO;
|
||||
import com.itheima.sfbx.insurance.dto.CombinationVO;
|
||||
import com.itheima.sfbx.insurance.dto.InsuranceVO;
|
||||
import com.itheima.sfbx.insurance.service.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName IndexController.java
|
||||
* @Description 销售平台首页
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "销售平台首页")
|
||||
@RestController
|
||||
@RequestMapping("index")
|
||||
public class IndexController {
|
||||
|
||||
@Autowired
|
||||
private ICategoryService categoryService;
|
||||
|
||||
@Autowired
|
||||
private IInsuranceService insuranceService;
|
||||
|
||||
@Autowired
|
||||
private IInsurancePlanService iInsurancePlanService;
|
||||
|
||||
@Autowired
|
||||
private ICombinationService combinationService;
|
||||
|
||||
@Autowired
|
||||
IBannerService bannerService;
|
||||
|
||||
/**
|
||||
* @Description 分类树形
|
||||
* @param categoryVO 分类对象
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("tree")
|
||||
@ApiOperation(value = "分类树形",notes = "分类树形")
|
||||
@ApiImplicitParam(name = "categoryVO",value = "分类对象",required = false,dataType = "CategoryVO")
|
||||
@ApiOperationSupport(includeParameters = {"categoryVO.parentCategoryNo","categoryVO.categoryType","categoryVO.checkedCategoryNos"})
|
||||
public ResponseResult<TreeVO> categoryTreeVO(@RequestBody CategoryVO categoryVO) {
|
||||
TreeVO treeVO = categoryService.categoryTreeVO(categoryVO.getParentCategoryNo(), categoryVO.getCategoryType(),categoryVO.getCheckedCategoryNos());
|
||||
return ResponseResultBuild.successBuild(treeVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的推荐分类
|
||||
*
|
||||
* @return List<CategoryVO>
|
||||
* @description 获取首页分类-->tab_category-->category_type:1
|
||||
*/
|
||||
@ApiOperation(value = "产品分类", notes = "产品分类")
|
||||
@PostMapping("/find-index-category-product")
|
||||
public ResponseResult<List<CategoryVO>> findIndexCategory() {
|
||||
List<Long> nodeFloors = Lists.newArrayList(2L);
|
||||
CategoryVO categoryVO = CategoryVO.builder().
|
||||
categoryType(CategoryConstant.PRODUCT_TYPE).
|
||||
dataState(CategoryConstant.DATA_STATE_0).
|
||||
showIndex(CategoryConstant.SHOW_INDEX_STATE_0).
|
||||
build();
|
||||
categoryVO.setNodeFloors(nodeFloors);
|
||||
return ResponseResultBuild.successBuild(categoryService.findList(categoryVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 热点保险推荐-找到每个分类下售卖的最好的一个保险
|
||||
* 热点保险推荐-->tab_insurance-->show_index:0并且是上架且有效状态--->附件调用fegin-->file
|
||||
* @return: Page<InsureVO>
|
||||
*/
|
||||
@PostMapping("find-hotspot-insurePage")
|
||||
@ApiOperation(value = "热点保险推荐", notes = "APP首页热点保险推荐分页")
|
||||
public ResponseResult<List<InsuranceVO>> findHotspotInsurePage() {
|
||||
InsuranceVO insuranceVO = InsuranceVO.builder().
|
||||
showIndex(InsureConstant.SHOW_INDEX_STATE_0).
|
||||
dataState(InsureConstant.DATA_STATE_0).
|
||||
build();
|
||||
Page<InsuranceVO> page = insuranceService.findPage(insuranceVO, 0, 10);
|
||||
return ResponseResultBuild.successBuild(page.getRecords());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的产品分类
|
||||
* 产品分类-->tab_category-->category_type:1
|
||||
*/
|
||||
@ApiOperation(value = "推荐分类", notes = "推荐分类")
|
||||
@PostMapping("/find-index-category-recommend")
|
||||
public ResponseResult<List<CategoryVO>> findCategoryRecommend() {
|
||||
CategoryVO categoryVO = CategoryVO.builder().
|
||||
categoryType(CategoryConstant.RECOMMEND_TYPE).
|
||||
dataState(CategoryConstant.DATA_STATE_0).
|
||||
showIndex(CategoryConstant.SHOW_INDEX_STATE_0).
|
||||
build();
|
||||
return ResponseResultBuild.successBuild(categoryService.findList(categoryVO));
|
||||
}
|
||||
|
||||
//推荐保险列表-->tab_insurance[tab_insurance_plan价格排序]-->optimization升序再按创建时间--->附件调用fegin-->file
|
||||
|
||||
/**
|
||||
* @description 推荐保险列表-
|
||||
* 推荐保险列表-->tab_insurance[tab_insurance_plan价格排序]-->optimization升序再按创建时间--->附件调用fegin-->file
|
||||
* @return: Page<InsureVO>
|
||||
*/
|
||||
@PostMapping("recommend-insure-list")
|
||||
@ApiOperation(value = "推荐保险列表", notes = "推荐保险列表")
|
||||
@ApiImplicitParam(name = "recommendCategoryNo", value = "保险类型", required = false, dataType = "String")
|
||||
public ResponseResult<List<InsuranceVO>> recommendInsureList(@RequestParam(value = "recommendCategoryNo",required = false) String recommendCategoryNo) {
|
||||
InsuranceVO insuranceVO = InsuranceVO.builder().
|
||||
showIndex(InsureConstant.SHOW_INDEX_STATE_0).
|
||||
dataState(InsureConstant.DATA_STATE_0).
|
||||
build();
|
||||
if (!EmptyUtil.isNullOrEmpty(recommendCategoryNo)){
|
||||
insuranceVO.setRecommendCategoryNo(Long.valueOf(recommendCategoryNo));
|
||||
}
|
||||
Page<InsuranceVO> page = insuranceService.findPage(insuranceVO, 0, 10);
|
||||
return ResponseResultBuild.successBuild(page.getRecords());
|
||||
}
|
||||
|
||||
/**
|
||||
* 金牌好品
|
||||
* @param category 保险分类编号
|
||||
* @description 金牌好品、安心培
|
||||
* -->tab_insurance-->optimization 或者 relieved
|
||||
*/
|
||||
@PostMapping("glod-insurance-list/{category}")
|
||||
@ApiOperation(value = "金牌好品", notes = "金牌好品")
|
||||
@ApiImplicitParam(name = "category", value = "保险分类编号", required = true, dataType = "Long", paramType = "path", example = "分类接口中获得的内容")
|
||||
public ResponseResult<List<InsuranceVO>> glodInsurancelist(@PathVariable("category") String category) {
|
||||
InsuranceVO insuranceVO = InsuranceVO.builder().
|
||||
dataState(SuperConstant.DATA_STATE_0).
|
||||
categoryNo(Long.valueOf(category)).
|
||||
goldSelection(InsuranceConstant.GOLDSELECTION_0).
|
||||
build();
|
||||
Page<InsuranceVO> insuranceVOPage = insuranceService.findPage(insuranceVO, 0, 10);
|
||||
return ResponseResultBuild.successBuild(insuranceVOPage.getRecords());
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 保险方案
|
||||
*/
|
||||
@PostMapping("insurance-plan")
|
||||
@ApiOperation(value = "保险方案", notes = "保险方案")
|
||||
public ResponseResult<List<CombinationVO>> insurancePlan() {
|
||||
Page<CombinationVO> page = combinationService.findPage(CombinationVO.builder().dataState(SuperConstant.DATA_STATE_0).build(), 0, 6);
|
||||
return ResponseResultBuild.successBuild(page.getRecords());
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询列表
|
||||
* @return List<BannerVO>
|
||||
*/
|
||||
@GetMapping("list")
|
||||
@ApiOperation(value = "banner查询列表",notes = "banner查询列表")
|
||||
public ResponseResult<List<BannerVO>> bannerList() {
|
||||
BannerVO bannerVO = BannerVO.builder()
|
||||
.dataState(SuperConstant.DATA_STATE_0)
|
||||
.build();
|
||||
List<BannerVO> bannerVOList = bannerService.findList(bannerVO);
|
||||
return ResponseResultBuild.successBuild(bannerVOList);
|
||||
}
|
||||
}
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.dto.trade.TradeVO;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.*;
|
||||
import com.itheima.sfbx.insurance.rule.AccessRuleDTO;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceService;
|
||||
import com.itheima.sfbx.insurance.service.IRuleService;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyOrderService;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @ClassName InsureController.java
|
||||
* @Description 投保
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险投保")
|
||||
@RestController
|
||||
@RequestMapping("insure")
|
||||
public class InsureController {
|
||||
|
||||
@Autowired
|
||||
IWarrantyService warrantyService;
|
||||
|
||||
@Autowired
|
||||
IWarrantyOrderService warrantyOrderService;
|
||||
|
||||
@Autowired
|
||||
private IInsuranceService insuranceService;
|
||||
|
||||
/***
|
||||
* @description 保险投保
|
||||
* @param doInsureVo 保险产品VO对象
|
||||
* @return 保险合同
|
||||
*/
|
||||
@PostMapping("do-insure")
|
||||
@ApiOperation(value = "保险投保",notes = "保险投保")
|
||||
@ApiImplicitParam(name = "doInsureVo",value = "保险产品详情Vo对象",required = true,dataType = "DoInsureVo")
|
||||
public ResponseResult<WarrantyVO> doInsure(@RequestBody DoInsureVo doInsureVo) {
|
||||
WarrantyVO warrantyVO = warrantyService.doInsure(doInsureVo);
|
||||
return ResponseResultBuild.successBuild(warrantyVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 查询保险合同及未支付的合同订单
|
||||
* @param warrantyId 保险合同ID
|
||||
* @return WarrantyVO
|
||||
*/
|
||||
@PostMapping("warranty/{warrantyId}")
|
||||
@ApiOperation(value = "查询合同",notes = "查询合同")
|
||||
@ApiImplicitParam(paramType = "path",name = "warrantyId",value = "合同ID",dataType = "String")
|
||||
public ResponseResult<WarrantyVO> findWarranty(@PathVariable("warrantyId") String warrantyId) {
|
||||
WarrantyVO warrantyVOResult = warrantyService.findWarranty(warrantyId);
|
||||
return ResponseResultBuild.successBuild(warrantyVOResult);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* @description 保费计算
|
||||
* @param doInsureVo 投保试算对象
|
||||
* @return 投入型:最终本期投保金额,返回0则表示不符合条件
|
||||
*/
|
||||
@PostMapping("do-premium")
|
||||
@ApiOperation(value = "保费计算",notes = "保费计算")
|
||||
@ApiImplicitParam(name = "doInsureVo",value = "投保试算对象",required = true,dataType = "DoInsureVo")
|
||||
public ResponseResult<String> doPremium(@RequestBody DoInsureVo doInsureVo) {
|
||||
String priceBuy= insuranceService.doPremium(doInsureVo);
|
||||
return ResponseResultBuild.successBuild(priceBuy);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 理财收益
|
||||
* @param doInsureVo 投保试算对象
|
||||
* @return 理财型:最终收益,返回0则表示不符合条件
|
||||
*/
|
||||
@PostMapping("do-earnings")
|
||||
@ApiOperation(value = "收益计算",notes = "收益计算")
|
||||
@ApiImplicitParam(name = "doInsureVo",value = "投保试算对象",required = true,dataType = "DoInsureVo")
|
||||
public ResponseResult<EarningVO> doEarnings(@RequestBody DoInsureVo doInsureVo) {
|
||||
EarningVO earningVO= insuranceService.doEarnings(doInsureVo);
|
||||
return ResponseResultBuild.successBuild(earningVO);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 保险支付:一次性支付
|
||||
* @param warrantyOrderId 合同订单Id
|
||||
* @param tradingChannel 支付渠道
|
||||
* @return 支付会话签名
|
||||
*/
|
||||
@PostMapping("do-payment/{warrantyOrderId}/{tradingChannel}")
|
||||
@ApiOperation(value = "一次性支付",notes = "一次性支付")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(paramType = "path",name = "warrantyOrderId",value = "合同保单Id",required = true,dataType = "String"),
|
||||
@ApiImplicitParam(paramType = "path",name = "tradingChannel",value = "支付渠道",required = true,dataType = "String")
|
||||
})
|
||||
public ResponseResult<TradeVO> doPayment(@PathVariable("warrantyOrderId")String warrantyOrderId,
|
||||
@PathVariable("tradingChannel")String tradingChannel) {
|
||||
return ResponseResultBuild.successBuild(warrantyOrderService.doPayment(warrantyOrderId,tradingChannel));
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 关闭订单
|
||||
* @param tradeOrderNo 交易订单号
|
||||
* @param tradingChannel 支付渠道
|
||||
* @return 支付会话签名
|
||||
*/
|
||||
@PostMapping("do-close/{tradeOrderNo}/{tradingChannel}")
|
||||
@ApiOperation(value = "关闭订单",notes = "关闭订单")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(paramType = "path",name = "tradeOrderNo",value = "交易订单号",required = true,dataType = "String"),
|
||||
@ApiImplicitParam(paramType = "path",name = "tradingChannel",value = "支付渠道",required = true,dataType = "String")
|
||||
})
|
||||
public ResponseResult<TradeVO> doClose(@PathVariable("tradeOrderNo")String tradeOrderNo,
|
||||
@PathVariable("tradingChannel")String tradingChannel) {
|
||||
return ResponseResultBuild.successBuild(warrantyOrderService.doClose(tradeOrderNo,tradingChannel));
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 保险支付:独立签约
|
||||
* @param warrantyOrderId 合同订单Id
|
||||
* @param tradingChannel 支付渠道
|
||||
* @return 签约唤醒签名
|
||||
*/
|
||||
@PostMapping("sign-contract/{warrantyOrderId}/{tradingChannel}")
|
||||
@ApiOperation(value = "独立签约",notes = "独立签约")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(paramType = "path",name = "warrantyOrderId",value = "合同保单Id",required = true,dataType = "Long"),
|
||||
@ApiImplicitParam(paramType = "path",name = "tradingChannel",value = "支付渠道",required = true,dataType = "String")
|
||||
})
|
||||
public ResponseResult<String> signContract(@PathVariable("warrantyOrderId")String warrantyOrderId,
|
||||
@PathVariable("tradingChannel")String tradingChannel) {
|
||||
return ResponseResultBuild.successBuild(warrantyOrderService.signContract(warrantyOrderId,tradingChannel));
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 保险支付:签约同步,并首次扣款
|
||||
* @param warrantyOrderId 合同订单Id
|
||||
* @param tradingChannel 支付渠道
|
||||
* @param agreementNo 支付签约号
|
||||
* @return 签约唤醒签名
|
||||
*/
|
||||
@PostMapping("sign-contract-sync/{warrantyOrderId}/{tradingChannel}/{agreementNo}")
|
||||
@ApiOperation(value = "签约同步",notes = "签约同步")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(paramType = "path",name = "warrantyOrderId",value = "合同保单Id",required = true,dataType = "Long"),
|
||||
@ApiImplicitParam(paramType = "path",name = "tradingChannel",value = "支付渠道",required = true,dataType = "String"),
|
||||
@ApiImplicitParam(paramType = "path",name = "agreementNo",value = "支付签约号",required = true,dataType = "String")
|
||||
})
|
||||
public ResponseResult<Boolean> signContractSync(@PathVariable("warrantyOrderId")String warrantyOrderId,
|
||||
@PathVariable("tradingChannel")String tradingChannel,
|
||||
@PathVariable("agreementNo")String agreementNo) {
|
||||
return ResponseResultBuild.successBuild(warrantyOrderService.signContractSync(warrantyOrderId,tradingChannel,agreementNo));
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 保险支付:关闭签约
|
||||
* @param warrantyOrderId 合同订单Id
|
||||
* @param tradingChannel 支付渠道
|
||||
* @return 支付会话签名
|
||||
*/
|
||||
@PostMapping("do-close-sign-contract/{warrantyOrderId}/{tradingChannel}")
|
||||
@ApiOperation(value = "关闭签约",notes = "关闭签约")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(paramType = "path",name = "warrantyOrderId",value = "合同保单Id",required = true,dataType = "Long"),
|
||||
@ApiImplicitParam(paramType = "path",name = "tradingChannel",value = "支付渠道",required = true,dataType = "String")
|
||||
})
|
||||
public ResponseResult<Boolean> doCloseSignContract(@PathVariable("warrantyOrderId")String warrantyOrderId,
|
||||
@PathVariable("tradingChannel")String tradingChannel) {
|
||||
return ResponseResultBuild.successBuild(warrantyOrderService.doCloseSignContract(warrantyOrderId,tradingChannel));
|
||||
}
|
||||
}
|
||||
+237
@@ -0,0 +1,237 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant;
|
||||
import com.itheima.sfbx.framework.commons.dto.security.CustomerVO;
|
||||
import com.itheima.sfbx.framework.commons.dto.security.UserVO;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.framework.commons.utils.SubjectContent;
|
||||
import com.itheima.sfbx.insurance.dto.*;
|
||||
import com.itheima.sfbx.insurance.service.ICustomerCardService;
|
||||
import com.itheima.sfbx.insurance.service.ICustomerInfoService;
|
||||
import com.itheima.sfbx.insurance.service.ICustomerRelationService;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyService;
|
||||
import com.itheima.sfbx.security.feign.CustomerFeign;
|
||||
import com.itheima.sfbx.wenxin.WenXinService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName MineController.java
|
||||
* @Description 我的
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "我的tab页")
|
||||
@RestController
|
||||
@RequestMapping("mined")
|
||||
public class MineController {
|
||||
|
||||
@Autowired
|
||||
private CustomerFeign customerFeign;
|
||||
|
||||
@Autowired
|
||||
private ICustomerInfoService customerInfoService;
|
||||
|
||||
@Autowired
|
||||
private ICustomerCardService customerCardService;
|
||||
|
||||
@Autowired
|
||||
private ICustomerRelationService customerRelationService;
|
||||
|
||||
@Autowired
|
||||
private WenXinService wenXinService;
|
||||
|
||||
/**
|
||||
* 01、注册页面:调用security-interface中的CustomerFeign接口
|
||||
*/
|
||||
@PostMapping("register")
|
||||
@ApiOperation(value = "注册", notes = "注册")
|
||||
@ApiImplicitParam(name = "customerVO", value = "客户对象VO", dataType = "CustomerVO")
|
||||
public ResponseResult<UserVO> register(@RequestBody CustomerVO customerVO) {
|
||||
UserVO userVO = customerFeign.registerUser(customerVO);
|
||||
userVO.setPassword("");
|
||||
return ResponseResultBuild.successBuild(userVO);
|
||||
}
|
||||
|
||||
//03、重置密码:必须登录才能重置密码,必须是完成手机号码补充内容
|
||||
@PostMapping("reset-password")
|
||||
@ApiOperation(value = "重置密码", notes = "重置密码")
|
||||
public ResponseResult<Boolean> resetPassword() {
|
||||
UserVO userVO = SubjectContent.getUserVO();
|
||||
return ResponseResultBuild.successBuild(customerInfoService.resetPassword(userVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 07、我的关系-->tab_customer_relation
|
||||
*/
|
||||
@PostMapping("my-relation")
|
||||
@ApiOperation(value = "根据当前登录人信息获取关系网", notes = "根据当前登录人信息获取关系网")
|
||||
public ResponseResult<List<CustomerRelationVO>> myRelation() {
|
||||
UserVO userVO = SubjectContent.getUserVO();
|
||||
CustomerRelationVO relationVO = CustomerRelationVO.builder()
|
||||
.customerId(userVO.getId())
|
||||
.dataState(SuperConstant.DATA_STATE_0)
|
||||
.build();
|
||||
List<CustomerRelationVO> res = customerRelationService.myRelation(relationVO);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据关系字段获取对应的亲属
|
||||
*
|
||||
* @param fields
|
||||
*/
|
||||
@PostMapping("my-relation-field/{relationgFields}")
|
||||
@ApiOperation(value = "根据关系字段获取当前登录人信息获取关系网", notes = "根据关系字段获取当前登录人信息获取关系网")
|
||||
@ApiImplicitParam(name = "relationgFields", value = "关系字段列表(用逗号分隔)", required = true, dataType = "String")
|
||||
public ResponseResult<List<CustomerRelationVO>> myRelationsFields(@PathVariable("relationgFields") String fields) {
|
||||
CustomerRelationVO relationVO = CustomerRelationVO.builder().
|
||||
dataState(SuperConstant.DATA_STATE_0).
|
||||
customerId(SubjectContent.getUserVO().getId()).
|
||||
relations(customerRelationService.getRelations(fields)).
|
||||
build();
|
||||
List<CustomerRelationVO> res = customerRelationService.myRelation(relationVO);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据关系字段获取对应的亲属
|
||||
*/
|
||||
@PostMapping("ocr-access")
|
||||
@ApiOperation(value = "获取百度云token", notes = "获取百度云token")
|
||||
public ResponseResult<BaiduCloudTokenVO> myRelationsFields() {
|
||||
BaiduCloudTokenVO ocrToken = customerInfoService.getOcrToken(SubjectContent.getUserVO());
|
||||
return ResponseResultBuild.successBuild(ocrToken);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
IWarrantyService warrantyService;
|
||||
|
||||
/***
|
||||
* @description 我的保单合同列表
|
||||
* @return 保单列表
|
||||
*/
|
||||
@PostMapping("my-warrantys-nums")
|
||||
@ApiOperation(value = "我的保单数量", notes = "我的保单数量")
|
||||
public ResponseResult<MyWarrantyInfoVO> myWarrantyNums(){
|
||||
MyWarrantyInfoVO res = warrantyService.myWarrantyNums(SubjectContent.getUserVO());
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 我的保单合同列表
|
||||
* @return 保单列表
|
||||
*/
|
||||
@PostMapping("my-warrantys")
|
||||
@ApiOperation(value = "我的保单列表", notes = "我的保单列表")
|
||||
public ResponseResult<List<WarrantyVO>> myWarrantyVOs(@RequestBody(required = false) CustomerRelationVO customerRelationVO){
|
||||
List<WarrantyVO> warrantyVOs = warrantyService.myWarrantyVOs(SubjectContent.getUserVO(),customerRelationVO);
|
||||
return ResponseResultBuild.successBuild(warrantyVOs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保单详情
|
||||
* @param warrantyId 保险合同ID
|
||||
* @return WarrantyVO
|
||||
*/
|
||||
@PostMapping("detail/{warrantyId}")
|
||||
@ApiOperation(value = "保单详情",notes = "保单详情")
|
||||
@ApiImplicitParam(paramType = "path",name = "warrantyId",value = "合同ID",dataType = "String")
|
||||
public ResponseResult<WarrantyVO> createWarranty(@PathVariable("warrantyId") String warrantyId) {
|
||||
WarrantyVO warrantyVOResult = warrantyService.findById(warrantyId);
|
||||
return ResponseResultBuild.successBuild(warrantyVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据关系字段获取对应的亲属
|
||||
*/
|
||||
@PostMapping("find-risk-solution")
|
||||
@ApiOperation(value = "获取我的风险和解决方案", notes = "向文心一言请求风险和解决方案")
|
||||
public ResponseResult<String> findRiskAndSolution() {
|
||||
String question = wenXinService.askQuestion(null);
|
||||
return ResponseResultBuild.successBuild(question);
|
||||
}
|
||||
|
||||
/**
|
||||
* 银行卡列表
|
||||
*/
|
||||
@PostMapping("bank-card-list")
|
||||
@ApiOperation(value = "我的银行卡列表", notes = "我的银行卡列表")
|
||||
public ResponseResult<List<CustomerCardVO>> bankCardList() {
|
||||
CustomerCardVO customerCardVO = CustomerCardVO.builder().
|
||||
dataState(SuperConstant.DATA_STATE_0).
|
||||
customerId(String.valueOf(SubjectContent.getUserVO().getId())).
|
||||
build();
|
||||
List<CustomerCardVO> res = customerCardService.bankCardList(customerCardVO);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加银行卡
|
||||
*/
|
||||
@PostMapping("bank-card")
|
||||
@ApiOperation(value = "添加银行卡", notes = "添加银行卡")
|
||||
public ResponseResult<CustomerCardVO> saveBankCard(@RequestBody CustomerCardVO customerCardVO) {
|
||||
CustomerCardVO res = customerCardService.saveBankCard(customerCardVO);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人脸识别认证
|
||||
*/
|
||||
@PostMapping("face-check")
|
||||
@ApiOperation(value = "人脸识别认证", notes = "人脸识别认证")
|
||||
public ResponseResult<Boolean> faceCheck() {
|
||||
Boolean res = customerInfoService.faceCheck();
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 身份证号存储
|
||||
*/
|
||||
@PostMapping("id-card")
|
||||
@ApiOperation(value = "身份证号存储", notes = "身份证号存储")
|
||||
public ResponseResult<CustomerInfoVO> idCard(@RequestBody CustomerInfoVO customerInfo) {
|
||||
CustomerInfoVO res = customerInfoService.idCard(customerInfo);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 身份证号存储
|
||||
*/
|
||||
@PostMapping("id-card-info")
|
||||
@ApiOperation(value = "身份证信息", notes = "身份证信息")
|
||||
public ResponseResult<CustomerInfoVO> idCardInfo() {
|
||||
CustomerInfoVO res = customerInfoService.idCardInfo();
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改默认使用银行卡
|
||||
*/
|
||||
@PostMapping("default-bank-card/{customerCardId}")
|
||||
@ApiOperation(value = "修改默认使用银行卡", notes = "修改默认使用银行卡")
|
||||
public ResponseResult<CustomerCardVO> defaultBankCard(@PathVariable("customerCardId") String customerCardId) {
|
||||
CustomerCardVO res = customerCardService.defaultBankCard(customerCardId);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解绑银行卡
|
||||
*/
|
||||
@PostMapping("remove-bank-card")
|
||||
@ApiOperation(value = "解绑银行卡", notes = "解绑银行卡")
|
||||
public ResponseResult<CustomerCardVO> removeBankCarrd(@RequestBody CustomerCardVO customerCardVO) {
|
||||
CustomerCardVO res = customerCardService.removeBankCard(customerCardVO);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.anno.SensitiveResponse;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.framework.commons.utils.SubjectContent;
|
||||
import com.itheima.sfbx.insurance.dto.CustomerRelationVO;
|
||||
import com.itheima.sfbx.insurance.dto.HomePeopleVO;
|
||||
import com.itheima.sfbx.insurance.dto.SelfWarrantyVO;
|
||||
import com.itheima.sfbx.insurance.service.ICustomerRelationService;
|
||||
import com.itheima.sfbx.insurance.service.IRuleService;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.FieldError;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @ClassName WarrantyController.java
|
||||
* @Description 家庭保障
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "我的家庭")
|
||||
@RestController
|
||||
@RequestMapping("mine-home")
|
||||
public class MineHomeController {
|
||||
|
||||
@Autowired
|
||||
private IWarrantyService warrantyService;
|
||||
|
||||
@Autowired
|
||||
private IRuleService ruleService;
|
||||
|
||||
@Autowired
|
||||
private ICustomerRelationService customerRelationService;
|
||||
|
||||
/**
|
||||
* 获取我的保单
|
||||
*/
|
||||
@PostMapping("home-all-warranty-order")
|
||||
@ApiOperation(value = "家庭全部保单数量", notes = "家庭全部保单数量")
|
||||
public ResponseResult<SelfWarrantyVO> myRelationsFields() {
|
||||
return ResponseResultBuild.successBuild(warrantyService.findMyWarrantyNums(SubjectContent.getUserVO()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 家庭人身保障
|
||||
*/
|
||||
@PostMapping("home-people-safe")
|
||||
@ApiOperation(value = "家庭人身保障", notes = "家庭人身保障")
|
||||
public ResponseResult<List<HomePeopleVO>> homePeopleSafe() {
|
||||
return ResponseResultBuild.successBuild(warrantyService.findHomeSafeInfo(SubjectContent.getUserVO()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加人物关系
|
||||
*/
|
||||
@PostMapping("customer-relation")
|
||||
@ApiOperation(value = "添加人物关系", notes = "添加人物关系")
|
||||
@ApiImplicitParam(name = "customerRelationVO", value = "用户关系", required = false, dataType = "CustomerRelationVO")
|
||||
public ResponseResult<CustomerRelationVO> addCustomerRelation(@Valid @RequestBody CustomerRelationVO customerRelationVO, BindingResult bindingResult) {
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResponseResultBuild.validateErrorBuild(null);
|
||||
}else {
|
||||
return ResponseResultBuild.successBuild(customerRelationService.save(customerRelationVO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人物关系
|
||||
*/
|
||||
@PostMapping("update-customer-relation")
|
||||
@ApiOperation(value = "修改人物关系", notes = "修改人物关系")
|
||||
@ApiImplicitParam(name = "customerRelationVO", value = "用户关系", required = false, dataType = "CustomerRelationVO")
|
||||
public ResponseResult<CustomerRelationVO> updateHomePeopleSafe(@Valid @RequestBody CustomerRelationVO customerRelationVO,BindingResult bindingResult) {
|
||||
if (bindingResult.hasErrors()) {
|
||||
// 返回包含错误信息的响应
|
||||
return ResponseResultBuild.validateErrorBuild(null);
|
||||
}else {
|
||||
customerRelationService.update(customerRelationVO);
|
||||
return ResponseResultBuild.successBuild(customerRelationVO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加人物关系
|
||||
*/
|
||||
@PostMapping("delete-customer-relation")
|
||||
@ApiOperation(value = "删除人物关系", notes = "删除人物关系")
|
||||
@ApiImplicitParam(name = "customerRelationVO", value = "用户关系", required = false, dataType = "CustomerRelationVO")
|
||||
@ApiOperationSupport(includeParameters = {"customerRelationVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteHomePeopleSafe(@RequestBody CustomerRelationVO customerRelationVO) {
|
||||
return ResponseResultBuild.successBuild(customerRelationService.delete(customerRelationVO.getCheckedIds()));
|
||||
}
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant;
|
||||
import com.itheima.sfbx.framework.commons.constant.category.CategoryConstant;
|
||||
import com.itheima.sfbx.framework.commons.dto.basic.TreeVO;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.constant.InsuranceConstant;
|
||||
import com.itheima.sfbx.insurance.dto.*;
|
||||
import com.itheima.sfbx.insurance.pojo.WarrantyOrder;
|
||||
import com.itheima.sfbx.insurance.service.ICategoryConditionService;
|
||||
import com.itheima.sfbx.insurance.service.ICategoryService;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName ProductController.java
|
||||
* @Description 产品
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "产品")
|
||||
@RestController
|
||||
@RequestMapping("product")
|
||||
public class ProductController {
|
||||
|
||||
@Autowired
|
||||
private ICategoryService categoryService;
|
||||
|
||||
@Autowired
|
||||
private ICategoryConditionService categoryConditionService;
|
||||
|
||||
@Autowired
|
||||
IInsuranceService insuranceService;
|
||||
|
||||
/**
|
||||
* @description 获取产品页面下的分类
|
||||
* @return TreeVO<CategoryVO>
|
||||
*/
|
||||
@ApiOperation(value = "查询产品页下的产品分类",notes = "查询产品页下的产品分类")
|
||||
@PostMapping("/find-product-categorys")
|
||||
public ResponseResult<TreeVO> findCategoryByType() {
|
||||
TreeVO treeVO = categoryService.categoryTreeVO(SuperConstant.ROOT_PARENT_ID, CategoryConstant.PRODUCT_TYPE, null);
|
||||
return ResponseResultBuild.successBuild(treeVO);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 查询产品分类下筛选项目
|
||||
* @param categoryNo
|
||||
* @return ResponseResult<List<CategoryConditionVO>>
|
||||
*/
|
||||
@ApiOperation(value = "查询产品分类下筛选项目",notes = "查询产品分类下筛选项目")
|
||||
@PostMapping("/find-condition/{categoryNo}")
|
||||
public ResponseResult<List<CategoryConditionVO>> findConditionByCategoryNo(@PathVariable(name = "categoryNo",required = false)String categoryNo) {
|
||||
return ResponseResultBuild.successBuild(categoryConditionService.findConditionByType(categoryNo));
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 查询产品列表
|
||||
* @param insuranceVO 搜索对象
|
||||
* @return ResponseResult<List<InsuranceVO>>
|
||||
*/
|
||||
@PostMapping("find-insurance-product")
|
||||
@ApiOperation(value = "查询产品列表",notes = "查询产品列表")
|
||||
public ResponseResult<List<InsuranceVO>> findInsuranceProduct(@RequestBody InsuranceVO insuranceVO){
|
||||
insuranceVO.setInsuranceState(InsuranceConstant.INSURANCE_STATE_0);
|
||||
return ResponseResultBuild.successBuild(insuranceService.findList(insuranceVO));
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 保险产品详情
|
||||
* @param insuranceId 保险id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("find-insurance/{insuranceId}")
|
||||
@ApiOperation(value = "保险产品详情",notes = "保险产品详情")
|
||||
@ApiImplicitParam(name = "insuranceId",value = "保险id",required = true,dataType = "String")
|
||||
public ResponseResult<InsuranceVO> findInsuranceDetails(@PathVariable("insuranceId")String insuranceId){
|
||||
InsuranceVO insuranceVO = insuranceService.findById(insuranceId);
|
||||
return ResponseResultBuild.successBuild(insuranceVO);
|
||||
}
|
||||
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.insurance.enums.RiskEnum;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.itheima.sfbx.insurance.dto.RiskVO;
|
||||
import com.itheima.sfbx.insurance.service.IRiskService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Description:风险表响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "风险表")
|
||||
@RestController
|
||||
@RequestMapping("risk")
|
||||
public class RiskController {
|
||||
|
||||
@Autowired
|
||||
IRiskService riskService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询风险表分页
|
||||
* @param riskVO 风险表VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<RiskVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "风险表分页",notes = "风险表分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "riskVO",value = "风险表VO对象",required = true,dataType = "RiskVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"riskVO.riskTypeKey","riskVO.riskTypeName","riskVO.riskKey","riskVO.riskName","riskVO.sortNo"})
|
||||
public ResponseResult<Page<RiskVO>> findRiskVOPage(
|
||||
@RequestBody RiskVO riskVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<RiskVO> riskVOPage = riskService.findPage(riskVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(riskVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存风险表
|
||||
* @param riskVO 风险表VO对象
|
||||
* @return RiskVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存Risk",notes = "添加Risk")
|
||||
@ApiImplicitParam(name = "riskVO",value = "风险表VO对象",required = true,dataType = "RiskVO")
|
||||
@ApiOperationSupport(includeParameters = {"riskVO.dataState","riskVO.riskTypeKey","riskVO.riskTypeName","riskVO.riskKey","riskVO.riskName","riskVO.sortNo"})
|
||||
public ResponseResult<RiskVO> createRisk(@RequestBody RiskVO riskVO) {
|
||||
RiskVO riskVOResult = riskService.save(riskVO);
|
||||
return ResponseResultBuild.successBuild(riskVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改风险表
|
||||
* @param riskVO 风险表VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改风险表",notes = "修改风险表")
|
||||
@ApiImplicitParam(name = "riskVO",value = "风险表VO对象",required = true,dataType = "RiskVO")
|
||||
@ApiOperationSupport(includeParameters = {"riskVO.id","riskVO.dataState","riskVO.riskTypeKey","riskVO.riskTypeName","riskVO.riskKey","riskVO.riskName","riskVO.sortNo"})
|
||||
public ResponseResult<Boolean> updateRisk(@RequestBody RiskVO riskVO) {
|
||||
Boolean flag = riskService.update(riskVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除风险表
|
||||
* @param riskVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除风险表",notes = "删除风险表")
|
||||
@ApiImplicitParam(name = "riskVO",value = "风险表VO对象",required = true,dataType = "RiskVO")
|
||||
@ApiOperationSupport(includeParameters = {"riskVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteRisk(@RequestBody RiskVO riskVO) {
|
||||
Boolean flag = riskService.delete(riskVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询风险表列表
|
||||
* @param riskVO 风险表VO对象
|
||||
* @return List<RiskVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询风险表列表",notes = "多条件查询风险表列表")
|
||||
@ApiImplicitParam(name = "riskVO",value = "风险表VO对象",required = true,dataType = "RiskVO")
|
||||
@ApiOperationSupport(includeParameters = {"riskVO.riskTypeKey","riskVO.riskTypeName","riskVO.riskKey","riskVO.riskName","riskVO.sortNo"})
|
||||
public ResponseResult<List<RiskVO>> riskList(@RequestBody RiskVO riskVO) {
|
||||
List<RiskVO> riskVOList = riskService.findList(riskVO);
|
||||
return ResponseResultBuild.successBuild(riskVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.CategoryVO;
|
||||
import com.itheima.sfbx.insurance.dto.SaleTopInsuranceVO;
|
||||
import com.itheima.sfbx.insurance.service.ICategoryService;
|
||||
import com.itheima.sfbx.insurance.service.ISaleTopInsuranceService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "热销榜")
|
||||
@RestController
|
||||
@RequestMapping("sale-top-insurance")
|
||||
public class SaleTopInsuranceController {
|
||||
|
||||
@Autowired
|
||||
ISaleTopInsuranceService saleTopInsuranceService;
|
||||
|
||||
@Autowired
|
||||
ICategoryService categoryService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询分页
|
||||
* @param saleTopInsuranceVO VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<SaleTopInsuranceVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "分页",notes = "分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "saleTopInsuranceVO",value = "VO对象",required = true,dataType = "SaleTopInsuranceVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"saleTopInsuranceVO.checkRule","saleTopInsuranceVO.insuranceId","saleTopInsuranceVO.insuranceName","saleTopInsuranceVO.insuranceDetail","saleTopInsuranceVO.comment","saleTopInsuranceVO.remake","saleTopInsuranceVO.categoryNo","saleTopInsuranceVO.companyNo"})
|
||||
public ResponseResult<Page<SaleTopInsuranceVO>> findSaleTopInsuranceVOPage(
|
||||
@RequestBody SaleTopInsuranceVO saleTopInsuranceVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<SaleTopInsuranceVO> saleTopInsuranceVOPage = saleTopInsuranceService.findPage(saleTopInsuranceVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(saleTopInsuranceVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存
|
||||
* @param saleTopInsuranceVO VO对象
|
||||
* @return SaleTopInsuranceVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存SaleTopInsurance",notes = "添加SaleTopInsurance")
|
||||
@ApiImplicitParam(name = "saleTopInsuranceVO",value = "VO对象",required = true,dataType = "SaleTopInsuranceVO")
|
||||
@ApiOperationSupport(includeParameters = {"saleTopInsuranceVO.dataState","saleTopInsuranceVO.checkRule","saleTopInsuranceVO.insuranceId","saleTopInsuranceVO.insuranceName","saleTopInsuranceVO.insuranceDetail","saleTopInsuranceVO.comment","saleTopInsuranceVO.remake","saleTopInsuranceVO.categoryNo","saleTopInsuranceVO.companyNo"})
|
||||
public ResponseResult<SaleTopInsuranceVO> createSaleTopInsurance(@RequestBody SaleTopInsuranceVO saleTopInsuranceVO) {
|
||||
SaleTopInsuranceVO saleTopInsuranceVOResult = saleTopInsuranceService.save(saleTopInsuranceVO);
|
||||
return ResponseResultBuild.successBuild(saleTopInsuranceVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改
|
||||
* @param saleTopInsuranceVO VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改",notes = "修改")
|
||||
@ApiImplicitParam(name = "saleTopInsuranceVO",value = "VO对象",required = true,dataType = "SaleTopInsuranceVO")
|
||||
@ApiOperationSupport(includeParameters = {"saleTopInsuranceVO.id","saleTopInsuranceVO.dataState","saleTopInsuranceVO.checkRule","saleTopInsuranceVO.insuranceId","saleTopInsuranceVO.insuranceName","saleTopInsuranceVO.insuranceDetail","saleTopInsuranceVO.comment","saleTopInsuranceVO.remake","saleTopInsuranceVO.categoryNo","saleTopInsuranceVO.companyNo"})
|
||||
public ResponseResult<Boolean> updateSaleTopInsurance(@RequestBody SaleTopInsuranceVO saleTopInsuranceVO) {
|
||||
Boolean flag = saleTopInsuranceService.update(saleTopInsuranceVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除
|
||||
* @param saleTopInsuranceVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除",notes = "删除")
|
||||
@ApiImplicitParam(name = "saleTopInsuranceVO",value = "VO对象",required = true,dataType = "SaleTopInsuranceVO")
|
||||
@ApiOperationSupport(includeParameters = {"saleTopInsuranceVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteSaleTopInsurance(@RequestBody SaleTopInsuranceVO saleTopInsuranceVO) {
|
||||
Boolean flag = saleTopInsuranceService.delete(saleTopInsuranceVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询列表
|
||||
* @param saleTopInsuranceVO VO对象
|
||||
* @return List<SaleTopInsuranceVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询列表",notes = "多条件查询列表")
|
||||
@ApiImplicitParam(name = "saleTopInsuranceVO",value = "VO对象",required = true,dataType = "SaleTopInsuranceVO")
|
||||
@ApiOperationSupport(includeParameters = {"saleTopInsuranceVO.checkRule","saleTopInsuranceVO.insuranceId","saleTopInsuranceVO.insuranceName","saleTopInsuranceVO.insuranceDetail","saleTopInsuranceVO.comment","saleTopInsuranceVO.remake","saleTopInsuranceVO.categoryNo","saleTopInsuranceVO.companyNo"})
|
||||
public ResponseResult<List<SaleTopInsuranceVO>> saleTopInsuranceList(@RequestBody SaleTopInsuranceVO saleTopInsuranceVO) {
|
||||
List<SaleTopInsuranceVO> saleTopInsuranceVOList = saleTopInsuranceService.findList(saleTopInsuranceVO);
|
||||
return ResponseResultBuild.successBuild(saleTopInsuranceVOList);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* @description 人种榜/险种榜分类
|
||||
* @return List<CategoryVO>
|
||||
*/
|
||||
@PostMapping("category-check-rule/{type}")
|
||||
@ApiOperation(value = "人种/险种分类",notes = "人种/险种分类")
|
||||
public ResponseResult<List<CategoryVO>> categoryCheckRule(@PathVariable("type")String type) {
|
||||
List<CategoryVO> res = categoryService.categoryCheckRule(type);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.framework.commons.utils.SubjectContent;
|
||||
import com.itheima.sfbx.insurance.dto.InsuranceVO;
|
||||
import com.itheima.sfbx.insurance.dto.SearchRecordVO;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceService;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceTopService;
|
||||
import com.itheima.sfbx.insurance.service.ISearchRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName SearchIndexController.java
|
||||
* @Description 搜索提示框首页
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "搜索提示框首页")
|
||||
@RestController
|
||||
@RequestMapping("search-index")
|
||||
public class SearchIndexController {
|
||||
|
||||
@Autowired
|
||||
private ISearchRecordService searchRecordService;
|
||||
|
||||
@Autowired
|
||||
private IInsuranceTopService insuranceTopService;
|
||||
|
||||
@Autowired
|
||||
private IInsuranceService insuranceService;
|
||||
|
||||
|
||||
/**
|
||||
* 搜索历史-->tab_search_record-->SubjectContent[当前登录人]
|
||||
* 只查询前5条记录
|
||||
*/
|
||||
@PostMapping("find-search-record")
|
||||
@ApiOperation(value = "搜索历史", notes = "搜索历史")
|
||||
public ResponseResult<List<SearchRecordVO>> findSearchRecord() {
|
||||
SearchRecordVO searchVO = SearchRecordVO.builder().
|
||||
createBy(SubjectContent.getUserVO().getId()).
|
||||
dataState(SuperConstant.DATA_STATE_0).
|
||||
build();
|
||||
List<SearchRecordVO> records = searchRecordService.findPage(searchVO, 0, 6).getRecords();
|
||||
return ResponseResultBuild.successBuild(records);
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索历史-->tab_search_record-->SubjectContent[当前登录人]
|
||||
* 只查询前5条记录
|
||||
*/
|
||||
@PostMapping("clean-search-record")
|
||||
@ApiOperation(value = "清空历史记录", notes = "清空历史记录")
|
||||
public ResponseResult<Boolean> cleanSearchRecord() {
|
||||
return ResponseResultBuild.successBuild(searchRecordService.cleanSearchRecord());
|
||||
}
|
||||
|
||||
/**
|
||||
* 热搜榜-->tab_search_record
|
||||
*/
|
||||
@PostMapping("/find-hot-search-record")
|
||||
@ApiOperation(value = "热搜榜", notes = "热搜榜")
|
||||
public ResponseResult<List<SearchRecordVO>> findHotSearchRecord() {
|
||||
List<SearchRecordVO> records = searchRecordService.tindTopRecord(10);
|
||||
return ResponseResultBuild.successBuild(records);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人气保险-->tab_insurance_top
|
||||
*/
|
||||
@PostMapping("find-popular-top-insurance")
|
||||
@ApiOperation(value = "人气保险", notes = "人气保险")
|
||||
public ResponseResult<List<InsuranceVO>> findPopularTopInsurance() {
|
||||
//默认条数
|
||||
Integer defaultNum = 3;
|
||||
//30天内有效数据
|
||||
Integer dateLimit = 30;
|
||||
//获取人气保险
|
||||
List<InsuranceVO> topInsurance = insuranceTopService.findTopInsurance(defaultNum, dateLimit);
|
||||
return ResponseResultBuild.successBuild(topInsurance);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 搜索保险
|
||||
* @param insuranceVO 保险名称
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<CategoryCoefficentVO>
|
||||
*/
|
||||
@PostMapping("find-search-insure/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "搜索保险", notes = "搜索保险")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "insuranceVO", value = "保险搜索条件", dataType = "InsuranceVO"),
|
||||
@ApiImplicitParam(name = "pageNum", value = "页码", example = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", example = "10", dataType = "Integer")
|
||||
})
|
||||
public ResponseResult<Page<InsuranceVO>> findSearchInsure(
|
||||
@RequestBody InsuranceVO insuranceVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<InsuranceVO> insurePageVO = insuranceService.findPage(insuranceVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(insurePageVO);
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
|
||||
import com.alibaba.nacos.common.utils.MD5Utils;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.framework.commons.utils.SubjectContent;
|
||||
import com.itheima.sfbx.insurance.dto.*;
|
||||
import com.itheima.sfbx.insurance.rule.advice.AdviceHealthDTO;
|
||||
import com.itheima.sfbx.insurance.service.DataExportService;
|
||||
import com.itheima.sfbx.insurance.service.IRuleService;
|
||||
import com.itheima.sfbx.insurance.service.ISickSearchRecordService;
|
||||
import com.itheima.sfbx.insurance.service.ISickService;
|
||||
import com.itheima.sfbx.insurance.service.impl.SickServiceImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName SeekAdviceController.java
|
||||
* @Description 健康咨询
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "健康咨询")
|
||||
@RestController
|
||||
@RequestMapping("seek-advice")
|
||||
public class SeekAdviceController {
|
||||
|
||||
@Autowired
|
||||
private ISickService sickService;
|
||||
|
||||
@Autowired
|
||||
private ISickSearchRecordService sickSearchRecordService;
|
||||
|
||||
/**
|
||||
* @description 医疗重疾类保险 健康咨询
|
||||
*/
|
||||
@PostMapping("sick-type")
|
||||
@ApiOperation(value = "疾病类型",notes = "疾病类型列表")
|
||||
public ResponseResult<List<DataDictVO>> findSickType() {
|
||||
return ResponseResultBuild.successBuild(sickService.findSickType());
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 疾病添加
|
||||
*/
|
||||
@ApiOperation(value = "添加疾病",notes = "添加疾病")
|
||||
@PostMapping("sick-add")
|
||||
public ResponseResult<SickVO> saveSick(@RequestBody SickVO sickVO) {
|
||||
return ResponseResultBuild.successBuild(sickService.save(sickVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 疾病搜索
|
||||
*/
|
||||
@ApiOperation(value = "疾病搜索",notes = "疾病搜索")
|
||||
@PostMapping("sick-search")
|
||||
public ResponseResult<List<SickVO>> searchSick(@RequestBody SickVO sickVO) {
|
||||
return ResponseResultBuild.successBuild(sickService.searchSick(sickVO.getSickKeyName(), SubjectContent.getUserVO()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 热搜榜
|
||||
* 默认查询30天内搜索次数最多的疾病
|
||||
*/
|
||||
@ApiOperation(value = "疾病热搜榜",notes = "30天内被搜索次数最多的疾病")
|
||||
@PostMapping("hot-sick-list")
|
||||
public ResponseResult<List<SickVO>> hotSickList() {
|
||||
return ResponseResultBuild.successBuild(sickSearchRecordService.hotSickList());
|
||||
}
|
||||
/**
|
||||
* @description 常见疾病
|
||||
* 默认查询30天内搜索次数最多的疾病
|
||||
*/
|
||||
@ApiOperation(value = "常见疾病",notes = "常见疾病")
|
||||
@PostMapping("common-diseases")
|
||||
public ResponseResult<List<SickVO>> commonDiseases() {
|
||||
return ResponseResultBuild.successBuild(sickService.commonDiseases());
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 医疗重疾类保险 健康咨询
|
||||
*/
|
||||
@PostMapping("seek-advice-from-health")
|
||||
@ApiOperation(value = "健康咨询",notes = "医疗重疾类保险:健康咨询")
|
||||
@ApiImplicitParam(name = "seekAdviceVO",value = "健康咨询传入对象",required = true,dataType = "SeekAdviceVO")
|
||||
public ResponseResult<QuestionTemplateVO> seekAdviceHealth(@RequestBody SeekAdviceVO seekAdviceVO) {
|
||||
|
||||
return ResponseResultBuild.successBuild(sickService.seekAdviceHealth(seekAdviceVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 提交问卷选项
|
||||
*/
|
||||
@PostMapping("submit-question-choose")
|
||||
@ApiOperation(value = "提交问卷选项",notes = "用户点击确认无误后,提交用户的选项")
|
||||
public ResponseResult<AdviceHealthDTO> submitQuestionChoose(@RequestBody AdviceHealthDTO healthTemplate) {
|
||||
return ResponseResultBuild.successBuild(sickService.submitQuestionChoose(healthTemplate));
|
||||
}
|
||||
|
||||
//=====================疾病数据导入=====================
|
||||
|
||||
@Autowired
|
||||
private DataExportService dataExportService;
|
||||
|
||||
/**
|
||||
* @description 提交问卷选项
|
||||
*/
|
||||
@PostMapping("data-input")
|
||||
public ResponseResult dataInport() {
|
||||
return ResponseResultBuild.successBuild(dataExportService.dataInport());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 数据修改
|
||||
*/
|
||||
@PostMapping("data-update")
|
||||
public ResponseResult dataUpdate() {
|
||||
return ResponseResultBuild.successBuild(dataExportService.dataUpdate());
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import cn.hutool.json.JSON;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.framework.commons.utils.SubjectContent;
|
||||
import com.itheima.sfbx.insurance.dto.WorryFreeCustomerInfoVO;
|
||||
import com.itheima.sfbx.insurance.dto.WorryFreeInsuranceMatchVO;
|
||||
import com.itheima.sfbx.insurance.dto.WorryFreeRiskItemVO;
|
||||
import com.itheima.sfbx.insurance.dto.WorryFreeSafeguardQuotaVO;
|
||||
import com.itheima.sfbx.insurance.service.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* WorryFreeInsuranceController
|
||||
*
|
||||
* @author: wgl
|
||||
* @describe: 省心配controller
|
||||
* @date: 2022/12/28 10:10
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "省心配")
|
||||
@RestController
|
||||
@RequestMapping("worry-free-insurance")
|
||||
public class WorryFreeInsuranceController {
|
||||
|
||||
@Autowired
|
||||
private IWorryFreeInsuranceService worryFreeInsuranceService;
|
||||
|
||||
@Autowired
|
||||
private IRuleService ruleService;
|
||||
|
||||
@Autowired
|
||||
private IWorryFreeRiskItemService worryFreeRiskItemService;
|
||||
|
||||
@Autowired
|
||||
private IWorryFreeFlowNodeService worryFreeFlowNodeService;
|
||||
|
||||
@Autowired
|
||||
private IWorryFreeSafeguardQuotaService worryFreeSafeguardQuotaService;
|
||||
|
||||
@Autowired
|
||||
private IWorryFreeInsuranceMatchService worryFreeInsuranceMatchService;
|
||||
/**
|
||||
* 省心配首页
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/index")
|
||||
@ApiOperation(value = "省心配首页", notes = "省心配首页")
|
||||
public String index() {
|
||||
return "worryfree";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据当前登录人从redis中获取对应的风险项
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/flow-node/{customerInfoId}")
|
||||
@ApiOperation(value = "流程节点", notes = "流程节点")
|
||||
@ApiImplicitParam(paramType = "path",name = "customerInfoId",value = "用户信息ID",example = "1",dataType = "String")
|
||||
public ResponseResult<List<String>> flowNode(@PathVariable("customerInfoId") String customerInfoId) {
|
||||
//获取流程节点数据
|
||||
List<String> res = worryFreeFlowNodeService.flowNode(Long.valueOf(customerInfoId));
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据当前登录人从redis中获取对应的风险项
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/safeguard-assess/{customerInfoId}")
|
||||
@ApiOperation(value = "保障评估", notes = "保障评估")
|
||||
@ApiImplicitParam(paramType = "path",name = "customerInfoId",value = "用户信息ID",example = "1",dataType = "String")
|
||||
public ResponseResult<WorryFreeSafeguardQuotaVO> safeguardAssess(@PathVariable("customerInfoId") String customerInfoId) {
|
||||
WorryFreeSafeguardQuotaVO res = worryFreeSafeguardQuotaService.findSaferQuota(Long.valueOf(customerInfoId));
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据当前登录人从redis中获取对应的风险项
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/risk-analysis/{customerInfoId}")
|
||||
@ApiOperation(value = "风险分析", notes = "获取风险分析结果")
|
||||
@ApiImplicitParam(paramType = "path",name = "customerInfoId",value = "用户信息ID",example = "1",dataType = "String")
|
||||
public ResponseResult<List<WorryFreeRiskItemVO>> findMyRiskItem(@PathVariable("customerInfoId") String customerInfoId) {
|
||||
List<WorryFreeRiskItemVO> res = worryFreeRiskItemService.findMyRiskItem(Long.valueOf(customerInfoId));
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 开始结算接口
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/do-calculate")
|
||||
@ApiOperation(value = "省心配核心:开始计算", notes = "省心配核心:开始计算")
|
||||
public ResponseResult<WorryFreeCustomerInfoVO> worryFree(@RequestBody WorryFreeCustomerInfoVO worryFreeCustomerInfoVO) {
|
||||
ruleService.buildBaseParams(worryFreeCustomerInfoVO);
|
||||
WorryFreeCustomerInfoVO res = ruleService.worryFreePairing(worryFreeCustomerInfoVO);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取推荐产品列表
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/product-list/{customerInfoId}")
|
||||
@ApiOperation(value = "省心配核心:获取推荐产品列表", notes = "省心配核心:获取推荐产品列表")
|
||||
@ApiImplicitParam(paramType = "path",name = "customerInfoId",value = "用户信息ID",example = "1",dataType = "String")
|
||||
public ResponseResult<List<WorryFreeInsuranceMatchVO>> productList(@PathVariable("customerInfoId") String customerInfoId) {
|
||||
List<WorryFreeInsuranceMatchVO> res = worryFreeInsuranceMatchService.productList(Long.valueOf(customerInfoId));
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
_ __ __
|
||||
(_) /__________ ______/ /_
|
||||
/ / __/ ___/ __ `/ ___/ __/
|
||||
/ / /_/ /__/ /_/ (__ ) /_
|
||||
/_/\__/\___/\__,_/____/\__/
|
||||
:: Spring Boot :: (v-2.7.10)
|
||||
:: Spring Cloud :: (v-2021.0.6)
|
||||
:: Spring Cloud Alibaba :: (v-2021.0.1.0)
|
||||
:: sfbx Cloud :: (v-2.0-SNAPSHOT)
|
||||
:: 传智教育---献给可爱的传智人 ::
|
||||
@@ -0,0 +1,57 @@
|
||||
#服务配置
|
||||
server:
|
||||
#端口
|
||||
port: 7065
|
||||
#服务编码
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
allow-circular-references: true
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
config:
|
||||
activate:
|
||||
on-profile:
|
||||
- test
|
||||
#应用配置
|
||||
application:
|
||||
#应用名称
|
||||
name: insurance-app
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心
|
||||
group: SEATA_GROUP
|
||||
service: ${spring.application.name}
|
||||
username: ${NACOS_USERNAME:nacos}
|
||||
password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+}
|
||||
config:
|
||||
server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心
|
||||
group: SEATA_GROUP
|
||||
file-extension: yml
|
||||
shared-configs: # 共享配置
|
||||
- data-id: shared-spring-seata.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-spring-task.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-redisson.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-mybatis-plus.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
username: ${NACOS_USERNAME:nacos}
|
||||
password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+}
|
||||
logging:
|
||||
config: classpath:logback.xml
|
||||
urule:
|
||||
resporityServerUrl: http://localhost:8090
|
||||
knowledgeUpdateCycle: 1
|
||||
@@ -0,0 +1,55 @@
|
||||
#服务配置
|
||||
server:
|
||||
#端口
|
||||
port: 7065
|
||||
#服务编码
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
allow-circular-references: true
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
profiles:
|
||||
active: dev
|
||||
#应用配置
|
||||
application:
|
||||
#应用名称
|
||||
name: insurance-app
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.12.129:8848 # nacos注册中心
|
||||
group: SEATA_GROUP
|
||||
service: ${spring.application.name}
|
||||
config:
|
||||
server-addr: 192.168.12.129:8848 # nacos配置中心地址
|
||||
group: SEATA_GROUP
|
||||
file-extension: yml
|
||||
shared-configs: # 共享配置
|
||||
- data-id: shared-spring-seata.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-spring-task.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-redisson.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-mybatis-plus.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-stream-rabbit-source-warranty.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
logging:
|
||||
config: classpath:logback.xml
|
||||
urule:
|
||||
resporityServerUrl: http://localhost:8090
|
||||
knowledgeUpdateCycle: 1
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径 -->
|
||||
<property name="LOG_HOME" value="/data/logs/insurance-app" />
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${LOG_HOME}/insurance-app-01.log.%d{yyyy-MM-dd}.log
|
||||
</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n</pattern>
|
||||
</encoder>
|
||||
<!--日志文件最大的大小 -->
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<MaxFileSize>10MB</MaxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
<!-- show parameters for hibernate sql 专为 Hibernate 定制 -->
|
||||
<logger name="org.hibernate.type.descriptor.sql.BasicBinder"
|
||||
level="TRACE" />
|
||||
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor"
|
||||
level="DEBUG" />
|
||||
<logger name="org.hibernate.SQL" level="DEBUG" />
|
||||
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
|
||||
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
|
||||
|
||||
<!--myibatis log configure -->
|
||||
<logger name="com.apache.ibatis" level="TRACE" />
|
||||
<logger name="java.sql.Connection" level="DEBUG" />
|
||||
<logger name="java.sql.Statement" level="DEBUG" />
|
||||
<logger name="java.sql.PreparedStatement" level="DEBUG" />
|
||||
|
||||
<!-- 日志输出级别 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
</root>
|
||||
<!--日志异步到数据库 -->
|
||||
</configuration>
|
||||
@@ -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>
|
||||
+13
@@ -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 {
|
||||
}
|
||||
+47
@@ -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();
|
||||
}
|
||||
+26
@@ -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);
|
||||
|
||||
}
|
||||
+35
@@ -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);
|
||||
}
|
||||
+46
@@ -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);
|
||||
|
||||
}
|
||||
+37
@@ -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;
|
||||
}
|
||||
}
|
||||
+21
@@ -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;
|
||||
}
|
||||
}
|
||||
+24
@@ -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;
|
||||
}
|
||||
}
|
||||
+36
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
FROM openjdk:11-jdk
|
||||
LABEL maintainer="研究院研发组 <research@itcast.cn>"
|
||||
|
||||
# 时区修改为东八区
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
WORKDIR /insurance-mgt
|
||||
ARG PACKAGE_PATH=./target/insurance-mgt.jar
|
||||
ADD ${PACKAGE_PATH:-./} insurance-mgt.jar
|
||||
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENV JAVA_OPTS="\
|
||||
-server \
|
||||
-Xms256m \
|
||||
-Xmx512m \
|
||||
-XX:MetaspaceSize=256m \
|
||||
-XX:MaxMetaspaceSize=512m\
|
||||
-Dspring.profiles.active=test"
|
||||
ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar $JAVA_OPTS insurance-mgt.jar"]
|
||||
@@ -0,0 +1,85 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>sfbx-insurance</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!--保险:后台管理web-->
|
||||
<artifactId>insurance-mgt</artifactId>
|
||||
<name>insurance-mgt</name>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-task-executor</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-knife4j-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>insurance-service</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.yaml</include>
|
||||
<include>**/*.txt</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<finalName>insurance-mgt</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.itheima.sfbx.insurance;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 后端管理界面中几乎所有管理功能对应的启动类
|
||||
*/
|
||||
@SpringBootApplication(scanBasePackages = "com.itheima.sfbx")
|
||||
public class InsuranceMgtStart {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(InsuranceMgtStart.class);
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.itheima.sfbx.insurance.binding;
|
||||
|
||||
import com.itheima.sfbx.framework.rabbitmq.source.WarrantySource;
|
||||
import org.springframework.cloud.stream.annotation.EnableBinding;
|
||||
|
||||
/**
|
||||
* @ClassName Binding.java
|
||||
* @Description 绑定文件发送者声明
|
||||
*/
|
||||
@EnableBinding({WarrantySource.class})
|
||||
public class SourceBinding {
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.itheima.sfbx.insurance.feign;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.dto.report.CategoryReportVO;
|
||||
import com.itheima.sfbx.framework.commons.utils.BeanConv;
|
||||
import com.itheima.sfbx.insurance.dto.CategoryVO;
|
||||
import com.itheima.sfbx.insurance.service.ICategoryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保险分类响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险分类-feign")
|
||||
@RestController
|
||||
@RequestMapping("category-feign")
|
||||
public class CategoryFeignController {
|
||||
|
||||
@Autowired
|
||||
ICategoryService categoryService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询保险分类列表
|
||||
* @param categoryReportVO 保险分类VO对象
|
||||
* @return List<CategoryVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询保险分类列表",notes = "多条件查询保险分类列表")
|
||||
@ApiImplicitParam(name = "categoryReportVO",value = "保险分类报表VO对象",required = true,dataType = "CategoryReportVO")
|
||||
public List<CategoryReportVO> categoryList(@RequestBody CategoryReportVO categoryReportVO) {
|
||||
CategoryVO categoryVO = BeanConv.toBean(categoryReportVO, CategoryVO.class);
|
||||
return BeanConv.toBeanList(categoryService.findList(categoryVO),CategoryReportVO.class);
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.itheima.sfbx.insurance.feign;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.dto.analysis.InsureCategoryDTO;
|
||||
import com.itheima.sfbx.framework.commons.dto.analysis.SaleReportDTO;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName SaleReportFeign.java
|
||||
* @Description 日投保明细服务接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险分类-feign")
|
||||
@RestController
|
||||
@RequestMapping("sale-report-feign")
|
||||
public class SaleReportFeignController {
|
||||
|
||||
@Autowired
|
||||
IWarrantyService warrantyService;
|
||||
|
||||
/**
|
||||
* 计划任务:日投保额度明细
|
||||
* @param reportTime 统计时间
|
||||
* @return 是否执行成功
|
||||
*/
|
||||
@PostMapping("do-insure-detail-day/{reportTime}")
|
||||
@ApiOperation(value = "日投保额度明细",notes = "日投保额度明细")
|
||||
SaleReportDTO doInsureDetailDay(@PathVariable("reportTime")String reportTime){
|
||||
return warrantyService.doInsureDetailDay(reportTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计划任务:统计日投保分类明细
|
||||
* @param reportTime 统计时间
|
||||
* @return 是否执行成功
|
||||
*/
|
||||
@PostMapping("do-insure-category/{reportTime}")
|
||||
@ApiOperation(value = "统计日投保分类明细",notes = "统计日投保分类明细")
|
||||
List<InsureCategoryDTO> doInsureCategory(@PathVariable("reportTime")String reportTime){
|
||||
return warrantyService.doInsureCategory(reportTime);
|
||||
}
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.itheima.sfbx.insurance.feign;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.WarrantyVO;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyOrderService;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保险合同响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险合同-feign")
|
||||
@RestController
|
||||
@RequestMapping("warranty-feign")
|
||||
public class WarrantyFeignController {
|
||||
|
||||
@Autowired
|
||||
IWarrantyService warrantyService;
|
||||
|
||||
@Autowired
|
||||
IWarrantyOrderService warrantyOrderService;
|
||||
|
||||
/***
|
||||
* @description 系统监听:清理合同保单
|
||||
* @param warrantyNo 订单合同号
|
||||
* @return: Boolean
|
||||
*/
|
||||
@PostMapping("clean-warranty/{warrantyNo}")
|
||||
@ApiOperation(value = "系统监听:清理合同保单",notes = "监听:清理合同保单")
|
||||
@ApiImplicitParam(paramType = "path",name = "warrantyNo",value = "保单号",dataType = "String")
|
||||
public Boolean cleanWarranty(@PathVariable("warrantyNo") String warrantyNo) {
|
||||
Boolean flag = warrantyService.cleanWarranty(warrantyNo);
|
||||
return flag;
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 计划任务:周期代扣
|
||||
* @return 扣款结果
|
||||
*/
|
||||
@PostMapping("periodic-pay")
|
||||
@ApiOperation(value = "计划任务:周期代扣",notes = "计划任务:周期代扣")
|
||||
public Boolean periodicPay() {
|
||||
return warrantyOrderService.periodicPay();
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 系统监听:同步合同支付结果
|
||||
* @param orderNo 订单合同号
|
||||
* @return: Boolean
|
||||
*/
|
||||
@PostMapping("sync-payment/{orderNo}/{tradeState}")
|
||||
@ApiOperation(value = "系统监听:同步合同支付结果",notes = "系统监听:同步合同支付结果")
|
||||
@ApiImplicitParams(value = {
|
||||
@ApiImplicitParam(paramType = "path",name = "orderNo",value = "合同订单编号",dataType = "String"),
|
||||
@ApiImplicitParam(paramType = "path",name = "tradeState",value = "交易状态",dataType = "String"),
|
||||
})
|
||||
public Boolean syncPayment(@PathVariable("orderNo") String orderNo,@PathVariable("tradeState") String tradeState) {
|
||||
Boolean flag = warrantyOrderService.syncPayment(orderNo,tradeState);
|
||||
return flag;
|
||||
}
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.BannerVO;
|
||||
import com.itheima.sfbx.insurance.service.IBannerService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "导航信息")
|
||||
@RestController
|
||||
@RequestMapping("banner")
|
||||
public class BannerController {
|
||||
|
||||
@Autowired
|
||||
IBannerService bannerService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询分页
|
||||
* @param bannerVO VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<BannerVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "分页",notes = "分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "bannerVO",value = "VO对象",required = true,dataType = "BannerVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"bannerVO.sortNo","bannerVO.url","bannerVO.bannerType"})
|
||||
public ResponseResult<Page<BannerVO>> findBannerVOPage(
|
||||
@RequestBody BannerVO bannerVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<BannerVO> bannerVOPage = bannerService.findPage(bannerVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(bannerVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存
|
||||
* @param bannerVO VO对象
|
||||
* @return BannerVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存Banner",notes = "添加Banner")
|
||||
@ApiImplicitParam(name = "bannerVO",value = "VO对象",required = true,dataType = "BannerVO")
|
||||
@ApiOperationSupport(includeParameters = {"bannerVO.dataState","bannerVO.sortNo","bannerVO.url","bannerVO.bannerType"})
|
||||
public ResponseResult<BannerVO> createBanner(@RequestBody BannerVO bannerVO) {
|
||||
BannerVO bannerVOResult = bannerService.save(bannerVO);
|
||||
return ResponseResultBuild.successBuild(bannerVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改
|
||||
* @param bannerVO VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改",notes = "修改")
|
||||
@ApiImplicitParam(name = "bannerVO",value = "VO对象",required = true,dataType = "BannerVO")
|
||||
@ApiOperationSupport(includeParameters = {"bannerVO.id","bannerVO.dataState","bannerVO.sortNo","bannerVO.url","bannerVO.bannerType"})
|
||||
public ResponseResult<Boolean> updateBanner(@RequestBody BannerVO bannerVO) {
|
||||
Boolean flag = bannerService.update(bannerVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除
|
||||
* @param bannerVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除",notes = "删除")
|
||||
@ApiImplicitParam(name = "bannerVO",value = "VO对象",required = true,dataType = "BannerVO")
|
||||
@ApiOperationSupport(includeParameters = {"bannerVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteBanner(@RequestBody BannerVO bannerVO) {
|
||||
Boolean flag = bannerService.delete(bannerVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询列表
|
||||
* @param bannerVO VO对象
|
||||
* @return List<BannerVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询列表",notes = "多条件查询列表")
|
||||
@ApiImplicitParam(name = "bannerVO",value = "VO对象",required = true,dataType = "BannerVO")
|
||||
@ApiOperationSupport(includeParameters = {"bannerVO.sortNo","bannerVO.url","bannerVO.bannerType"})
|
||||
public ResponseResult<List<BannerVO>> bannerList(@RequestBody BannerVO bannerVO) {
|
||||
List<BannerVO> bannerVOList = bannerService.findList(bannerVO);
|
||||
return ResponseResultBuild.successBuild(bannerVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.CategoryCoefficentVO;
|
||||
import com.itheima.sfbx.insurance.service.ICategoryCoefficentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:分类系数项响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "分类系数项")
|
||||
@RestController
|
||||
@RequestMapping("category-coefficent")
|
||||
public class CategoryCoefficentController {
|
||||
|
||||
@Autowired
|
||||
ICategoryCoefficentService categoryCoefficentService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询分类系数项列表
|
||||
* @param categoryCoefficentVO 分类系数项VO对象
|
||||
* @return List<CategoryCoefficentVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询分类系数项列表",notes = "多条件查询分类系数项列表")
|
||||
@ApiImplicitParam(name = "categoryCoefficentVO",value = "分类系数项VO对象",required = true,dataType = "CategoryCoefficentVO")
|
||||
@ApiOperationSupport(includeParameters = {"categoryCoefficentVO.categoryNo","categoryCoefficentVO.coefficentKey","categoryCoefficentVO.sortNo","categoryCoefficentVO.remake"})
|
||||
public ResponseResult<List<CategoryCoefficentVO>> categoryCoefficentList(@RequestBody CategoryCoefficentVO categoryCoefficentVO) {
|
||||
List<CategoryCoefficentVO> categoryCoefficentVOList = categoryCoefficentService.findList(categoryCoefficentVO);
|
||||
return ResponseResultBuild.successBuild(categoryCoefficentVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.CategoryConditionVO;
|
||||
import com.itheima.sfbx.insurance.service.ICategoryConditionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:分类筛选项响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "分类筛选项")
|
||||
@RestController
|
||||
@RequestMapping("category-condition")
|
||||
public class CategoryConditionController {
|
||||
|
||||
@Autowired
|
||||
ICategoryConditionService categoryConditionService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询分类筛选项列表
|
||||
* @param categoryConditionVO 分类筛选项VO对象
|
||||
* @return List<CategoryConditionVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询分类筛选项列表",notes = "多条件查询分类筛选项列表")
|
||||
@ApiImplicitParam(name = "categoryConditionVO",value = "分类筛选项VO对象",required = true,dataType = "CategoryConditionVO")
|
||||
@ApiOperationSupport(includeParameters = {"categoryConditionVO.categoryNo","categoryConditionVO.conditionKey","categoryConditionVO.sortNo","categoryConditionVO.remake"})
|
||||
public ResponseResult<List<CategoryConditionVO>> categoryConditionList(@RequestBody CategoryConditionVO categoryConditionVO) {
|
||||
List<CategoryConditionVO> categoryConditionVOList = categoryConditionService.findList(categoryConditionVO);
|
||||
return ResponseResultBuild.successBuild(categoryConditionVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.dto.basic.TreeVO;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.CategoryVO;
|
||||
import com.itheima.sfbx.insurance.service.ICategoryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保险分类响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险分类")
|
||||
@RestController
|
||||
@RequestMapping("category")
|
||||
public class CategoryController {
|
||||
|
||||
@Autowired
|
||||
ICategoryService categoryService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询保险分类分页
|
||||
* @param categoryVO 保险分类VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<CategoryVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "保险分类分页",notes = "保险分类分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "categoryVO",value = "保险分类VO对象",required = true,dataType = "CategoryVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"categoryVO.parentCategoryNo","categoryVO.categoryNo","categoryVO.categoryName","categoryVO.icon","categoryVO.leafNode","categoryVO.showIndex","categoryVO.categoryType","categoryVO.sortNo","categoryVO.remake","categoryVO.insuranceType"})
|
||||
public ResponseResult<Page<CategoryVO>> findCategoryVOPage(
|
||||
@RequestBody CategoryVO categoryVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<CategoryVO> categoryVOPage = categoryService.findPage(categoryVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(categoryVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存保险分类
|
||||
* @param categoryVO 保险分类VO对象
|
||||
* @return CategoryVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存Category",notes = "添加Category")
|
||||
@ApiImplicitParam(name = "categoryVO",value = "保险分类VO对象",required = true,dataType = "CategoryVO")
|
||||
@ApiOperationSupport(includeParameters = {"categoryVO.dataState","categoryVO.parentCategoryNo",
|
||||
"categoryVO.categoryName","categoryVO.icon","categoryVO.leafNode","categoryVO.showIndex",
|
||||
"categoryVO.categoryType","categoryVO.sortNo","categoryVO.remake","categoryVO.insuranceType",
|
||||
"categoryVO.categoryClaimVOs.claimKey","categoryVO.categoryConditionVOs.conditionKey",
|
||||
"categoryVO.categoryCoefficentVOs.coefficentKey","categoryVO.categorySafeguardVOs.safeguardKey"})
|
||||
public ResponseResult<CategoryVO> createCategory(@RequestBody CategoryVO categoryVO) {
|
||||
CategoryVO categoryVOResult = categoryService.save(categoryVO);
|
||||
return ResponseResultBuild.successBuild(categoryVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改保险分类
|
||||
* @param categoryVO 保险分类VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改保险分类",notes = "修改保险分类")
|
||||
@ApiImplicitParam(name = "categoryVO",value = "保险分类VO对象",required = true,dataType = "CategoryVO")
|
||||
@ApiOperationSupport(includeParameters = {"categoryVO.id","categoryVO.dataState","categoryVO.parentCategoryNo",
|
||||
"categoryVO.categoryNo","categoryVO.categoryName","categoryVO.icon","categoryVO.leafNode",
|
||||
"categoryVO.showIndex","categoryVO.categoryType","categoryVO.sortNo","categoryVO.remake","categoryVO.insuranceType",
|
||||
"categoryVO.categoryClaimVOs.claimKey","categoryVO.categoryConditionVOs.conditionKey",
|
||||
"categoryVO.categoryCoefficentVOs.coefficentKey","categoryVO.categorySafeguardVOs.safeguardKey"})
|
||||
public ResponseResult<Boolean> updateCategory(@RequestBody CategoryVO categoryVO) {
|
||||
Boolean flag = categoryService.update(categoryVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除保险分类
|
||||
* @param categoryVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除保险分类",notes = "删除保险分类")
|
||||
@ApiImplicitParam(name = "categoryVO",value = "保险分类VO对象",required = true,dataType = "CategoryVO")
|
||||
@ApiOperationSupport(includeParameters = {"categoryVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteCategory(@RequestBody CategoryVO categoryVO) {
|
||||
Boolean flag = categoryService.delete(categoryVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询保险分类列表
|
||||
* @param categoryVO 保险分类VO对象
|
||||
* @return List<CategoryVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询保险分类列表",notes = "多条件查询保险分类列表")
|
||||
@ApiImplicitParam(name = "categoryVO",value = "保险分类VO对象",required = true,dataType = "CategoryVO")
|
||||
@ApiOperationSupport(includeParameters = {"categoryVO.parentCategoryNo","categoryVO.categoryNo","categoryVO.categoryName",
|
||||
"categoryVO.icon","categoryVO.leafNode","categoryVO.showIndex","categoryVO.categoryType",
|
||||
"categoryVO.sortNo","categoryVO.remake","categoryVO.insuranceType"})
|
||||
public ResponseResult<List<CategoryVO>> categoryList(@RequestBody CategoryVO categoryVO) {
|
||||
List<CategoryVO> categoryVOList = categoryService.findList(categoryVO);
|
||||
return ResponseResultBuild.successBuild(categoryVOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 分类树形
|
||||
* @param categoryVO 分类对象
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("tree")
|
||||
@ApiOperation(value = "分类树形",notes = "分类树形")
|
||||
@ApiImplicitParam(name = "categoryVO",value = "分类对象",required = false,dataType = "CategoryVO")
|
||||
@ApiOperationSupport(includeParameters = {"categoryVO.parentCategoryNo","categoryVO.categoryType","categoryVO.checkedCategoryNos"})
|
||||
public ResponseResult<TreeVO> categoryTreeVO(@RequestBody CategoryVO categoryVO) {
|
||||
TreeVO treeVO = categoryService.categoryTreeVO(categoryVO.getParentCategoryNo(), categoryVO.getCategoryType(),categoryVO.getCheckedCategoryNos());
|
||||
return ResponseResultBuild.successBuild(treeVO);
|
||||
}
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.CategorySafeguardVO;
|
||||
import com.itheima.sfbx.insurance.service.ICategorySafeguardService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:分类保障项响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "分类保障项")
|
||||
@RestController
|
||||
@RequestMapping("category-safeguard")
|
||||
public class CategorySafeguardController {
|
||||
|
||||
@Autowired
|
||||
ICategorySafeguardService categorySafeguardService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询分类保障项列表
|
||||
* @param categorySafeguardVO 分类保障项VO对象
|
||||
* @return List<CategorySafeguardVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询分类保障项列表",notes = "多条件查询分类保障项列表")
|
||||
@ApiImplicitParam(name = "categorySafeguardVO",value = "分类保障项VO对象",required = true,dataType = "CategorySafeguardVO")
|
||||
@ApiOperationSupport(includeParameters = {"categorySafeguardVO.categoryNo","categorySafeguardVO.safeguardKey","categorySafeguardVO.sortNo","categorySafeguardVO.remake"})
|
||||
public ResponseResult<List<CategorySafeguardVO>> categorySafeguardList(@RequestBody CategorySafeguardVO categorySafeguardVO) {
|
||||
List<CategorySafeguardVO> categorySafeguardVOList = categorySafeguardService.findList(categorySafeguardVO);
|
||||
return ResponseResultBuild.successBuild(categorySafeguardVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.enums.security.DeptEnum;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.CoefficentVO;
|
||||
import com.itheima.sfbx.insurance.dto.CoefficentVO;
|
||||
import com.itheima.sfbx.insurance.service.ICoefficentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:系数项响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "系数项")
|
||||
@RestController
|
||||
@RequestMapping("coefficent")
|
||||
public class CoefficentController {
|
||||
|
||||
@Autowired
|
||||
ICoefficentService coefficentService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询系数项分页
|
||||
* @param coefficentVO 系数项VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<CoefficentVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "系数项分页",notes = "系数项分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "coefficentVO",value = "系数项VO对象",required = true,dataType = "CoefficentVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"coefficentVO.dataState","coefficentVO.coefficentKey","coefficentVO.coefficentKeyName","coefficentVO.coefficentVal","coefficentVO.sortNo","coefficentVO.remake","coefficentVO.coefficentType"})
|
||||
public ResponseResult<Page<CoefficentVO>> findCoefficentVOPage(
|
||||
@RequestBody CoefficentVO coefficentVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<CoefficentVO> coefficentVOPage = coefficentService.findPage(coefficentVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(coefficentVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存系数项
|
||||
* @param coefficentVO 系数项VO对象
|
||||
* @return CoefficentVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存Coefficent",notes = "添加Coefficent")
|
||||
@ApiImplicitParam(name = "coefficentVO",value = "系数项VO对象",required = true,dataType = "CoefficentVO")
|
||||
@ApiOperationSupport(includeParameters = {"coefficentVO.dataState","coefficentVO.coefficentKey","coefficentVO.coefficentKeyName","coefficentVO.coefficentVal","coefficentVO.sortNo","coefficentVO.remake","coefficentVO.coefficentType"})
|
||||
public ResponseResult<CoefficentVO> createCoefficent(@RequestBody CoefficentVO coefficentVO) {
|
||||
CoefficentVO coefficentVOResult = coefficentService.save(coefficentVO);
|
||||
return ResponseResultBuild.successBuild(coefficentVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改系数项
|
||||
* @param coefficentVO 系数项VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改系数项",notes = "修改系数项")
|
||||
@ApiImplicitParam(name = "coefficentVO",value = "系数项VO对象",required = true,dataType = "CoefficentVO")
|
||||
@ApiOperationSupport(includeParameters = {"coefficentVO.id","coefficentVO.dataState","coefficentVO.coefficentKey","coefficentVO.coefficentKeyName","coefficentVO.coefficentVal","coefficentVO.sortNo","coefficentVO.remake","coefficentVO.coefficentType"})
|
||||
public ResponseResult<Boolean> updateCoefficent(@RequestBody CoefficentVO coefficentVO) {
|
||||
Boolean flag = coefficentService.update(coefficentVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除系数项
|
||||
* @param coefficentVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除系数项",notes = "删除系数项")
|
||||
@ApiImplicitParam(name = "coefficentVO",value = "系数项VO对象",required = true,dataType = "CoefficentVO")
|
||||
@ApiOperationSupport(includeParameters = {"coefficentVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteCoefficent(@RequestBody CoefficentVO coefficentVO) {
|
||||
Boolean flag = coefficentService.delete(coefficentVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询系数项列表
|
||||
* @param coefficentVO 系数项VO对象
|
||||
* @return List<CoefficentVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询系数项列表",notes = "多条件查询系数项列表")
|
||||
@ApiImplicitParam(name = "coefficentVO",value = "系数项VO对象",required = true,dataType = "CoefficentVO")
|
||||
@ApiOperationSupport(includeParameters = {"coefficentVO.dataState","coefficentVO.coefficentKey","coefficentVO.coefficentKeyName","coefficentVO.coefficentVal","coefficentVO.sortNo","coefficentVO.remake","coefficentVO.coefficentType"})
|
||||
public ResponseResult<List<CoefficentVO>> coefficentList(@RequestBody CoefficentVO coefficentVO) {
|
||||
List<CoefficentVO> coefficentVOList = coefficentService.findList(coefficentVO);
|
||||
return ResponseResultBuild.successBuild(coefficentVOList);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 系数项key查询CoefficentVO
|
||||
* @param coefficentKey 系数项key
|
||||
* @return CoefficentVO
|
||||
*/
|
||||
@PostMapping("coefficent-key/{coefficentKey}")
|
||||
@ApiOperation(value = "系数项key查询CoefficentVO",notes = "系数项key查询CoefficentVO")
|
||||
@ApiImplicitParam(paramType = "path",name = "coefficentKey",value = "系数项key",dataType = "String")
|
||||
public ResponseResult<CoefficentVO> findByCoefficentKey(@PathVariable("coefficentKey") String coefficentKey) {
|
||||
CoefficentVO coefficentVO = coefficentService.findByCoefficentKey(coefficentKey);
|
||||
return ResponseResultBuild.successBuild(coefficentVO);
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.CombinationVO;
|
||||
import com.itheima.sfbx.insurance.service.ICombinationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:组合方案响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "组合方案")
|
||||
@RestController
|
||||
@RequestMapping("combination")
|
||||
public class CombinationController {
|
||||
|
||||
@Autowired
|
||||
ICombinationService combinationService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询组合方案分页
|
||||
* @param combinationVO 组合方案VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<CombinationVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "组合方案分页",notes = "组合方案分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "combinationVO",value = "组合方案VO对象",required = true,dataType = "CombinationVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"combinationVO.combinationName","combinationVO.riskAnalysis","combinationVO.riskScenarioJson"})
|
||||
public ResponseResult<Page<CombinationVO>> findCombinationVOPage(
|
||||
@RequestBody CombinationVO combinationVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<CombinationVO> combinationVOPage = combinationService.findPage(combinationVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(combinationVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存组合方案
|
||||
* @param combinationVO 组合方案VO对象
|
||||
* @return CombinationVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存Combination",notes = "添加Combination")
|
||||
@ApiImplicitParam(name = "combinationVO",value = "组合方案VO对象",required = true,dataType = "CombinationVO")
|
||||
@ApiOperationSupport(includeParameters = {"combinationVO.dataState","combinationVO.combinationName","combinationVO.riskAnalysis","combinationVO.riskScenarioJson"})
|
||||
public ResponseResult<CombinationVO> createCombination(@RequestBody CombinationVO combinationVO) {
|
||||
CombinationVO combinationVOResult = combinationService.save(combinationVO);
|
||||
return ResponseResultBuild.successBuild(combinationVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改组合方案
|
||||
* @param combinationVO 组合方案VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改组合方案",notes = "修改组合方案")
|
||||
@ApiImplicitParam(name = "combinationVO",value = "组合方案VO对象",required = true,dataType = "CombinationVO")
|
||||
@ApiOperationSupport(includeParameters = {"combinationVO.id","combinationVO.dataState","combinationVO.combinationName","combinationVO.riskAnalysis","combinationVO.riskScenarioJson"})
|
||||
public ResponseResult<Boolean> updateCombination(@RequestBody CombinationVO combinationVO) {
|
||||
Boolean flag = combinationService.update(combinationVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除组合方案
|
||||
* @param combinationVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除组合方案",notes = "删除组合方案")
|
||||
@ApiImplicitParam(name = "combinationVO",value = "组合方案VO对象",required = true,dataType = "CombinationVO")
|
||||
@ApiOperationSupport(includeParameters = {"combinationVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteCombination(@RequestBody CombinationVO combinationVO) {
|
||||
Boolean flag = combinationService.delete(combinationVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询组合方案列表
|
||||
* @param combinationVO 组合方案VO对象
|
||||
* @return List<CombinationVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询组合方案列表",notes = "多条件查询组合方案列表")
|
||||
@ApiImplicitParam(name = "combinationVO",value = "组合方案VO对象",required = true,dataType = "CombinationVO")
|
||||
@ApiOperationSupport(includeParameters = {"combinationVO.combinationName","combinationVO.riskAnalysis","combinationVO.riskScenarioJson"})
|
||||
public ResponseResult<List<CombinationVO>> combinationList(@RequestBody CombinationVO combinationVO) {
|
||||
List<CombinationVO> combinationVOList = combinationService.findList(combinationVO);
|
||||
return ResponseResultBuild.successBuild(combinationVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.ConditionVO;
|
||||
import com.itheima.sfbx.insurance.service.IConditionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:筛选项响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "筛选项")
|
||||
@RestController
|
||||
@RequestMapping("condition")
|
||||
public class ConditionController {
|
||||
|
||||
@Autowired
|
||||
IConditionService conditionService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询筛选项分页
|
||||
* @param conditionVO 筛选项VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<ConditionVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "筛选项分页",notes = "筛选项分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "conditionVO",value = "筛选项VO对象",required = true,dataType = "ConditionVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"conditionVO.dataState","conditionVO.conditionKey","conditionVO.conditionKeyName","conditionVO.conditionVal","conditionVO.sortNo","conditionVO.remake"})
|
||||
public ResponseResult<Page<ConditionVO>> findConditionVOPage(
|
||||
@RequestBody ConditionVO conditionVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<ConditionVO> conditionVOPage = conditionService.findPage(conditionVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(conditionVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存筛选项
|
||||
* @param conditionVO 筛选项VO对象
|
||||
* @return ConditionVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存Condition",notes = "添加Condition")
|
||||
@ApiImplicitParam(name = "conditionVO",value = "筛选项VO对象",required = true,dataType = "ConditionVO")
|
||||
@ApiOperationSupport(includeParameters = {"conditionVO.dataState","conditionVO.conditionKey","conditionVO.conditionKeyName","conditionVO.conditionVal","conditionVO.sortNo","conditionVO.remake"})
|
||||
public ResponseResult<ConditionVO> createCondition(@RequestBody ConditionVO conditionVO) {
|
||||
ConditionVO conditionVOResult = conditionService.save(conditionVO);
|
||||
return ResponseResultBuild.successBuild(conditionVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改筛选项
|
||||
* @param conditionVO 筛选项VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改筛选项",notes = "修改筛选项")
|
||||
@ApiImplicitParam(name = "conditionVO",value = "筛选项VO对象",required = true,dataType = "ConditionVO")
|
||||
@ApiOperationSupport(includeParameters = {"conditionVO.id","conditionVO.dataState","conditionVO.conditionKey","conditionVO.conditionKeyName","conditionVO.conditionVal","conditionVO.sortNo","conditionVO.remake"})
|
||||
public ResponseResult<Boolean> updateCondition(@RequestBody ConditionVO conditionVO) {
|
||||
Boolean flag = conditionService.update(conditionVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除筛选项
|
||||
* @param conditionVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除筛选项",notes = "删除筛选项")
|
||||
@ApiImplicitParam(name = "conditionVO",value = "筛选项VO对象",required = true,dataType = "ConditionVO")
|
||||
@ApiOperationSupport(includeParameters = {"conditionVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteCondition(@RequestBody ConditionVO conditionVO) {
|
||||
Boolean flag = conditionService.delete(conditionVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询筛选项列表
|
||||
* @param conditionVO 筛选项VO对象
|
||||
* @return List<ConditionVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询筛选项列表",notes = "多条件查询筛选项列表")
|
||||
@ApiImplicitParam(name = "conditionVO",value = "筛选项VO对象",required = true,dataType = "ConditionVO")
|
||||
@ApiOperationSupport(includeParameters = {"conditionVO.dataState","conditionVO.conditionKey","conditionVO.conditionKeyName","conditionVO.conditionVal","conditionVO.sortNo","conditionVO.remake"})
|
||||
public ResponseResult<List<ConditionVO>> conditionList(@RequestBody ConditionVO conditionVO) {
|
||||
List<ConditionVO> conditionVOList = conditionService.findList(conditionVO);
|
||||
return ResponseResultBuild.successBuild(conditionVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.HealthAssessmentVO;
|
||||
import com.itheima.sfbx.insurance.service.IHealthAssessmentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:评估类目响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "评估类目")
|
||||
@RestController
|
||||
@RequestMapping("health-assessment")
|
||||
public class HealthAssessmentController {
|
||||
|
||||
@Autowired
|
||||
IHealthAssessmentService healthAssessmentService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询评估类目分页
|
||||
* @param healthAssessmentVO 评估类目VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<HealthAssessmentVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "评估类目分页",notes = "评估类目分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "healthAssessmentVO",value = "评估类目VO对象",required = true,dataType = "HealthAssessmentVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"healthAssessmentVO.insuranceId","healthAssessmentVO.assessmentKey","healthAssessmentVO.assessmentKeyName","healthAssessmentVO.assessmentVal","healthAssessmentVO.sortNo","healthAssessmentVO.remake"})
|
||||
public ResponseResult<Page<HealthAssessmentVO>> findHealthAssessmentVOPage(
|
||||
@RequestBody HealthAssessmentVO healthAssessmentVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<HealthAssessmentVO> healthAssessmentVOPage = healthAssessmentService.findPage(healthAssessmentVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(healthAssessmentVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存评估类目
|
||||
* @param healthAssessmentVO 评估类目VO对象
|
||||
* @return HealthAssessmentVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存HealthAssessment",notes = "添加HealthAssessment")
|
||||
@ApiImplicitParam(name = "healthAssessmentVO",value = "评估类目VO对象",required = true,dataType = "HealthAssessmentVO")
|
||||
@ApiOperationSupport(includeParameters = {"healthAssessmentVO.dataState","healthAssessmentVO.insuranceId","healthAssessmentVO.assessmentKey","healthAssessmentVO.assessmentKeyName","healthAssessmentVO.assessmentVal","healthAssessmentVO.sortNo","healthAssessmentVO.remake"})
|
||||
public ResponseResult<HealthAssessmentVO> createHealthAssessment(@RequestBody HealthAssessmentVO healthAssessmentVO) {
|
||||
HealthAssessmentVO healthAssessmentVOResult = healthAssessmentService.save(healthAssessmentVO);
|
||||
return ResponseResultBuild.successBuild(healthAssessmentVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改评估类目
|
||||
* @param healthAssessmentVO 评估类目VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改评估类目",notes = "修改评估类目")
|
||||
@ApiImplicitParam(name = "healthAssessmentVO",value = "评估类目VO对象",required = true,dataType = "HealthAssessmentVO")
|
||||
@ApiOperationSupport(includeParameters = {"healthAssessmentVO.id","healthAssessmentVO.dataState","healthAssessmentVO.insuranceId","healthAssessmentVO.assessmentKey","healthAssessmentVO.assessmentKeyName","healthAssessmentVO.assessmentVal","healthAssessmentVO.sortNo","healthAssessmentVO.remake"})
|
||||
public ResponseResult<Boolean> updateHealthAssessment(@RequestBody HealthAssessmentVO healthAssessmentVO) {
|
||||
Boolean flag = healthAssessmentService.update(healthAssessmentVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除评估类目
|
||||
* @param healthAssessmentVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除评估类目",notes = "删除评估类目")
|
||||
@ApiImplicitParam(name = "healthAssessmentVO",value = "评估类目VO对象",required = true,dataType = "HealthAssessmentVO")
|
||||
@ApiOperationSupport(includeParameters = {"healthAssessmentVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteHealthAssessment(@RequestBody HealthAssessmentVO healthAssessmentVO) {
|
||||
Boolean flag = healthAssessmentService.delete(healthAssessmentVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询评估类目列表
|
||||
* @param healthAssessmentVO 评估类目VO对象
|
||||
* @return List<HealthAssessmentVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询评估类目列表",notes = "多条件查询评估类目列表")
|
||||
@ApiImplicitParam(name = "healthAssessmentVO",value = "评估类目VO对象",required = true,dataType = "HealthAssessmentVO")
|
||||
@ApiOperationSupport(includeParameters = {"healthAssessmentVO.insuranceId","healthAssessmentVO.assessmentKey","healthAssessmentVO.assessmentKeyName","healthAssessmentVO.assessmentVal","healthAssessmentVO.sortNo","healthAssessmentVO.remake"})
|
||||
public ResponseResult<List<HealthAssessmentVO>> healthAssessmentList(@RequestBody HealthAssessmentVO healthAssessmentVO) {
|
||||
List<HealthAssessmentVO> healthAssessmentVOList = healthAssessmentService.findList(healthAssessmentVO);
|
||||
return ResponseResultBuild.successBuild(healthAssessmentVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.CustomerRelationVO;
|
||||
import com.itheima.sfbx.insurance.dto.InsuranceApproveVO;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceApproveService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保批信息响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保批信息")
|
||||
@RestController
|
||||
@RequestMapping("insurance-approve")
|
||||
public class InsuranceApproveController {
|
||||
|
||||
@Autowired
|
||||
IInsuranceApproveService insuranceApproveService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询保批信息分页
|
||||
* @param insuranceApproveVO 保批信息VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<InsuranceApproveVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "保批信息分页",notes = "保批信息分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "insuranceApproveVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"insuranceApproveVO.changeFieldKey","insuranceApproveVO.changeFieldName","insuranceApproveVO.changeBeforeValue","insuranceApproveVO.changeAfterValue","insuranceApproveVO.insuranceId","insuranceApproveVO.insuranceName","insuranceApproveVO.warrantyNo","insuranceApproveVO.approveState","insuranceApproveVO.applicantId","insuranceApproveVO.applicantName","insuranceApproveVO.applicantTime","insuranceApproveVO.companyNo","insuranceApproveVO.companyName","insuranceApproveVO.insuredId","insuranceApproveVO.insuredName","insuranceApproveVO.sortNo","insuranceApproveVO.remake"})
|
||||
public ResponseResult<Page<InsuranceApproveVO>> findInsuranceApproveVOPage(
|
||||
@RequestBody InsuranceApproveVO insuranceApproveVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<InsuranceApproveVO> insuranceApproveVOPage = insuranceApproveService.findPage(insuranceApproveVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(insuranceApproveVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存保批信息
|
||||
* @return InsuranceApproveVO
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation(value = "保存InsuranceApprove",notes = "添加InsuranceApprove")
|
||||
@ApiImplicitParam(name = "insuranceApproveVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceApproveVO.dataState","insuranceApproveVO.changeFieldKey","insuranceApproveVO.changeFieldName","insuranceApproveVO.changeBeforeValue","insuranceApproveVO.changeAfterValue","insuranceApproveVO.insuranceId","insuranceApproveVO.insuranceName","insuranceApproveVO.warrantyNo","insuranceApproveVO.approveState","insuranceApproveVO.applicantId","insuranceApproveVO.applicantName","insuranceApproveVO.applicantTime","insuranceApproveVO.companyNo","insuranceApproveVO.companyName","insuranceApproveVO.insuredId","insuranceApproveVO.insuredName","insuranceApproveVO.sortNo","insuranceApproveVO.remake"})
|
||||
public ResponseResult<InsuranceApproveVO> createInsuranceApprove(@RequestBody InsuranceApproveVO insuranceApproveVO) {
|
||||
InsuranceApproveVO res = insuranceApproveService.save(insuranceApproveVO);
|
||||
return ResponseResultBuild.successBuild(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改保批信息
|
||||
* @param insuranceApproveVO 保批信息VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改保批信息",notes = "修改保批信息")
|
||||
@ApiImplicitParam(name = "insuranceApproveVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceApproveVO.id","insuranceApproveVO.dataState","insuranceApproveVO.changeFieldKey","insuranceApproveVO.changeFieldName","insuranceApproveVO.changeBeforeValue","insuranceApproveVO.changeAfterValue","insuranceApproveVO.insuranceId","insuranceApproveVO.insuranceName","insuranceApproveVO.warrantyNo","insuranceApproveVO.approveState","insuranceApproveVO.applicantId","insuranceApproveVO.applicantName","insuranceApproveVO.applicantTime","insuranceApproveVO.companyNo","insuranceApproveVO.companyName","insuranceApproveVO.insuredId","insuranceApproveVO.insuredName","insuranceApproveVO.sortNo","insuranceApproveVO.remake"})
|
||||
public ResponseResult<Boolean> updateInsuranceApprove(@RequestBody InsuranceApproveVO insuranceApproveVO) {
|
||||
Boolean flag = insuranceApproveService.update(insuranceApproveVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除保批信息
|
||||
* @param insuranceApproveVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除保批信息",notes = "删除保批信息")
|
||||
@ApiImplicitParam(name = "insuranceApproveVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceApproveVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteInsuranceApprove(@RequestBody InsuranceApproveVO insuranceApproveVO) {
|
||||
Boolean flag = insuranceApproveService.delete(insuranceApproveVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询保批信息列表
|
||||
* @param insuranceApproveVO 保批信息VO对象
|
||||
* @return List<InsuranceApproveVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询保批信息列表",notes = "多条件查询保批信息列表")
|
||||
@ApiImplicitParam(name = "insuranceApproveVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceApproveVO.changeFieldKey","insuranceApproveVO.changeFieldName","insuranceApproveVO.changeBeforeValue","insuranceApproveVO.changeAfterValue","insuranceApproveVO.insuranceId","insuranceApproveVO.insuranceName","insuranceApproveVO.warrantyNo","insuranceApproveVO.approveState","insuranceApproveVO.applicantId","insuranceApproveVO.applicantName","insuranceApproveVO.applicantTime","insuranceApproveVO.companyNo","insuranceApproveVO.companyName","insuranceApproveVO.insuredId","insuranceApproveVO.insuredName","insuranceApproveVO.sortNo","insuranceApproveVO.remake"})
|
||||
public ResponseResult<List<InsuranceApproveVO>> insuranceApproveList(@RequestBody InsuranceApproveVO insuranceApproveVO) {
|
||||
List<InsuranceApproveVO> insuranceApproveVOList = insuranceApproveService.findList(insuranceApproveVO);
|
||||
return ResponseResultBuild.successBuild(insuranceApproveVOList);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* @description 根据合同编号获取报批信息
|
||||
* @return List<InsuranceApproveVO>
|
||||
*/
|
||||
@PostMapping("approve-warrantyNo/{warrantyNo}")
|
||||
@ApiOperation(value = "根据合同编号获取报批信息",notes = "根据合同编号获取报批信息")
|
||||
public ResponseResult<List<InsuranceApproveVO>> approveWarrantyNo(@PathVariable String warrantyNo) {
|
||||
List<InsuranceApproveVO> insuranceApproveVOList = insuranceApproveService.findByWarrantyNo(warrantyNo);
|
||||
return ResponseResultBuild.successBuild(insuranceApproveVOList);
|
||||
}
|
||||
}
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.insurance.enums.InsuranceApproveDetailEnum;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.itheima.sfbx.insurance.dto.InsuranceApproveDetailVO;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceApproveDetailService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Description:保批信息响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保批信息详情")
|
||||
@RestController
|
||||
@RequestMapping("insurance-approve-detail")
|
||||
public class InsuranceApproveDetailController {
|
||||
|
||||
@Autowired
|
||||
IInsuranceApproveDetailService insuranceApproveDetailService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询保批信息分页
|
||||
* @param insuranceApproveDetailVO 保批信息VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<InsuranceApproveDetailVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "保批信息分页",notes = "保批信息分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "insuranceApproveDetailVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveDetailVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"insuranceApproveDetailVO.approveId","insuranceApproveDetailVO.type","insuranceApproveDetailVO.changeFieldKey","insuranceApproveDetailVO.title","insuranceApproveDetailVO.label","insuranceApproveDetailVO.modifyCont","insuranceApproveDetailVO.modifyReason","insuranceApproveDetailVO.approveTime","insuranceApproveDetailVO.sortNo"})
|
||||
public ResponseResult<Page<InsuranceApproveDetailVO>> findInsuranceApproveDetailVOPage(
|
||||
@RequestBody InsuranceApproveDetailVO insuranceApproveDetailVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<InsuranceApproveDetailVO> insuranceApproveDetailVOPage = insuranceApproveDetailService.findPage(insuranceApproveDetailVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(insuranceApproveDetailVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存保批信息
|
||||
* @param insuranceApproveDetailVO 保批信息VO对象
|
||||
* @return InsuranceApproveDetailVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存InsuranceApproveDetail",notes = "添加InsuranceApproveDetail")
|
||||
@ApiImplicitParam(name = "insuranceApproveDetailVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveDetailVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceApproveDetailVO.dataState","insuranceApproveDetailVO.approveId","insuranceApproveDetailVO.type","insuranceApproveDetailVO.changeFieldKey","insuranceApproveDetailVO.title","insuranceApproveDetailVO.label","insuranceApproveDetailVO.modifyCont","insuranceApproveDetailVO.modifyReason","insuranceApproveDetailVO.approveTime","insuranceApproveDetailVO.sortNo"})
|
||||
public ResponseResult<InsuranceApproveDetailVO> createInsuranceApproveDetail(@RequestBody InsuranceApproveDetailVO insuranceApproveDetailVO) {
|
||||
InsuranceApproveDetailVO insuranceApproveDetailVOResult = insuranceApproveDetailService.save(insuranceApproveDetailVO);
|
||||
return ResponseResultBuild.successBuild(insuranceApproveDetailVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改保批信息
|
||||
* @param insuranceApproveDetailVO 保批信息VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改保批信息",notes = "修改保批信息")
|
||||
@ApiImplicitParam(name = "insuranceApproveDetailVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveDetailVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceApproveDetailVO.id","insuranceApproveDetailVO.dataState","insuranceApproveDetailVO.approveId","insuranceApproveDetailVO.type","insuranceApproveDetailVO.changeFieldKey","insuranceApproveDetailVO.title","insuranceApproveDetailVO.label","insuranceApproveDetailVO.modifyCont","insuranceApproveDetailVO.modifyReason","insuranceApproveDetailVO.approveTime","insuranceApproveDetailVO.sortNo"})
|
||||
public ResponseResult<Boolean> updateInsuranceApproveDetail(@RequestBody InsuranceApproveDetailVO insuranceApproveDetailVO) {
|
||||
Boolean flag = insuranceApproveDetailService.update(insuranceApproveDetailVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除保批信息
|
||||
* @param insuranceApproveDetailVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除保批信息",notes = "删除保批信息")
|
||||
@ApiImplicitParam(name = "insuranceApproveDetailVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveDetailVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceApproveDetailVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteInsuranceApproveDetail(@RequestBody InsuranceApproveDetailVO insuranceApproveDetailVO) {
|
||||
Boolean flag = insuranceApproveDetailService.delete(insuranceApproveDetailVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询保批信息列表
|
||||
* @param insuranceApproveDetailVO 保批信息VO对象
|
||||
* @return List<InsuranceApproveDetailVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询保批信息列表",notes = "多条件查询保批信息列表")
|
||||
@ApiImplicitParam(name = "insuranceApproveDetailVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveDetailVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceApproveDetailVO.approveId","insuranceApproveDetailVO.type","insuranceApproveDetailVO.changeFieldKey","insuranceApproveDetailVO.title","insuranceApproveDetailVO.label","insuranceApproveDetailVO.modifyCont","insuranceApproveDetailVO.modifyReason","insuranceApproveDetailVO.approveTime","insuranceApproveDetailVO.sortNo"})
|
||||
public ResponseResult<List<InsuranceApproveDetailVO>> insuranceApproveDetailList(@RequestBody InsuranceApproveDetailVO insuranceApproveDetailVO) {
|
||||
List<InsuranceApproveDetailVO> insuranceApproveDetailVOList = insuranceApproveDetailService.findList(insuranceApproveDetailVO);
|
||||
return ResponseResultBuild.successBuild(insuranceApproveDetailVOList);
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.InsuranceCoefficentVO;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceCoefficentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保险系数项响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险系数项")
|
||||
@RestController
|
||||
@RequestMapping("insurance-coefficent")
|
||||
public class InsuranceCoefficentController {
|
||||
|
||||
@Autowired
|
||||
IInsuranceCoefficentService insuranceCoefficentService;
|
||||
|
||||
/**
|
||||
* @Description 保存保险系数项
|
||||
* @param insuranceCoefficentVOs 保险系数项VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存InsuranceCoefficent",notes = "添加InsuranceCoefficent")
|
||||
@ApiImplicitParam(name = "insuranceCoefficentVOs",value = "保险系数项VO对象",required = true,dataType = "InsuranceCoefficentVO")
|
||||
public ResponseResult<Boolean> createInsuranceCoefficent(@RequestBody List<InsuranceCoefficentVO> insuranceCoefficentVOs) {
|
||||
Boolean flag = insuranceCoefficentService.save(insuranceCoefficentVOs);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description 修改保险系数项
|
||||
* @param insuranceCoefficentVOs 保险系数项VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改保险系数项",notes = "修改保险系数项")
|
||||
@ApiImplicitParam(name = "insuranceCoefficentVOs",value = "保险系数项VO对象",required = true,dataType = "InsuranceCoefficentVO")
|
||||
public ResponseResult<Boolean> updateInsuranceCoefficent(@RequestBody List<InsuranceCoefficentVO> insuranceCoefficentVOs) {
|
||||
Boolean flag = insuranceCoefficentService.update(insuranceCoefficentVOs);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询保险系数项列表
|
||||
* @param insuranceCoefficentVO 保险系数项VO对象
|
||||
* @return List<InsuranceCoefficentVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询保险系数项列表",notes = "多条件查询保险系数项列表")
|
||||
@ApiImplicitParam(name = "insuranceCoefficentVO",value = "保险系数项VO对象",required = true,dataType = "InsuranceCoefficentVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceCoefficentVO.insuranceId","insuranceCoefficentVO.coefficentKey","insuranceCoefficentVO.coefficentKeyName","insuranceCoefficentVO.coefficentValue","insuranceCoefficentVO.score","insuranceCoefficentVO.isDefault","insuranceCoefficentVO.sortNo"})
|
||||
public ResponseResult<List<InsuranceCoefficentVO>> insuranceCoefficentList(@RequestBody InsuranceCoefficentVO insuranceCoefficentVO) {
|
||||
List<InsuranceCoefficentVO> insuranceCoefficentVOList = insuranceCoefficentService.findList(insuranceCoefficentVO);
|
||||
return ResponseResultBuild.successBuild(insuranceCoefficentVOList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.InsuranceConditionVO;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceConditionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保险筛选项响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险筛选项")
|
||||
@RestController
|
||||
@RequestMapping("insurance-condition")
|
||||
public class InsuranceConditionController {
|
||||
|
||||
@Autowired
|
||||
IInsuranceConditionService insuranceConditionService;
|
||||
|
||||
/**
|
||||
* @Description 保存保险筛选项
|
||||
* @param insuranceConditionListVOs 保险筛选项VO对象
|
||||
* @return InsuranceConditionVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存InsuranceCondition", notes = "添加InsuranceCondition")
|
||||
@ApiImplicitParam(name = "insuranceConditionListVOs", value = "保险筛选项VO对象", required = true, dataType = "InsuranceConditionVO")
|
||||
public ResponseResult<Boolean> createInsuranceCondition(@RequestBody List<InsuranceConditionVO> insuranceConditionListVOs) {
|
||||
Boolean flag = insuranceConditionService.save(insuranceConditionListVOs);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改保险筛选项
|
||||
* @param insuranceConditionListVOs 保险筛选项VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改保险筛选项", notes = "修改保险筛选项")
|
||||
@ApiImplicitParam(name = "insuranceConditionListVOs", value = "保险筛选项VO对象", required = true, dataType = "InsuranceConditionVO")
|
||||
public ResponseResult<Boolean> updateInsuranceCondition(@RequestBody List<InsuranceConditionVO> insuranceConditionListVOs) {
|
||||
Boolean flag = insuranceConditionService.update(insuranceConditionListVOs);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询保险筛选项列表
|
||||
* @param insuranceConditionVO 保险筛选项VO对象
|
||||
* @return List<InsuranceConditionVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询保险筛选项列表", notes = "多条件查询保险筛选项列表")
|
||||
@ApiImplicitParam(name = "insuranceConditionVO", value = "保险筛选项VO对象", required = true, dataType = "InsuranceConditionVO")
|
||||
public ResponseResult<List<InsuranceConditionVO>> insuranceConditionList(@RequestBody InsuranceConditionVO insuranceConditionVO) {
|
||||
List<InsuranceConditionVO> insuranceConditionVOList = insuranceConditionService.findList(insuranceConditionVO);
|
||||
return ResponseResultBuild.successBuild(insuranceConditionVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.InsuranceVO;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保险产品响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险产品")
|
||||
@RestController
|
||||
@RequestMapping("insurance")
|
||||
public class InsuranceController {
|
||||
|
||||
@Autowired
|
||||
IInsuranceService insuranceService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询保险产品分页
|
||||
* @param insuranceVO 保险产品VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<InsuranceVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "保险产品分页",notes = "保险产品分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "insuranceVO",value = "保险产品VO对象",required = true,dataType = "InsuranceVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"insuranceVO.categoryNo","insurance.checkRule",
|
||||
"insuranceVO.publishNumber","insuranceVO.categoryNo","insuranceVO.recommendCategoryNo",
|
||||
"insuranceVO.insuranceName","insuranceVO.optimization","insuranceVO.relieved",
|
||||
"insuranceVO.showIndex","insuranceVO.labelsJson","insuranceVO.remakeJson","insuranceVO.timeStart",
|
||||
"insuranceVO.timeStartUnit","insuranceVO.timeEnd","insuranceVO.timeEndUnit","insuranceVO.relation",
|
||||
"insuranceVO.sortNo","insuranceVO.multiple","insuranceVO.continuousInsuranceAge","insuranceVO.companyNo",
|
||||
"insuranceVO.insuranceState","insuranceVO.grace","insuranceVO.graceUnit","insuranceVO.revival",
|
||||
"insuranceVO.revivalUnit","insuranceVO.comment","insuranceVO.remake"})
|
||||
public ResponseResult<Page<InsuranceVO>> findInsuranceVOPage(
|
||||
@RequestBody InsuranceVO insuranceVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<InsuranceVO> insuranceVOPage = insuranceService.findPage(insuranceVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(insuranceVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存保险产品
|
||||
* @param insuranceVO 保险产品VO对象
|
||||
* @return InsuranceVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存Insurance",notes = "添加Insurance")
|
||||
@ApiImplicitParam(name = "insuranceVO",value = "保险产品VO对象",required = true,dataType = "InsuranceVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceVO.publishNumber","insuranceVO.categoryNo",
|
||||
"insuranceVO.recommendCategoryNo","insuranceVO.insuranceName","insuranceVO.goldSelection",
|
||||
"insuranceVO.carefree","insuranceVO.showIndex","insuranceVO.labelsJson","insuranceVO.remakeJson",
|
||||
"insuranceVO.timeStart","insuranceVO.timeStartUnit","insuranceVO.timeEnd",
|
||||
"insuranceVO.timeEndUnit","insuranceVO.relation","insuranceVO.sortNo","insuranceVO.multiple",
|
||||
"insuranceVO.continuousInsuranceAge","insuranceVO.checkRule","insuranceVO.companyNo",
|
||||
"insuranceVO.insuranceState", "insuranceVO.grace","insuranceVO.graceUnit","insuranceVO.revival",
|
||||
"insuranceVO.revivalUnit", "insuranceVO.comment","insuranceVO.remake","insuranceVO.hesitation",
|
||||
"insuranceVO.waits", "insuranceVO.operatingRate","insuranceVO.individualAgentRate",
|
||||
"insuranceVO.platformAgentRate"})
|
||||
public ResponseResult<InsuranceVO> createInsurance(@RequestBody InsuranceVO insuranceVO) {
|
||||
InsuranceVO insuranceVOResult = insuranceService.save(insuranceVO);
|
||||
return ResponseResultBuild.successBuild(insuranceVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改保险产品
|
||||
* @param insuranceVO 保险产品VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改保险产品",notes = "修改保险产品")
|
||||
@ApiImplicitParam(name = "insuranceVO",value = "保险产品VO对象",required = true,dataType = "InsuranceVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceVO.id","insuranceVO.publishNumber","insuranceVO.categoryNo",
|
||||
"insuranceVO.recommendCategoryNo","insuranceVO.insuranceName","insuranceVO.goldSelection",
|
||||
"insuranceVO.carefree","insuranceVO.showIndex","insuranceVO.labelsJson","insuranceVO.remakeJson",
|
||||
"insuranceVO.timeStart","insuranceVO.timeStartUnit","insuranceVO.timeEnd",
|
||||
"insuranceVO.timeEndUnit","insuranceVO.relation","insuranceVO.sortNo","insuranceVO.multiple",
|
||||
"insuranceVO.continuousInsuranceAge","insuranceVO.checkRule","insuranceVO.companyNo","insuranceVO.insuranceState",
|
||||
"insuranceVO.grace","insuranceVO.graceUnit","insuranceVO.revival","insuranceVO.revivalUnit",
|
||||
"insuranceVO.comment","insuranceVO.remake","insuranceVO.hesitation","insuranceVO.waits",
|
||||
"insuranceVO.operatingRate","insuranceVO.individualAgentRate","insuranceVO.platformAgentRate"})
|
||||
public ResponseResult<Boolean> updateInsurance(@RequestBody InsuranceVO insuranceVO) {
|
||||
Boolean flag = insuranceService.update(insuranceVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询保险产品列表
|
||||
* @param insuranceVO 保险产品VO对象
|
||||
* @return List<InsuranceVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询保险产品列表",notes = "多条件查询保险产品列表")
|
||||
@ApiImplicitParam(name = "insuranceVO",value = "保险产品VO对象",required = true,dataType = "InsuranceVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceVO.publishNumber","insuranceVO.categoryNo",
|
||||
"insuranceVO.recommendCategoryNo","insuranceVO.insuranceName","insuranceVO.goldSelection",
|
||||
"insuranceVO.carefree","insuranceVO.showIndex","insuranceVO.labelsJson","insuranceVO.remakeJson",
|
||||
"insuranceVO.timeStart","insuranceVO.timeStartUnit","insuranceVO.timeEnd",
|
||||
"insuranceVO.timeEndUnit","insuranceVO.relation","insuranceVO.sortNo","insuranceVO.multiple",
|
||||
"insuranceVO.continuousInsuranceAge","insuranceVO.checkRule","insuranceVO.companyNo","insuranceVO.insuranceState",
|
||||
"insuranceVO.grace","insuranceVO.graceUnit","insuranceVO.revival","insuranceVO.revivalUnit",
|
||||
"insuranceVO.comment","insuranceVO.remake","insuranceVO.hesitation","insuranceVO.waits",
|
||||
"insuranceVO.operatingRate","insuranceVO.individualAgentRate","insuranceVO.platformAgentRate"})
|
||||
public ResponseResult<List<InsuranceVO>> insuranceList(@RequestBody InsuranceVO insuranceVO) {
|
||||
List<InsuranceVO> insuranceVOList = insuranceService.findList(insuranceVO);
|
||||
return ResponseResultBuild.successBuild(insuranceVOList);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 保险产品详情
|
||||
* @param insuranceId 保险id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("insurance/{insuranceId}")
|
||||
@ApiOperation(value = "保险产品详情",notes = "保险产品详情")
|
||||
@ApiImplicitParam(name = "insuranceId",value = "保险id",required = true,dataType = "String")
|
||||
public ResponseResult<InsuranceVO> findInsuranceDetails(@PathVariable("insuranceId")String insuranceId){
|
||||
InsuranceVO insuranceVO = insuranceService.findById(insuranceId);
|
||||
return ResponseResultBuild.successBuild(insuranceVO);
|
||||
}
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.InsurancePlanVO;
|
||||
import com.itheima.sfbx.insurance.dto.InsuranceVO;
|
||||
import com.itheima.sfbx.insurance.service.IInsurancePlanService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保险方案响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险方案")
|
||||
@RestController
|
||||
@RequestMapping("insurance-plan")
|
||||
public class InsurancePlanController {
|
||||
|
||||
@Autowired
|
||||
IInsurancePlanService insurancePlanService;
|
||||
|
||||
/**
|
||||
* @Description 保存保险方案
|
||||
* @param insurancePlanVOs 保险产品方案VO对象列表
|
||||
* @return InsurancePlanVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存InsurancePlan",notes = "添加InsurancePlan")
|
||||
@ApiImplicitParam(name = "insurancePlanVOs",value = "保险方案VO对象",required = true,dataType = "InsurancePlanVO")
|
||||
public ResponseResult<Boolean> createInsurancePlans(@RequestBody List<InsurancePlanVO> insurancePlanVOs) {
|
||||
Boolean flag=insurancePlanService.save(insurancePlanVOs);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改保险方案
|
||||
* @param insurancePlanVOs 保险产品方案VO对象列表
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改保险方案",notes = "修改保险方案")
|
||||
@ApiImplicitParam(name = "insurancePlanVOs",value = "保险方案VO对象",required = true,dataType = "InsurancePlanVO")
|
||||
public ResponseResult<Boolean> updateInsurancePlan(@RequestBody List<InsurancePlanVO> insurancePlanVOs) {
|
||||
Boolean flag = insurancePlanService.update(insurancePlanVOs);
|
||||
return ResponseResultBuild.successBuild(true);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询保险方案列表
|
||||
* @param insurancePlanVO 保险方案VO对象
|
||||
* @return List<InsurancePlanVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询保险方案列表",notes = "多条件查询保险方案列表")
|
||||
@ApiImplicitParam(name = "insurancePlanVO",value = "保险方案VO对象",required = true,dataType = "InsurancePlanVO")
|
||||
@ApiOperationSupport(includeParameters = {"insurancePlanVO.insuranceId","insurancePlanVO.palnName","insurancePlanVO.palnRemake","insurancePlanVO.price","insurancePlanVO.priceUnit","insurancePlanVO.rateTopGrade","insurancePlanVO.rateLastYear","insurancePlanVO.rateGuarantee","insurancePlanVO.sortNo"})
|
||||
public ResponseResult<List<InsurancePlanVO>> insurancePlanList(@RequestBody InsurancePlanVO insurancePlanVO) {
|
||||
List<InsurancePlanVO> insurancePlanVOList = insurancePlanService.findList(insurancePlanVO);
|
||||
return ResponseResultBuild.successBuild(insurancePlanVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.insurance.enums.InsuranceSievingEnum;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.itheima.sfbx.insurance.dto.InsuranceSievingVO;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceSievingService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Description:初筛结果响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "初筛结果")
|
||||
@RestController
|
||||
@RequestMapping("insurance-sieving")
|
||||
public class InsuranceSievingController {
|
||||
|
||||
@Autowired
|
||||
IInsuranceSievingService insuranceSievingService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询初筛结果分页
|
||||
* @param insuranceSievingVO 初筛结果VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<InsuranceSievingVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "初筛结果分页",notes = "初筛结果分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "insuranceSievingVO",value = "初筛结果VO对象",required = true,dataType = "InsuranceSievingVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"insuranceSievingVO.name","insuranceSievingVO.sicksName","insuranceSievingVO.sicksKey","insuranceSievingVO.result","insuranceSievingVO.sortNo"})
|
||||
public ResponseResult<Page<InsuranceSievingVO>> findInsuranceSievingVOPage(
|
||||
@RequestBody InsuranceSievingVO insuranceSievingVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<InsuranceSievingVO> insuranceSievingVOPage = insuranceSievingService.findPage(insuranceSievingVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(insuranceSievingVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存初筛结果
|
||||
* @param insuranceSievingVO 初筛结果VO对象
|
||||
* @return InsuranceSievingVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存InsuranceSieving",notes = "添加InsuranceSieving")
|
||||
@ApiImplicitParam(name = "insuranceSievingVO",value = "初筛结果VO对象",required = true,dataType = "InsuranceSievingVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceSievingVO.dataState","insuranceSievingVO.name","insuranceSievingVO.sicksName","insuranceSievingVO.sicksKey","insuranceSievingVO.result","insuranceSievingVO.sortNo"})
|
||||
public ResponseResult<InsuranceSievingVO> createInsuranceSieving(@RequestBody InsuranceSievingVO insuranceSievingVO) {
|
||||
InsuranceSievingVO insuranceSievingVOResult = insuranceSievingService.save(insuranceSievingVO);
|
||||
return ResponseResultBuild.successBuild(insuranceSievingVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改初筛结果
|
||||
* @param insuranceSievingVO 初筛结果VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改初筛结果",notes = "修改初筛结果")
|
||||
@ApiImplicitParam(name = "insuranceSievingVO",value = "初筛结果VO对象",required = true,dataType = "InsuranceSievingVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceSievingVO.id","insuranceSievingVO.dataState","insuranceSievingVO.name","insuranceSievingVO.sicksName","insuranceSievingVO.sicksKey","insuranceSievingVO.result","insuranceSievingVO.sortNo"})
|
||||
public ResponseResult<Boolean> updateInsuranceSieving(@RequestBody InsuranceSievingVO insuranceSievingVO) {
|
||||
Boolean flag = insuranceSievingService.update(insuranceSievingVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除初筛结果
|
||||
* @param insuranceSievingVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除初筛结果",notes = "删除初筛结果")
|
||||
@ApiImplicitParam(name = "insuranceSievingVO",value = "初筛结果VO对象",required = true,dataType = "InsuranceSievingVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceSievingVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteInsuranceSieving(@RequestBody InsuranceSievingVO insuranceSievingVO) {
|
||||
Boolean flag = insuranceSievingService.delete(insuranceSievingVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询初筛结果列表
|
||||
* @param insuranceSievingVO 初筛结果VO对象
|
||||
* @return List<InsuranceSievingVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询初筛结果列表",notes = "多条件查询初筛结果列表")
|
||||
@ApiImplicitParam(name = "insuranceSievingVO",value = "初筛结果VO对象",required = true,dataType = "InsuranceSievingVO")
|
||||
@ApiOperationSupport(includeParameters = {"insuranceSievingVO.name","insuranceSievingVO.sicksName","insuranceSievingVO.sicksKey","insuranceSievingVO.result","insuranceSievingVO.sortNo"})
|
||||
public ResponseResult<List<InsuranceSievingVO>> insuranceSievingList(@RequestBody InsuranceSievingVO insuranceSievingVO) {
|
||||
List<InsuranceSievingVO> insuranceSievingVOList = insuranceSievingService.findList(insuranceSievingVO);
|
||||
return ResponseResultBuild.successBuild(insuranceSievingVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.RiskAnalysisVO;
|
||||
import com.itheima.sfbx.insurance.service.IRiskAnalysisService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:风险类目响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "风险类目")
|
||||
@RestController
|
||||
@RequestMapping("risk-analysis")
|
||||
public class RiskAnalysisController {
|
||||
|
||||
@Autowired
|
||||
IRiskAnalysisService riskAnalysisService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询风险类目分页
|
||||
* @param riskAnalysisVO 风险类目VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<RiskAnalysisVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "风险类目分页",notes = "风险类目分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "riskAnalysisVO",value = "风险类目VO对象",required = true,dataType = "RiskAnalysisVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"riskAnalysisVO.insuranceId","riskAnalysisVO.assessmentKey","riskAnalysisVO.assessmentKeyName","riskAnalysisVO.assessmentVal","riskAnalysisVO.assessmentType","riskAnalysisVO.sortNo","riskAnalysisVO.remake"})
|
||||
public ResponseResult<Page<RiskAnalysisVO>> findRiskAnalysisVOPage(
|
||||
@RequestBody RiskAnalysisVO riskAnalysisVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<RiskAnalysisVO> riskAnalysisVOPage = riskAnalysisService.findPage(riskAnalysisVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(riskAnalysisVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存风险类目
|
||||
* @param riskAnalysisVO 风险类目VO对象
|
||||
* @return RiskAnalysisVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存RiskAnalysis",notes = "添加RiskAnalysis")
|
||||
@ApiImplicitParam(name = "riskAnalysisVO",value = "风险类目VO对象",required = true,dataType = "RiskAnalysisVO")
|
||||
@ApiOperationSupport(includeParameters = {"riskAnalysisVO.dataState","riskAnalysisVO.insuranceId","riskAnalysisVO.assessmentKey","riskAnalysisVO.assessmentKeyName","riskAnalysisVO.assessmentVal","riskAnalysisVO.assessmentType","riskAnalysisVO.sortNo","riskAnalysisVO.remake"})
|
||||
public ResponseResult<RiskAnalysisVO> createRiskAnalysis(@RequestBody RiskAnalysisVO riskAnalysisVO) {
|
||||
RiskAnalysisVO riskAnalysisVOResult = riskAnalysisService.save(riskAnalysisVO);
|
||||
return ResponseResultBuild.successBuild(riskAnalysisVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改风险类目
|
||||
* @param riskAnalysisVO 风险类目VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改风险类目",notes = "修改风险类目")
|
||||
@ApiImplicitParam(name = "riskAnalysisVO",value = "风险类目VO对象",required = true,dataType = "RiskAnalysisVO")
|
||||
@ApiOperationSupport(includeParameters = {"riskAnalysisVO.id","riskAnalysisVO.dataState","riskAnalysisVO.insuranceId","riskAnalysisVO.assessmentKey","riskAnalysisVO.assessmentKeyName","riskAnalysisVO.assessmentVal","riskAnalysisVO.assessmentType","riskAnalysisVO.sortNo","riskAnalysisVO.remake"})
|
||||
public ResponseResult<Boolean> updateRiskAnalysis(@RequestBody RiskAnalysisVO riskAnalysisVO) {
|
||||
Boolean flag = riskAnalysisService.update(riskAnalysisVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除风险类目
|
||||
* @param riskAnalysisVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除风险类目",notes = "删除风险类目")
|
||||
@ApiImplicitParam(name = "riskAnalysisVO",value = "风险类目VO对象",required = true,dataType = "RiskAnalysisVO")
|
||||
@ApiOperationSupport(includeParameters = {"riskAnalysisVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteRiskAnalysis(@RequestBody RiskAnalysisVO riskAnalysisVO) {
|
||||
Boolean flag = riskAnalysisService.delete(riskAnalysisVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询风险类目列表
|
||||
* @param riskAnalysisVO 风险类目VO对象
|
||||
* @return List<RiskAnalysisVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询风险类目列表",notes = "多条件查询风险类目列表")
|
||||
@ApiImplicitParam(name = "riskAnalysisVO",value = "风险类目VO对象",required = true,dataType = "RiskAnalysisVO")
|
||||
@ApiOperationSupport(includeParameters = {"riskAnalysisVO.insuranceId","riskAnalysisVO.assessmentKey","riskAnalysisVO.assessmentKeyName","riskAnalysisVO.assessmentVal","riskAnalysisVO.assessmentType","riskAnalysisVO.sortNo","riskAnalysisVO.remake"})
|
||||
public ResponseResult<List<RiskAnalysisVO>> riskAnalysisList(@RequestBody RiskAnalysisVO riskAnalysisVO) {
|
||||
List<RiskAnalysisVO> riskAnalysisVOList = riskAnalysisService.findList(riskAnalysisVO);
|
||||
return ResponseResultBuild.successBuild(riskAnalysisVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.SafeguardVO;
|
||||
import com.itheima.sfbx.insurance.service.ISafeguardService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保障项响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保障项")
|
||||
@RestController
|
||||
@RequestMapping("safeguard")
|
||||
public class SafeguardController {
|
||||
|
||||
@Autowired
|
||||
ISafeguardService safeguardService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询保障项分页
|
||||
* @param safeguardVO 保障项VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<SafeguardVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "保障项分页",notes = "保障项分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"safeguardVO.dataState","safeguardVO.safeguardKey","safeguardVO.safeguardKeyName","safeguardVO.safeguardVal","safeguardVO.safeguardType","safeguardVO.sortNo","safeguardVO.remake"})
|
||||
public ResponseResult<Page<SafeguardVO>> findSafeguardVOPage(
|
||||
@RequestBody SafeguardVO safeguardVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<SafeguardVO> safeguardVOPage = safeguardService.findPage(safeguardVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(safeguardVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存保障项
|
||||
* @param safeguardVO 保障项VO对象
|
||||
* @return SafeguardVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存Safeguard",notes = "添加Safeguard")
|
||||
@ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO")
|
||||
@ApiOperationSupport(includeParameters = {"safeguardVO.dataState","safeguardVO.safeguardKey","safeguardVO.safeguardKeyName","safeguardVO.safeguardVal","safeguardVO.safeguardType","safeguardVO.sortNo","safeguardVO.remake"})
|
||||
public ResponseResult<SafeguardVO> createSafeguard(@RequestBody SafeguardVO safeguardVO) {
|
||||
SafeguardVO safeguardVOResult = safeguardService.save(safeguardVO);
|
||||
return ResponseResultBuild.successBuild(safeguardVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改保障项
|
||||
* @param safeguardVO 保障项VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改保障项",notes = "修改保障项")
|
||||
@ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO")
|
||||
@ApiOperationSupport(includeParameters = {"safeguardVO.id","safeguardVO.dataState","safeguardVO.safeguardKey","safeguardVO.safeguardKeyName","safeguardVO.safeguardVal","safeguardVO.safeguardType","safeguardVO.sortNo","safeguardVO.remake"})
|
||||
public ResponseResult<Boolean> updateSafeguard(@RequestBody SafeguardVO safeguardVO) {
|
||||
Boolean flag = safeguardService.update(safeguardVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除保障项
|
||||
* @param safeguardVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除保障项",notes = "删除保障项")
|
||||
@ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO")
|
||||
@ApiOperationSupport(includeParameters = {"safeguardVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteSafeguard(@RequestBody SafeguardVO safeguardVO) {
|
||||
Boolean flag = safeguardService.delete(safeguardVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询保障项列表
|
||||
* @param safeguardVO 保障项VO对象
|
||||
* @return List<SafeguardVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询保障项列表",notes = "多条件查询保障项列表")
|
||||
@ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO")
|
||||
@ApiOperationSupport(includeParameters = {"safeguardVO.dataState","safeguardVO.safeguardKey","safeguardVO.safeguardKeyName","safeguardVO.safeguardVal","safeguardVO.safeguardType","safeguardVO.sortNo","safeguardVO.remake"})
|
||||
public ResponseResult<List<SafeguardVO>> safeguardList(@RequestBody SafeguardVO safeguardVO) {
|
||||
List<SafeguardVO> safeguardVOList = safeguardService.findList(safeguardVO);
|
||||
return ResponseResultBuild.successBuild(safeguardVOList);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 按safeguardKey查询SafeguardVO
|
||||
* @param safeguardKey 保障项key
|
||||
* @return SafeguardVO
|
||||
*/
|
||||
@PostMapping("safeguard-key/{safeguardKey}")
|
||||
@ApiOperation(value = "保障项key查询SafeguardVO",notes = "保障项key查询SafeguardVO")
|
||||
@ApiImplicitParam(paramType = "path",name = "safeguardKey",value = "保障项key",dataType = "String")
|
||||
public ResponseResult<SafeguardVO> findBySafeguardKey(@PathVariable("safeguardKey") String safeguardKey) {
|
||||
SafeguardVO safeguardVO = safeguardService.findBySafeguardKey(safeguardKey);
|
||||
return ResponseResultBuild.successBuild(safeguardVO);
|
||||
}
|
||||
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.framework.commons.utils.SubjectContent;
|
||||
import com.itheima.sfbx.insurance.dto.*;
|
||||
import com.itheima.sfbx.insurance.rule.advice.AdviceHealthDTO;
|
||||
import com.itheima.sfbx.insurance.service.IInsuranceSievingService;
|
||||
import com.itheima.sfbx.insurance.service.ISickSearchRecordService;
|
||||
import com.itheima.sfbx.insurance.service.ISickService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName SeekAdviceController.java
|
||||
* @Description 健康咨询
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "健康咨询,保险初筛")
|
||||
@RestController
|
||||
@RequestMapping("seek-advice")
|
||||
public class SeekAdviceController {
|
||||
|
||||
@Autowired
|
||||
private IInsuranceSievingService insuranceSievingService;
|
||||
|
||||
/**
|
||||
* @description 分页查询保险问卷
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "分页查询保险问卷",notes = "分页查询保险问卷")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "insuranceSievingVO",value = "筛选项VO对象",required = true,dataType = "InsuranceSievingVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
public ResponseResult<Page<InsuranceSievingVO>> findInsuranceSievingPage(
|
||||
@RequestBody InsuranceSievingVO insuranceSievingVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<InsuranceSievingVO> page = insuranceSievingService.findPage(insuranceSievingVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(page);
|
||||
}
|
||||
|
||||
}
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.WarrantyVO;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保险合同响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保险合同")
|
||||
@RestController
|
||||
@RequestMapping("warranty")
|
||||
public class WarrantyController {
|
||||
|
||||
@Autowired
|
||||
IWarrantyService warrantyService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询保险合同分页
|
||||
* @param warrantyVO 保险合同VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<WarrantyVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "保险合同分页",notes = "保险合同分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "warrantyVO",value = "保险合同VO对象",required = true,dataType = "WarrantyVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"warrantyVO.insuranceId","warrantyVO.insuranceName","warrantyVO.insuranceJson","warrantyVO.warrantyNo","warrantyVO.applicantName","warrantyVO.applicantIdentityCard","warrantyVO.insuredName","warrantyVO.insuredIdentityCard","warrantyVO.companyNo","warrantyVO.companyName","warrantyVO.safeguardStartTime","warrantyVO.safeguardEndTime","warrantyVO.premium","warrantyVO.paymentMethod","warrantyVO.autoWarrantyExtension","warrantyVO.warrantyState","warrantyVO.underwritingState","warrantyVO.periods","warrantyVO.dutyPeriod","warrantyVO.sortNo","warrantyVO.hesitationTime","warrantyVO.grace","warrantyVO.graceUnit","warrantyVO.revival","warrantyVO.revivalUnit"})
|
||||
public ResponseResult<Page<WarrantyVO>> findWarrantyVOPage(
|
||||
@RequestBody WarrantyVO warrantyVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<WarrantyVO> warrantyVOPage = warrantyService.findPage(warrantyVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(warrantyVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存保险合同
|
||||
* @param warrantyVO 保险合同VO对象
|
||||
* @return WarrantyVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存Warranty",notes = "添加Warranty")
|
||||
@ApiImplicitParam(name = "warrantyVO",value = "保险合同VO对象",required = true,dataType = "WarrantyVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyVO.dataState","warrantyVO.insuranceId","warrantyVO.insuranceName","warrantyVO.insuranceJson","warrantyVO.warrantyNo","warrantyVO.applicantName","warrantyVO.applicantIdentityCard","warrantyVO.insuredName","warrantyVO.insuredIdentityCard","warrantyVO.companyNo","warrantyVO.companyName","warrantyVO.safeguardStartTime","warrantyVO.safeguardEndTime","warrantyVO.premium","warrantyVO.paymentMethod","warrantyVO.autoWarrantyExtension","warrantyVO.warrantyState","warrantyVO.underwritingState","warrantyVO.periods","warrantyVO.dutyPeriod","warrantyVO.sortNo","warrantyVO.hesitationTime","warrantyVO.grace","warrantyVO.graceUnit","warrantyVO.revival","warrantyVO.revivalUnit"})
|
||||
public ResponseResult<WarrantyVO> createWarranty(@RequestBody WarrantyVO warrantyVO) {
|
||||
WarrantyVO warrantyVOResult = warrantyService.save(warrantyVO);
|
||||
return ResponseResultBuild.successBuild(warrantyVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改保险合同
|
||||
* @param warrantyVO 保险合同VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改保险合同",notes = "修改保险合同")
|
||||
@ApiImplicitParam(name = "warrantyVO",value = "保险合同VO对象",required = true,dataType = "WarrantyVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyVO.id","warrantyVO.dataState","warrantyVO.insuranceId","warrantyVO.insuranceName","warrantyVO.insuranceJson","warrantyVO.warrantyNo","warrantyVO.applicantName","warrantyVO.applicantIdentityCard","warrantyVO.insuredName","warrantyVO.insuredIdentityCard","warrantyVO.companyNo","warrantyVO.companyName","warrantyVO.safeguardStartTime","warrantyVO.safeguardEndTime","warrantyVO.premium","warrantyVO.paymentMethod","warrantyVO.autoWarrantyExtension","warrantyVO.warrantyState","warrantyVO.underwritingState","warrantyVO.periods","warrantyVO.dutyPeriod","warrantyVO.sortNo","warrantyVO.hesitationTime","warrantyVO.grace","warrantyVO.graceUnit","warrantyVO.revival","warrantyVO.revivalUnit"})
|
||||
public ResponseResult<Boolean> updateWarranty(@RequestBody WarrantyVO warrantyVO) {
|
||||
Boolean flag = warrantyService.update(warrantyVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除保险合同
|
||||
* @param warrantyVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除保险合同",notes = "删除保险合同")
|
||||
@ApiImplicitParam(name = "warrantyVO",value = "保险合同VO对象",required = true,dataType = "WarrantyVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteWarranty(@RequestBody WarrantyVO warrantyVO) {
|
||||
Boolean flag = warrantyService.delete(warrantyVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询保险合同列表
|
||||
* @param warrantyVO 保险合同VO对象
|
||||
* @return List<WarrantyVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询保险合同列表",notes = "多条件查询保险合同列表")
|
||||
@ApiImplicitParam(name = "warrantyVO",value = "保险合同VO对象",required = true,dataType = "WarrantyVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyVO.insuranceId","warrantyVO.insuranceName","warrantyVO.insuranceJson","warrantyVO.warrantyNo","warrantyVO.applicantName","warrantyVO.applicantIdentityCard","warrantyVO.insuredName","warrantyVO.insuredIdentityCard","warrantyVO.companyNo","warrantyVO.companyName","warrantyVO.safeguardStartTime","warrantyVO.safeguardEndTime","warrantyVO.premium","warrantyVO.paymentMethod","warrantyVO.autoWarrantyExtension","warrantyVO.warrantyState","warrantyVO.underwritingState","warrantyVO.periods","warrantyVO.dutyPeriod","warrantyVO.sortNo","warrantyVO.hesitationTime","warrantyVO.grace","warrantyVO.graceUnit","warrantyVO.revival","warrantyVO.revivalUnit"})
|
||||
public ResponseResult<List<WarrantyVO>> warrantyList(@RequestBody WarrantyVO warrantyVO) {
|
||||
List<WarrantyVO> warrantyVOList = warrantyService.findList(warrantyVO);
|
||||
return ResponseResultBuild.successBuild(warrantyVOList);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 核保补发
|
||||
* @return List<WarrantyVO>
|
||||
*/
|
||||
@PostMapping("send-check-info")
|
||||
@ApiOperation(value = "核保补发",notes = "核保补发")
|
||||
public ResponseResult<Boolean> sendCheckInfo() {
|
||||
warrantyService.sendCheckInfo();
|
||||
return ResponseResultBuild.successBuild(true);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* @description 保批补发
|
||||
* @return List<WarrantyVO>
|
||||
*/
|
||||
@PostMapping("send-approve-info")
|
||||
@ApiOperation(value = "保批补发",notes = "保批补发")
|
||||
public ResponseResult<Boolean> sendApproveInfo() {
|
||||
warrantyService.sendApproveInfo();
|
||||
return ResponseResultBuild.successBuild(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 查询保险合同
|
||||
* @param warrantyId 保险合同ID
|
||||
* @return WarrantyVO
|
||||
*/
|
||||
@PostMapping("detail/{warrantyId}")
|
||||
@ApiOperation(value = "查询合同",notes = "查询合同")
|
||||
@ApiImplicitParam(paramType = "path",name = "warrantyId",value = "合同ID",dataType = "String")
|
||||
public ResponseResult<WarrantyVO> createWarranty(@PathVariable("warrantyId") String warrantyId) {
|
||||
WarrantyVO warrantyVOResult = warrantyService.findById(warrantyId);
|
||||
return ResponseResultBuild.successBuild(warrantyVOResult);
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.WarrantyApplicantVO;
|
||||
import com.itheima.sfbx.insurance.pojo.WarrantyInsured;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyCustomerService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:保险客户响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "合同客户相关")
|
||||
@RestController
|
||||
@RequestMapping("warranty-customer")
|
||||
public class WarrantyCustomerController {
|
||||
|
||||
@Autowired
|
||||
IWarrantyCustomerService warrantyCustomerService;
|
||||
|
||||
/**
|
||||
* @param warrantyNo 保单号
|
||||
* @return CustomerInfoVO
|
||||
* @Description 按保单号查询投保人信息
|
||||
*/
|
||||
@PostMapping("/warranty-applicant/{warrantyNo}")
|
||||
@ApiOperation(value = "合同投保人信息", notes = "合同投保人信息")
|
||||
@ApiImplicitParam(paramType = "path", name = "warrantyNo", value = "合同编号", dataType = "String")
|
||||
public ResponseResult<WarrantyApplicantVO> findWarrantyApplicant(@PathVariable("warrantyNo") String warrantyNo) {
|
||||
WarrantyApplicantVO warrantyApplicant = warrantyCustomerService.findWarrantyApplicant(warrantyNo);
|
||||
return ResponseResultBuild.successBuild(warrantyApplicant);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param warrantyNo 身份证
|
||||
* @return CustomerInfoVO
|
||||
* @Description 按保单号查询被投保人信息
|
||||
*/
|
||||
@PostMapping("/warranty-insured/{warrantyNo}")
|
||||
@ApiOperation(value = "合同被保人信息", notes = "合同被保人信息")
|
||||
@ApiImplicitParam(paramType = "path", name = "warrantyNo", value = "合同编号", dataType = "String")
|
||||
public ResponseResult<List<WarrantyInsured>> findWarrantyInsured(@PathVariable("warrantyNo") String warrantyNo) {
|
||||
List<WarrantyInsured> warrantyInsureds = warrantyCustomerService.findWarrantyInsured(warrantyNo);
|
||||
return ResponseResultBuild.successBuild(warrantyInsureds);
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.WarrantyEarningsOrderVO;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyEarningsOrderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:给付计划订单响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "给付计划订单")
|
||||
@RestController
|
||||
@RequestMapping("warranty-earnings-order")
|
||||
public class WarrantyEarningsOrderController {
|
||||
|
||||
@Autowired
|
||||
IWarrantyEarningsOrderService warrantyEarningsOrderService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询给付计划订单分页
|
||||
* @param warrantyEarningsOrderVO 给付计划订单VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<WarrantyEarningsOrderVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "给付计划订单分页",notes = "给付计划订单分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "warrantyEarningsOrderVO",value = "给付计划订单VO对象",required = true,dataType = "WarrantyEarningsOrderVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"warrantyEarningsOrderVO.orderNo","warrantyEarningsOrderVO.premium","warrantyEarningsOrderVO.warrantyNo","warrantyEarningsOrderVO.currentPeriod","warrantyEarningsOrderVO.scheduleTime","warrantyEarningsOrderVO.actualTime","warrantyEarningsOrderVO.orderState","warrantyEarningsOrderVO.applicantName","warrantyEarningsOrderVO.applicantIdentityCard","warrantyEarningsOrderVO.sortNo"})
|
||||
public ResponseResult<Page<WarrantyEarningsOrderVO>> findWarrantyEarningsOrderVOPage(
|
||||
@RequestBody WarrantyEarningsOrderVO warrantyEarningsOrderVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<WarrantyEarningsOrderVO> warrantyEarningsOrderVOPage = warrantyEarningsOrderService.findPage(warrantyEarningsOrderVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(warrantyEarningsOrderVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存给付计划订单
|
||||
* @param warrantyEarningsOrderVO 给付计划订单VO对象
|
||||
* @return WarrantyEarningsOrderVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存WarrantyEarningsOrder",notes = "添加WarrantyEarningsOrder")
|
||||
@ApiImplicitParam(name = "warrantyEarningsOrderVO",value = "给付计划订单VO对象",required = true,dataType = "WarrantyEarningsOrderVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyEarningsOrderVO.dataState","warrantyEarningsOrderVO.orderNo","warrantyEarningsOrderVO.premium","warrantyEarningsOrderVO.warrantyNo","warrantyEarningsOrderVO.currentPeriod","warrantyEarningsOrderVO.scheduleTime","warrantyEarningsOrderVO.actualTime","warrantyEarningsOrderVO.orderState","warrantyEarningsOrderVO.applicantName","warrantyEarningsOrderVO.applicantIdentityCard","warrantyEarningsOrderVO.sortNo"})
|
||||
public ResponseResult<WarrantyEarningsOrderVO> createWarrantyEarningsOrder(@RequestBody WarrantyEarningsOrderVO warrantyEarningsOrderVO) {
|
||||
WarrantyEarningsOrderVO warrantyEarningsOrderVOResult = warrantyEarningsOrderService.save(warrantyEarningsOrderVO);
|
||||
return ResponseResultBuild.successBuild(warrantyEarningsOrderVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改给付计划订单
|
||||
* @param warrantyEarningsOrderVO 给付计划订单VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改给付计划订单",notes = "修改给付计划订单")
|
||||
@ApiImplicitParam(name = "warrantyEarningsOrderVO",value = "给付计划订单VO对象",required = true,dataType = "WarrantyEarningsOrderVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyEarningsOrderVO.id","warrantyEarningsOrderVO.dataState","warrantyEarningsOrderVO.orderNo","warrantyEarningsOrderVO.premium","warrantyEarningsOrderVO.warrantyNo","warrantyEarningsOrderVO.currentPeriod","warrantyEarningsOrderVO.scheduleTime","warrantyEarningsOrderVO.actualTime","warrantyEarningsOrderVO.orderState","warrantyEarningsOrderVO.applicantName","warrantyEarningsOrderVO.applicantIdentityCard","warrantyEarningsOrderVO.sortNo"})
|
||||
public ResponseResult<Boolean> updateWarrantyEarningsOrder(@RequestBody WarrantyEarningsOrderVO warrantyEarningsOrderVO) {
|
||||
Boolean flag = warrantyEarningsOrderService.update(warrantyEarningsOrderVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除给付计划订单
|
||||
* @param warrantyEarningsOrderVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除给付计划订单",notes = "删除给付计划订单")
|
||||
@ApiImplicitParam(name = "warrantyEarningsOrderVO",value = "给付计划订单VO对象",required = true,dataType = "WarrantyEarningsOrderVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyEarningsOrderVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteWarrantyEarningsOrder(@RequestBody WarrantyEarningsOrderVO warrantyEarningsOrderVO) {
|
||||
Boolean flag = warrantyEarningsOrderService.delete(warrantyEarningsOrderVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询给付计划订单列表
|
||||
* @param warrantyEarningsOrderVO 给付计划订单VO对象
|
||||
* @return List<WarrantyEarningsOrderVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询给付计划订单列表",notes = "多条件查询给付计划订单列表")
|
||||
@ApiImplicitParam(name = "warrantyEarningsOrderVO",value = "给付计划订单VO对象",required = true,dataType = "WarrantyEarningsOrderVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyEarningsOrderVO.orderNo","warrantyEarningsOrderVO.premium","warrantyEarningsOrderVO.warrantyNo","warrantyEarningsOrderVO.currentPeriod","warrantyEarningsOrderVO.scheduleTime","warrantyEarningsOrderVO.actualTime","warrantyEarningsOrderVO.orderState","warrantyEarningsOrderVO.applicantName","warrantyEarningsOrderVO.applicantIdentityCard","warrantyEarningsOrderVO.sortNo"})
|
||||
public ResponseResult<List<WarrantyEarningsOrderVO>> warrantyEarningsOrderList(@RequestBody WarrantyEarningsOrderVO warrantyEarningsOrderVO) {
|
||||
List<WarrantyEarningsOrderVO> warrantyEarningsOrderVOList = warrantyEarningsOrderService.findList(warrantyEarningsOrderVO);
|
||||
return ResponseResultBuild.successBuild(warrantyEarningsOrderVOList);
|
||||
}
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.itheima.sfbx.insurance.web;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.itheima.sfbx.framework.commons.basic.ResponseResult;
|
||||
import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
|
||||
import com.itheima.sfbx.insurance.dto.WarrantyOrderVO;
|
||||
import com.itheima.sfbx.insurance.service.IWarrantyOrderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:合同订单响应接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "保费明细")
|
||||
@RestController
|
||||
@RequestMapping("warranty-order")
|
||||
public class WarrantyOrderController {
|
||||
|
||||
@Autowired
|
||||
IWarrantyOrderService warrantyOrderService;
|
||||
|
||||
/***
|
||||
* @description 多条件查询合同订单分页
|
||||
* @param warrantyOrderVO 合同订单VO查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return: Page<WarrantyOrderVO>
|
||||
*/
|
||||
@PostMapping("page/{pageNum}/{pageSize}")
|
||||
@ApiOperation(value = "合同订单分页",notes = "合同订单分页")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "warrantyOrderVO",value = "合同订单VO对象",required = true,dataType = "WarrantyOrderVO"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
|
||||
})
|
||||
@ApiOperationSupport(includeParameters = {"warrantyOrderVO.orderNo","warrantyOrderVO.warrantyNo","warrantyOrderVO.periods","warrantyOrderVO.currentPeriod","warrantyOrderVO.premium","warrantyOrderVO.scheduleTime","warrantyOrderVO.actualTime","warrantyOrderVO.graceTime","warrantyOrderVO.revivalTime","warrantyOrderVO.orderState","warrantyOrderVO.sortNo","warrantyOrderVO.companyNo","warrantyOrderVO.tradingChannel"})
|
||||
public ResponseResult<Page<WarrantyOrderVO>> findWarrantyOrderVOPage(
|
||||
@RequestBody WarrantyOrderVO warrantyOrderVO,
|
||||
@PathVariable("pageNum") int pageNum,
|
||||
@PathVariable("pageSize") int pageSize) {
|
||||
Page<WarrantyOrderVO> warrantyOrderVOPage = warrantyOrderService.findPage(warrantyOrderVO, pageNum, pageSize);
|
||||
return ResponseResultBuild.successBuild(warrantyOrderVOPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 保存合同订单
|
||||
* @param warrantyOrderVO 合同订单VO对象
|
||||
* @return WarrantyOrderVO
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存WarrantyOrder",notes = "添加WarrantyOrder")
|
||||
@ApiImplicitParam(name = "warrantyOrderVO",value = "合同订单VO对象",required = true,dataType = "WarrantyOrderVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyOrderVO.dataState","warrantyOrderVO.orderNo","warrantyOrderVO.warrantyNo","warrantyOrderVO.periods","warrantyOrderVO.currentPeriod","warrantyOrderVO.premium","warrantyOrderVO.scheduleTime","warrantyOrderVO.actualTime","warrantyOrderVO.graceTime","warrantyOrderVO.revivalTime","warrantyOrderVO.orderState","warrantyOrderVO.sortNo","warrantyOrderVO.companyNo","warrantyOrderVO.tradingChannel"})
|
||||
public ResponseResult<WarrantyOrderVO> createWarrantyOrder(@RequestBody WarrantyOrderVO warrantyOrderVO) {
|
||||
WarrantyOrderVO warrantyOrderVOResult = warrantyOrderService.save(warrantyOrderVO);
|
||||
return ResponseResultBuild.successBuild(warrantyOrderVOResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改合同订单
|
||||
* @param warrantyOrderVO 合同订单VO对象
|
||||
* @return Boolean 是否修改成功
|
||||
*/
|
||||
@PatchMapping
|
||||
@ApiOperation(value = "修改合同订单",notes = "修改合同订单")
|
||||
@ApiImplicitParam(name = "warrantyOrderVO",value = "合同订单VO对象",required = true,dataType = "WarrantyOrderVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyOrderVO.id","warrantyOrderVO.dataState","warrantyOrderVO.orderNo","warrantyOrderVO.warrantyNo","warrantyOrderVO.periods","warrantyOrderVO.currentPeriod","warrantyOrderVO.premium","warrantyOrderVO.scheduleTime","warrantyOrderVO.actualTime","warrantyOrderVO.graceTime","warrantyOrderVO.revivalTime","warrantyOrderVO.orderState","warrantyOrderVO.sortNo","warrantyOrderVO.companyNo","warrantyOrderVO.tradingChannel"})
|
||||
public ResponseResult<Boolean> updateWarrantyOrder(@RequestBody WarrantyOrderVO warrantyOrderVO) {
|
||||
Boolean flag = warrantyOrderService.update(warrantyOrderVO);
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 删除合同订单
|
||||
* @param warrantyOrderVO 刪除条件:checkedIds 不可为空
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除合同订单",notes = "删除合同订单")
|
||||
@ApiImplicitParam(name = "warrantyOrderVO",value = "合同订单VO对象",required = true,dataType = "WarrantyOrderVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyOrderVO.checkedIds"})
|
||||
public ResponseResult<Boolean> deleteWarrantyOrder(@RequestBody WarrantyOrderVO warrantyOrderVO) {
|
||||
Boolean flag = warrantyOrderService.delete(warrantyOrderVO.getCheckedIds());
|
||||
return ResponseResultBuild.successBuild(flag);
|
||||
}
|
||||
|
||||
/***
|
||||
* @description 多条件查询合同订单列表
|
||||
* @param warrantyOrderVO 合同订单VO对象
|
||||
* @return List<WarrantyOrderVO>
|
||||
*/
|
||||
@PostMapping("list")
|
||||
@ApiOperation(value = "多条件查询合同订单列表",notes = "多条件查询合同订单列表")
|
||||
@ApiImplicitParam(name = "warrantyOrderVO",value = "合同订单VO对象",required = true,dataType = "WarrantyOrderVO")
|
||||
@ApiOperationSupport(includeParameters = {"warrantyOrderVO.orderNo","warrantyOrderVO.warrantyNo","warrantyOrderVO.periods","warrantyOrderVO.currentPeriod","warrantyOrderVO.premium","warrantyOrderVO.scheduleTime","warrantyOrderVO.actualTime","warrantyOrderVO.graceTime","warrantyOrderVO.revivalTime","warrantyOrderVO.orderState","warrantyOrderVO.sortNo","warrantyOrderVO.companyNo","warrantyOrderVO.tradingChannel"})
|
||||
public ResponseResult<List<WarrantyOrderVO>> warrantyOrderList(@RequestBody WarrantyOrderVO warrantyOrderVO) {
|
||||
List<WarrantyOrderVO> warrantyOrderVOList = warrantyOrderService.findList(warrantyOrderVO);
|
||||
return ResponseResultBuild.successBuild(warrantyOrderVOList);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
_ __ __
|
||||
(_) /__________ ______/ /_
|
||||
/ / __/ ___/ __ `/ ___/ __/
|
||||
/ / /_/ /__/ /_/ (__ ) /_
|
||||
/_/\__/\___/\__,_/____/\__/
|
||||
:: Spring Boot :: (v-2.7.10)
|
||||
:: Spring Cloud :: (v-2021.0.6)
|
||||
:: Spring Cloud Alibaba :: (v-2021.0.1.0)
|
||||
:: sfbx Cloud :: (v-2.0-SNAPSHOT)
|
||||
:: 传智教育---献给可爱的传智人 ::
|
||||
@@ -0,0 +1,54 @@
|
||||
#服务配置
|
||||
server:
|
||||
#端口
|
||||
port: 7066
|
||||
#服务编码
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
allow-circular-references: true
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
config:
|
||||
activate:
|
||||
on-profile:
|
||||
- test
|
||||
#应用配置
|
||||
application:
|
||||
#应用名称
|
||||
name: insurance-mgt
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心
|
||||
group: SEATA_GROUP
|
||||
service: ${spring.application.name}
|
||||
username: ${NACOS_USERNAME:nacos}
|
||||
password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+}
|
||||
config:
|
||||
server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心
|
||||
group: SEATA_GROUP
|
||||
file-extension: yml
|
||||
shared-configs: # 共享配置
|
||||
- data-id: shared-spring-seata.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-spring-task.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-redisson.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-mybatis-plus.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
username: ${NACOS_USERNAME:nacos}
|
||||
password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+}
|
||||
logging:
|
||||
config: classpath:logback.xml
|
||||
@@ -0,0 +1,51 @@
|
||||
#服务配置
|
||||
server:
|
||||
#端口
|
||||
port: 7066
|
||||
#服务编码
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
allow-circular-references: true
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
profiles:
|
||||
active: dev
|
||||
#应用配置
|
||||
application:
|
||||
#应用名称
|
||||
name: insurance-mgt
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.12.129:8848 # nacos注册中心
|
||||
group: SEATA_GROUP
|
||||
service: ${spring.application.name}
|
||||
config:
|
||||
server-addr: 192.168.12.129:8848 # nacos配置中心地址
|
||||
group: SEATA_GROUP
|
||||
file-extension: yml
|
||||
shared-configs: # 共享配置
|
||||
- data-id: shared-spring-seata.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-spring-task.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-redisson.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-mybatis-plus.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
- data-id: shared-stream-rabbit-source-warranty.yml #配置文件名-DataId
|
||||
group: SEATA_GROUP
|
||||
refresh: false
|
||||
logging:
|
||||
config: classpath:logback.xml
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径 -->
|
||||
<property name="LOG_HOME" value="/data/logs/insurance-mgt" />
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${LOG_HOME}/insurance-mgt-01.log.%d{yyyy-MM-dd}.log
|
||||
</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n</pattern>
|
||||
</encoder>
|
||||
<!--日志文件最大的大小 -->
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<MaxFileSize>10MB</MaxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
<!-- show parameters for hibernate sql 专为 Hibernate 定制 -->
|
||||
<logger name="org.hibernate.type.descriptor.sql.BasicBinder"
|
||||
level="TRACE" />
|
||||
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor"
|
||||
level="DEBUG" />
|
||||
<logger name="org.hibernate.SQL" level="DEBUG" />
|
||||
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
|
||||
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
|
||||
|
||||
<!--myibatis log configure -->
|
||||
<logger name="com.apache.ibatis" level="TRACE" />
|
||||
<logger name="java.sql.Connection" level="DEBUG" />
|
||||
<logger name="java.sql.Statement" level="DEBUG" />
|
||||
<logger name="java.sql.PreparedStatement" level="DEBUG" />
|
||||
|
||||
<!-- 日志输出级别 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
</root>
|
||||
<!--日志异步到数据库 -->
|
||||
</configuration>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>sfbx-insurance</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!--保险:统一service-->
|
||||
<artifactId>insurance-service</artifactId>
|
||||
<name>insurance-service</name>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-mybatis-plus</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>file-interface</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-rabbitmq</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-seata</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>security-interface</artifactId>
|
||||
</dependency>
|
||||
<!-- 规则引擎客户端 -->
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>rule-client</artifactId>
|
||||
</dependency>
|
||||
<!-- 交易模块 -->
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>trade-interface</artifactId>
|
||||
</dependency>
|
||||
<!-- 外部数据源 -->
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-out-interface</artifactId>
|
||||
</dependency>
|
||||
<!-- 数据字典 -->
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>dict-interface</artifactId>
|
||||
</dependency>
|
||||
<!-- ai模块 -->
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-ai</artifactId>
|
||||
</dependency>
|
||||
<!--三方sdk接口封装-->
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>sfbx-apache-httpclient</artifactId>
|
||||
</dependency>
|
||||
<!-- 数据脱敏组件 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.itheima.sfbx</groupId>-->
|
||||
<!-- <artifactId>framework-data-desensitize</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
</dependencies>
|
||||
</project>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:缓存常量
|
||||
*/
|
||||
public class BannerCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "banner:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:浏览记录缓存常量
|
||||
*/
|
||||
public class BrowsingHistoryCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "browsing-history:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:保险分类缓存常量
|
||||
*/
|
||||
public class CategoryCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "category:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
//树形
|
||||
public static final String TREE = PREFIX+"tree";;
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:分类系数项缓存常量
|
||||
*/
|
||||
public class CategoryCoefficentCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "category-coefficent:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:分类筛选项缓存常量
|
||||
*/
|
||||
public class CategoryConditionCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "category-condition:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:分类保障项缓存常量
|
||||
*/
|
||||
public class CategorySafeguardCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "category-safeguard:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:系数项缓存常量
|
||||
*/
|
||||
public class CoefficentCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "coefficent:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:组合方案缓存常量
|
||||
*/
|
||||
public class CombinationCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "combination:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:组合保险缓存常量
|
||||
*/
|
||||
public class CombinationInsuranceCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "combination-insurance:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:筛选项缓存常量
|
||||
*/
|
||||
public class ConditionCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "condition:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:绑卡信息缓存常量
|
||||
*/
|
||||
public class CustomerCardCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "customer-card:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:客户信息表缓存常量
|
||||
*/
|
||||
public class CustomerInfoCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "customer-info:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
//list下拉框
|
||||
public static final String OCR= PREFIX+"OCR";
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:客户宠物缓存常量
|
||||
*/
|
||||
public class CustomerPetCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "customer-pet:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:客户关系表缓存常量
|
||||
*/
|
||||
public class CustomerRelationCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "customer-relation:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant;
|
||||
|
||||
/**
|
||||
* @Description:客户关系表缓存常量
|
||||
*/
|
||||
public class CustomerRelationConstant extends SuperConstant {
|
||||
|
||||
//本人
|
||||
public static final String SELF= "0";
|
||||
|
||||
//子女
|
||||
public static final String CHILDREN= "3";
|
||||
|
||||
//配偶
|
||||
public static final String SPOUSE = "1";
|
||||
|
||||
//父母
|
||||
public static final String PARENTS= "2";
|
||||
|
||||
//其他
|
||||
public static final String OTHER= "4";
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:评估类目缓存常量
|
||||
*/
|
||||
public class HealthAssessmentCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "health-assessment:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:保批信息缓存常量
|
||||
*/
|
||||
public class InsuranceApproveCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "insurance-approve:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:保批信息缓存常量
|
||||
*/
|
||||
public class InsuranceApproveDetailCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "insurance-approve-detail:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:保险产品缓存常量
|
||||
*/
|
||||
public class InsuranceCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "insurance:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:保险系数项缓存常量
|
||||
*/
|
||||
public class InsuranceCoefficentCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "insurance-coefficent:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:保险筛选项缓存常量
|
||||
*/
|
||||
public class InsuranceConditionCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "insurance-condition:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
/**
|
||||
* @ClassName InsuranceConstant.java
|
||||
* @Description TODO
|
||||
*/
|
||||
public class InsuranceConstant {
|
||||
|
||||
//单位:天
|
||||
public static final String DAY = "DAY";
|
||||
//单位:周
|
||||
public static final String WEEK = "WEEK";
|
||||
//单位:月
|
||||
public static final String MONTH = "MONTH";
|
||||
//单位:年
|
||||
public static final String YEAR = "YEAR";
|
||||
//单位:岁
|
||||
public static final String AGE = "AGE";
|
||||
//年龄范围
|
||||
public static final String RANGE_AGE = "XS005";
|
||||
//什么时候开始领
|
||||
public static final String ACTUAL_GET_START = "XS012";
|
||||
//合同规定:领至多久
|
||||
public static final String ACTUAL_GET_END = "XS013";
|
||||
//养老测算:领至多久
|
||||
public static final String TRIAL_GET_END ="XS015";
|
||||
//领取周期
|
||||
public static final String ACTUAL_GET_UNIT = "XS014";
|
||||
//理财:投入方式
|
||||
public static final String BUY_MODE = "XS002";
|
||||
//定投:追投方式投入
|
||||
public static final String BUY_MODE_0 = "XS002-0";
|
||||
//趸交:一次性投入
|
||||
public static final String BUY_MODE_1 = "XS002-1";
|
||||
//团险人数
|
||||
public static final String NUMBER_OF_PEOPLE = "XS016";
|
||||
//投入周期单位
|
||||
public static final String PERIODIC_UNIT = "XS011";
|
||||
//投入时长
|
||||
public static final String PERIODIC = "XS008";
|
||||
//保障期限
|
||||
public static final String PROTECTION_PERIOD = "XS006";
|
||||
//付款方式
|
||||
public static final String PAY_MENT = "XS003";
|
||||
//连续投保
|
||||
public static final String AUTO_WARRANTY_EXTENSION = "XS010";
|
||||
//金牌好品
|
||||
public static final String GOLDSELECTION_0="0";
|
||||
//上架状态
|
||||
public static final String INSURANCE_STATE_0="0";
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:保险方案缓存常量
|
||||
*/
|
||||
public class InsurancePlanCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "insurance-plan:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:保险规则缓存常量
|
||||
*/
|
||||
public class InsuranceRuleCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "insurance-rule:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:初筛结果缓存常量
|
||||
*/
|
||||
public class InsuranceSievingCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "insurance-sieving:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:人气保险缓存常量
|
||||
*/
|
||||
public class InsuranceTopCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "insurance-top:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:方案给付缓存常量
|
||||
*/
|
||||
public class PlanEarningsCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "plan-earnings:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:方案给付缓存常量
|
||||
*/
|
||||
public class PlanEarningsConstant extends CacheConstant {
|
||||
|
||||
//给付类型:0终身领取 1固定领取
|
||||
public static final String EarningsType_0= "0";
|
||||
public static final String EarningsType_1= "1";
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:方案保障项缓存常量
|
||||
*/
|
||||
public class PlanSafeguardCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "plan-safeguard:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:风险类目缓存常量
|
||||
*/
|
||||
public class RiskAnalysisCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "risk-analysis:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:风险表缓存常量
|
||||
*/
|
||||
public class RiskCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "risk:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
/**
|
||||
* RuleConstant
|
||||
*
|
||||
* @author: wgl
|
||||
* @describe: 规则常量类
|
||||
* @date: 2022/12/28 10:10
|
||||
*/
|
||||
public class RuleConstant {
|
||||
|
||||
public final static String RULE_GROUP_NAME = "四方保险销售平台";
|
||||
|
||||
private final static String SICK_ADVICE_KNOWLEDGEID = "rule_stream_34";
|
||||
|
||||
private final static String SICK_ADVICE_PROCESSID = "rule_stream_01";
|
||||
|
||||
public final static String SLASH = "/";
|
||||
|
||||
/**
|
||||
* 获取
|
||||
* @param knowledgeId
|
||||
* @return
|
||||
*/
|
||||
public final static String getRuleKnowledge(String knowledgeId){
|
||||
return RULE_GROUP_NAME+SLASH+knowledgeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取
|
||||
* @return
|
||||
*/
|
||||
public final static String sickAdviceAdviceKnowledge(){
|
||||
return RULE_GROUP_NAME+SLASH+SICK_ADVICE_KNOWLEDGEID;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取
|
||||
* @return
|
||||
*/
|
||||
public final static String sickAdviceProcessId(){
|
||||
return SICK_ADVICE_PROCESSID;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:保障项缓存常量
|
||||
*/
|
||||
public class SafeguardCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "safeguard:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:缓存常量
|
||||
*/
|
||||
public class SaleTopInsuranceCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "sale-top-insurance:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.itheima.sfbx.insurance.constant;
|
||||
|
||||
import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
|
||||
|
||||
/**
|
||||
* @Description:搜索记录缓存常量
|
||||
*/
|
||||
public class SearchRecordCacheConstant extends CacheConstant {
|
||||
|
||||
//缓存父包
|
||||
public static final String PREFIX= "search-record:";
|
||||
|
||||
//缓存父包
|
||||
public static final String BASIC= PREFIX+"basic";
|
||||
|
||||
//分布式锁前缀
|
||||
public static final String LOCK_PREFIX = PREFIX+"lock:";
|
||||
|
||||
//page分页
|
||||
public static final String PAGE= PREFIX+"page";
|
||||
|
||||
//list下拉框
|
||||
public static final String LIST= PREFIX+"list";
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user