赵冬冬 преди 4 години
родител
ревизия
9d8b5c118b

+ 30 - 0
forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/mapper/OmsOrderPayMapper.java

@@ -0,0 +1,30 @@
+package com.hwrj.cloud.portal.mapper;
+
+import com.hwrj.cloud.portal.model.OmsOrderPay;
+import com.hwrj.cloud.portal.model.OmsOrderPayExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface OmsOrderPayMapper {
+    long countByExample(OmsOrderPayExample example);
+
+    int deleteByExample(OmsOrderPayExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(OmsOrderPay record);
+
+    int insertSelective(OmsOrderPay record);
+
+    List<OmsOrderPay> selectByExample(OmsOrderPayExample example);
+
+    OmsOrderPay selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") OmsOrderPay record, @Param("example") OmsOrderPayExample example);
+
+    int updateByExample(@Param("record") OmsOrderPay record, @Param("example") OmsOrderPayExample example);
+
+    int updateByPrimaryKeySelective(OmsOrderPay record);
+
+    int updateByPrimaryKey(OmsOrderPay record);
+}

+ 129 - 0
forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/OmsOrderPay.java

@@ -0,0 +1,129 @@
+package com.hwrj.cloud.portal.model;
+
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class OmsOrderPay implements Serializable {
+    @ApiModelProperty(value = "id")
+    private Long id;
+
+    @ApiModelProperty(value = "订单id")
+    private Long orderId;
+
+    @ApiModelProperty(value = "支付金额")
+    private BigDecimal payMoney;
+
+    @ApiModelProperty(value = "创建人")
+    private Long createId;
+
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "支付状态 0未支付 1已支付")
+    private Integer status;
+
+    @ApiModelProperty(value = "1支付宝 2 微信")
+    private Integer payType;
+
+    private static final long serialVersionUID = 1L;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(Long orderId) {
+        this.orderId = orderId;
+    }
+
+    public BigDecimal getPayMoney() {
+        return payMoney;
+    }
+
+    public void setPayMoney(BigDecimal payMoney) {
+        this.payMoney = payMoney;
+    }
+
+    public Long getCreateId() {
+        return createId;
+    }
+
+    public void setCreateId(Long createId) {
+        this.createId = createId;
+    }
+
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Integer getPayType() {
+        return payType;
+    }
+
+    public void setPayType(Integer payType) {
+        this.payType = payType;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", orderId=").append(orderId);
+        sb.append(", payMoney=").append(payMoney);
+        sb.append(", createId=").append(createId);
+        sb.append(", createUser=").append(createUser);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", status=").append(status);
+        sb.append(", payType=").append(payType);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 752 - 0
forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/OmsOrderPayExample.java

