浏览代码

add:新增商品订单相关表信息

yonge 5 年之前
父节点
当前提交
69d07914f3

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/dal/dao/GoodsOrderDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.web.dal.dao;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.web.dal.entity.GoodsOrder;
+
+public interface GoodsOrderDao extends BaseDAO<Long, GoodsOrder> {
+
+	
+}

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/dal/dao/GoodsOrderItemDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.web.dal.dao;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.web.dal.entity.GoodsOrderItem;
+
+public interface GoodsOrderItemDao extends BaseDAO<Long, GoodsOrderItem> {
+
+	
+}

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/dal/dao/GoodsOrderPaymentDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.web.dal.dao;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.web.dal.entity.GoodsOrderPayment;
+
+public interface GoodsOrderPaymentDao extends BaseDAO<Long, GoodsOrderPayment> {
+
+	
+}

+ 184 - 0
mec-web/src/main/java/com/ym/mec/web/dal/entity/GoodsOrder.java

@@ -0,0 +1,184 @@
+package com.ym.mec.web.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+/**
+ * 对应数据库表(goods_order):
+ */
+public class GoodsOrder {
+
+	public enum OrderStatus implements BaseEnum<String, OrderStatus> {
+
+		NOT_PAY("NOT_PAY", "待支付"), WAIT_PAY_CONFIRM("WAIT_PAY_CONFIRM", "支付待确认"), WAIT_SHIPMENT("WAIT_SHIPMENT", "待发货"), SHIPPED("SHIPPED", "已发货"), RECEIVED(
+				"RECEIVED", "已收货"), COMPLETED("COMPLETED", "已完成"), CANCELED("CANCELED", "已取消"), FAILED("FAILED", "支付失败");
+
+		private String code;
+
+		private String desc;
+
+		private OrderStatus(String code, String desc) {
+			this.code = code;
+			this.desc = desc;
+		}
+
+		@Override
+		public String getCode() {
+			return code;
+		}
+
+		public String getDesc() {
+			return desc;
+		}
+	}
+
+	/**  */
+	private Long id;
+
+	/**  */
+	private Integer userId;
+
+	/** 订单状态 */
+	private OrderStatus status;
+
+	/** 订单总额 */
+	private long totalAmount;
+
+	/** 商品数量 */
+	private Integer goodsQuantity;
+
+	/** 用户备注 */
+	private String userNote;
+
+	/** 订单号 */
+	private String orderNo;
+
+	/** 订单来源 */
+	private String orderSource;
+
+	/** 收货人 */
+	private Long receiverId;
+
+	/** 快递公司 */
+	private String expressCompanyCode;
+
+	/** 快递单号 */
+	private String expressNum;
+
+	/**  */
+	private java.util.Date createTime;
+
+	/**  */
+	private java.util.Date updateTime;
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getId() {
+		return this.id;
+	}
+
+	public void setUserId(Integer userId) {
+		this.userId = userId;
+	}
+
+	public Integer getUserId() {
+		return this.userId;
+	}
+
+	public void setStatus(OrderStatus status) {
+		this.status = status;
+	}
+
+	public OrderStatus getStatus() {
+		return this.status;
+	}
+
+	public void setTotalAmount(long totalAmount) {
+		this.totalAmount = totalAmount;
+	}
+
+	public long getTotalAmount() {
+		return this.totalAmount;
+	}
+
+	public void setGoodsQuantity(Integer goodsQuantity) {
+		this.goodsQuantity = goodsQuantity;
+	}
+
+	public Integer getGoodsQuantity() {
+		return this.goodsQuantity;
+	}
+
+	public void setUserNote(String userNote) {
+		this.userNote = userNote;
+	}
+
+	public String getUserNote() {
+		return this.userNote;
+	}
+
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+
+	public String getOrderNo() {
+		return this.orderNo;
+	}
+
+	public void setOrderSource(String orderSource) {
+		this.orderSource = orderSource;
+	}
+
+	public String getOrderSource() {
+		return this.orderSource;
+	}
+
+	public void setReceiverId(Long receiverId) {
+		this.receiverId = receiverId;
+	}
+
+	public Long getReceiverId() {
+		return this.receiverId;
+	}
+
+	public void setExpressCompanyCode(String expressCompanyCode) {
+		this.expressCompanyCode = expressCompanyCode;
+	}
+
+	public String getExpressCompanyCode() {
+		return this.expressCompanyCode;
+	}
+
+	public void setExpressNum(String expressNum) {
+		this.expressNum = expressNum;
+	}
+
+	public String getExpressNum() {
+		return this.expressNum;
+	}
+
+	public void setCreateTime(java.util.Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public java.util.Date getCreateTime() {
+		return this.createTime;
+	}
+
+	public void setUpdateTime(java.util.Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public java.util.Date getUpdateTime() {
+		return this.updateTime;
+	}
+
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 103 - 0
mec-web/src/main/java/com/ym/mec/web/dal/entity/GoodsOrderItem.java

@@ -0,0 +1,103 @@
+package com.ym.mec.web.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(goods_order_item):
+ */
+public class GoodsOrderItem {
+
+	/**  */
+	private Long id;
+	
+	/**  */
+	private Long goodsOrderId;
+	
+	/**  */
+	private Integer goodsId;
+	
+	/** 市场价 */
+	private long marketPrice;
+	
+	/** 折扣价 */
+	private long discountPrice;
+	
+	/** 商品数量 */
+	private Integer goodsQuantity;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setGoodsOrderId(Long goodsOrderId){
+		this.goodsOrderId = goodsOrderId;
+	}
+	
+	public Long getGoodsOrderId(){
+		return this.goodsOrderId;
+	}
+			
+	public void setGoodsId(Integer goodsId){
+		this.goodsId = goodsId;
+	}
+	
+	public Integer getGoodsId(){
+		return this.goodsId;
+	}
+			
+	public void setMarketPrice(long marketPrice){
+		this.marketPrice = marketPrice;
+	}
+	
+	public long getMarketPrice(){
+		return this.marketPrice;
+	}
+			
+	public void setDiscountPrice(long discountPrice){
+		this.discountPrice = discountPrice;
+	}
+	
+	public long getDiscountPrice(){
+		return this.discountPrice;
+	}
+			
+	public void setGoodsQuantity(Integer goodsQuantity){
+		this.goodsQuantity = goodsQuantity;
+	}
+	
+	public Integer getGoodsQuantity(){
+		return this.goodsQuantity;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 194 - 0
mec-web/src/main/java/com/ym/mec/web/dal/entity/GoodsOrderPayment.java

@@ -0,0 +1,194 @@
+package com.ym.mec.web.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+/**
+ * 对应数据库表(goods_order_payment):
+ */
+public class GoodsOrderPayment {
+
+	public enum PayStatus implements BaseEnum<String, PayStatus> {
+
+		FAILED("FAILED", "支付失败"), WAIT_PAY("WAIT_PAY", "待支付"), PAYING("PAYING", "支付中"), SUCCESSED("SUCCESSED", "支付成功");
+
+		private String code;
+
+		private String desc;
+
+		private PayStatus(String code, String desc) {
+			this.code = code;
+			this.desc = desc;
+		}
+
+		@Override
+		public String getCode() {
+			return code;
+		}
+
+		public String getDesc() {
+			return desc;
+		}
+	}
+
+	/**  */
+	private Long id;
+
+	/**  */
+	private Integer userId;
+
+	/**  */
+	private Long goodsOrderId;
+
+	/** 支付渠道 */
+	private String paymentChannel;
+
+	/** 业务渠道 */
+	private String paymentBusinessChannel;
+
+	/** 支付账号 */
+	private String paymentAccountNo;
+
+	/** 支付金额 */
+	private long amount;
+
+	/** 交易流水号 */
+	private String transNo;
+
+	/** 订单号 */
+	private String orderNo;
+
+	/** 支付状态 */
+	private PayStatus payStatus;
+
+	/** 到账时间 */
+	private java.util.Date arrivalTime;
+
+	/** 备注 */
+	private String remark;
+
+	/**  */
+	private java.util.Date createTime;
+
+	/**  */
+	private java.util.Date updateTime;
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getId() {
+		return this.id;
+	}
+
+	public void setUserId(Integer userId) {
+		this.userId = userId;
+	}
+
+	public Integer getUserId() {
+		return this.userId;
+	}
+
+	public void setGoodsOrderId(Long goodsOrderId) {
+		this.goodsOrderId = goodsOrderId;
+	}
+
+	public Long getGoodsOrderId() {
+		return this.goodsOrderId;
+	}
+
+	public void setPaymentChannel(String paymentChannel) {
+		this.paymentChannel = paymentChannel;
+	}
+
+	public String getPaymentChannel() {
+		return this.paymentChannel;
+	}
+
+	public void setPaymentBusinessChannel(String paymentBusinessChannel) {
+		this.paymentBusinessChannel = paymentBusinessChannel;
+	}
+
+	public String getPaymentBusinessChannel() {
+		return this.paymentBusinessChannel;
+	}
+
+	public void setPaymentAccountNo(String paymentAccountNo) {
+		this.paymentAccountNo = paymentAccountNo;
+	}
+
+	public String getPaymentAccountNo() {
+		return this.paymentAccountNo;
+	}
+
+	public void setAmount(long amount) {
+		this.amount = amount;
+	}
+
+	public long getAmount() {
+		return this.amount;
+	}
+
+	public void setTransNo(String transNo) {
+		this.transNo = transNo;
+	}
+
+	public String getTransNo() {
+		return this.transNo;
+	}
+
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+
+	public String getOrderNo() {
+		return this.orderNo;
+	}
+
+	public void setPayStatus(PayStatus payStatus) {
+		this.payStatus = payStatus;
+	}
+
+	public PayStatus getPayStatus() {
+		return this.payStatus;
+	}
+
+	public void setArrivalTime(java.util.Date arrivalTime) {
+		this.arrivalTime = arrivalTime;
+	}
+
+	public java.util.Date getArrivalTime() {
+		return this.arrivalTime;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public String getRemark() {
+		return this.remark;
+	}
+
+	public void setCreateTime(java.util.Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public java.util.Date getCreateTime() {
+		return this.createTime;
+	}
+
+	public void setUpdateTime(java.util.Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public java.util.Date getUpdateTime() {
+		return this.updateTime;
+	}
+
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/service/GoodsOrderItemService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.web.service;
+
+import com.ym.mec.common.service.BaseService;
+import com.ym.mec.web.dal.entity.GoodsOrderItem;
+
+public interface GoodsOrderItemService extends BaseService<Long, GoodsOrderItem> {
+
+}

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/service/GoodsOrderPaymentService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.web.service;
+
+import com.ym.mec.common.service.BaseService;
+import com.ym.mec.web.dal.entity.GoodsOrderPayment;
+
+public interface GoodsOrderPaymentService extends BaseService<Long, GoodsOrderPayment> {
+
+}

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/service/GoodsOrderService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.web.service;
+
+import com.ym.mec.common.service.BaseService;
+import com.ym.mec.web.dal.entity.GoodsOrder;
+
+public interface GoodsOrderService extends BaseService<Long, GoodsOrder> {
+
+}

+ 23 - 0
mec-web/src/main/java/com/ym/mec/web/service/impl/GoodsOrderItemServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.web.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.web.dal.dao.GoodsOrderItemDao;
+import com.ym.mec.web.dal.entity.GoodsOrderItem;
+import com.ym.mec.web.service.GoodsOrderItemService;
+
+@Service
+public class GoodsOrderItemServiceImpl extends BaseServiceImpl<Long, GoodsOrderItem>  implements GoodsOrderItemService {
+	
+	@Autowired
+	private GoodsOrderItemDao goodsOrderItemDao;
+
+	@Override
+	public BaseDAO<Long, GoodsOrderItem> getDAO() {
+		return goodsOrderItemDao;
+	}
+	
+}

+ 23 - 0
mec-web/src/main/java/com/ym/mec/web/service/impl/GoodsOrderPaymentServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.web.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.web.dal.dao.GoodsOrderPaymentDao;
+import com.ym.mec.web.dal.entity.GoodsOrderPayment;
+import com.ym.mec.web.service.GoodsOrderPaymentService;
+
+@Service
+public class GoodsOrderPaymentServiceImpl extends BaseServiceImpl<Long, GoodsOrderPayment>  implements GoodsOrderPaymentService {
+	
+	@Autowired
+	private GoodsOrderPaymentDao goodsOrderPaymentDao;
+
+	@Override
+	public BaseDAO<Long, GoodsOrderPayment> getDAO() {
+		return goodsOrderPaymentDao;
+	}
+	
+}

+ 23 - 0
mec-web/src/main/java/com/ym/mec/web/service/impl/GoodsOrderServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.web.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.web.dal.dao.GoodsOrderDao;
+import com.ym.mec.web.dal.entity.GoodsOrder;
+import com.ym.mec.web.service.GoodsOrderService;
+
+@Service
+public class GoodsOrderServiceImpl extends BaseServiceImpl<Long, GoodsOrder>  implements GoodsOrderService {
+	
+	@Autowired
+	private GoodsOrderDao goodsOrderDao;
+
+	@Override
+	public BaseDAO<Long, GoodsOrder> getDAO() {
+		return goodsOrderDao;
+	}
+	
+}

+ 89 - 0
mec-web/src/main/resources/config/mybatis/GoodsOrderItemMapper.xml

@@ -0,0 +1,89 @@
+<?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.ym.mec.web.dal.dao.GoodsOrderItemDao">
+
+	<resultMap type="com.ym.mec.web.dal.entity.GoodsOrderItem"
+		id="GoodsOrderItem">
+		<result column="id_" property="id" />
+		<result column="goods_order_id_" property="goodsOrderId" />
+		<result column="goods_id_" property="goodsId" />
+		<result column="market_price_" property="marketPrice" />
+		<result column="discount_price_" property="discountPrice" />
+		<result column="goods_quantity_" property="goodsQuantity" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="GoodsOrderItem">
+		SELECT * FROM
+		goods_order_item WHERE id_ = #{id}
+	</select>
+
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="GoodsOrderItem">
+		SELECT * FROM goods_order_item
+		ORDER BY id_
+	</select>
+
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.GoodsOrderItem"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO goods_order_item
+		(id_,goods_order_id_,goods_id_,market_price_,discount_price_,goods_quantity_,create_time_,update_time_)
+		VALUES(#{id},#{goodsOrderId},#{goodsId},#{marketPrice},#{discountPrice},#{goodsQuantity},#{createTime},#{updateTime})
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.web.dal.entity.GoodsOrderItem">
+		UPDATE goods_order_item
+		<set>
+			<if test="goodsQuantity != null">
+				goods_quantity_ = #{goodsQuantity},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="marketPrice != null">
+				market_price_ = #{marketPrice},
+			</if>
+			<if test="discountPrice != null">
+				discount_price_ = #{discountPrice},
+			</if>
+			<if test="goodsOrderId != null">
+				goods_order_id_ = #{goodsOrderId},
+			</if>
+			<if test="goodsId != null">
+				goods_id_ = #{goodsId},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM goods_order_item WHERE id_ =
+		#{id}
+	</delete>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="GoodsOrderItem" parameterType="map">
+		SELECT * FROM goods_order_item ORDER BY id_
+		<include refid="global.limit" />
+	</select>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM
+		goods_order_item
+	</select>
+</mapper>

+ 107 - 0
mec-web/src/main/resources/config/mybatis/GoodsOrderMapper.xml

@@ -0,0 +1,107 @@
+<?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.ym.mec.web.dal.dao.GoodsOrderDao">
+
+	<resultMap type="com.ym.mec.web.dal.entity.GoodsOrder" id="GoodsOrder">
+		<result column="id_" property="id" />
+		<result column="user_id_" property="userId" />
+		<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
+		<result column="total_amount_" property="totalAmount" />
+		<result column="goods_quantity_" property="goodsQuantity" />
+		<result column="user_note_" property="userNote" />
+		<result column="order_no_" property="orderNo" />
+		<result column="order_source_" property="orderSource" />
+		<result column="receiver_id_" property="receiverId" />
+		<result column="express_company_code_" property="expressCompanyCode" />
+		<result column="express_num_" property="expressNum" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="GoodsOrder">
+		SELECT * FROM
+		goods_order WHERE id_ = #{id}
+	</select>
+
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="GoodsOrder">
+		SELECT * FROM goods_order ORDER
+		BY id_
+	</select>
+
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.GoodsOrder"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO goods_order
+		(id_,user_id_,status_,total_amount_,goods_quantity_,user_note_,order_no_,order_source_,receiver_id_,express_company_code_,express_num_,create_time_,update_time_)
+		VALUES(#{id},#{userId},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{totalAmount},#{goodsQuantity},#{userNote},#{orderNo},#{orderSource},#{receiverId},#{expressCompanyCode},#{expressNum},#{createTime},#{updateTime})
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.web.dal.entity.GoodsOrder">
+		UPDATE goods_order
+		<set>
+			<if test="status != null">
+				status_ = #{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+			</if>
+			<if test="goodsQuantity != null">
+				goods_quantity_ = #{goodsQuantity},
+			</if>
+			<if test="orderNo != null">
+				order_no_ = #{orderNo},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+			<if test="receiverId != null">
+				receiver_id_ = #{receiverId},
+			</if>
+			<if test="userId != null">
+				user_id_ = #{userId},
+			</if>
+			<if test="userNote != null">
+				user_note_ = #{userNote},
+			</if>
+			<if test="orderSource != null">
+				order_source_ = #{orderSource},
+			</if>
+			<if test="totalAmount != null">
+				total_amount_ = #{totalAmount},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="expressCompanyCode != null">
+				express_company_code_ = #{expressCompanyCode},
+			</if>
+			<if test="expressNum != null">
+				express_num_ = #{expressNum},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM goods_order WHERE id_ = #{id}
+	</delete>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="GoodsOrder" parameterType="map">
+		SELECT * FROM goods_order ORDER BY id_
+		<include refid="global.limit" />
+	</select>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM
+		goods_order
+	</select>
+</mapper>

+ 114 - 0
mec-web/src/main/resources/config/mybatis/GoodsOrderPaymentMapper.xml

@@ -0,0 +1,114 @@
+<?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.ym.mec.web.dal.dao.GoodsOrderPaymentDao">
+
+	<resultMap type="com.ym.mec.web.dal.entity.GoodsOrderPayment"
+		id="GoodsOrderPayment">
+		<result column="id_" property="id" />
+		<result column="user_id_" property="userId" />
+		<result column="goods_order_id_" property="goodsOrderId" />
+		<result column="payment_channel_" property="paymentChannel" />
+		<result column="payment_business_channel_" property="paymentBusinessChannel" />
+		<result column="payment_account_no_" property="paymentAccountNo" />
+		<result column="amount_" property="amount" />
+		<result column="trans_no_" property="transNo" />
+		<result column="order_no_" property="orderNo" />
+		<result column="pay_status_" property="payStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
+		<result column="arrival_time_" property="arrivalTime" />
+		<result column="remark_" property="remark" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="GoodsOrderPayment">
+		SELECT * FROM
+		goods_order_payment WHERE id_ = #{id}
+	</select>
+
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="GoodsOrderPayment">
+		SELECT * FROM goods_order_payment
+		ORDER BY id_
+	</select>
+
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.GoodsOrderPayment"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO goods_order_payment
+		(id_,user_id_,goods_order_id_,payment_channel_,payment_business_channel_,payment_account_no_,amount_,trans_no_,order_no_,pay_status_,arrival_time_,remark_,create_time_,update_time_)
+		VALUES(#{id},#{userId},#{goodsOrderId},#{paymentChannel},#{paymentBusinessChannel},#{paymentAccountNo},#{amount},#{transNo},#{orderNo},#{payStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{arrivalTime},#{remark},#{createTime},#{updateTime})
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.web.dal.entity.GoodsOrderPayment">
+		UPDATE goods_order_payment
+		<set>
+			<if test="payStatus != null">
+				pay_status_ = #{payStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+			</if>
+			<if test="orderNo != null">
+				order_no_ = #{orderNo},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="amount != null">
+				amount_ = #{amount},
+			</if>
+			<if test="arrivalTime != null">
+				arrival_time_ = #{arrivalTime},
+			</if>
+			<if test="paymentChannel != null">
+				payment_channel_ = #{paymentChannel},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+			<if test="userId != null">
+				user_id_ = #{userId},
+			</if>
+			<if test="remark != null">
+				remark_ = #{remark},
+			</if>
+			<if test="paymentAccountNo != null">
+				payment_account_no_ = #{paymentAccountNo},
+			</if>
+			<if test="paymentBusinessChannel != null">
+				payment_business_channel_ = #{paymentBusinessChannel},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="goodsOrderId != null">
+				goods_order_id_ = #{goodsOrderId},
+			</if>
+			<if test="transNo != null">
+				trans_no_ = #{transNo},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM goods_order_payment WHERE id_ =
+		#{id}
+	</delete>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="GoodsOrderPayment"
+		parameterType="map">
+		SELECT * FROM goods_order_payment ORDER BY id_
+		<include refid="global.limit" />
+	</select>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM
+		goods_order_payment
+	</select>
+</mapper>