first commit

This commit is contained in:
abcv7
2026-02-25 15:08:40 +08:00
commit 7f1d83ada7
2003 changed files with 144362 additions and 0 deletions
@@ -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>
@@ -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);
}
}
@@ -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 {
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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;
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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);
}
}
@@ -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>