update
This commit is contained in:
parent
374931d349
commit
4b2f365605
@ -1,10 +1,11 @@
|
||||
package com.ruoyi.generator.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -18,23 +19,23 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.alibaba.druid.DbType;
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStatement;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.sql.SqlUtil;
|
||||
import com.ruoyi.generator.domain.GenTable;
|
||||
import com.ruoyi.generator.domain.GenTableColumn;
|
||||
import com.ruoyi.generator.service.IGenTableColumnService;
|
||||
import com.ruoyi.generator.service.IGenTableService;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.sql.SqlUtil;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
|
@ -13,8 +13,6 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.core.domain.TreeEntity;
|
||||
#end
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* ${functionName}对象 ${tableName}
|
||||
*
|
||||
|
@ -29,8 +29,8 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
/**
|
||||
* 发票Controller
|
||||
*
|
||||
* @author Dftre
|
||||
* @date 2024-02-15
|
||||
* @author ruoyi
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pay/invoice")
|
||||
|
@ -88,7 +88,7 @@ public class PayOrderController extends BaseController
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PayOrder payOrder)
|
||||
{
|
||||
payOrder.setUserId(getUserId());
|
||||
payOrder.setCreateBy(getUsername());
|
||||
payOrder.setOrderNumber(Seq.getId().toString());
|
||||
AjaxResult result = toAjax(payOrderService.insertPayOrder(payOrder));
|
||||
result.put(AjaxResult.DATA_TAG, payOrder);
|
||||
|
@ -11,13 +11,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
/**
|
||||
* 发票对象 pay_invoice
|
||||
*
|
||||
* @author Dftre
|
||||
* @date 2024-02-15
|
||||
* @author ruoyi
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
@Schema(description = "发票对象")
|
||||
public class PayInvoice extends BaseEntity {
|
||||
public class PayInvoice extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/** 发票id */
|
||||
@Schema(title = "发票id")
|
||||
private Long invoiceId;
|
||||
@ -56,71 +58,95 @@ public class PayInvoice extends BaseEntity {
|
||||
@Schema(title = "发票备注")
|
||||
@Excel(name = "发票备注")
|
||||
private String invoiceRemark;
|
||||
|
||||
public void setInvoiceId(Long invoiceId) {
|
||||
public void setInvoiceId(Long invoiceId)
|
||||
{
|
||||
this.invoiceId = invoiceId;
|
||||
}
|
||||
|
||||
public Long getInvoiceId() {
|
||||
public Long getInvoiceId()
|
||||
{
|
||||
return invoiceId;
|
||||
}
|
||||
|
||||
public void setOrderNumber(String orderNumber) {
|
||||
|
||||
public void setOrderNumber(String orderNumber)
|
||||
{
|
||||
this.orderNumber = orderNumber;
|
||||
}
|
||||
|
||||
public String getOrderNumber() {
|
||||
public String getOrderNumber()
|
||||
{
|
||||
return orderNumber;
|
||||
}
|
||||
|
||||
public void setInvoiceType(String invoiceType) {
|
||||
|
||||
public void setInvoiceType(String invoiceType)
|
||||
{
|
||||
this.invoiceType = invoiceType;
|
||||
}
|
||||
|
||||
public String getInvoiceType() {
|
||||
public String getInvoiceType()
|
||||
{
|
||||
return invoiceType;
|
||||
}
|
||||
|
||||
public void setInvoiceHeader(String invoiceHeader) {
|
||||
|
||||
public void setInvoiceHeader(String invoiceHeader)
|
||||
{
|
||||
this.invoiceHeader = invoiceHeader;
|
||||
}
|
||||
|
||||
public String getInvoiceHeader() {
|
||||
public String getInvoiceHeader()
|
||||
{
|
||||
return invoiceHeader;
|
||||
}
|
||||
|
||||
public void setInvoiceNumber(String invoiceNumber) {
|
||||
|
||||
public void setInvoiceNumber(String invoiceNumber)
|
||||
{
|
||||
this.invoiceNumber = invoiceNumber;
|
||||
}
|
||||
|
||||
public String getInvoiceNumber() {
|
||||
public String getInvoiceNumber()
|
||||
{
|
||||
return invoiceNumber;
|
||||
}
|
||||
|
||||
public void setInvoicePhone(String invoicePhone) {
|
||||
|
||||
public void setInvoicePhone(String invoicePhone)
|
||||
{
|
||||
this.invoicePhone = invoicePhone;
|
||||
}
|
||||
|
||||
public String getInvoicePhone() {
|
||||
public String getInvoicePhone()
|
||||
{
|
||||
return invoicePhone;
|
||||
}
|
||||
|
||||
public void setInvoiceEmail(String invoiceEmail) {
|
||||
|
||||
public void setInvoiceEmail(String invoiceEmail)
|
||||
{
|
||||
this.invoiceEmail = invoiceEmail;
|
||||
}
|
||||
|
||||
public String getInvoiceEmail() {
|
||||
public String getInvoiceEmail()
|
||||
{
|
||||
return invoiceEmail;
|
||||
}
|
||||
|
||||
public void setInvoiceRemark(String invoiceRemark) {
|
||||
|
||||
public void setInvoiceRemark(String invoiceRemark)
|
||||
{
|
||||
this.invoiceRemark = invoiceRemark;
|
||||
}
|
||||
|
||||
public String getInvoiceRemark() {
|
||||
public String getInvoiceRemark()
|
||||
{
|
||||
return invoiceRemark;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -132,6 +158,11 @@ public class PayInvoice extends BaseEntity {
|
||||
.append("invoicePhone", getInvoicePhone())
|
||||
.append("invoiceEmail", getInvoiceEmail())
|
||||
.append("invoiceRemark", getInvoiceRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -11,10 +11,10 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
/**
|
||||
* 订单对象 pay_order
|
||||
*
|
||||
* @author Dftre
|
||||
* @date 2024-02-15
|
||||
* @author ruoyi
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
@Schema(title = "订单对象")
|
||||
@Schema(description = "订单对象")
|
||||
public class PayOrder extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -22,11 +22,6 @@ public class PayOrder extends BaseEntity {
|
||||
@Schema(title = "订单ID")
|
||||
private Long orderId;
|
||||
|
||||
/** 用户id */
|
||||
@Schema(title = "用户id")
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 订单号 */
|
||||
@Schema(title = "订单号")
|
||||
@Excel(name = "订单号")
|
||||
@ -42,7 +37,7 @@ public class PayOrder extends BaseEntity {
|
||||
@Excel(name = "订单总金额")
|
||||
private String totalAmount;
|
||||
|
||||
/** 订单总金额 */
|
||||
/** 实际支付金额 */
|
||||
@Schema(title = "实际支付金额")
|
||||
@Excel(name = "实际支付金额")
|
||||
private String actualAmount;
|
||||
@ -52,11 +47,6 @@ public class PayOrder extends BaseEntity {
|
||||
@Excel(name = "订单内容")
|
||||
private String orderContent;
|
||||
|
||||
/** 订单备注 */
|
||||
@Schema(title = "订单备注")
|
||||
@Excel(name = "订单备注")
|
||||
private String orderRemark;
|
||||
|
||||
/** 负载信息 */
|
||||
@Schema(title = "负载信息")
|
||||
@Excel(name = "负载信息")
|
||||
@ -70,14 +60,6 @@ public class PayOrder extends BaseEntity {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setOrderNumber(String orderNumber) {
|
||||
this.orderNumber = orderNumber;
|
||||
}
|
||||
@ -102,14 +84,14 @@ public class PayOrder extends BaseEntity {
|
||||
return totalAmount;
|
||||
}
|
||||
|
||||
public String getActualAmount() {
|
||||
return actualAmount;
|
||||
}
|
||||
|
||||
public void setActualAmount(String actualAmount) {
|
||||
this.actualAmount = actualAmount;
|
||||
}
|
||||
|
||||
public String getActualAmount() {
|
||||
return actualAmount;
|
||||
}
|
||||
|
||||
public void setOrderContent(String orderContent) {
|
||||
this.orderContent = orderContent;
|
||||
}
|
||||
@ -118,14 +100,6 @@ public class PayOrder extends BaseEntity {
|
||||
return orderContent;
|
||||
}
|
||||
|
||||
public void setOrderRemark(String orderRemark) {
|
||||
this.orderRemark = orderRemark;
|
||||
}
|
||||
|
||||
public String getOrderRemark() {
|
||||
return orderRemark;
|
||||
}
|
||||
|
||||
public void setOrderMessage(String orderMessage) {
|
||||
this.orderMessage = orderMessage;
|
||||
}
|
||||
@ -138,14 +112,17 @@ public class PayOrder extends BaseEntity {
|
||||
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("actualAmount", getActualAmount())
|
||||
.append("orderContent", getOrderContent())
|
||||
.append("orderRemark", getOrderRemark())
|
||||
.append("orderMessage", getOrderMessage())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ import com.ruoyi.pay.domain.PayInvoice;
|
||||
/**
|
||||
* 发票Mapper接口
|
||||
*
|
||||
* @author Dftre
|
||||
* @date 2024-02-15
|
||||
* @author ruoyi
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
public interface PayInvoiceMapper
|
||||
{
|
||||
|
@ -7,8 +7,8 @@ import com.ruoyi.pay.domain.PayInvoice;
|
||||
/**
|
||||
* 发票Service接口
|
||||
*
|
||||
* @author Dftre
|
||||
* @date 2024-02-15
|
||||
* @author ruoyi
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
public interface IPayInvoiceService
|
||||
{
|
||||
|
@ -7,10 +7,11 @@ import com.ruoyi.pay.domain.PayOrder;
|
||||
/**
|
||||
* 订单Service接口
|
||||
*
|
||||
* @author Dftre
|
||||
* @date 2024-02-15
|
||||
* @author ruoyi
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
public interface IPayOrderService {
|
||||
public interface IPayOrderService
|
||||
{
|
||||
/**
|
||||
* 查询订单
|
||||
*
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.pay.domain.PayInvoice;
|
||||
import com.ruoyi.pay.mapper.PayInvoiceMapper;
|
||||
import com.ruoyi.pay.service.IPayInvoiceService;
|
||||
@ -12,8 +13,8 @@ import com.ruoyi.pay.service.IPayInvoiceService;
|
||||
/**
|
||||
* 发票Service业务层处理
|
||||
*
|
||||
* @author Dftre
|
||||
* @date 2024-02-15
|
||||
* @author ruoyi
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
@Service
|
||||
public class PayInvoiceServiceImpl implements IPayInvoiceService
|
||||
@ -54,6 +55,7 @@ public class PayInvoiceServiceImpl implements IPayInvoiceService
|
||||
@Override
|
||||
public int insertPayInvoice(PayInvoice payInvoice)
|
||||
{
|
||||
payInvoice.setCreateTime(DateUtils.getNowDate());
|
||||
return payInvoiceMapper.insertPayInvoice(payInvoice);
|
||||
}
|
||||
|
||||
@ -66,6 +68,7 @@ public class PayInvoiceServiceImpl implements IPayInvoiceService
|
||||
@Override
|
||||
public int updatePayInvoice(PayInvoice payInvoice)
|
||||
{
|
||||
payInvoice.setUpdateTime(DateUtils.getNowDate());
|
||||
return payInvoiceMapper.updatePayInvoice(payInvoice);
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.pay.domain.PayOrder;
|
||||
import com.ruoyi.pay.mapper.PayOrderMapper;
|
||||
import com.ruoyi.pay.service.IPayOrderService;
|
||||
@ -12,8 +13,8 @@ import com.ruoyi.pay.service.IPayOrderService;
|
||||
/**
|
||||
* 订单Service业务层处理
|
||||
*
|
||||
* @author Dftre
|
||||
* @date 2024-02-15
|
||||
* @author ruoyi
|
||||
* @date 2024-06-11
|
||||
*/
|
||||
@Service
|
||||
public class PayOrderServiceImpl implements IPayOrderService {
|
||||
@ -72,6 +73,7 @@ public class PayOrderServiceImpl implements IPayOrderService {
|
||||
*/
|
||||
@Override
|
||||
public int updatePayOrder(PayOrder payOrder) {
|
||||
payOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return payOrderMapper.updatePayOrder(payOrder);
|
||||
}
|
||||
|
||||
|
@ -13,10 +13,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="invoicePhone" column="invoice_phone" />
|
||||
<result property="invoiceEmail" column="invoice_email" />
|
||||
<result property="invoiceRemark" column="invoice_remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="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
|
||||
select invoice_id, order_number, invoice_type, invoice_header, invoice_number, invoice_phone, invoice_email, invoice_remark, create_by, create_time, update_by, update_time, remark from pay_invoice
|
||||
</sql>
|
||||
|
||||
<select id="selectPayInvoiceList" parameterType="PayInvoice" resultMap="PayInvoiceResult">
|
||||
@ -48,6 +53,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="invoicePhone != null">invoice_phone,</if>
|
||||
<if test="invoiceEmail != null">invoice_email,</if>
|
||||
<if test="invoiceRemark != null">invoice_remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="invoiceId != null">#{invoiceId},</if>
|
||||
@ -58,6 +68,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="invoicePhone != null">#{invoicePhone},</if>
|
||||
<if test="invoiceEmail != null">#{invoiceEmail},</if>
|
||||
<if test="invoiceRemark != null">#{invoiceRemark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -71,6 +86,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="invoicePhone != null">invoice_phone = #{invoicePhone},</if>
|
||||
<if test="invoiceEmail != null">invoice_email = #{invoiceEmail},</if>
|
||||
<if test="invoiceRemark != null">invoice_remark = #{invoiceRemark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where pay_invoice.invoice_id = #{invoiceId}
|
||||
</update>
|
||||
|
@ -1,32 +1,36 @@
|
||||
<?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">
|
||||
<!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="actualAmount" column="actual_amount" />
|
||||
<result property="orderContent" column="order_content" />
|
||||
<result property="orderRemark" column="order_remark" />
|
||||
<result property="orderMessage" column="order_message" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPayOrderVo"> select order_id, user_id, order_number, order_status, total_amount,actual_amount,
|
||||
order_content, order_remark, order_message from pay_order </sql>
|
||||
<sql id="selectPayOrderVo">
|
||||
select order_id, order_number, order_status, total_amount, actual_amount, order_content, order_message, create_by, create_time, update_by, update_time, remark 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="actualAmount != null and actualAmount != ''"> and actual_amount = #{actualAmount}</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>
|
||||
@ -36,49 +40,53 @@
|
||||
where pay_order.order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<select id="selectPayOrderByOrderNumber" parameterType="String" resultMap="PayOrderResult">
|
||||
<include refid="selectPayOrderVo" />
|
||||
where pay_order.order_number = #{orderNumber}
|
||||
</select>
|
||||
|
||||
<insert id="insertPayOrder" parameterType="PayOrder"> insert into pay_order
|
||||
<insert id="insertPayOrder" parameterType="PayOrder" useGeneratedKeys="true" keyProperty="orderId">
|
||||
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="actualAmount != null">actual_amount,</if>
|
||||
<if test="orderContent != null">order_content,</if>
|
||||
<if test="orderRemark != null">
|
||||
order_remark,</if>
|
||||
<if test="orderMessage != null">order_message,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</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="actualAmount != null">#{actualAmount},</if>
|
||||
<if test="orderContent != null">#{orderContent},</if>
|
||||
<if test="orderRemark != null">#{orderRemark},</if>
|
||||
<if test="orderMessage != null">#{orderMessage},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePayOrder" parameterType="PayOrder"> update pay_order
|
||||
<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="actualAmount != null">actual_amount = #{actualAmount},</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>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where pay_order.order_id = #{orderId} </update>
|
||||
where pay_order.order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePayOrderByOrderId" parameterType="Long">
|
||||
delete from pay_order where order_id = #{orderId}
|
||||
|
42
sql/pay.sql
42
sql/pay.sql
@ -3,15 +3,18 @@
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `pay_order`;
|
||||
CREATE TABLE `pay_order` (
|
||||
`order_id` bigint NOT NULL AUTO_INCREMENT 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 '订单总金额',
|
||||
`actual_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 '负载信息',
|
||||
order_id bigint NOT NULL AUTO_INCREMENT 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 '订单总金额',
|
||||
actual_amount varchar(255) NULL DEFAULT NULL COMMENT '实际支付金额',
|
||||
order_content varchar(255) NULL DEFAULT NULL COMMENT '订单内容',
|
||||
order_message varchar(255) NULL DEFAULT NULL COMMENT '负载信息',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default null comment '备注',
|
||||
PRIMARY KEY (`order_id`)
|
||||
) ENGINE = InnoDB COMMENT = '订单';
|
||||
|
||||
@ -20,14 +23,19 @@ CREATE TABLE `pay_order` (
|
||||
-- ----------------------------
|
||||
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 '发票备注',
|
||||
invoice_id bigint NOT NULL AUTO_INCREMENT 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 '发票备注',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default null comment '备注',
|
||||
PRIMARY KEY (`invoice_id`)
|
||||
) ENGINE = InnoDB COMMENT = '发票';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user