@@ -0,0 +1,752 @@
+package com.hwrj.cloud.portal.model;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class OmsOrderPayExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public OmsOrderPayExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdIsNull() {
+            addCriterion("order_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdIsNotNull() {
+            addCriterion("order_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdEqualTo(Long value) {
+            addCriterion("order_id =", value, "orderId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdNotEqualTo(Long value) {
+            addCriterion("order_id <>", value, "orderId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdGreaterThan(Long value) {
+            addCriterion("order_id >", value, "orderId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("order_id >=", value, "orderId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdLessThan(Long value) {
+            addCriterion("order_id <", value, "orderId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdLessThanOrEqualTo(Long value) {
+            addCriterion("order_id <=", value, "orderId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdIn(List<Long> values) {
+            addCriterion("order_id in", values, "orderId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdNotIn(List<Long> values) {
+            addCriterion("order_id not in", values, "orderId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdBetween(Long value1, Long value2) {
+            addCriterion("order_id between", value1, value2, "orderId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderIdNotBetween(Long value1, Long value2) {
+            addCriterion("order_id not between", value1, value2, "orderId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyIsNull() {
+            addCriterion("pay_money is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyIsNotNull() {
+            addCriterion("pay_money is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyEqualTo(BigDecimal value) {
+            addCriterion("pay_money =", value, "payMoney");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyNotEqualTo(BigDecimal value) {
+            addCriterion("pay_money <>", value, "payMoney");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyGreaterThan(BigDecimal value) {
+            addCriterion("pay_money >", value, "payMoney");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyGreaterThanOrEqualTo(BigDecimal value) {
+            addCriterion("pay_money >=", value, "payMoney");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyLessThan(BigDecimal value) {
+            addCriterion("pay_money <", value, "payMoney");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyLessThanOrEqualTo(BigDecimal value) {
+            addCriterion("pay_money <=", value, "payMoney");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyIn(List<BigDecimal> values) {
+            addCriterion("pay_money in", values, "payMoney");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyNotIn(List<BigDecimal> values) {
+            addCriterion("pay_money not in", values, "payMoney");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("pay_money between", value1, value2, "payMoney");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayMoneyNotBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("pay_money not between", value1, value2, "payMoney");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdIsNull() {
+            addCriterion("create_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdIsNotNull() {
+            addCriterion("create_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdEqualTo(Long value) {
+            addCriterion("create_id =", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdNotEqualTo(Long value) {
+            addCriterion("create_id <>", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdGreaterThan(Long value) {
+            addCriterion("create_id >", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_id >=", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdLessThan(Long value) {
+            addCriterion("create_id <", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdLessThanOrEqualTo(Long value) {
+            addCriterion("create_id <=", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdIn(List<Long> values) {
+            addCriterion("create_id in", values, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdNotIn(List<Long> values) {
+            addCriterion("create_id not in", values, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdBetween(Long value1, Long value2) {
+            addCriterion("create_id between", value1, value2, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdNotBetween(Long value1, Long value2) {
+            addCriterion("create_id not between", value1, value2, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserIsNull() {
+            addCriterion("create_user is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserIsNotNull() {
+            addCriterion("create_user is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserEqualTo(String value) {
+            addCriterion("create_user =", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotEqualTo(String value) {
+            addCriterion("create_user <>", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserGreaterThan(String value) {
+            addCriterion("create_user >", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
+            addCriterion("create_user >=", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserLessThan(String value) {
+            addCriterion("create_user <", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserLessThanOrEqualTo(String value) {
+            addCriterion("create_user <=", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserLike(String value) {
+            addCriterion("create_user like", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotLike(String value) {
+            addCriterion("create_user not like", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserIn(List<String> values) {
+            addCriterion("create_user in", values, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotIn(List<String> values) {
+            addCriterion("create_user not in", values, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserBetween(String value1, String value2) {
+            addCriterion("create_user between", value1, value2, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotBetween(String value1, String value2) {
+            addCriterion("create_user not between", value1, value2, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("status =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("status <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("status >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("status >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("status <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("status <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("status in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("status not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("status between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("status not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeIsNull() {
+            addCriterion("pay_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeIsNotNull() {
+            addCriterion("pay_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeEqualTo(Integer value) {
+            addCriterion("pay_type =", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeNotEqualTo(Integer value) {
+            addCriterion("pay_type <>", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeGreaterThan(Integer value) {
+            addCriterion("pay_type >", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("pay_type >=", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeLessThan(Integer value) {
+            addCriterion("pay_type <", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("pay_type <=", value, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeIn(List<Integer> values) {
+            addCriterion("pay_type in", values, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeNotIn(List<Integer> values) {
+            addCriterion("pay_type not in", values, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeBetween(Integer value1, Integer value2) {
+            addCriterion("pay_type between", value1, value2, "payType");
+            return (Criteria) this;
+        }
+
+        public Criteria andPayTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("pay_type not between", value1, value2, "payType");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 274 - 0
forest-portal/portal-mbg/src/main/resources/com/hwrj/cloud/portal/mapper/OmsOrderPayMapper.xml

@@ -0,0 +1,274 @@
+<?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.hwrj.cloud.portal.mapper.OmsOrderPayMapper">
+  <resultMap id="BaseResultMap" type="com.hwrj.cloud.portal.model.OmsOrderPay">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="order_id" jdbcType="BIGINT" property="orderId" />
+    <result column="pay_money" jdbcType="DECIMAL" property="payMoney" />
+    <result column="create_id" jdbcType="BIGINT" property="createId" />
+    <result column="create_user" jdbcType="VARCHAR" property="createUser" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="pay_type" jdbcType="INTEGER" property="payType" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, order_id, pay_money, create_id, create_user, create_time, update_time, status, 
+    pay_type
+  </sql>
+  <select id="selectByExample" parameterType="com.hwrj.cloud.portal.model.OmsOrderPayExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from oms_order_pay
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from oms_order_pay
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from oms_order_pay
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.hwrj.cloud.portal.model.OmsOrderPayExample">
+    delete from oms_order_pay
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.hwrj.cloud.portal.model.OmsOrderPay">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into oms_order_pay (order_id, pay_money, create_id, 
+      create_user, create_time, update_time, 
+      status, pay_type)
+    values (#{orderId,jdbcType=BIGINT}, #{payMoney,jdbcType=DECIMAL}, #{createId,jdbcType=BIGINT}, 
+      #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{status,jdbcType=INTEGER}, #{payType,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.hwrj.cloud.portal.model.OmsOrderPay">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into oms_order_pay
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="orderId != null">
+        order_id,
+      </if>
+      <if test="payMoney != null">
+        pay_money,
+      </if>
+      <if test="createId != null">
+        create_id,
+      </if>
+      <if test="createUser != null">
+        create_user,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="status != null">
+        status,
+      </if>
+      <if test="payType != null">
+        pay_type,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="orderId != null">
+        #{orderId,jdbcType=BIGINT},
+      </if>
+      <if test="payMoney != null">
+        #{payMoney,jdbcType=DECIMAL},
+      </if>
+      <if test="createId != null">
+        #{createId,jdbcType=BIGINT},
+      </if>
+      <if test="createUser != null">
+        #{createUser,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="payType != null">
+        #{payType,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.hwrj.cloud.portal.model.OmsOrderPayExample" resultType="java.lang.Long">
+    select count(*) from oms_order_pay
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update oms_order_pay
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.orderId != null">
+        order_id = #{record.orderId,jdbcType=BIGINT},
+      </if>
+      <if test="record.payMoney != null">
+        pay_money = #{record.payMoney,jdbcType=DECIMAL},
+      </if>
+      <if test="record.createId != null">
+        create_id = #{record.createId,jdbcType=BIGINT},
+      </if>
+      <if test="record.createUser != null">
+        create_user = #{record.createUser,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.status != null">
+        status = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.payType != null">
+        pay_type = #{record.payType,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update oms_order_pay
+    set id = #{record.id,jdbcType=BIGINT},
+      order_id = #{record.orderId,jdbcType=BIGINT},
+      pay_money = #{record.payMoney,jdbcType=DECIMAL},
+      create_id = #{record.createId,jdbcType=BIGINT},
+      create_user = #{record.createUser,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      status = #{record.status,jdbcType=INTEGER},
+      pay_type = #{record.payType,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.hwrj.cloud.portal.model.OmsOrderPay">
+    update oms_order_pay
+    <set>
+      <if test="orderId != null">
+        order_id = #{orderId,jdbcType=BIGINT},
+      </if>
+      <if test="payMoney != null">
+        pay_money = #{payMoney,jdbcType=DECIMAL},
+      </if>
+      <if test="createId != null">
+        create_id = #{createId,jdbcType=BIGINT},
+      </if>
+      <if test="createUser != null">
+        create_user = #{createUser,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="payType != null">
+        pay_type = #{payType,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.hwrj.cloud.portal.model.OmsOrderPay">
+    update oms_order_pay
+    set order_id = #{orderId,jdbcType=BIGINT},
+      pay_money = #{payMoney,jdbcType=DECIMAL},
+      create_id = #{createId,jdbcType=BIGINT},
+      create_user = #{createUser,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      status = #{status,jdbcType=INTEGER},
+      pay_type = #{payType,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 24 - 17
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/controller/WechatH5PayController.java

@@ -6,15 +6,20 @@ import com.github.binarywang.wxpay.constant.WxPayConstants;
 import com.github.binarywang.wxpay.exception.WxPayException;
 import com.github.binarywang.wxpay.service.WxPayService;
 import com.hwrj.cloud.common.api.CommonResult;
+import com.hwrj.cloud.portal.from.WxPayFrom;
+import com.hwrj.cloud.portal.model.OmsOrder;
+import com.hwrj.cloud.portal.service.OmsOrderPayService;
+import com.hwrj.cloud.portal.service.OmsPortalOrderService;
 import com.hwrj.cloud.portal.util.GeneratorIdUtils;
 import com.hwrj.cloud.portal.util.UUIDUtils;
-import com.hwrj.cloud.portal.from.WxPayFrom;
 import io.swagger.annotations.Api;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -36,15 +41,22 @@ public class WechatH5PayController {
     @Autowired
     private WxPayService wxPayService;
 
+    @Autowired
+    private OmsPortalOrderService omsPortalOrderService;
+
+    @Autowired
+    private OmsOrderPayService omsOrderPayService;
+
     @GetMapping("/pay")
     @ResponseBody
     public CommonResult pay(WxPayFrom wxPayFrom, HttpServletRequest request) {
-        String orderId = wxPayFrom.getOrderId();
+        Long orderId = wxPayFrom.getOrderId();
         String openid = wxPayFrom.getOpenid();
         String tradeType = wxPayFrom.getTradeType();
+        OmsOrder omsOrder = omsPortalOrderService.selectById(orderId);
+        Integer status = omsOrder.getPayType();
         //查询订单是否支付
-        int enable = 0;
-        if(1==enable){
+        if (status != 0) {
             throw new RuntimeException("订单已支付");
         }
         WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest();
@@ -53,17 +65,16 @@ public class WechatH5PayController {
 
         orderRequest.setNonceStr(s);
         //商品描述
-        orderRequest.setBody("碳汇扶贫!");
+        orderRequest.setBody(omsOrder.getNote());
         //商户订单号(支付编号)
         GeneratorIdUtils generatorIdUtils = new GeneratorIdUtils();
-        String orderNum = generatorIdUtils.nextId();
+        Long orderNum = generatorIdUtils.nextId();
         log.info("orderNum:" + orderNum);
         //设置商户订单号
-        orderRequest.setOutTradeNo(orderNum);
-        //设置支付id
+        orderRequest.setOutTradeNo(orderNum.toString());
         //设置金额
         //data.getTotalPrice();
-        BigDecimal money = new BigDecimal("0.1");
+        BigDecimal money = omsOrder.getPayAmount();
         //元转成分
         money = money.multiply(new BigDecimal(100));
         int i = money.intValue();
@@ -95,6 +106,7 @@ public class WechatH5PayController {
         }
         //更新本地订单支付id
         //orderClient.update(data);
+        omsOrderPayService.insert(omsOrder, orderNum);
         //签名完成新增支付订单
         return CommonResult.failed("微信支付成功");
     }
@@ -142,11 +154,8 @@ public class WechatH5PayController {
             System.out.println("===============付款成功,业务开始处理==============");
             String orderNum = wxPayOrderNotifyResult.getOutTradeNo();
             log.info("orderNum:" + orderNum);
-
-//            Order order=new Order();
-//            order.setTransId(orderNum);
-//            //将订单更新为支付
-//            orderClient.payment(order);
+            //将订单更新为支付
+            omsOrderPayService.update(Long.valueOf(orderNum));
             /**
              * 自己的业务
              */
@@ -166,8 +175,6 @@ public class WechatH5PayController {
     }
 
 
-
-
     public static String setXML(String return_code, String return_msg) {
         return "<xml><return_code><![CDATA[" + return_code + "]]></return_code><return_msg><![CDATA[" + return_msg + "]]></return_msg></xml>";
     }

+ 1 - 1
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/from/WxPayFrom.java

@@ -5,7 +5,7 @@ import lombok.Data;
 @Data
 public class WxPayFrom {
 
-    private String orderId;
+    private Long orderId;
 
     private String openid;
 

+ 10 - 0
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/OmsOrderPayService.java

@@ -0,0 +1,10 @@
+package com.hwrj.cloud.portal.service;
+
+import com.hwrj.cloud.portal.model.OmsOrder;
+
+
+public interface OmsOrderPayService {
+    void insert(OmsOrder omsOrder, Long orderNum);
+
+    void update(Long valueOf);
+}

+ 2 - 0
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/OmsPortalOrderService.java

@@ -5,6 +5,7 @@ import com.hwrj.cloud.portal.domain.ConfirmOrderResult;
 import com.hwrj.cloud.portal.domain.OmsOrderDetail;
 import com.hwrj.cloud.portal.domain.OrderParam;
 import com.hwrj.cloud.portal.from.OrderFrom;
+import com.hwrj.cloud.portal.model.OmsOrder;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
@@ -79,4 +80,5 @@ public interface OmsPortalOrderService {
     Map<String, Object> saveOrder(OrderParam orderParam,OrderFrom orderFrom);
 
 
+    OmsOrder selectById(Long orderId);
 }

+ 57 - 0
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/impl/OmsOrderPayServiceImpl.java

@@ -0,0 +1,57 @@
+package com.hwrj.cloud.portal.service.impl;
+
+import com.hwrj.cloud.portal.mapper.OmsOrderMapper;
+import com.hwrj.cloud.portal.mapper.OmsOrderPayMapper;
+import com.hwrj.cloud.portal.model.OmsOrder;
+import com.hwrj.cloud.portal.model.OmsOrderPay;
+import com.hwrj.cloud.portal.model.UmsMember;
+import com.hwrj.cloud.portal.service.OmsOrderPayService;
+import com.hwrj.cloud.portal.service.UmsMemberService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+@Service
+public class OmsOrderPayServiceImpl implements OmsOrderPayService {
+    @Autowired
+    private OmsOrderPayMapper omsOrderPayMapper;
+    @Autowired
+    private UmsMemberService memberService;
+
+    @Autowired
+    private OmsOrderMapper omsOrderMapper;
+    @Autowired
+    @Override
+    public void insert(OmsOrder omsOrder, Long orderNum) {
+        UmsMember currentMember = memberService.getCurrentMember();
+        OmsOrderPay record = new OmsOrderPay();
+        record.setId(orderNum);
+        record.setOrderId(omsOrder.getId());
+        record.setPayMoney(omsOrder.getPayAmount());
+        record.setStatus(0);
+        record.setCreateId(currentMember.getId());
+        record.setCreateUser(currentMember.getNickname());
+        record.setCreateTime(new Date());
+        record.setPayType(2);
+        omsOrderPayMapper.insertSelective(record);
+    }
+
+    @Override
+    public void update(Long valueOf) {
+        OmsOrderPay omsOrderPay = omsOrderPayMapper.selectByPrimaryKey(valueOf);
+        omsOrderPay.setStatus(1);
+        omsOrderPay.setUpdateTime(new Date());
+        omsOrderPayMapper.updateByPrimaryKeySelective(omsOrderPay);
+        Long orderId = omsOrderPay.getOrderId();
+        OmsOrder order =new OmsOrder();
+        order.setId(orderId);
+        //设置为微信支付
+        order.setPayType(2);
+        //设置为待发货
+        order.setStatus(1);
+        //设置支付时间
+        order.setPaymentTime(new Date());
+        omsOrderMapper.updateByPrimaryKeySelective(order);
+    }
+}

+ 4 - 0
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/impl/OmsPortalOrderServiceImpl.java

@@ -1071,5 +1071,9 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
         calcAmount.setPayAmount(totalAmount.subtract(promotionAmount));
         return calcAmount;
     }
+    @Override
+    public OmsOrder selectById(Long orderId){
+        return  orderMapper.selectByPrimaryKey(orderId);
+    }
 
 }

+ 3 - 2
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/util/GeneratorIdUtils.java

@@ -28,7 +28,7 @@ public class GeneratorIdUtils {
         this.workerId = (long)(255 & this.getLastIP());
     }
 
-    public synchronized String nextId() {
+    public synchronized Long nextId() {
         long timestamp = this.currentTime();
         if (timestamp < this.lastTimestamp) {
             throw new RuntimeException(String.format("时钟向后移动。拒绝在%d毫秒内生成id", this.lastTimestamp - timestamp));
@@ -46,7 +46,8 @@ public class GeneratorIdUtils {
             long suffix = this.datacenterId << (int)this.datacenterIdShift | this.workerId << (int)this.workerIdShift | this.sequence;
             SimpleDateFormat timePe = new SimpleDateFormat("yyyyMMddHHMMssSSS");
             String datePrefix = timePe.format(timestamp);
-            return datePrefix + suffix;
+            Long aLong = Long.valueOf(datePrefix + suffix);
+            return aLong;
         }
     }