提交 ee430dc3 authored 作者: hzh's avatar hzh

51旅游卫士部分功能实现

上级 2d505139
......@@ -73,9 +73,10 @@ public interface WeishiService {
/**
* 获取保险公司相关文档接口
*
* @param productId 产品id
* @param annexTp
* @return
* @param annexTp annexTp
* @return 数据
*/
AnnexResponse annex(Integer productId,String annexTp);
}
......@@ -3,14 +3,12 @@ package org.dromara.mall.controller.weishi.app;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.weishi.model.res.ProductResponse;
import org.dromara.common.weishi.model.res.ProductsResponse;
import org.dromara.common.weishi.model.req.ApplyRequest;
import org.dromara.common.weishi.model.req.ProposalRequest;
import org.dromara.common.weishi.model.res.*;
import org.dromara.common.weishi.service.WeishiService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
......@@ -40,6 +38,7 @@ public class WeishiController {
/**
* 产品详情
*
* @param productId 产品id
* @return 产品详情
*/
@GetMapping("/productDetail")
......@@ -47,5 +46,75 @@ public class WeishiController {
return R.ok(weishiService.productDetail(productId));
}
/**
* 获取保险公司相关文档接口
*
* @param productId 产品id
* @param annexTp annexTp
* @return 产品详情
*/
@GetMapping("/annex")
public R<AnnexResponse> annex(@RequestParam(value = "productId") Integer productId,
@RequestParam(value = "annexTp") String annexTp) {
return R.ok(weishiService.annex(productId, annexTp));
}
/**
* 承保接口
*
* @param req 请求参数
* @return 数据
*/
@PostMapping("/insureApply")
public R<ApplyResponse> insureApply(@RequestBody ApplyRequest req) {
return R.ok(weishiService.insureApply(req));
}
/**
* 核保接口
*
* @param req 请求参数
* @return 数据
*/
@PostMapping("/insureProposal")
public R<ProposalResponse> insureProposal(@RequestBody ProposalRequest req) {
return R.ok(weishiService.insureProposal(req));
}
/**
* 保单详情
*
* @param orderNum 订单号
* @return 保单详情
*/
@GetMapping("/insureDetail")
public R<IssueResponse> insureDetail(@RequestParam String orderNum) {
return R.ok(weishiService.insureDetail(orderNum));
}
/**
* 订单撤单接口
*
* @param orderNum 订单号
*/
@PostMapping("/insureCancel/{orderNum}")
public R<Void> insureCancel(@PathVariable String orderNum) {
weishiService.insureCancel(orderNum);
return R.ok();
}
/**
* 保单撤单接口
*
* @param policyNum 保单号
*/
@PostMapping("/policyCancel/{policyNum}")
public R<Void> policyCancel(@PathVariable String policyNum) {
weishiService.policyCancel(policyNum);
return R.ok();
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论