Commit d5626afd authored by machengbo's avatar machengbo

商城订单管理

parent b47044eb
package com.jz.dm.mall.moduls.controller.order;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.entity.Order;
import com.jz.dm.mall.moduls.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
* 订单表(TOrder)表控制层
*
* @author Bellamy
* @since 2020-12-01 10:41:41
*/
@RestController
@RequestMapping("/order")
@Api(tags = "订单管理")
public class OrderController{
/**
* 服务对象
*/
@Autowired
private OrderService tOrderService;
@GetMapping(value = "/list")
@ApiOperation(value = "订单管理列表(分页查询)", notes = "订单列表(分页查询)")
public Result<IPage<Order>> queryPageList(Order order, HttpServletRequest req) throws Exception {
Result<IPage<Order>> result = new Result<IPage<Order>>();
IPage<Order> pageList = tOrderService.queryPage(new Page<Order>(1, 2), order);
result.setSuccess(true);
result.setResult(pageList);
return result;
}
}
\ No newline at end of file
package com.jz.dm.mall.moduls.controller.order;
import com.jz.dm.mall.moduls.service.OrderGoodsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 订单商品信息(TOrderGoodsInfo)表控制层
*
* @author Bellamy
* @since 2020-12-01 10:41:41
*/
@RestController
@RequestMapping("orderGoodsInfo")
public class OrderGoodsInfoController {
/**
* 服务对象
*/
@Autowired
private OrderGoodsInfoService tOrderGoodsInfoService;
}
\ No newline at end of file
package com.jz.dm.mall.moduls.controller.order;
import com.jz.dm.mall.moduls.service.OrderPaymentService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 订单支付(TOrderPayment)表控制层
*
* @author Bellamy
* @since 2020-12-01 10:41:42
*/
@RestController
@RequestMapping("orderPayment")
@Api(tags = "订单支付API")
public class OrderPaymentController {
/**
* 服务对象
*/
@Autowired
private OrderPaymentService tOrderPaymentService;
}
\ No newline at end of file
package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.util.Date;
/**
* 订单表(TOrder)实体类
*
* @author makejava
* @since 2020-12-01 10:41:40
*/
@TableName("t_order")
@ApiModel
public class Order implements Serializable {
private static final long serialVersionUID = 651546246975691600L;
/**
* 订单id
*/
private Long orderId;
/**
* 订单编号
*/
private String orderNumber;
/**
* 用户id
*/
private Long customerId;
/**
* 订单状态:01待支付,02已支付,03已取消
*/
private String orderStatus;
/**
* 订单金额
*/
private Double orderMoney;
/**
* 订单时间
*/
private Date orderTime;
/**
* 卖家id
*/
private Long sellerId;
/**
* 支付金额
*/
private Double paymentMoney;
/**
* 支付时间
*/
private Date paymentTime;
/**
* 支付方式:01余额
*/
private String paymentMethod;
/**
* 优惠金额
*/
private Double districtMoney;
/**
* 购买方式:01年,02季,03月,04次(服务类型)
*/
private String purchaseMethod;
/**
* 商品token
*/
private String goodsToken;
/**
* 盐值
*/
private String saltValue;
/**
* apikey
*/
private String apiKey;
/**
* 生效日期
*/
private Date takeEffectTime;
/**
* 失效日期
*/
private Date invalidTime;
/**
* 价格类型:01免费,02收费
*/
private String priceType;
/**
* 创建人
*/
private String crePerson;
/**
* 创建时间
*/
private Date creTime;
/**
* 更新时间
*/
private Date uptTime;
/**
* 更新人
*/
private String uptPerson;
/**
* 删除标识
*/
private String delFlag;
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public String getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
public Double getOrderMoney() {
return orderMoney;
}
public void setOrderMoney(Double orderMoney) {
this.orderMoney = orderMoney;
}
public Date getOrderTime() {
return orderTime;
}
public void setOrderTime(Date orderTime) {
this.orderTime = orderTime;
}
public Long getSellerId() {
return sellerId;
}
public void setSellerId(Long sellerId) {
this.sellerId = sellerId;
}
public Double getPaymentMoney() {
return paymentMoney;
}
public void setPaymentMoney(Double paymentMoney) {
this.paymentMoney = paymentMoney;
}
public Date getPaymentTime() {
return paymentTime;
}
public void setPaymentTime(Date paymentTime) {
this.paymentTime = paymentTime;
}
public String getPaymentMethod() {
return paymentMethod;
}
public void setPaymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
}
public Double getDistrictMoney() {
return districtMoney;
}
public void setDistrictMoney(Double districtMoney) {
this.districtMoney = districtMoney;
}
public String getPurchaseMethod() {
return purchaseMethod;
}
public void setPurchaseMethod(String purchaseMethod) {
this.purchaseMethod = purchaseMethod;
}
public String getGoodsToken() {
return goodsToken;
}
public void setGoodsToken(String goodsToken) {
this.goodsToken = goodsToken;
}
public String getSaltValue() {
return saltValue;
}
public void setSaltValue(String saltValue) {
this.saltValue = saltValue;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public Date getTakeEffectTime() {
return takeEffectTime;
}
public void setTakeEffectTime(Date takeEffectTime) {
this.takeEffectTime = takeEffectTime;
}
public Date getInvalidTime() {
return invalidTime;
}
public void setInvalidTime(Date invalidTime) {
this.invalidTime = invalidTime;
}
public String getPriceType() {
return priceType;
}
public void setPriceType(String priceType) {
this.priceType = priceType;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getUptPerson() {
return uptPerson;
}
public void setUptPerson(String uptPerson) {
this.uptPerson = uptPerson;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}
\ No newline at end of file
package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.util.Date;
/**
* 订单商品信息(TOrderGoodsInfo)实体类
*
* @author Bellamy
* @since 2020-12-01 10:41:41
*/
@TableName("t_order_goods_info")
@ApiModel
public class OrderGoodsInfo implements Serializable {
private static final long serialVersionUID = 380725675159762591L;
/**
* 订单商品信息
*/
private Long orderGoodsInfoId;
/**
* 订单id
*/
private Long orderId;
/**
* 数据id
*/
private Long dataGoodsId;
/**
* 创建时间
*/
private Date creTime;
/**
* 创建人
*/
private String crePerson;
/**
* 删除标识:Y是,N否
*/
private String delFlag;
public Long getOrderGoodsInfoId() {
return orderGoodsInfoId;
}
public void setOrderGoodsInfoId(Long orderGoodsInfoId) {
this.orderGoodsInfoId = orderGoodsInfoId;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public Long getDataGoodsId() {
return dataGoodsId;
}
public void setDataGoodsId(Long dataGoodsId) {
this.dataGoodsId = dataGoodsId;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}
\ No newline at end of file
package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.util.Date;
/**
* 订单支付(TOrderPayment)实体类
*
* @author Bellamy
* @since 2020-12-01 10:41:41
*/
@TableName("t_order_payment")
@ApiModel
public class OrderPayment implements Serializable {
private static final long serialVersionUID = -14423507905800987L;
/**
* 支付id
*/
private Long paymentId;
/**
* 订单id
*/
private Long orderId;
/**
* 卖家id(收款方)
*/
private Long sellerId;
/**
* 支付金额
*/
private Double paymentMoney;
/**
* 支付时间
*/
private Date paymentTime;
/**
* 支付方式:01余额
*/
private String paymentMethod;
/**
* 优惠金额
*/
private Double districtMoney;
/**
* 支付状态
*/
private String paymentStatus;
/**
* 购买方式:01年,02季,03月,04次(服务类型)
*/
private String purchaseMethod;
/**
* 创建时间
*/
private Date creTime;
/**
* 删除标识
*/
private String delFlag;
public Long getPaymentId() {
return paymentId;
}
public void setPaymentId(Long paymentId) {
this.paymentId = paymentId;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public Long getSellerId() {
return sellerId;
}
public void setSellerId(Long sellerId) {
this.sellerId = sellerId;
}
public Double getPaymentMoney() {
return paymentMoney;
}
public void setPaymentMoney(Double paymentMoney) {
this.paymentMoney = paymentMoney;
}
public Date getPaymentTime() {
return paymentTime;
}
public void setPaymentTime(Date paymentTime) {
this.paymentTime = paymentTime;
}
public String getPaymentMethod() {
return paymentMethod;
}
public void setPaymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
}
public Double getDistrictMoney() {
return districtMoney;
}
public void setDistrictMoney(Double districtMoney) {
this.districtMoney = districtMoney;
}
public String getPaymentStatus() {
return paymentStatus;
}
public void setPaymentStatus(String paymentStatus) {
this.paymentStatus = paymentStatus;
}
public String getPurchaseMethod() {
return purchaseMethod;
}
public void setPurchaseMethod(String purchaseMethod) {
this.purchaseMethod = purchaseMethod;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}
\ No newline at end of file
package com.jz.dm.mall.moduls.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jz.common.base.BaseMapper;
import com.jz.dm.mall.moduls.entity.Order;
/**
* 订单表(TOrder)表数据库访问层
*
* @author Bellamy
* @since 2020-12-01 10:41:40
*/
public interface OrderDao extends BaseMapper<Order> {
IPage<Order> queryPage(Page<Order> orderPage,Order order);
}
\ No newline at end of file
package com.jz.dm.mall.moduls.mapper;
import com.jz.common.base.BaseMapper;
import com.jz.common.entity.OrderGoodsInfo;
/**
* 订单商品信息(TOrderGoodsInfo)表数据库访问层
*
* @author Bellamy
* @since 2020-12-01 10:41:41
*/
public interface OrderGoodsInfoDao extends BaseMapper<OrderGoodsInfo> {
}
\ No newline at end of file
package com.jz.dm.mall.moduls.mapper;
import com.jz.common.base.BaseMapper;
import com.jz.common.entity.OrderPayment;
/**
* 订单支付(TOrderPayment)表数据库访问层
*
* @author Bellamy
* @since 2020-12-01 10:41:41
*/
public interface OrderPaymentDao extends BaseMapper<OrderPayment> {
}
\ No newline at end of file
package com.jz.dm.mall.moduls.service;
/**
* 订单商品信息(TOrderGoodsInfo)表服务接口
*
* @author Bellamy
* @since 2020-12-01 10:41:41
*/
public interface OrderGoodsInfoService {
}
\ No newline at end of file
package com.jz.dm.mall.moduls.service;
/**
* 订单支付(TOrderPayment)表服务接口
*
* @author Bellamy
* @since 2020-12-01 10:41:41
*/
public interface OrderPaymentService {
}
\ No newline at end of file
package com.jz.dm.mall.moduls.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jz.dm.mall.moduls.entity.Order;
/**
* 订单表(TOrder)表服务接口
*
* @author Bellamy
* @since 2020-12-01 10:41:40
*/
public interface OrderService {
IPage<Order> queryPage(Page<Order> orderPage, Order order);
}
\ No newline at end of file
package com.jz.dm.mall.moduls.service.impl;
import com.jz.dm.mall.moduls.mapper.OrderGoodsInfoDao;
import com.jz.dm.mall.moduls.service.OrderGoodsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 订单商品信息(TOrderGoodsInfo)表服务实现类
*
* @author Bellamy
* @since 2020-12-01 10:41:41
*/
@Service("orderGoodsInfoService")
public class OrderGoodsInfoServiceImpl implements OrderGoodsInfoService {
@Autowired
private OrderGoodsInfoDao tOrderGoodsInfoDao;
}
\ No newline at end of file
package com.jz.dm.mall.moduls.service.impl;
import com.jz.dm.mall.moduls.mapper.OrderPaymentDao;
import com.jz.dm.mall.moduls.service.OrderPaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 订单支付(TOrderPayment)表服务实现类
*
* @author Bellamy
* @since 2020-12-01 10:41:42
*/
@Service("orderPaymentService")
public class OrderPaymentServiceImpl implements OrderPaymentService {
@Autowired
private OrderPaymentDao tOrderPaymentDao;
}
\ No newline at end of file
package com.jz.dm.mall.moduls.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jz.common.entity.User;
import com.jz.dm.mall.moduls.entity.Order;
import com.jz.dm.mall.moduls.mapper.OrderDao;
import com.jz.dm.mall.moduls.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* 订单表(TOrder)表服务实现类
*
* @author Bellamy
* @since 2020-12-01 10:41:40
*/
@Service("orderService")
@Transactional
public class OrderServiceImpl implements OrderService {
@Autowired
private OrderDao tOrderDao;
@Override
public IPage<Order> queryPage(Page<Order> orderPage, Order order) {
return tOrderDao.queryPage(orderPage,order);
}
}
\ No newline at end of file
This diff is collapsed.
<?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.jz.dm.mall.moduls.mapper.OrderGoodsInfoDao">
<resultMap type="com.jz.dm.mall.moduls.entity.OrderGoodsInfo" id="TOrderGoodsInfoMap">
<result property="orderGoodsInfoId" column="order_goods_info_id" jdbcType="INTEGER"/>
<result property="orderId" column="order_id" jdbcType="INTEGER"/>
<result property="dataGoodsId" column="data_goods_id" jdbcType="INTEGER"/>
<result property="creTime" column="cre_time" jdbcType="TIMESTAMP"/>
<result property="crePerson" column="cre_person" jdbcType="VARCHAR"/>
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="TOrderGoodsInfoMap">
select
order_goods_info_id, order_id, data_goods_id, cre_time, cre_person, del_flag
from t_order_goods_info
where order_goods_info_id = #{orderGoodsInfoId}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="TOrderGoodsInfoMap">
select
order_goods_info_id, order_id, data_goods_id, cre_time, cre_person, del_flag
from t_order_goods_info
limit #{offset}, #{limit}
</select>
<!--通过实体作为筛选条件查询-->
<select id="queryAll" resultMap="TOrderGoodsInfoMap">
select
order_goods_info_id, order_id, data_goods_id, cre_time, cre_person, del_flag
from t_order_goods_info
<where>
<if test="orderGoodsInfoId != null">
and order_goods_info_id = #{orderGoodsInfoId}
</if>
<if test="orderId != null">
and order_id = #{orderId}
</if>
<if test="dataGoodsId != null">
and data_goods_id = #{dataGoodsId}
</if>
<if test="creTime != null">
and cre_time = #{creTime}
</if>
<if test="crePerson != null and crePerson != ''">
and cre_person = #{crePerson}
</if>
<if test="delFlag != null and delFlag != ''">
and del_flag = #{delFlag}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="orderGoodsInfoId" useGeneratedKeys="true">
insert into t_order_goods_info(order_id, data_goods_id, cre_time, cre_person, del_flag)
values (#{orderId}, #{dataGoodsId}, #{creTime}, #{crePerson}, #{delFlag})
</insert>
<insert id="insertBatch" keyProperty="orderGoodsInfoId" useGeneratedKeys="true">
insert into t_order_goods_info(order_id, data_goods_id, cre_time, cre_person, del_flag)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.orderId}, #{entity.dataGoodsId}, #{entity.creTime}, #{entity.crePerson}, #{entity.delFlag})
</foreach>
</insert>
<!--通过主键修改数据-->
<update id="update">
update t_order_goods_info
<set>
<if test="orderId != null">
order_id = #{orderId},
</if>
<if test="dataGoodsId != null">
data_goods_id = #{dataGoodsId},
</if>
<if test="creTime != null">
cre_time = #{creTime},
</if>
<if test="crePerson != null and crePerson != ''">
cre_person = #{crePerson},
</if>
<if test="delFlag != null and delFlag != ''">
del_flag = #{delFlag},
</if>
</set>
where order_goods_info_id = #{orderGoodsInfoId}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from t_order_goods_info where order_goods_info_id = #{orderGoodsInfoId}
</delete>
</mapper>
\ No newline at end of file
<?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.jz.dm.mall.moduls.mapper.OrderPaymentDao">
<resultMap type="com.jz.dm.mall.moduls.entity.OrderPayment" id="TOrderPaymentMap">
<result property="paymentId" column="payment_id" jdbcType="INTEGER"/>
<result property="orderId" column="order_id" jdbcType="INTEGER"/>
<result property="sellerId" column="seller_id" jdbcType="INTEGER"/>
<result property="paymentMoney" column="payment_money" jdbcType="NUMERIC"/>
<result property="paymentTime" column="payment_time" jdbcType="TIMESTAMP"/>
<result property="paymentMethod" column="payment_method" jdbcType="VARCHAR"/>
<result property="districtMoney" column="district_money" jdbcType="NUMERIC"/>
<result property="paymentStatus" column="payment_status" jdbcType="VARCHAR"/>
<result property="purchaseMethod" column="purchase_method" jdbcType="VARCHAR"/>
<result property="creTime" column="cre_time" jdbcType="TIMESTAMP"/>
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="TOrderPaymentMap">
select
payment_id, order_id, seller_id, payment_money, payment_time, payment_method, district_money, payment_status, purchase_method, cre_time, del_flag
from t_order_payment
where payment_id = #{paymentId}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="TOrderPaymentMap">
select
payment_id, order_id, seller_id, payment_money, payment_time, payment_method, district_money, payment_status, purchase_method, cre_time, del_flag
from t_order_payment
limit #{offset}, #{limit}
</select>
<!--通过实体作为筛选条件查询-->
<select id="queryAll" resultMap="TOrderPaymentMap">
select
payment_id, order_id, seller_id, payment_money, payment_time, payment_method, district_money, payment_status,
purchase_method, cre_time, del_flag
from t_order_payment
<where>
<if test="paymentId != null">
and payment_id = #{paymentId}
</if>
<if test="orderId != null">
and order_id = #{orderId}
</if>
<if test="sellerId != null">
and seller_id = #{sellerId}
</if>
<if test="paymentMoney != null">
and payment_money = #{paymentMoney}
</if>
<if test="paymentTime != null">
and payment_time = #{paymentTime}
</if>
<if test="paymentMethod != null and paymentMethod != ''">
and payment_method = #{paymentMethod}
</if>
<if test="districtMoney != null">
and district_money = #{districtMoney}
</if>
<if test="paymentStatus != null and paymentStatus != ''">
and payment_status = #{paymentStatus}
</if>
<if test="purchaseMethod != null and purchaseMethod != ''">
and purchase_method = #{purchaseMethod}
</if>
<if test="creTime != null">
and cre_time = #{creTime}
</if>
<if test="delFlag != null and delFlag != ''">
and del_flag = #{delFlag}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="paymentId" useGeneratedKeys="true">
insert into t_order_payment(order_id, seller_id, payment_money, payment_time, payment_method, district_money, payment_status, purchase_method, cre_time, del_flag)
values (#{orderId}, #{sellerId}, #{paymentMoney}, #{paymentTime}, #{paymentMethod}, #{districtMoney}, #{paymentStatus}, #{purchaseMethod}, #{creTime}, #{delFlag})
</insert>
<insert id="insertBatch" keyProperty="paymentId" useGeneratedKeys="true">
insert into t_order_payment(order_id, seller_id, payment_money, payment_time, payment_method,
district_money, payment_status, purchase_method, cre_time, del_flag)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.orderId}, #{entity.sellerId}, #{entity.paymentMoney}, #{entity.paymentTime},
#{entity.paymentMethod}, #{entity.districtMoney}, #{entity.paymentStatus}, #{entity.purchaseMethod},
#{entity.creTime}, #{entity.delFlag})
</foreach>
</insert>
<!--通过主键修改数据-->
<update id="update">
update t_order_payment
<set>
<if test="orderId != null">
order_id = #{orderId},
</if>
<if test="sellerId != null">
seller_id = #{sellerId},
</if>
<if test="paymentMoney != null">
payment_money = #{paymentMoney},
</if>
<if test="paymentTime != null">
payment_time = #{paymentTime},
</if>
<if test="paymentMethod != null and paymentMethod != ''">
payment_method = #{paymentMethod},
</if>
<if test="districtMoney != null">
district_money = #{districtMoney},
</if>
<if test="paymentStatus != null and paymentStatus != ''">
payment_status = #{paymentStatus},
</if>
<if test="purchaseMethod != null and purchaseMethod != ''">
purchase_method = #{purchaseMethod},
</if>
<if test="creTime != null">
cre_time = #{creTime},
</if>
<if test="delFlag != null and delFlag != ''">
del_flag = #{delFlag},
</if>
</set>
where payment_id = #{paymentId}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from t_order_payment where payment_id = #{paymentId}
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment