update
This commit is contained in:
parent
705747be89
commit
ecd51fa0f4
@ -27,6 +27,13 @@
|
|||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 支付基础模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-pay-common</artifactId>
|
||||||
|
<version>${ruoyi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 收钱吧支付 -->
|
<!-- 收钱吧支付 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
@ -61,6 +68,7 @@
|
|||||||
<module>ruoyi-pay-sqb</module>
|
<module>ruoyi-pay-sqb</module>
|
||||||
<module>ruoyi-pay-alipay</module>
|
<module>ruoyi-pay-alipay</module>
|
||||||
<module>ruoyi-pay-wx</module>
|
<module>ruoyi-pay-wx</module>
|
||||||
|
<module>ruoyi-pay-common</module>
|
||||||
<module>ruoyi-pay-start</module>
|
<module>ruoyi-pay-start</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
28
ruoyi-pay/ruoyi-pay-common/pom.xml
Normal file
28
ruoyi-pay/ruoyi-pay-common/pom.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>ruoyi-pay</artifactId>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<version>3.8.7.3.1</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-pay-common</artifactId>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
支付基础模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- 通用工具-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,113 @@
|
|||||||
|
package com.ruoyi.pay.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.pay.domain.PayInvoice;
|
||||||
|
import com.ruoyi.pay.service.IPayInvoiceService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-02-15
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pay/invoice")
|
||||||
|
@Tag(name = "【发票】管理")
|
||||||
|
public class PayInvoiceController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IPayInvoiceService payInvoiceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发票列表
|
||||||
|
*/
|
||||||
|
@Operation(summary = "查询发票列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:invoice:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(PayInvoice payInvoice)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<PayInvoice> list = payInvoiceService.selectPayInvoiceList(payInvoice);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出发票列表
|
||||||
|
*/
|
||||||
|
@Operation(summary = "导出发票列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:invoice:export')")
|
||||||
|
@Log(title = "发票", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, PayInvoice payInvoice)
|
||||||
|
{
|
||||||
|
List<PayInvoice> list = payInvoiceService.selectPayInvoiceList(payInvoice);
|
||||||
|
ExcelUtil<PayInvoice> util = new ExcelUtil<PayInvoice>(PayInvoice.class);
|
||||||
|
util.exportExcel(response, list, "发票数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取发票详细信息
|
||||||
|
*/
|
||||||
|
@Operation(summary = "获取发票详细信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:invoice:query')")
|
||||||
|
@GetMapping(value = "/{invoiceId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("invoiceId") Long invoiceId)
|
||||||
|
{
|
||||||
|
return success(payInvoiceService.selectPayInvoiceByInvoiceId(invoiceId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发票
|
||||||
|
*/
|
||||||
|
@Operation(summary = "新增发票")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:invoice:add')")
|
||||||
|
@Log(title = "发票", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody PayInvoice payInvoice)
|
||||||
|
{
|
||||||
|
return toAjax(payInvoiceService.insertPayInvoice(payInvoice));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发票
|
||||||
|
*/
|
||||||
|
@Operation(summary = "修改发票")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:invoice:edit')")
|
||||||
|
@Log(title = "发票", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody PayInvoice payInvoice)
|
||||||
|
{
|
||||||
|
return toAjax(payInvoiceService.updatePayInvoice(payInvoice));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发票
|
||||||
|
*/
|
||||||
|
@Operation(summary = "删除发票")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:invoice:remove')")
|
||||||
|
@Log(title = "发票", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{invoiceIds}")
|
||||||
|
public AjaxResult remove(@PathVariable( name = "invoiceIds" ) Long[] invoiceIds)
|
||||||
|
{
|
||||||
|
return toAjax(payInvoiceService.deletePayInvoiceByInvoiceIds(invoiceIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,113 @@
|
|||||||
|
package com.ruoyi.pay.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.pay.domain.PayOrder;
|
||||||
|
import com.ruoyi.pay.service.IPayOrderService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-02-15
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pay/order")
|
||||||
|
@Tag(name = "【订单】管理")
|
||||||
|
public class PayOrderController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IPayOrderService payOrderService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单列表
|
||||||
|
*/
|
||||||
|
@Operation(summary = "查询订单列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:order:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(PayOrder payOrder)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<PayOrder> list = payOrderService.selectPayOrderList(payOrder);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出订单列表
|
||||||
|
*/
|
||||||
|
@Operation(summary = "导出订单列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:order:export')")
|
||||||
|
@Log(title = "订单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, PayOrder payOrder)
|
||||||
|
{
|
||||||
|
List<PayOrder> list = payOrderService.selectPayOrderList(payOrder);
|
||||||
|
ExcelUtil<PayOrder> util = new ExcelUtil<PayOrder>(PayOrder.class);
|
||||||
|
util.exportExcel(response, list, "订单数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取订单详细信息
|
||||||
|
*/
|
||||||
|
@Operation(summary = "获取订单详细信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:order:query')")
|
||||||
|
@GetMapping(value = "/{orderId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("orderId") Long orderId)
|
||||||
|
{
|
||||||
|
return success(payOrderService.selectPayOrderByOrderId(orderId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单
|
||||||
|
*/
|
||||||
|
@Operation(summary = "新增订单")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:order:add')")
|
||||||
|
@Log(title = "订单", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody PayOrder payOrder)
|
||||||
|
{
|
||||||
|
return toAjax(payOrderService.insertPayOrder(payOrder));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单
|
||||||
|
*/
|
||||||
|
@Operation(summary = "修改订单")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:order:edit')")
|
||||||
|
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody PayOrder payOrder)
|
||||||
|
{
|
||||||
|
return toAjax(payOrderService.updatePayOrder(payOrder));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单
|
||||||
|
*/
|
||||||
|
@Operation(summary = "删除订单")
|
||||||
|
@PreAuthorize("@ss.hasPermi('pay:order:remove')")
|
||||||
|
@Log(title = "订单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{orderIds}")
|
||||||
|
public AjaxResult remove(@PathVariable( name = "orderIds" ) Long[] orderIds)
|
||||||
|
{
|
||||||
|
return toAjax(payOrderService.deletePayOrderByOrderIds(orderIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,187 @@
|
|||||||
|
package com.ruoyi.pay.domain;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票对象 pay_invoice
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-02-15
|
||||||
|
*/
|
||||||
|
@Schema(description = "发票对象")
|
||||||
|
public class PayInvoice extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/** 发票id */
|
||||||
|
@Schema(defaultValue = "发票id")
|
||||||
|
private Long invoiceId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 订单号 */
|
||||||
|
@Schema(defaultValue = "订单号")
|
||||||
|
@Excel(name = "订单号")
|
||||||
|
private String orderNumber;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 发票类型 */
|
||||||
|
@Schema(defaultValue = "发票类型")
|
||||||
|
@Excel(name = "发票类型")
|
||||||
|
private String invoiceType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 发票抬头 */
|
||||||
|
@Schema(defaultValue = "发票抬头")
|
||||||
|
@Excel(name = "发票抬头")
|
||||||
|
private String invoiceHeader;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 纳税人识别号 */
|
||||||
|
@Schema(defaultValue = "纳税人识别号")
|
||||||
|
@Excel(name = "纳税人识别号")
|
||||||
|
private String invoiceNumber;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 收票人手机号 */
|
||||||
|
@Schema(defaultValue = "收票人手机号")
|
||||||
|
@Excel(name = "收票人手机号")
|
||||||
|
private String invoicePhone;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 收票人邮箱 */
|
||||||
|
@Schema(defaultValue = "收票人邮箱")
|
||||||
|
@Excel(name = "收票人邮箱")
|
||||||
|
private String invoiceEmail;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 发票备注 */
|
||||||
|
@Schema(defaultValue = "发票备注")
|
||||||
|
@Excel(name = "发票备注")
|
||||||
|
private String invoiceRemark;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void setInvoiceId(Long invoiceId)
|
||||||
|
{
|
||||||
|
this.invoiceId = invoiceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getInvoiceId()
|
||||||
|
{
|
||||||
|
return invoiceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setOrderNumber(String orderNumber)
|
||||||
|
{
|
||||||
|
this.orderNumber = orderNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderNumber()
|
||||||
|
{
|
||||||
|
return orderNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setInvoiceType(String invoiceType)
|
||||||
|
{
|
||||||
|
this.invoiceType = invoiceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvoiceType()
|
||||||
|
{
|
||||||
|
return invoiceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setInvoiceHeader(String invoiceHeader)
|
||||||
|
{
|
||||||
|
this.invoiceHeader = invoiceHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvoiceHeader()
|
||||||
|
{
|
||||||
|
return invoiceHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setInvoiceNumber(String invoiceNumber)
|
||||||
|
{
|
||||||
|
this.invoiceNumber = invoiceNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvoiceNumber()
|
||||||
|
{
|
||||||
|
return invoiceNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setInvoicePhone(String invoicePhone)
|
||||||
|
{
|
||||||
|
this.invoicePhone = invoicePhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvoicePhone()
|
||||||
|
{
|
||||||
|
return invoicePhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setInvoiceEmail(String invoiceEmail)
|
||||||
|
{
|
||||||
|
this.invoiceEmail = invoiceEmail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvoiceEmail()
|
||||||
|
{
|
||||||
|
return invoiceEmail;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setInvoiceRemark(String invoiceRemark)
|
||||||
|
{
|
||||||
|
this.invoiceRemark = invoiceRemark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvoiceRemark()
|
||||||
|
{
|
||||||
|
return invoiceRemark;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("invoiceId", getInvoiceId())
|
||||||
|
.append("orderNumber", getOrderNumber())
|
||||||
|
.append("invoiceType", getInvoiceType())
|
||||||
|
.append("invoiceHeader", getInvoiceHeader())
|
||||||
|
.append("invoiceNumber", getInvoiceNumber())
|
||||||
|
.append("invoicePhone", getInvoicePhone())
|
||||||
|
.append("invoiceEmail", getInvoiceEmail())
|
||||||
|
.append("invoiceRemark", getInvoiceRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,187 @@
|
|||||||
|
package com.ruoyi.pay.domain;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单对象 pay_order
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-02-15
|
||||||
|
*/
|
||||||
|
@Schema(description = "订单对象")
|
||||||
|
public class PayOrder extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/** 订单ID */
|
||||||
|
@Schema(defaultValue = "订单ID")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 用户id */
|
||||||
|
@Schema(defaultValue = "用户id")
|
||||||
|
@Excel(name = "用户id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 订单号 */
|
||||||
|
@Schema(defaultValue = "订单号")
|
||||||
|
@Excel(name = "订单号")
|
||||||
|
private String orderNumber;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 订单状态 */
|
||||||
|
@Schema(defaultValue = "订单状态")
|
||||||
|
@Excel(name = "订单状态")
|
||||||
|
private String orderStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 订单总金额 */
|
||||||
|
@Schema(defaultValue = "订单总金额")
|
||||||
|
@Excel(name = "订单总金额")
|
||||||
|
private String totalAmount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 订单内容 */
|
||||||
|
@Schema(defaultValue = "订单内容")
|
||||||
|
@Excel(name = "订单内容")
|
||||||
|
private String orderContent;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 订单备注 */
|
||||||
|
@Schema(defaultValue = "订单备注")
|
||||||
|
@Excel(name = "订单备注")
|
||||||
|
private String orderRemark;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 负载信息 */
|
||||||
|
@Schema(defaultValue = "负载信息")
|
||||||
|
@Excel(name = "负载信息")
|
||||||
|
private String orderMessage;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void setOrderId(Long orderId)
|
||||||
|
{
|
||||||
|
this.orderId = orderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOrderId()
|
||||||
|
{
|
||||||
|
return orderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setUserId(Long userId)
|
||||||
|
{
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUserId()
|
||||||
|
{
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setOrderNumber(String orderNumber)
|
||||||
|
{
|
||||||
|
this.orderNumber = orderNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderNumber()
|
||||||
|
{
|
||||||
|
return orderNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setOrderStatus(String orderStatus)
|
||||||
|
{
|
||||||
|
this.orderStatus = orderStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderStatus()
|
||||||
|
{
|
||||||
|
return orderStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setTotalAmount(String totalAmount)
|
||||||
|
{
|
||||||
|
this.totalAmount = totalAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTotalAmount()
|
||||||
|
{
|
||||||
|
return totalAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setOrderContent(String orderContent)
|
||||||
|
{
|
||||||
|
this.orderContent = orderContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderContent()
|
||||||
|
{
|
||||||
|
return orderContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setOrderRemark(String orderRemark)
|
||||||
|
{
|
||||||
|
this.orderRemark = orderRemark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderRemark()
|
||||||
|
{
|
||||||
|
return orderRemark;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setOrderMessage(String orderMessage)
|
||||||
|
{
|
||||||
|
this.orderMessage = orderMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderMessage()
|
||||||
|
{
|
||||||
|
return orderMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("orderId", getOrderId())
|
||||||
|
.append("userId", getUserId())
|
||||||
|
.append("orderNumber", getOrderNumber())
|
||||||
|
.append("orderStatus", getOrderStatus())
|
||||||
|
.append("totalAmount", getTotalAmount())
|
||||||
|
.append("orderContent", getOrderContent())
|
||||||
|
.append("orderRemark", getOrderRemark())
|
||||||
|
.append("orderMessage", getOrderMessage())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.pay.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.pay.domain.PayInvoice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-02-15
|
||||||
|
*/
|
||||||
|
public interface PayInvoiceMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询发票
|
||||||
|
*
|
||||||
|
* @param invoiceId 发票主键
|
||||||
|
* @return 发票
|
||||||
|
*/
|
||||||
|
public PayInvoice selectPayInvoiceByInvoiceId(Long invoiceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发票列表
|
||||||
|
*
|
||||||
|
* @param payInvoice 发票
|
||||||
|
* @return 发票集合
|
||||||
|
*/
|
||||||
|
public List<PayInvoice> selectPayInvoiceList(PayInvoice payInvoice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发票
|
||||||
|
*
|
||||||
|
* @param payInvoice 发票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertPayInvoice(PayInvoice payInvoice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发票
|
||||||
|
*
|
||||||
|
* @param payInvoice 发票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updatePayInvoice(PayInvoice payInvoice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发票
|
||||||
|
*
|
||||||
|
* @param invoiceId 发票主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePayInvoiceByInvoiceId(Long invoiceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除发票
|
||||||
|
*
|
||||||
|
* @param invoiceIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePayInvoiceByInvoiceIds(Long[] invoiceIds);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.pay.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.pay.domain.PayOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-02-15
|
||||||
|
*/
|
||||||
|
public interface PayOrderMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询订单
|
||||||
|
*
|
||||||
|
* @param orderId 订单主键
|
||||||
|
* @return 订单
|
||||||
|
*/
|
||||||
|
public PayOrder selectPayOrderByOrderId(Long orderId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单列表
|
||||||
|
*
|
||||||
|
* @param payOrder 订单
|
||||||
|
* @return 订单集合
|
||||||
|
*/
|
||||||
|
public List<PayOrder> selectPayOrderList(PayOrder payOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单
|
||||||
|
*
|
||||||
|
* @param payOrder 订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertPayOrder(PayOrder payOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单
|
||||||
|
*
|
||||||
|
* @param payOrder 订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updatePayOrder(PayOrder payOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单
|
||||||
|
*
|
||||||
|
* @param orderId 订单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePayOrderByOrderId(Long orderId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除订单
|
||||||
|
*
|
||||||
|
* @param orderIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePayOrderByOrderIds(Long[] orderIds);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.pay.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.pay.domain.PayInvoice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-02-15
|
||||||
|
*/
|
||||||
|
public interface IPayInvoiceService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询发票
|
||||||
|
*
|
||||||
|
* @param invoiceId 发票主键
|
||||||
|
* @return 发票
|
||||||
|
*/
|
||||||
|
public PayInvoice selectPayInvoiceByInvoiceId(Long invoiceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发票列表
|
||||||
|
*
|
||||||
|
* @param payInvoice 发票
|
||||||
|
* @return 发票集合
|
||||||
|
*/
|
||||||
|
public List<PayInvoice> selectPayInvoiceList(PayInvoice payInvoice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发票
|
||||||
|
*
|
||||||
|
* @param payInvoice 发票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertPayInvoice(PayInvoice payInvoice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发票
|
||||||
|
*
|
||||||
|
* @param payInvoice 发票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updatePayInvoice(PayInvoice payInvoice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除发票
|
||||||
|
*
|
||||||
|
* @param invoiceIds 需要删除的发票主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePayInvoiceByInvoiceIds(Long[] invoiceIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发票信息
|
||||||
|
*
|
||||||
|
* @param invoiceId 发票主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePayInvoiceByInvoiceId(Long invoiceId);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.pay.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.pay.domain.PayOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-02-15
|
||||||
|
*/
|
||||||
|
public interface IPayOrderService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询订单
|
||||||
|
*
|
||||||
|
* @param orderId 订单主键
|
||||||
|
* @return 订单
|
||||||
|
*/
|
||||||
|
public PayOrder selectPayOrderByOrderId(Long orderId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单列表
|
||||||
|
*
|
||||||
|
* @param payOrder 订单
|
||||||
|
* @return 订单集合
|
||||||
|
*/
|
||||||
|
public List<PayOrder> selectPayOrderList(PayOrder payOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单
|
||||||
|
*
|
||||||
|
* @param payOrder 订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertPayOrder(PayOrder payOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单
|
||||||
|
*
|
||||||
|
* @param payOrder 订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updatePayOrder(PayOrder payOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除订单
|
||||||
|
*
|
||||||
|
* @param orderIds 需要删除的订单主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePayOrderByOrderIds(Long[] orderIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单信息
|
||||||
|
*
|
||||||
|
* @param orderId 订单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deletePayOrderByOrderId(Long orderId);
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.pay.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.pay.mapper.PayInvoiceMapper;
|
||||||
|
import com.ruoyi.pay.domain.PayInvoice;
|
||||||
|
import com.ruoyi.pay.service.IPayInvoiceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-02-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PayInvoiceServiceImpl implements IPayInvoiceService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private PayInvoiceMapper payInvoiceMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发票
|
||||||
|
*
|
||||||
|
* @param invoiceId 发票主键
|
||||||
|
* @return 发票
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PayInvoice selectPayInvoiceByInvoiceId(Long invoiceId)
|
||||||
|
{
|
||||||
|
return payInvoiceMapper.selectPayInvoiceByInvoiceId(invoiceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发票列表
|
||||||
|
*
|
||||||
|
* @param payInvoice 发票
|
||||||
|
* @return 发票
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PayInvoice> selectPayInvoiceList(PayInvoice payInvoice)
|
||||||
|
{
|
||||||
|
return payInvoiceMapper.selectPayInvoiceList(payInvoice);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发票
|
||||||
|
*
|
||||||
|
* @param payInvoice 发票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertPayInvoice(PayInvoice payInvoice)
|
||||||
|
{
|
||||||
|
return payInvoiceMapper.insertPayInvoice(payInvoice);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发票
|
||||||
|
*
|
||||||
|
* @param payInvoice 发票
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updatePayInvoice(PayInvoice payInvoice)
|
||||||
|
{
|
||||||
|
return payInvoiceMapper.updatePayInvoice(payInvoice);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除发票
|
||||||
|
*
|
||||||
|
* @param invoiceIds 需要删除的发票主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deletePayInvoiceByInvoiceIds(Long[] invoiceIds)
|
||||||
|
{
|
||||||
|
return payInvoiceMapper.deletePayInvoiceByInvoiceIds(invoiceIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发票信息
|
||||||
|
*
|
||||||
|
* @param invoiceId 发票主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deletePayInvoiceByInvoiceId(Long invoiceId)
|
||||||
|
{
|
||||||
|
return payInvoiceMapper.deletePayInvoiceByInvoiceId(invoiceId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.pay.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.pay.mapper.PayOrderMapper;
|
||||||
|
import com.ruoyi.pay.domain.PayOrder;
|
||||||
|
import com.ruoyi.pay.service.IPayOrderService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-02-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PayOrderServiceImpl implements IPayOrderService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private PayOrderMapper payOrderMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单
|
||||||
|
*
|
||||||
|
* @param orderId 订单主键
|
||||||
|
* @return 订单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PayOrder selectPayOrderByOrderId(Long orderId)
|
||||||
|
{
|
||||||
|
return payOrderMapper.selectPayOrderByOrderId(orderId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单列表
|
||||||
|
*
|
||||||
|
* @param payOrder 订单
|
||||||
|
* @return 订单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PayOrder> selectPayOrderList(PayOrder payOrder)
|
||||||
|
{
|
||||||
|
return payOrderMapper.selectPayOrderList(payOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单
|
||||||
|
*
|
||||||
|
* @param payOrder 订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertPayOrder(PayOrder payOrder)
|
||||||
|
{
|
||||||
|
return payOrderMapper.insertPayOrder(payOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单
|
||||||
|
*
|
||||||
|
* @param payOrder 订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updatePayOrder(PayOrder payOrder)
|
||||||
|
{
|
||||||
|
return payOrderMapper.updatePayOrder(payOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除订单
|
||||||
|
*
|
||||||
|
* @param orderIds 需要删除的订单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deletePayOrderByOrderIds(Long[] orderIds)
|
||||||
|
{
|
||||||
|
return payOrderMapper.deletePayOrderByOrderIds(orderIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单信息
|
||||||
|
*
|
||||||
|
* @param orderId 订单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deletePayOrderByOrderId(Long orderId)
|
||||||
|
{
|
||||||
|
return payOrderMapper.deletePayOrderByOrderId(orderId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.pay.mapper.PayInvoiceMapper">
|
||||||
|
|
||||||
|
<resultMap type="PayInvoice" id="PayInvoiceResult">
|
||||||
|
<result property="invoiceId" column="invoice_id" />
|
||||||
|
<result property="orderNumber" column="order_number" />
|
||||||
|
<result property="invoiceType" column="invoice_type" />
|
||||||
|
<result property="invoiceHeader" column="invoice_header" />
|
||||||
|
<result property="invoiceNumber" column="invoice_number" />
|
||||||
|
<result property="invoicePhone" column="invoice_phone" />
|
||||||
|
<result property="invoiceEmail" column="invoice_email" />
|
||||||
|
<result property="invoiceRemark" column="invoice_remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectPayInvoiceVo">
|
||||||
|
select invoice_id, order_number, invoice_type, invoice_header, invoice_number, invoice_phone, invoice_email, invoice_remark from pay_invoice
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectPayInvoiceList" parameterType="PayInvoice" resultMap="PayInvoiceResult">
|
||||||
|
<include refid="selectPayInvoiceVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="orderNumber != null and orderNumber != ''"> and order_number = #{orderNumber}</if>
|
||||||
|
<if test="invoiceType != null and invoiceType != ''"> and invoice_type = #{invoiceType}</if>
|
||||||
|
<if test="invoiceHeader != null and invoiceHeader != ''"> and invoice_header = #{invoiceHeader}</if>
|
||||||
|
<if test="invoiceNumber != null and invoiceNumber != ''"> and invoice_number = #{invoiceNumber}</if>
|
||||||
|
<if test="invoicePhone != null and invoicePhone != ''"> and invoice_phone = #{invoicePhone}</if>
|
||||||
|
<if test="invoiceEmail != null and invoiceEmail != ''"> and invoice_email = #{invoiceEmail}</if>
|
||||||
|
<if test="invoiceRemark != null and invoiceRemark != ''"> and invoice_remark = #{invoiceRemark}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPayInvoiceByInvoiceId" parameterType="Long" resultMap="PayInvoiceResult">
|
||||||
|
<include refid="selectPayInvoiceVo"/>
|
||||||
|
where pay_invoice.invoice_id = #{invoiceId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertPayInvoice" parameterType="PayInvoice">
|
||||||
|
insert into pay_invoice
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="invoiceId != null">invoice_id,</if>
|
||||||
|
<if test="orderNumber != null">order_number,</if>
|
||||||
|
<if test="invoiceType != null">invoice_type,</if>
|
||||||
|
<if test="invoiceHeader != null">invoice_header,</if>
|
||||||
|
<if test="invoiceNumber != null">invoice_number,</if>
|
||||||
|
<if test="invoicePhone != null">invoice_phone,</if>
|
||||||
|
<if test="invoiceEmail != null">invoice_email,</if>
|
||||||
|
<if test="invoiceRemark != null">invoice_remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="invoiceId != null">#{invoiceId},</if>
|
||||||
|
<if test="orderNumber != null">#{orderNumber},</if>
|
||||||
|
<if test="invoiceType != null">#{invoiceType},</if>
|
||||||
|
<if test="invoiceHeader != null">#{invoiceHeader},</if>
|
||||||
|
<if test="invoiceNumber != null">#{invoiceNumber},</if>
|
||||||
|
<if test="invoicePhone != null">#{invoicePhone},</if>
|
||||||
|
<if test="invoiceEmail != null">#{invoiceEmail},</if>
|
||||||
|
<if test="invoiceRemark != null">#{invoiceRemark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updatePayInvoice" parameterType="PayInvoice">
|
||||||
|
update pay_invoice
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="orderNumber != null">order_number = #{orderNumber},</if>
|
||||||
|
<if test="invoiceType != null">invoice_type = #{invoiceType},</if>
|
||||||
|
<if test="invoiceHeader != null">invoice_header = #{invoiceHeader},</if>
|
||||||
|
<if test="invoiceNumber != null">invoice_number = #{invoiceNumber},</if>
|
||||||
|
<if test="invoicePhone != null">invoice_phone = #{invoicePhone},</if>
|
||||||
|
<if test="invoiceEmail != null">invoice_email = #{invoiceEmail},</if>
|
||||||
|
<if test="invoiceRemark != null">invoice_remark = #{invoiceRemark},</if>
|
||||||
|
</trim>
|
||||||
|
where pay_invoice.invoice_id = #{invoiceId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deletePayInvoiceByInvoiceId" parameterType="Long">
|
||||||
|
delete from pay_invoice where invoice_id = #{invoiceId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deletePayInvoiceByInvoiceIds" parameterType="String">
|
||||||
|
delete from pay_invoice where invoice_id in
|
||||||
|
<foreach item="invoiceId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{invoiceId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.pay.mapper.PayOrderMapper">
|
||||||
|
|
||||||
|
<resultMap type="PayOrder" id="PayOrderResult">
|
||||||
|
<result property="orderId" column="order_id" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="orderNumber" column="order_number" />
|
||||||
|
<result property="orderStatus" column="order_status" />
|
||||||
|
<result property="totalAmount" column="total_amount" />
|
||||||
|
<result property="orderContent" column="order_content" />
|
||||||
|
<result property="orderRemark" column="order_remark" />
|
||||||
|
<result property="orderMessage" column="order_message" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectPayOrderVo">
|
||||||
|
select order_id, user_id, order_number, order_status, total_amount, order_content, order_remark, order_message from pay_order
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectPayOrderList" parameterType="PayOrder" resultMap="PayOrderResult">
|
||||||
|
<include refid="selectPayOrderVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
|
<if test="orderNumber != null and orderNumber != ''"> and order_number = #{orderNumber}</if>
|
||||||
|
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
||||||
|
<if test="totalAmount != null and totalAmount != ''"> and total_amount = #{totalAmount}</if>
|
||||||
|
<if test="orderContent != null and orderContent != ''"> and order_content = #{orderContent}</if>
|
||||||
|
<if test="orderRemark != null and orderRemark != ''"> and order_remark = #{orderRemark}</if>
|
||||||
|
<if test="orderMessage != null and orderMessage != ''"> and order_message = #{orderMessage}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPayOrderByOrderId" parameterType="Long" resultMap="PayOrderResult">
|
||||||
|
<include refid="selectPayOrderVo"/>
|
||||||
|
where pay_order.order_id = #{orderId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertPayOrder" parameterType="PayOrder">
|
||||||
|
insert into pay_order
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">order_id,</if>
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
|
<if test="orderNumber != null">order_number,</if>
|
||||||
|
<if test="orderStatus != null">order_status,</if>
|
||||||
|
<if test="totalAmount != null">total_amount,</if>
|
||||||
|
<if test="orderContent != null">order_content,</if>
|
||||||
|
<if test="orderRemark != null">order_remark,</if>
|
||||||
|
<if test="orderMessage != null">order_message,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">#{orderId},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
|
<if test="orderNumber != null">#{orderNumber},</if>
|
||||||
|
<if test="orderStatus != null">#{orderStatus},</if>
|
||||||
|
<if test="totalAmount != null">#{totalAmount},</if>
|
||||||
|
<if test="orderContent != null">#{orderContent},</if>
|
||||||
|
<if test="orderRemark != null">#{orderRemark},</if>
|
||||||
|
<if test="orderMessage != null">#{orderMessage},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updatePayOrder" parameterType="PayOrder">
|
||||||
|
update pay_order
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
|
<if test="orderNumber != null">order_number = #{orderNumber},</if>
|
||||||
|
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
||||||
|
<if test="totalAmount != null">total_amount = #{totalAmount},</if>
|
||||||
|
<if test="orderContent != null">order_content = #{orderContent},</if>
|
||||||
|
<if test="orderRemark != null">order_remark = #{orderRemark},</if>
|
||||||
|
<if test="orderMessage != null">order_message = #{orderMessage},</if>
|
||||||
|
</trim>
|
||||||
|
where pay_order.order_id = #{orderId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deletePayOrderByOrderId" parameterType="Long">
|
||||||
|
delete from pay_order where order_id = #{orderId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deletePayOrderByOrderIds" parameterType="String">
|
||||||
|
delete from pay_order where order_id in
|
||||||
|
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{orderId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -23,6 +23,13 @@
|
|||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 支付基础模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-pay-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 收钱吧支付 -->
|
<!-- 收钱吧支付 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
@ -41,6 +48,7 @@
|
|||||||
<artifactId>ruoyi-pay-wx</artifactId>
|
<artifactId>ruoyi-pay-wx</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -19,7 +19,7 @@ CREATE TABLE oauth_user (
|
|||||||
code VARCHAR(255) COMMENT '用户的授权code,部分平台可能没有',
|
code VARCHAR(255) COMMENT '用户的授权code,部分平台可能没有',
|
||||||
oauth_token VARCHAR(255) COMMENT 'Twitter平台用户的附带属性,部分平台可能没有',
|
oauth_token VARCHAR(255) COMMENT 'Twitter平台用户的附带属性,部分平台可能没有',
|
||||||
oauth_token_secret VARCHAR(255) COMMENT 'Twitter平台用户的附带属性,部分平台可能没有'
|
oauth_token_secret VARCHAR(255) COMMENT 'Twitter平台用户的附带属性,部分平台可能没有'
|
||||||
);
|
) ENGINE = InnoDB COMMENT = '第三方登录';
|
||||||
|
|
||||||
-- 菜单 SQL
|
-- 菜单 SQL
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
@ -12,7 +12,7 @@ CREATE TABLE `online_mb` (
|
|||||||
`resultType` varchar(255) NULL COMMENT '响应类型',
|
`resultType` varchar(255) NULL COMMENT '响应类型',
|
||||||
`actuator` varchar(255) NULL COMMENT '执行器',
|
`actuator` varchar(255) NULL COMMENT '执行器',
|
||||||
PRIMARY KEY (`mb_id`)
|
PRIMARY KEY (`mb_id`)
|
||||||
);
|
) ENGINE = InnoDB COMMENT = '在线接口';
|
||||||
|
|
||||||
-- 菜单 SQL
|
-- 菜单 SQL
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
80
sql/pay.sql
Normal file
80
sql/pay.sql
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
-- ----------------------------
|
||||||
|
-- 订单表
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `pay_order`;
|
||||||
|
CREATE TABLE `pay_order` (
|
||||||
|
`order_id` bigint NOT NULL COMMENT '订单ID',
|
||||||
|
`user_id` bigint NULL DEFAULT NULL COMMENT '用户id',
|
||||||
|
`order_number` varchar(255) NULL DEFAULT NULL COMMENT '订单号',
|
||||||
|
`order_status` varchar(255) NULL DEFAULT NULL COMMENT '订单状态',
|
||||||
|
`total_amount` varchar(255) NULL DEFAULT NULL COMMENT '订单总金额',
|
||||||
|
`order_content` varchar(255) NULL DEFAULT NULL COMMENT '订单内容',
|
||||||
|
`order_remark` varchar(255) NULL DEFAULT NULL COMMENT '订单备注',
|
||||||
|
`order_message` varchar(255) NULL DEFAULT NULL COMMENT '负载信息',
|
||||||
|
PRIMARY KEY (`order_id`)
|
||||||
|
) ENGINE = InnoDB COMMENT = '订单';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 发票表
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `pay_invoice`;
|
||||||
|
CREATE TABLE `pay_invoice` (
|
||||||
|
`invoice_id` bigint NOT NULL COMMENT '发票id',
|
||||||
|
`order_number` varchar(255) NULL DEFAULT NULL COMMENT '订单号',
|
||||||
|
`invoice_type` varchar(255) NULL DEFAULT NULL COMMENT '发票类型',
|
||||||
|
`invoice_header` varchar(255) NULL DEFAULT NULL COMMENT '发票抬头',
|
||||||
|
`invoice_number` varchar(255) NULL DEFAULT NULL COMMENT '纳税人识别号',
|
||||||
|
`invoice_phone` varchar(255) NULL DEFAULT NULL COMMENT '收票人手机号',
|
||||||
|
`invoice_email` varchar(255) NULL DEFAULT NULL COMMENT '收票人邮箱',
|
||||||
|
`invoice_remark` varchar(255) NULL DEFAULT NULL COMMENT '发票备注',
|
||||||
|
PRIMARY KEY (`invoice_id`)
|
||||||
|
) ENGINE = InnoDB COMMENT = '发票';
|
||||||
|
|
||||||
|
INSERT INTO sys_menu (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2024, '支付管理', 0, 4, '/pay', NULL, NULL, 1, 0, 'M', '0', '0', NULL, 'money', 'admin', '2024-02-15 22:40:23', '', NULL, '');
|
||||||
|
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('订单', '2024', '1', 'order', 'pay/order/index', 1, 0, 'C', '0', '0', 'pay:order:list', '#', 'admin', sysdate(), '', null, '订单菜单');
|
||||||
|
|
||||||
|
-- 按钮父菜单ID
|
||||||
|
SELECT @parentId := LAST_INSERT_ID();
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('订单查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'pay:order:query', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('订单新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'pay:order:add', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('订单修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'pay:order:edit', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('订单删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'pay:order:remove', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('订单导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'pay:order:export', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('发票', '2024', '1', 'invoice', 'pay/invoice/index', 1, 0, 'C', '0', '0', 'pay:invoice:list', '#', 'admin', sysdate(), '', null, '发票菜单');
|
||||||
|
|
||||||
|
-- 按钮父菜单ID
|
||||||
|
SELECT @parentId := LAST_INSERT_ID();
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('发票查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'pay:invoice:query', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('发票新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'pay:invoice:add', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('发票修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'pay:invoice:edit', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('发票删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'pay:invoice:remove', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('发票导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'pay:invoice:export', '#', 'admin', sysdate(), '', null, '');
|
Loading…
Reference in New Issue
Block a user