From e76b3d267706c06bd1f80e77f9d90890ac2fd546 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 29 十二月 2025 17:42:54 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mobile_community
---
ruoyi-system/src/main/java/com/ruoyi/system/dto/AuditInsuranceOrderOfflineDTO.java | 26 ++
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TInsuranceOrderMapper.java | 36 +++
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TInsuranceOrderServiceImpl.java | 35 ++
ruoyi-system/src/main/resources/mapper/system/TInsuranceOrderMapper.xml | 143 +++++++++++
ruoyi-system/src/main/java/com/ruoyi/system/model/TInsuranceOrder.java | 19 +
ruoyi-system/src/main/java/com/ruoyi/system/export/TInsuranceOrderRefundExport.java | 51 ++++
ruoyi-system/src/main/resources/mapper/system/TOtherConfigMapper.xml | 3
ruoyi-system/src/main/java/com/ruoyi/system/export/TInsuranceOrderExport.java | 43 +++
ruoyi-system/src/main/java/com/ruoyi/system/model/TOtherConfig.java | 3
ruoyi-system/src/main/java/com/ruoyi/system/service/TInsuranceOrderService.java | 34 ++
ruoyi-system/src/main/java/com/ruoyi/system/vo/TInsuranceOrderVO.java | 21 +
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInsuranceOrderController.java | 223 ++++++++++++++++++
ruoyi-system/src/main/java/com/ruoyi/system/dto/AuditInsuranceOrderRefundDTO.java | 28 ++
ruoyi-system/src/main/java/com/ruoyi/system/query/TInsuranceOrderQuery.java | 20 +
14 files changed, 679 insertions(+), 6 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInsuranceOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInsuranceOrderController.java
index 8a03253..5098043 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInsuranceOrderController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInsuranceOrderController.java
@@ -1,8 +1,40 @@
package com.ruoyi.web.controller.api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import cn.afterturn.easypoi.excel.ExcelExportUtil;
+import cn.afterturn.easypoi.excel.entity.ExportParams;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.WebUtils;
+import com.ruoyi.system.dto.AuditInsuranceOrderOfflineDTO;
+import com.ruoyi.system.dto.AuditInsuranceOrderRefundDTO;
+import com.ruoyi.system.export.TInsuranceOrderExport;
+import com.ruoyi.system.export.TInsuranceOrderRefundExport;
+import com.ruoyi.system.export.TRefundOrderExport;
+import com.ruoyi.system.model.TCourse;
+import com.ruoyi.system.model.TInsurance;
+import com.ruoyi.system.model.TInsuranceOrder;
+import com.ruoyi.system.query.TInsuranceOrderQuery;
+import com.ruoyi.system.service.TInsuranceOrderService;
+import com.ruoyi.system.service.TInsuranceService;
+import com.ruoyi.system.vo.TInsuranceOrderVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.List;
+import java.util.Objects;
/**
* <p>
@@ -12,9 +44,196 @@
* @author xiaochen
* @since 2025-12-29
*/
+@Api(tags = "保险订单")
@RestController
@RequestMapping("/t-insurance-order")
public class TInsuranceOrderController {
+ private final TInsuranceOrderService insuranceOrderService;
+ private final TInsuranceService insuranceService;
+
+ @Autowired
+ public TInsuranceOrderController(TInsuranceOrderService insuranceOrderService, TInsuranceService insuranceService) {
+ this.insuranceOrderService = insuranceOrderService;
+ this.insuranceService = insuranceService;
+ }
+
+ /**
+ * 获取保险订单管理管理列表
+ */
+ @ApiOperation(value = "获取保险订单记录分页列表")
+ @PostMapping(value = "/pageList")
+ public R<PageInfo<TInsuranceOrderVO>> pageList(@RequestBody TInsuranceOrderQuery query) {
+ return R.ok(insuranceOrderService.pageList(query));
+ }
+ /**
+ * 获取保险申请退款记录分页列表
+ */
+ @ApiOperation(value = "获取保险申请退款记录分页列表")
+ @PostMapping(value = "/refundPageList")
+ public R<PageInfo<TInsuranceOrderVO>> refundPageList(@RequestBody TInsuranceOrderQuery query) {
+ return R.ok(insuranceOrderService.refundPageList(query));
+ }
+
+ /**
+ * 查看保险订单管理详情
+ */
+ @ApiOperation(value = "查看保险订单管理详情")
+ @GetMapping(value = "/getDetailById")
+ public R<TInsuranceOrderVO> getDetailById(@RequestParam String id) {
+ TInsuranceOrder insuranceOrder = insuranceOrderService.getById(id);
+ TInsuranceOrderVO insuranceOrderVO = new TInsuranceOrderVO();
+ BeanUtils.copyProperties(insuranceOrder, insuranceOrderVO);
+ // 查询保险信息
+ TInsurance insurance = insuranceService.getById(insuranceOrder.getInsuranceId());
+ insuranceOrderVO.setInsurance(insurance);
+ return R.ok(insuranceOrderVO);
+ }
+
+ /**
+ * 审核保险订单管理退款申请
+ */
+ @Log(title = "保险订单管理信息-审核保险订单管理线下支付", businessType = BusinessType.UPDATE)
+ @ApiOperation(value = "审核保险订单管理线下支付")
+ @PostMapping(value = "/auditInsuranceOrderOffline")
+ public R<String> auditInsuranceOrderOffline(@Validated @RequestBody AuditInsuranceOrderOfflineDTO dto) {
+ TInsuranceOrder insuranceOrder = insuranceOrderService.getById(dto.getId());
+ if(dto.getOfflineStatus() == 1){
+ // 通过
+ insuranceOrder.setOfflineVoucher(dto.getOfflineVoucher());
+ // 修改支付状态为已退款
+ insuranceOrder.setStatus(2);
+ }
+ if(dto.getOfflineStatus() == 2){
+ // 驳回
+ insuranceOrder.setOfflineReason(dto.getOfflineReason());
+ insuranceOrder.setStatus(4);
+ }
+ insuranceOrderService.updateById(insuranceOrder);
+ return R.ok();
+ }
+
+ /**
+ * 审核保险订单管理退款申请
+ */
+ @Log(title = "保险订单管理信息-审核保险订单管理退款申请", businessType = BusinessType.UPDATE)
+ @ApiOperation(value = "审核保险订单管理退款申请")
+ @PostMapping(value = "/auditInsuranceOrderRefund")
+ public R<String> auditInsuranceOrderRefund(@Validated @RequestBody AuditInsuranceOrderRefundDTO dto) {
+ TInsuranceOrder insuranceOrder = insuranceOrderService.getById(dto.getId());
+ insuranceOrder.setRefundStatus(dto.getRefundStatus());
+ if(dto.getRefundStatus() == 2){
+ // 通过
+ insuranceOrder.setRefundVoucher(dto.getRefundVoucher());
+ // 修改支付状态为已退款
+ insuranceOrder.setStatus(1);
+ }
+ if(dto.getRefundStatus() == 3){
+ // 驳回
+ insuranceOrder.setRejectReason(dto.getRejectReason());
+ insuranceOrder.setStatus(2);
+ }
+ insuranceOrderService.updateById(insuranceOrder);
+ return R.ok();
+ }
+
+ /**
+ * 删除保险订单管理
+ */
+ @Log(title = "保险订单管理信息-删除保险订单管理", businessType = BusinessType.DELETE)
+ @ApiOperation(value = "删除保险订单管理")
+ @DeleteMapping(value = "/deleteById")
+ public R<Boolean> deleteById(@RequestParam String id) {
+ return R.ok(insuranceOrderService.removeById(id));
+ }
+
+ /**
+ * 批量删除保险订单管理
+ */
+ @Log(title = "保险订单管理信息-删除保险订单管理", businessType = BusinessType.DELETE)
+ @ApiOperation(value = "批量删除保险订单管理")
+ @DeleteMapping(value = "/deleteByIds")
+ public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
+ return R.ok(insuranceOrderService.removeByIds(ids));
+ }
+
+ @Log(title = "保险订单管理信息-保险订单记录导出", businessType = BusinessType.EXPORT)
+ @ApiOperation(value = "保险订单记录导出")
+ @PostMapping("/exportInsuranceOrder")
+ public void exportInsuranceOrder(@RequestBody TInsuranceOrderQuery query){
+ List<TInsuranceOrderExport> insuranceOrderExports = insuranceOrderService.exportInsuranceOrder(query);
+ for (TInsuranceOrderExport insuranceOrderExport : insuranceOrderExports) {
+ if(Objects.nonNull(insuranceOrderExport.getPayTime())){
+ insuranceOrderExport.setPayTimeStr(DateUtils.localDateTimeToString(insuranceOrderExport.getPayTime()));
+ }
+ if(Objects.nonNull(insuranceOrderExport.getEndTime())){
+ insuranceOrderExport.setEndTimeStr(DateUtils.localDateToString(insuranceOrderExport.getEndTime()));
+ }
+ }
+ Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TInsuranceOrderExport.class, insuranceOrderExports);
+ HttpServletResponse response = WebUtils.response();
+ assert response != null;
+ response.setContentType("application/vnd.ms-excel");
+ response.setCharacterEncoding("utf-8");
+ ServletOutputStream outputStream = null;
+ try {
+ String fileName = URLEncoder.encode("保险订单记录.xls", "utf-8");
+ response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
+ response.setContentType("application/vnd.ms-excel;charset=UTF-8");
+ response.setHeader("Pragma", "no-cache");
+ response.setHeader("Cache-Control", "no-cache");
+ outputStream = response.getOutputStream();
+ workbook.write(outputStream);
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ outputStream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ @Log(title = "保险订单管理信息-退款记录导出", businessType = BusinessType.EXPORT)
+ @ApiOperation(value = "退款记录导出")
+ @PostMapping("/exportRefundOrder")
+ public void exportRefundOrder(@RequestBody TInsuranceOrderQuery query){
+ List<TInsuranceOrderRefundExport> insuranceOrderRefundExports = insuranceOrderService.exportRefundOrder(query);
+ for (TInsuranceOrderRefundExport insuranceOrderRefundExport : insuranceOrderRefundExports) {
+ if(Objects.nonNull(insuranceOrderRefundExport.getPayTime())){
+ insuranceOrderRefundExport.setPayTimeStr(DateUtils.localDateTimeToString(insuranceOrderRefundExport.getPayTime()));
+ }
+ if(Objects.nonNull(insuranceOrderRefundExport.getEndTime())){
+ insuranceOrderRefundExport.setEndTimeStr(DateUtils.localDateToString(insuranceOrderRefundExport.getEndTime()));
+ }
+ if(Objects.nonNull(insuranceOrderRefundExport.getRequestRefundTime())){
+ insuranceOrderRefundExport.setRequestRefundTimeStr(DateUtils.localDateTimeToString(insuranceOrderRefundExport.getRequestRefundTime()));
+ }
+ }
+ Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TInsuranceOrderRefundExport.class, insuranceOrderRefundExports);
+ HttpServletResponse response = WebUtils.response();
+ assert response != null;
+ response.setContentType("application/vnd.ms-excel");
+ response.setCharacterEncoding("utf-8");
+ ServletOutputStream outputStream = null;
+ try {
+ String fileName = URLEncoder.encode("保险退款记录.xls", "utf-8");
+ response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
+ response.setContentType("application/vnd.ms-excel;charset=UTF-8");
+ response.setHeader("Pragma", "no-cache");
+ response.setHeader("Cache-Control", "no-cache");
+ outputStream = response.getOutputStream();
+ workbook.write(outputStream);
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ outputStream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/dto/AuditInsuranceOrderOfflineDTO.java b/ruoyi-system/src/main/java/com/ruoyi/system/dto/AuditInsuranceOrderOfflineDTO.java
new file mode 100644
index 0000000..3ed10ce
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/dto/AuditInsuranceOrderOfflineDTO.java
@@ -0,0 +1,26 @@
+package com.ruoyi.system.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+@Data
+@ApiModel(value = "审核保险订单线下支付信息AuditInsuranceOrderOfflineDTO")
+public class AuditInsuranceOrderOfflineDTO implements Serializable {
+
+ @NotBlank(message = "记录id不能为空")
+ private String id;
+
+ @ApiModelProperty(value = "退款审核状态 1=通过 2=驳回")
+ private Integer offlineStatus;
+
+ @ApiModelProperty(value = "支付凭证")
+ private String offlineVoucher;
+
+ @ApiModelProperty(value = "线下支付驳回原因")
+ private String offlineReason;
+
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/dto/AuditInsuranceOrderRefundDTO.java b/ruoyi-system/src/main/java/com/ruoyi/system/dto/AuditInsuranceOrderRefundDTO.java
new file mode 100644
index 0000000..09b49ac
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/dto/AuditInsuranceOrderRefundDTO.java
@@ -0,0 +1,28 @@
+package com.ruoyi.system.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+@Data
+@ApiModel(value = "审核保险订单退款信息AuditInsuranceOrderRefundDTO")
+public class AuditInsuranceOrderRefundDTO implements Serializable {
+
+ @NotBlank(message = "记录id不能为空")
+ private String id;
+
+ @NotNull(message = "退款审核状态不能为空")
+ @ApiModelProperty(value = "退款审核状态 1=待审核 2=通过 3=驳回")
+ private Integer refundStatus;
+
+ @ApiModelProperty(value = "退款凭证")
+ private String refundVoucher;
+
+ @ApiModelProperty(value = "驳回原因")
+ private String rejectReason;
+
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/export/TInsuranceOrderExport.java b/ruoyi-system/src/main/java/com/ruoyi/system/export/TInsuranceOrderExport.java
new file mode 100644
index 0000000..a53809a
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/export/TInsuranceOrderExport.java
@@ -0,0 +1,43 @@
+package com.ruoyi.system.export;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+@Data
+@ApiModel(value = "保险缴纳记录导出TInsuranceOrderExport")
+public class TInsuranceOrderExport implements Serializable {
+
+ @Excel(name = "支付时间",width = 20)
+ private String payTimeStr;
+ private LocalDateTime payTime;
+
+ @Excel(name = "保险费用",width = 20)
+ private BigDecimal insuranceMoney;
+
+ @Excel(name = "有效期至",width = 20)
+ private String endTimeStr;
+ private LocalDate endTime;
+
+ @Excel(name = "缴纳人",width = 20)
+ private String name;
+
+ @Excel(name = "联系电话",width = 20)
+ private String phone;
+
+ @Excel(name = "身份证号",width = 20)
+ private String idCard;
+
+ @Excel(name = "支付类型",width = 20,replace = {"线上支付_1","线下支付_2"})
+ private Integer payType;
+
+ @Excel(name = "状态",width = 20,replace = {"待支付_0","已退款_1","已支付_2","已过期_3","已驳回_4"})
+ private Integer status;
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/export/TInsuranceOrderRefundExport.java b/ruoyi-system/src/main/java/com/ruoyi/system/export/TInsuranceOrderRefundExport.java
new file mode 100644
index 0000000..3557e1e
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/export/TInsuranceOrderRefundExport.java
@@ -0,0 +1,51 @@
+package com.ruoyi.system.export;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+@Data
+@ApiModel(value = "保险缴纳退款记录导出TInsuranceOrderRefundExport")
+public class TInsuranceOrderRefundExport implements Serializable {
+
+ @Excel(name = "缴纳时间",width = 20)
+ private String payTimeStr;
+ private LocalDateTime payTime;
+
+ @Excel(name = "保险费用",width = 20)
+ private BigDecimal insuranceMoney;
+
+ @Excel(name = "有效期至",width = 20)
+ private String endTimeStr;
+ private LocalDate endTime;
+
+ @Excel(name = "报名人",width = 20)
+ private String name;
+
+ @Excel(name = "联系电话",width = 20)
+ private String phone;
+
+ @Excel(name = "退款申请时间",width = 20)
+ private String requestRefundTimeStr;
+ private LocalDateTime requestRefundTime;
+
+ @Excel(name = "银行卡号")
+ private String bankCardNumber;
+
+ @Excel(name = "持卡人姓名")
+ private String cardholderName;
+
+ @Excel(name = "所属银行")
+ private String bankName;
+
+ @Excel(name = "状态",width = 20,replace = {"待支付_0","已退款_1","已支付_2","已过期_3","已驳回_4"})
+ private Integer status;
+
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TInsuranceOrderMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TInsuranceOrderMapper.java
index bb88a92..0f6aa19 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TInsuranceOrderMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TInsuranceOrderMapper.java
@@ -2,7 +2,15 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.system.export.TInsuranceOrderExport;
+import com.ruoyi.system.export.TInsuranceOrderRefundExport;
import com.ruoyi.system.model.TInsuranceOrder;
+import com.ruoyi.system.query.TInsuranceOrderQuery;
+import com.ruoyi.system.vo.TInsuranceOrderVO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
/**
* <p>
@@ -14,4 +22,32 @@
*/
public interface TInsuranceOrderMapper extends BaseMapper<TInsuranceOrder> {
+ /**
+ * 订单分页
+ * @param query
+ * @param pageInfo
+ * @return
+ */
+ List<TInsuranceOrderVO> pageList(@Param("query") TInsuranceOrderQuery query, @Param("pageInfo")PageInfo<TInsuranceOrderVO> pageInfo);
+
+ /**
+ *
+ * @param query
+ * @param pageInfo
+ * @return
+ */
+ List<TInsuranceOrderVO> refundPageList(@Param("query")TInsuranceOrderQuery query, @Param("pageInfo")PageInfo<TInsuranceOrderVO> pageInfo);
+ /**
+ * 保险订单分页导出
+ * @param query
+ * @return
+ */
+ List<TInsuranceOrderExport> exportInsuranceOrder(@Param("query")TInsuranceOrderQuery query);
+
+ /**
+ * 保险退款申请导出
+ * @param query
+ * @return
+ */
+ List<TInsuranceOrderRefundExport> exportRefundOrder(@Param("query")TInsuranceOrderQuery query);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TInsuranceOrder.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TInsuranceOrder.java
index 3c5dec9..e5cf398 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TInsuranceOrder.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/model/TInsuranceOrder.java
@@ -97,7 +97,7 @@
* 0未付款 1已退 2已支付
*/
@TableField("status")
- @ApiModelProperty(value = "0未付款 1已退 2已支付 3已过期")
+ @ApiModelProperty(value = "0未付款 1已退 2已支付 3已过期 4=线下支付已驳回")
private Integer status;
/**
* 退款时间
@@ -169,7 +169,20 @@
@TableField("reject_reason")
@ApiModelProperty(value = "驳回原因")
private String rejectReason;
+ /**
+ * 线下支付打款凭证
+ */
+ @TableField("offline_voucher")
+ @ApiModelProperty(value = "线下支付打款凭证")
+ private String offlineVoucher;
+ /**
+ * 驳回原因
+ */
+ @TableField("offline_reason")
+ @ApiModelProperty(value = "线下支付驳回原因")
+ private String offlineReason;
-
-
+ @ApiModelProperty(value = "银行名称")
+ @TableField("bank_name")
+ private String bankName;
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TOtherConfig.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TOtherConfig.java
index 612ef19..b706f1c 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TOtherConfig.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/model/TOtherConfig.java
@@ -38,5 +38,8 @@
@TableField("days")
private Integer days;
+ @ApiModelProperty(value = "是否开启课程缴费 1=是 0=否")
+ @TableField("is_open_course")
+ private Integer isOpenCourse;
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/query/TInsuranceOrderQuery.java b/ruoyi-system/src/main/java/com/ruoyi/system/query/TInsuranceOrderQuery.java
new file mode 100644
index 0000000..aabfe39
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/query/TInsuranceOrderQuery.java
@@ -0,0 +1,20 @@
+package com.ruoyi.system.query;
+
+import com.ruoyi.common.core.domain.model.TimeRangeQueryBody;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "保险订单查询query-TInsuranceOrderQuery")
+public class TInsuranceOrderQuery extends TimeRangeQueryBody {
+
+ @ApiModelProperty(value = "1线上2线下")
+ private Integer payType;
+ @ApiModelProperty(value = "姓名")
+ private String name;
+ @ApiModelProperty(value = "手机号")
+ private String phone;
+ @ApiModelProperty(value = "0未付款 1已退 2已支付 3已过期")
+ private Integer status;
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TInsuranceOrderService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TInsuranceOrderService.java
index 8a770d0..2214e34 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TInsuranceOrderService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TInsuranceOrderService.java
@@ -2,7 +2,14 @@
import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.system.export.TInsuranceOrderExport;
+import com.ruoyi.system.export.TInsuranceOrderRefundExport;
import com.ruoyi.system.model.TInsuranceOrder;
+import com.ruoyi.system.query.TInsuranceOrderQuery;
+import com.ruoyi.system.vo.TInsuranceOrderVO;
+
+import java.util.List;
/**
* <p>
@@ -14,4 +21,31 @@
*/
public interface TInsuranceOrderService extends IService<TInsuranceOrder> {
+ /**
+ * 保险订单分页查询
+ * @param query
+ * @return
+ */
+ PageInfo<TInsuranceOrderVO> pageList(TInsuranceOrderQuery query);
+
+ /**
+ * 保险退款申请分页列表
+ * @param query
+ * @return
+ */
+ PageInfo<TInsuranceOrderVO> refundPageList(TInsuranceOrderQuery query);
+
+ /**
+ * 保险订单分页导出
+ * @param query
+ * @return
+ */
+ List<TInsuranceOrderExport> exportInsuranceOrder(TInsuranceOrderQuery query);
+
+ /**
+ * 保险退款申请导出
+ * @param query
+ * @return
+ */
+ List<TInsuranceOrderRefundExport> exportRefundOrder(TInsuranceOrderQuery query);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TInsuranceOrderServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TInsuranceOrderServiceImpl.java
index 356f70b..4c0ccff 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TInsuranceOrderServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TInsuranceOrderServiceImpl.java
@@ -1,10 +1,18 @@
package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.system.export.TInsuranceOrderExport;
+import com.ruoyi.system.export.TInsuranceOrderRefundExport;
import com.ruoyi.system.mapper.TInsuranceOrderMapper;
+import com.ruoyi.system.model.TAdvertisement;
import com.ruoyi.system.model.TInsuranceOrder;
+import com.ruoyi.system.query.TInsuranceOrderQuery;
import com.ruoyi.system.service.TInsuranceOrderService;
+import com.ruoyi.system.vo.TInsuranceOrderVO;
import org.springframework.stereotype.Service;
+
+import java.util.List;
/**
* <p>
@@ -17,4 +25,31 @@
@Service
public class TInsuranceOrderServiceImpl extends ServiceImpl<TInsuranceOrderMapper, TInsuranceOrder> implements TInsuranceOrderService {
+ @Override
+ public PageInfo<TInsuranceOrderVO> pageList(TInsuranceOrderQuery query) {
+ PageInfo<TInsuranceOrderVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
+ List<TInsuranceOrderVO> list = this.baseMapper.pageList(query,pageInfo);
+ pageInfo.setRecords(list);
+ return pageInfo;
+ }
+
+ @Override
+ public PageInfo<TInsuranceOrderVO> refundPageList(TInsuranceOrderQuery query) {
+ PageInfo<TInsuranceOrderVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
+ List<TInsuranceOrderVO> list = this.baseMapper.refundPageList(query,pageInfo);
+ pageInfo.setRecords(list);
+ return pageInfo;
+ }
+
+ @Override
+ public List<TInsuranceOrderExport> exportInsuranceOrder(TInsuranceOrderQuery query) {
+ List<TInsuranceOrderExport> list = this.baseMapper.exportInsuranceOrder(query);
+ return list;
+ }
+
+ @Override
+ public List<TInsuranceOrderRefundExport> exportRefundOrder(TInsuranceOrderQuery query) {
+ List<TInsuranceOrderRefundExport> list = this.baseMapper.exportRefundOrder(query);
+ return list;
+ }
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/vo/TInsuranceOrderVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/vo/TInsuranceOrderVO.java
new file mode 100644
index 0000000..7476ffd
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/vo/TInsuranceOrderVO.java
@@ -0,0 +1,21 @@
+package com.ruoyi.system.vo;
+
+import com.ruoyi.system.model.TInsurance;
+import com.ruoyi.system.model.TInsuranceOrder;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+@ApiModel(value = "保险订单返回TInsuranceOrderVO")
+public class TInsuranceOrderVO extends TInsuranceOrder {
+
+ @ApiModelProperty(value = "保险金额")
+ private BigDecimal insuranceMoney;
+
+ @ApiModelProperty(value = "保险信息")
+ private TInsurance insurance;
+
+}
diff --git a/ruoyi-system/src/main/resources/mapper/system/TInsuranceOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TInsuranceOrderMapper.xml
index a734300..7503d51 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TInsuranceOrderMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TInsuranceOrderMapper.xml
@@ -26,6 +26,9 @@
<result column="refund_status" property="refundStatus" />
<result column="refund_voucher" property="refundVoucher" />
<result column="reject_reason" property="rejectReason" />
+ <result column="offline_voucher" property="offlineVoucher" />
+ <result column="offline_reason" property="offlineReason" />
+ <result column="bank_name" property="bankName" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="create_by" property="createBy" />
@@ -33,4 +36,144 @@
<result column="disabled" property="disabled" />
</resultMap>
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ id, insurance_id, app_user_id, `name`, phone, id_card, end_time, img, pay_type, pay_no, pay_money,
+ pay_time, transaction_id, status, refund_time, request_refund_time, refund_money, refund_reason,
+ refund_reason_pictures, refund_number, refund_transaction_id, refund_status, refund_voucher,
+ reject_reason, create_time, update_time, create_by, update_by, disabled, bank_card_number,
+ cardholder_name,offline_voucher,offline_reason,bank_name
+ </sql>
+
+ <select id="pageList" resultType="com.ruoyi.system.vo.TInsuranceOrderVO">
+ select tio.id, tio.insurance_id, tio.app_user_id, tio.`name`, tio.phone, tio.id_card,
+ tio.end_time, tio.img, tio.pay_type, tio.pay_no, tio.pay_money, tio.pay_time,
+ tio.transaction_id, tio.status, tio.refund_time, tio.request_refund_time,
+ tio.refund_money, tio.refund_reason, tio.refund_reason_pictures,tio.offline_reason,
+ tio.refund_number, tio.refund_transaction_id, tio.refund_status,tio.offline_voucher,
+ tio.refund_voucher, tio.reject_reason, tio.create_time, tio.update_time,tio.bank_name,
+ tio.create_by, tio.update_by, tio.disabled, tio.bank_card_number, tio.cardholder_name,
+ t.insurance_money
+ from t_insurance_order tio
+ left join t_insurance t on tio.insurance_id = t.id
+ <where>
+ <if test="query.payType != null">
+ AND tio.pay_type = #{query.payType}
+ </if>
+ <if test="query.name != null and query.name != ''">
+ AND tio.`name` LIKE concat('%',#{query.name},'%')
+ </if>
+ <if test="query.phone != null and query.phone != ''">
+ AND tio.phone LIKE concat('%',#{query.phone},'%')
+ </if>
+ <if test="query.status != null">
+ AND tio.status = #{query.status}
+ </if>
+ <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+ AND tio.end_time >= #{query.startTime}
+ AND tio.end_time <= #{query.endTime}
+ </if>
+ AND tio.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+ </where>
+ ORDER BY tio.create_time DESC
+ </select>
+ <select id="refundPageList" resultType="com.ruoyi.system.vo.TInsuranceOrderVO">
+ select tio.id, tio.insurance_id, tio.app_user_id, tio.`name`, tio.phone, tio.id_card,
+ tio.end_time, tio.img, tio.pay_type, tio.pay_no, tio.pay_money, tio.pay_time,
+ tio.transaction_id, tio.status, tio.refund_time, tio.request_refund_time,
+ tio.refund_money, tio.refund_reason, tio.refund_reason_pictures,tio.offline_reason,
+ tio.refund_number, tio.refund_transaction_id, tio.refund_status,tio.offline_voucher,
+ tio.refund_voucher, tio.reject_reason, tio.create_time, tio.update_time,tio.bank_name,
+ tio.create_by, tio.update_by, tio.disabled, tio.bank_card_number, tio.cardholder_name,
+ t.insurance_money
+ from t_insurance_order tio
+ left join t_insurance t on tio.insurance_id = t.id
+ <where>
+ <if test="query.payType != null">
+ AND tio.pay_type = #{query.payType}
+ </if>
+ <if test="query.name != null and query.name != ''">
+ AND tio.`name` LIKE concat('%',#{query.name},'%')
+ </if>
+ <if test="query.phone != null and query.phone != ''">
+ AND tio.phone LIKE concat('%',#{query.phone},'%')
+ </if>
+ <if test="query.status != null">
+ AND tio.status = #{query.status}
+ </if>
+ <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+ AND tio.end_time >= #{query.startTime}
+ AND tio.end_time <= #{query.endTime}
+ </if>
+ AND tio.refund_status = 1
+ AND tio.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+ </where>
+ ORDER BY tio.create_time DESC
+ </select>
+ <select id="exportInsuranceOrder" resultType="com.ruoyi.system.export.TInsuranceOrderExport">
+ select tio.id, tio.insurance_id, tio.app_user_id, tio.`name`, tio.phone, tio.id_card,
+ tio.end_time, tio.img, tio.pay_type, tio.pay_no, tio.pay_money, tio.pay_time,
+ tio.transaction_id, tio.status, tio.refund_time, tio.request_refund_time,
+ tio.refund_money, tio.refund_reason, tio.refund_reason_pictures,tio.offline_reason,
+ tio.refund_number, tio.refund_transaction_id, tio.refund_status,tio.offline_voucher,
+ tio.refund_voucher, tio.reject_reason, tio.create_time, tio.update_time,tio.bank_name,
+ tio.create_by, tio.update_by, tio.disabled, tio.bank_card_number, tio.cardholder_name,
+ t.insurance_money
+ from t_insurance_order tio
+ left join t_insurance t on tio.insurance_id = t.id
+ <where>
+ <if test="query.payType != null">
+ AND tio.pay_type = #{query.payType}
+ </if>
+ <if test="query.name != null and query.name != ''">
+ AND tio.`name` LIKE concat('%',#{query.name},'%')
+ </if>
+ <if test="query.phone != null and query.phone != ''">
+ AND tio.phone LIKE concat('%',#{query.phone},'%')
+ </if>
+ <if test="query.status != null">
+ AND tio.status = #{query.status}
+ </if>
+ <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+ AND tio.end_time >= #{query.startTime}
+ AND tio.end_time <= #{query.endTime}
+ </if>
+ AND tio.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+ </where>
+ ORDER BY tio.create_time DESC
+ </select>
+ <select id="exportRefundOrder" resultType="com.ruoyi.system.export.TInsuranceOrderRefundExport">
+ select tio.id, tio.insurance_id, tio.app_user_id, tio.`name`, tio.phone, tio.id_card,
+ tio.end_time, tio.img, tio.pay_type, tio.pay_no, tio.pay_money, tio.pay_time,
+ tio.transaction_id, tio.status, tio.refund_time, tio.request_refund_time,
+ tio.refund_money, tio.refund_reason, tio.refund_reason_pictures,tio.offline_reason,
+ tio.refund_number, tio.refund_transaction_id, tio.refund_status,tio.offline_voucher,
+ tio.refund_voucher, tio.reject_reason, tio.create_time, tio.update_time,tio.bank_name,
+ tio.create_by, tio.update_by, tio.disabled, tio.bank_card_number, tio.cardholder_name,
+ t.insurance_money
+ from t_insurance_order tio
+ left join t_insurance t on tio.insurance_id = t.id
+ <where>
+ <if test="query.payType != null">
+ AND tio.pay_type = #{query.payType}
+ </if>
+ <if test="query.name != null and query.name != ''">
+ AND tio.`name` LIKE concat('%',#{query.name},'%')
+ </if>
+ <if test="query.phone != null and query.phone != ''">
+ AND tio.phone LIKE concat('%',#{query.phone},'%')
+ </if>
+ <if test="query.status != null">
+ AND tio.status = #{query.status}
+ </if>
+ <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+ AND tio.end_time >= #{query.startTime}
+ AND tio.end_time <= #{query.endTime}
+ </if>
+ AND tio.refund_status = 1
+ AND tio.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+ </where>
+ ORDER BY tio.create_time DESC
+ </select>
+
</mapper>
diff --git a/ruoyi-system/src/main/resources/mapper/system/TOtherConfigMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TOtherConfigMapper.xml
index 6c9c0d3..183e1fb 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TOtherConfigMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TOtherConfigMapper.xml
@@ -7,11 +7,12 @@
<id column="id" property="id" />
<result column="elderly_age" property="elderlyAge" />
<result column="days" property="days" />
+ <result column="is_open_course" property="isOpenCourse" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
- id, elderly_age, days
+ id, elderly_age, days,is_open_course
</sql>
</mapper>
--
Gitblit v1.7.1