Commit d53783a9 authored by jmdhappy's avatar jmdhappy
Browse files

初始化提交

parent 324ccaaf
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.xxpay</groupId>
<artifactId>xxpay-master</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>xxpay-common</module>
<module>xxpay-dal</module>
<module>xxpay-mgr</module>
<module>xxpay-shop</module>
<module>xxpay4spring-cloud</module>
</modules>
<!-- 使用最新的spring-boot版本 -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.SR5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.xxpay</groupId>
<artifactId>xxpay-dal</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>xxpay-dal</name>
<description>xxpay-master</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mysql.connector.java.version>5.1.34</mysql.connector.java.version>
<mybatis.version>3.4.1</mybatis.version>
<mybatis.spring.version>1.3.0</mybatis.spring.version>
<mybatis.generator.version>1.3.2</mybatis.generator.version>
<fastjson.version>1.2.7</fastjson.version>
</properties>
<dependencies>
<dependency>
<groupId>org.xxpay</groupId>
<artifactId>xxpay-common</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.connector.java.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>${mybatis.spring.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>${mybatis.generator.version}</version>
</dependency>
<!--druid数据库连接池-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.26</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>1.3.6.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- mybatis 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>4.1.6</version>
</dependency>
</dependencies>
<build>
<finalName>xxpay-dal</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource> <!-- 配置需要被替换的资源文件路径 -->
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>${mybatis.generator.version}</version>
<dependencies>
<dependency>
<groupId>org.xxpay</groupId>
<artifactId>xxpay-dal</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package org.xxpay.dal.dao.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.xxpay.dal.dao.model.IapReceipt;
import org.xxpay.dal.dao.model.IapReceiptExample;
public interface IapReceiptMapper {
int countByExample(IapReceiptExample example);
int deleteByExample(IapReceiptExample example);
int deleteByPrimaryKey(String payOrderId);
int insert(IapReceipt record);
int insertSelective(IapReceipt record);
List<IapReceipt> selectByExampleWithBLOBs(IapReceiptExample example);
List<IapReceipt> selectByExample(IapReceiptExample example);
IapReceipt selectByPrimaryKey(String payOrderId);
int updateByExampleSelective(@Param("record") IapReceipt record, @Param("example") IapReceiptExample example);
int updateByExampleWithBLOBs(@Param("record") IapReceipt record, @Param("example") IapReceiptExample example);
int updateByExample(@Param("record") IapReceipt record, @Param("example") IapReceiptExample example);
int updateByPrimaryKeySelective(IapReceipt record);
int updateByPrimaryKeyWithBLOBs(IapReceipt record);
int updateByPrimaryKey(IapReceipt record);
}
\ No newline at end of file
package org.xxpay.dal.dao.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.xxpay.dal.dao.model.MchInfo;
import org.xxpay.dal.dao.model.MchInfoExample;
public interface MchInfoMapper {
int countByExample(MchInfoExample example);
int deleteByExample(MchInfoExample example);
int deleteByPrimaryKey(String mchId);
int insert(MchInfo record);
int insertSelective(MchInfo record);
List<MchInfo> selectByExample(MchInfoExample example);
MchInfo selectByPrimaryKey(String mchId);
int updateByExampleSelective(@Param("record") MchInfo record, @Param("example") MchInfoExample example);
int updateByExample(@Param("record") MchInfo record, @Param("example") MchInfoExample example);
int updateByPrimaryKeySelective(MchInfo record);
int updateByPrimaryKey(MchInfo record);
}
\ No newline at end of file
package org.xxpay.dal.dao.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.xxpay.dal.dao.model.PayChannel;
import org.xxpay.dal.dao.model.PayChannelExample;
public interface PayChannelMapper {
int countByExample(PayChannelExample example);
int deleteByExample(PayChannelExample example);
int deleteByPrimaryKey(Integer id);
int insert(PayChannel record);
int insertSelective(PayChannel record);
List<PayChannel> selectByExample(PayChannelExample example);
PayChannel selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") PayChannel record, @Param("example") PayChannelExample example);
int updateByExample(@Param("record") PayChannel record, @Param("example") PayChannelExample example);
int updateByPrimaryKeySelective(PayChannel record);
int updateByPrimaryKey(PayChannel record);
}
\ No newline at end of file
package org.xxpay.dal.dao.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.xxpay.dal.dao.model.PayOrder;
import org.xxpay.dal.dao.model.PayOrderExample;
public interface PayOrderMapper {
int countByExample(PayOrderExample example);
int deleteByExample(PayOrderExample example);
int deleteByPrimaryKey(String payOrderId);
int insert(PayOrder record);
int insertSelective(PayOrder record);
List<PayOrder> selectByExample(PayOrderExample example);
PayOrder selectByPrimaryKey(String payOrderId);
int updateByExampleSelective(@Param("record") PayOrder record, @Param("example") PayOrderExample example);
int updateByExample(@Param("record") PayOrder record, @Param("example") PayOrderExample example);
int updateByPrimaryKeySelective(PayOrder record);
int updateByPrimaryKey(PayOrder record);
}
\ No newline at end of file
package org.xxpay.dal.dao.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.xxpay.dal.dao.model.TransOrder;
import org.xxpay.dal.dao.model.TransOrderExample;
public interface TransOrderMapper {
int countByExample(TransOrderExample example);
int deleteByExample(TransOrderExample example);
int deleteByPrimaryKey(String transOrderId);
int insert(TransOrder record);
int insertSelective(TransOrder record);
List<TransOrder> selectByExample(TransOrderExample example);
TransOrder selectByPrimaryKey(String transOrderId);
int updateByExampleSelective(@Param("record") TransOrder record, @Param("example") TransOrderExample example);
int updateByExample(@Param("record") TransOrder record, @Param("example") TransOrderExample example);
int updateByPrimaryKeySelective(TransOrder record);
int updateByPrimaryKey(TransOrder record);
}
\ No newline at end of file
package org.xxpay.dal.dao.model;
import java.io.Serializable;
import java.util.Date;
public class IapReceipt implements Serializable {
/**
* 支付订单号
*
* @mbggenerated
*/
private String payOrderId;
/**
* 商户ID
*
* @mbggenerated
*/
private String mchId;
/**
* IAP业务号
*
* @mbggenerated
*/
private String transactionId;
/**
* 处理状态:0-未处理,1-处理成功,-1-处理失败
*
* @mbggenerated
*/
private Byte status;
/**
* 处理次数
*
* @mbggenerated
*/
private Byte handleCount;
/**
* 创建时间
*
* @mbggenerated
*/
private Date createTime;
/**
* 更新时间
*
* @mbggenerated
*/
private Date updateTime;
/**
* 渠道ID
*
* @mbggenerated
*/
private String receiptData;
private static final long serialVersionUID = 1L;
public String getPayOrderId() {
return payOrderId;
}
public void setPayOrderId(String payOrderId) {
this.payOrderId = payOrderId;
}
public String getMchId() {
return mchId;
}
public void setMchId(String mchId) {
this.mchId = mchId;
}
public String getTransactionId() {
return transactionId;
}
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public Byte getHandleCount() {
return handleCount;
}
public void setHandleCount(Byte handleCount) {
this.handleCount = handleCount;
}
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 String getReceiptData() {
return receiptData;
}
public void setReceiptData(String receiptData) {
this.receiptData = receiptData;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", payOrderId=").append(payOrderId);
sb.append(", mchId=").append(mchId);
sb.append(", transactionId=").append(transactionId);
sb.append(", status=").append(status);
sb.append(", handleCount=").append(handleCount);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", receiptData=").append(receiptData);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
IapReceipt other = (IapReceipt) that;
return (this.getPayOrderId() == null ? other.getPayOrderId() == null : this.getPayOrderId().equals(other.getPayOrderId()))
&& (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId()))
&& (this.getTransactionId() == null ? other.getTransactionId() == null : this.getTransactionId().equals(other.getTransactionId()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getHandleCount() == null ? other.getHandleCount() == null : this.getHandleCount().equals(other.getHandleCount()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getReceiptData() == null ? other.getReceiptData() == null : this.getReceiptData().equals(other.getReceiptData()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getPayOrderId() == null) ? 0 : getPayOrderId().hashCode());
result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode());
result = prime * result + ((getTransactionId() == null) ? 0 : getTransactionId().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getHandleCount() == null) ? 0 : getHandleCount().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getReceiptData() == null) ? 0 : getReceiptData().hashCode());
return result;
}
}
\ No newline at end of file
package org.xxpay.dal.dao.model;
import java.io.Serializable;
import java.util.Date;
public class MchInfo implements Serializable {
/**
* 商户ID
*
* @mbggenerated
*/
private String mchId;
/**
* 名称
*
* @mbggenerated
*/
private String name;
/**
* 类型
*
* @mbggenerated
*/
private String type;
/**
* 请求私钥
*
* @mbggenerated
*/
private String reqKey;
/**
* 响应私钥
*
* @mbggenerated
*/
private String resKey;
/**
* 商户状态,0-停止使用,1-使用中
*
* @mbggenerated
*/
private Byte state;
/**
* 创建时间
*
* @mbggenerated
*/
private Date createTime;
/**
* 更新时间
*
* @mbggenerated
*/
private Date updateTime;
private static final long serialVersionUID = 1L;
public String getMchId() {
return mchId;
}
public void setMchId(String mchId) {
this.mchId = mchId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getReqKey() {
return reqKey;
}
public void setReqKey(String reqKey) {
this.reqKey = reqKey;
}
public String getResKey() {
return resKey;
}
public void setResKey(String resKey) {
this.resKey = resKey;
}
public Byte getState() {
return state;
}
public void setState(Byte state) {
this.state = state;
}
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;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", mchId=").append(mchId);
sb.append(", name=").append(name);
sb.append(", type=").append(type);
sb.append(", reqKey=").append(reqKey);
sb.append(", resKey=").append(resKey);
sb.append(", state=").append(state);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
MchInfo other = (MchInfo) that;
return (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getReqKey() == null ? other.getReqKey() == null : this.getReqKey().equals(other.getReqKey()))
&& (this.getResKey() == null ? other.getResKey() == null : this.getResKey().equals(other.getResKey()))
&& (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getReqKey() == null) ? 0 : getReqKey().hashCode());
result = prime * result + ((getResKey() == null) ? 0 : getResKey().hashCode());
result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return result;
}
}
\ No newline at end of file
package org.xxpay.dal.dao.model;
import java.io.Serializable;
import java.util.Date;
public class PayChannel implements Serializable {
/**
* 渠道主键ID
*
* @mbggenerated
*/
private Integer id;
/**
* 渠道ID
*
* @mbggenerated
*/
private String channelId;
/**
* 渠道名称,如:alipay,wechat
*
* @mbggenerated
*/
private String channelName;
/**
* 渠道商户ID
*
* @mbggenerated
*/
private String channelMchId;
/**
* 商户ID
*
* @mbggenerated
*/
private String mchId;
/**
* 渠道状态,0-停止使用,1-使用中
*
* @mbggenerated
*/
private Byte state;
/**
* 配置参数,json字符串
*
* @mbggenerated
*/
private String param;
/**
* 备注
*
* @mbggenerated
*/
private String remark;
/**
* 创建时间
*
* @mbggenerated
*/
private Date createTime;
/**
* 更新时间
*
* @mbggenerated
*/
private Date updateTime;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getChannelId() {
return channelId;
}
public void setChannelId(String channelId) {
this.channelId = channelId;
}
public String getChannelName() {
return channelName;
}
public void setChannelName(String channelName) {
this.channelName = channelName;
}
public String getChannelMchId() {
return channelMchId;
}
public void setChannelMchId(String channelMchId) {
this.channelMchId = channelMchId;
}
public String getMchId() {
return mchId;
}
public void setMchId(String mchId) {
this.mchId = mchId;
}
public Byte getState() {
return state;
}
public void setState(Byte state) {
this.state = state;
}
public String getParam() {
return param;
}
public void setParam(String param) {
this.param = param;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
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;
}
@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(", channelId=").append(channelId);
sb.append(", channelName=").append(channelName);
sb.append(", channelMchId=").append(channelMchId);
sb.append(", mchId=").append(mchId);
sb.append(", state=").append(state);
sb.append(", param=").append(param);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
PayChannel other = (PayChannel) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId()))
&& (this.getChannelName() == null ? other.getChannelName() == null : this.getChannelName().equals(other.getChannelName()))
&& (this.getChannelMchId() == null ? other.getChannelMchId() == null : this.getChannelMchId().equals(other.getChannelMchId()))
&& (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId()))
&& (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
&& (this.getParam() == null ? other.getParam() == null : this.getParam().equals(other.getParam()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode());
result = prime * result + ((getChannelName() == null) ? 0 : getChannelName().hashCode());
result = prime * result + ((getChannelMchId() == null) ? 0 : getChannelMchId().hashCode());
result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode());
result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
result = prime * result + ((getParam() == null) ? 0 : getParam().hashCode());
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return result;
}
}
\ No newline at end of file
package org.xxpay.dal.dao.model;
import java.io.Serializable;
import java.util.Date;
public class PayOrder implements Serializable {
/**
* 支付订单号
*
* @mbggenerated
*/
private String payOrderId;
/**
* 商户ID
*
* @mbggenerated
*/
private String mchId;
/**
* 商户订单号
*
* @mbggenerated
*/
private String mchOrderNo;
/**
* 渠道ID
*
* @mbggenerated
*/
private String channelId;
/**
* 支付金额,单位分
*
* @mbggenerated
*/
private Long amount;
/**
* 三位货币代码,人民币:cny
*
* @mbggenerated
*/
private String currency;
/**
* 支付状态,0-订单生成,1-支付中(目前未使用),2-支付成功,3-业务处理完成
*
* @mbggenerated
*/
private Byte status;
/**
* 客户端IP
*
* @mbggenerated
*/
private String clientIp;
/**
* 设备
*
* @mbggenerated
*/
private String device;
/**
* 商品标题
*
* @mbggenerated
*/
private String subject;
/**
* 商品描述信息
*
* @mbggenerated
*/
private String body;
/**
* 特定渠道发起时额外参数
*
* @mbggenerated
*/
private String extra;
/**
* 渠道商户ID
*
* @mbggenerated
*/
private String channelMchId;
/**
* 渠道订单号
*
* @mbggenerated
*/
private String channelOrderNo;
/**
* 渠道支付错误码
*
* @mbggenerated
*/
private String errCode;
/**
* 渠道支付错误描述
*
* @mbggenerated
*/
private String errMsg;
/**
* 扩展参数1
*
* @mbggenerated
*/
private String param1;
/**
* 扩展参数2
*
* @mbggenerated
*/
private String param2;
/**
* 通知地址
*
* @mbggenerated
*/
private String notifyUrl;
/**
* 通知次数
*
* @mbggenerated
*/
private Byte notifyCount;
/**
* 最后一次通知时间
*
* @mbggenerated
*/
private Long lastNotifyTime;
/**
* 订单失效时间
*
* @mbggenerated
*/
private Long expireTime;
/**
* 订单支付成功时间
*
* @mbggenerated
*/
private Long paySuccTime;
/**
* 创建时间
*
* @mbggenerated
*/
private Date createTime;
/**
* 更新时间
*
* @mbggenerated
*/
private Date updateTime;
private static final long serialVersionUID = 1L;
public String getPayOrderId() {
return payOrderId;
}
public void setPayOrderId(String payOrderId) {
this.payOrderId = payOrderId;
}
public String getMchId() {
return mchId;
}
public void setMchId(String mchId) {
this.mchId = mchId;
}
public String getMchOrderNo() {
return mchOrderNo;
}
public void setMchOrderNo(String mchOrderNo) {
this.mchOrderNo = mchOrderNo;
}
public String getChannelId() {
return channelId;
}
public void setChannelId(String channelId) {
this.channelId = channelId;
}
public Long getAmount() {
return amount;
}
public void setAmount(Long amount) {
this.amount = amount;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public String getClientIp() {
return clientIp;
}
public void setClientIp(String clientIp) {
this.clientIp = clientIp;
}
public String getDevice() {
return device;
}
public void setDevice(String device) {
this.device = device;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public String getExtra() {
return extra;
}
public void setExtra(String extra) {
this.extra = extra;
}
public String getChannelMchId() {
return channelMchId;
}
public void setChannelMchId(String channelMchId) {
this.channelMchId = channelMchId;
}
public String getChannelOrderNo() {
return channelOrderNo;
}
public void setChannelOrderNo(String channelOrderNo) {
this.channelOrderNo = channelOrderNo;
}
public String getErrCode() {
return errCode;
}
public void setErrCode(String errCode) {
this.errCode = errCode;
}
public String getErrMsg() {
return errMsg;
}
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}
public String getParam1() {
return param1;
}
public void setParam1(String param1) {
this.param1 = param1;
}
public String getParam2() {
return param2;
}
public void setParam2(String param2) {
this.param2 = param2;
}
public String getNotifyUrl() {
return notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public Byte getNotifyCount() {
return notifyCount;
}
public void setNotifyCount(Byte notifyCount) {
this.notifyCount = notifyCount;
}
public Long getLastNotifyTime() {
return lastNotifyTime;
}
public void setLastNotifyTime(Long lastNotifyTime) {
this.lastNotifyTime = lastNotifyTime;
}
public Long getExpireTime() {
return expireTime;
}
public void setExpireTime(Long expireTime) {
this.expireTime = expireTime;
}
public Long getPaySuccTime() {
return paySuccTime;
}
public void setPaySuccTime(Long paySuccTime) {
this.paySuccTime = paySuccTime;
}
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;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", payOrderId=").append(payOrderId);
sb.append(", mchId=").append(mchId);
sb.append(", mchOrderNo=").append(mchOrderNo);
sb.append(", channelId=").append(channelId);
sb.append(", amount=").append(amount);
sb.append(", currency=").append(currency);
sb.append(", status=").append(status);
sb.append(", clientIp=").append(clientIp);
sb.append(", device=").append(device);
sb.append(", subject=").append(subject);
sb.append(", body=").append(body);
sb.append(", extra=").append(extra);
sb.append(", channelMchId=").append(channelMchId);
sb.append(", channelOrderNo=").append(channelOrderNo);
sb.append(", errCode=").append(errCode);
sb.append(", errMsg=").append(errMsg);
sb.append(", param1=").append(param1);
sb.append(", param2=").append(param2);
sb.append(", notifyUrl=").append(notifyUrl);
sb.append(", notifyCount=").append(notifyCount);
sb.append(", lastNotifyTime=").append(lastNotifyTime);
sb.append(", expireTime=").append(expireTime);
sb.append(", paySuccTime=").append(paySuccTime);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
PayOrder other = (PayOrder) that;
return (this.getPayOrderId() == null ? other.getPayOrderId() == null : this.getPayOrderId().equals(other.getPayOrderId()))
&& (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId()))
&& (this.getMchOrderNo() == null ? other.getMchOrderNo() == null : this.getMchOrderNo().equals(other.getMchOrderNo()))
&& (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId()))
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
&& (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getClientIp() == null ? other.getClientIp() == null : this.getClientIp().equals(other.getClientIp()))
&& (this.getDevice() == null ? other.getDevice() == null : this.getDevice().equals(other.getDevice()))
&& (this.getSubject() == null ? other.getSubject() == null : this.getSubject().equals(other.getSubject()))
&& (this.getBody() == null ? other.getBody() == null : this.getBody().equals(other.getBody()))
&& (this.getExtra() == null ? other.getExtra() == null : this.getExtra().equals(other.getExtra()))
&& (this.getChannelMchId() == null ? other.getChannelMchId() == null : this.getChannelMchId().equals(other.getChannelMchId()))
&& (this.getChannelOrderNo() == null ? other.getChannelOrderNo() == null : this.getChannelOrderNo().equals(other.getChannelOrderNo()))
&& (this.getErrCode() == null ? other.getErrCode() == null : this.getErrCode().equals(other.getErrCode()))
&& (this.getErrMsg() == null ? other.getErrMsg() == null : this.getErrMsg().equals(other.getErrMsg()))
&& (this.getParam1() == null ? other.getParam1() == null : this.getParam1().equals(other.getParam1()))
&& (this.getParam2() == null ? other.getParam2() == null : this.getParam2().equals(other.getParam2()))
&& (this.getNotifyUrl() == null ? other.getNotifyUrl() == null : this.getNotifyUrl().equals(other.getNotifyUrl()))
&& (this.getNotifyCount() == null ? other.getNotifyCount() == null : this.getNotifyCount().equals(other.getNotifyCount()))
&& (this.getLastNotifyTime() == null ? other.getLastNotifyTime() == null : this.getLastNotifyTime().equals(other.getLastNotifyTime()))
&& (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()))
&& (this.getPaySuccTime() == null ? other.getPaySuccTime() == null : this.getPaySuccTime().equals(other.getPaySuccTime()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getPayOrderId() == null) ? 0 : getPayOrderId().hashCode());
result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode());
result = prime * result + ((getMchOrderNo() == null) ? 0 : getMchOrderNo().hashCode());
result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode());
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getClientIp() == null) ? 0 : getClientIp().hashCode());
result = prime * result + ((getDevice() == null) ? 0 : getDevice().hashCode());
result = prime * result + ((getSubject() == null) ? 0 : getSubject().hashCode());
result = prime * result + ((getBody() == null) ? 0 : getBody().hashCode());
result = prime * result + ((getExtra() == null) ? 0 : getExtra().hashCode());
result = prime * result + ((getChannelMchId() == null) ? 0 : getChannelMchId().hashCode());
result = prime * result + ((getChannelOrderNo() == null) ? 0 : getChannelOrderNo().hashCode());
result = prime * result + ((getErrCode() == null) ? 0 : getErrCode().hashCode());
result = prime * result + ((getErrMsg() == null) ? 0 : getErrMsg().hashCode());
result = prime * result + ((getParam1() == null) ? 0 : getParam1().hashCode());
result = prime * result + ((getParam2() == null) ? 0 : getParam2().hashCode());
result = prime * result + ((getNotifyUrl() == null) ? 0 : getNotifyUrl().hashCode());
result = prime * result + ((getNotifyCount() == null) ? 0 : getNotifyCount().hashCode());
result = prime * result + ((getLastNotifyTime() == null) ? 0 : getLastNotifyTime().hashCode());
result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
result = prime * result + ((getPaySuccTime() == null) ? 0 : getPaySuccTime().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return result;
}
}
\ No newline at end of file
package org.xxpay.dal.dao.model;
import java.io.Serializable;
import java.util.Date;
public class TransOrder implements Serializable {
/**
* 转账订单号
*
* @mbggenerated
*/
private String transOrderId;
/**
* 商户ID
*
* @mbggenerated
*/
private String mchId;
/**
* 商户订单号
*
* @mbggenerated
*/
private String mchOrderNo;
/**
* 渠道ID
*
* @mbggenerated
*/
private String channelId;
/**
* 转账金额,单位分
*
* @mbggenerated
*/
private Long amount;
/**
* 三位货币代码,人民币:cny
*
* @mbggenerated
*/
private String currency;
/**
* 支付状态:0-订单生成,1-转账中,2-转账成功,3-转账失败,4-业务处理完成,5-确认失败,6-不确认结果,7-等待手动处理,8-手动处理提现成功,9-手动处理提现失败
*
* @mbggenerated
*/
private Byte status;
/**
* 客户端IP
*
* @mbggenerated
*/
private String clientIp;
/**
* 设备
*
* @mbggenerated
*/
private String device;
/**
* 备注
*
* @mbggenerated
*/
private String remarkInfo;
/**
* 渠道用户标识,如微信openId
*
* @mbggenerated
*/
private String openId;
/**
* 校验姓名:0-不校验真实姓名,1-强校验真实姓名,2-针对已实名认证的用户才校验真实姓名
*
* @mbggenerated
*/
private Byte checkName;
/**
* 用户姓名
*
* @mbggenerated
*/
private String userName;
/**
* 特定渠道发起时额外参数
*
* @mbggenerated
*/
private String extra;
/**
* 渠道商户ID
*
* @mbggenerated
*/
private String channelMchId;
/**
* 渠道订单号
*
* @mbggenerated
*/
private String channelOrderNo;
/**
* 渠道支付错误码
*
* @mbggenerated
*/
private String errCode;
/**
* 渠道支付错误描述
*
* @mbggenerated
*/
private String errMsg;
/**
* 扩展参数1
*
* @mbggenerated
*/
private String param1;
/**
* 扩展参数2
*
* @mbggenerated
*/
private String param2;
/**
* 通知地址
*
* @mbggenerated
*/
private String notifyUrl;
/**
* 通知次数
*
* @mbggenerated
*/
private Byte notifyCount;
/**
* 最后一次通知时间
*
* @mbggenerated
*/
private Long lastNotifyTime;
/**
* 订单失效时间
*
* @mbggenerated
*/
private Long expireTime;
/**
* 订单转账成功时间
*
* @mbggenerated
*/
private Long transSuccTime;
/**
* 创建时间
*
* @mbggenerated
*/
private Date createTime;
/**
* 更新时间
*
* @mbggenerated
*/
private Date updateTime;
private static final long serialVersionUID = 1L;
public String getTransOrderId() {
return transOrderId;
}
public void setTransOrderId(String transOrderId) {
this.transOrderId = transOrderId;
}
public String getMchId() {
return mchId;
}
public void setMchId(String mchId) {
this.mchId = mchId;
}
public String getMchOrderNo() {
return mchOrderNo;
}
public void setMchOrderNo(String mchOrderNo) {
this.mchOrderNo = mchOrderNo;
}
public String getChannelId() {
return channelId;
}
public void setChannelId(String channelId) {
this.channelId = channelId;
}
public Long getAmount() {
return amount;
}
public void setAmount(Long amount) {
this.amount = amount;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public String getClientIp() {
return clientIp;
}
public void setClientIp(String clientIp) {
this.clientIp = clientIp;
}
public String getDevice() {
return device;
}
public void setDevice(String device) {
this.device = device;
}
public String getRemarkInfo() {
return remarkInfo;
}
public void setRemarkInfo(String remarkInfo) {
this.remarkInfo = remarkInfo;
}
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
public Byte getCheckName() {
return checkName;
}
public void setCheckName(Byte checkName) {
this.checkName = checkName;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getExtra() {
return extra;
}
public void setExtra(String extra) {
this.extra = extra;
}
public String getChannelMchId() {
return channelMchId;
}
public void setChannelMchId(String channelMchId) {
this.channelMchId = channelMchId;
}
public String getChannelOrderNo() {
return channelOrderNo;
}
public void setChannelOrderNo(String channelOrderNo) {
this.channelOrderNo = channelOrderNo;
}
public String getErrCode() {
return errCode;
}
public void setErrCode(String errCode) {
this.errCode = errCode;
}
public String getErrMsg() {
return errMsg;
}
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}
public String getParam1() {
return param1;
}
public void setParam1(String param1) {
this.param1 = param1;
}
public String getParam2() {
return param2;
}
public void setParam2(String param2) {
this.param2 = param2;
}
public String getNotifyUrl() {
return notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public Byte getNotifyCount() {
return notifyCount;
}
public void setNotifyCount(Byte notifyCount) {
this.notifyCount = notifyCount;
}
public Long getLastNotifyTime() {
return lastNotifyTime;
}
public void setLastNotifyTime(Long lastNotifyTime) {
this.lastNotifyTime = lastNotifyTime;
}
public Long getExpireTime() {
return expireTime;
}
public void setExpireTime(Long expireTime) {
this.expireTime = expireTime;
}
public Long getTransSuccTime() {
return transSuccTime;
}
public void setTransSuccTime(Long transSuccTime) {
this.transSuccTime = transSuccTime;
}
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;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", transOrderId=").append(transOrderId);
sb.append(", mchId=").append(mchId);
sb.append(", mchOrderNo=").append(mchOrderNo);
sb.append(", channelId=").append(channelId);
sb.append(", amount=").append(amount);
sb.append(", currency=").append(currency);
sb.append(", status=").append(status);
sb.append(", clientIp=").append(clientIp);
sb.append(", device=").append(device);
sb.append(", remarkInfo=").append(remarkInfo);
sb.append(", openId=").append(openId);
sb.append(", checkName=").append(checkName);
sb.append(", userName=").append(userName);
sb.append(", extra=").append(extra);
sb.append(", channelMchId=").append(channelMchId);
sb.append(", channelOrderNo=").append(channelOrderNo);
sb.append(", errCode=").append(errCode);
sb.append(", errMsg=").append(errMsg);
sb.append(", param1=").append(param1);
sb.append(", param2=").append(param2);
sb.append(", notifyUrl=").append(notifyUrl);
sb.append(", notifyCount=").append(notifyCount);
sb.append(", lastNotifyTime=").append(lastNotifyTime);
sb.append(", expireTime=").append(expireTime);
sb.append(", transSuccTime=").append(transSuccTime);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
TransOrder other = (TransOrder) that;
return (this.getTransOrderId() == null ? other.getTransOrderId() == null : this.getTransOrderId().equals(other.getTransOrderId()))
&& (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId()))
&& (this.getMchOrderNo() == null ? other.getMchOrderNo() == null : this.getMchOrderNo().equals(other.getMchOrderNo()))
&& (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId()))
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
&& (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getClientIp() == null ? other.getClientIp() == null : this.getClientIp().equals(other.getClientIp()))
&& (this.getDevice() == null ? other.getDevice() == null : this.getDevice().equals(other.getDevice()))
&& (this.getRemarkInfo() == null ? other.getRemarkInfo() == null : this.getRemarkInfo().equals(other.getRemarkInfo()))
&& (this.getOpenId() == null ? other.getOpenId() == null : this.getOpenId().equals(other.getOpenId()))
&& (this.getCheckName() == null ? other.getCheckName() == null : this.getCheckName().equals(other.getCheckName()))
&& (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
&& (this.getExtra() == null ? other.getExtra() == null : this.getExtra().equals(other.getExtra()))
&& (this.getChannelMchId() == null ? other.getChannelMchId() == null : this.getChannelMchId().equals(other.getChannelMchId()))
&& (this.getChannelOrderNo() == null ? other.getChannelOrderNo() == null : this.getChannelOrderNo().equals(other.getChannelOrderNo()))
&& (this.getErrCode() == null ? other.getErrCode() == null : this.getErrCode().equals(other.getErrCode()))
&& (this.getErrMsg() == null ? other.getErrMsg() == null : this.getErrMsg().equals(other.getErrMsg()))
&& (this.getParam1() == null ? other.getParam1() == null : this.getParam1().equals(other.getParam1()))
&& (this.getParam2() == null ? other.getParam2() == null : this.getParam2().equals(other.getParam2()))
&& (this.getNotifyUrl() == null ? other.getNotifyUrl() == null : this.getNotifyUrl().equals(other.getNotifyUrl()))
&& (this.getNotifyCount() == null ? other.getNotifyCount() == null : this.getNotifyCount().equals(other.getNotifyCount()))
&& (this.getLastNotifyTime() == null ? other.getLastNotifyTime() == null : this.getLastNotifyTime().equals(other.getLastNotifyTime()))
&& (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()))
&& (this.getTransSuccTime() == null ? other.getTransSuccTime() == null : this.getTransSuccTime().equals(other.getTransSuccTime()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getTransOrderId() == null) ? 0 : getTransOrderId().hashCode());
result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode());
result = prime * result + ((getMchOrderNo() == null) ? 0 : getMchOrderNo().hashCode());
result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode());
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getClientIp() == null) ? 0 : getClientIp().hashCode());
result = prime * result + ((getDevice() == null) ? 0 : getDevice().hashCode());
result = prime * result + ((getRemarkInfo() == null) ? 0 : getRemarkInfo().hashCode());
result = prime * result + ((getOpenId() == null) ? 0 : getOpenId().hashCode());
result = prime * result + ((getCheckName() == null) ? 0 : getCheckName().hashCode());
result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
result = prime * result + ((getExtra() == null) ? 0 : getExtra().hashCode());
result = prime * result + ((getChannelMchId() == null) ? 0 : getChannelMchId().hashCode());
result = prime * result + ((getChannelOrderNo() == null) ? 0 : getChannelOrderNo().hashCode());
result = prime * result + ((getErrCode() == null) ? 0 : getErrCode().hashCode());
result = prime * result + ((getErrMsg() == null) ? 0 : getErrMsg().hashCode());
result = prime * result + ((getParam1() == null) ? 0 : getParam1().hashCode());
result = prime * result + ((getParam2() == null) ? 0 : getParam2().hashCode());
result = prime * result + ((getNotifyUrl() == null) ? 0 : getNotifyUrl().hashCode());
result = prime * result + ((getNotifyCount() == null) ? 0 : getNotifyCount().hashCode());
result = prime * result + ((getLastNotifyTime() == null) ? 0 : getLastNotifyTime().hashCode());
result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
result = prime * result + ((getTransSuccTime() == null) ? 0 : getTransSuccTime().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return result;
}
}
\ No newline at end of file
package org.xxpay.dal.dao.plugin;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.dom.java.Field;
import org.mybatis.generator.internal.DefaultCommentGenerator;
/**
* @Description: 生成model中,字段增加注释
* @author dingzhiwei jmdhappy@126.com
* @date 2017-07-05
* @version V1.0
* @Copyright: www.xxpay.org
*/
public class CommentGenerator extends DefaultCommentGenerator {
@Override
public void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
super.addFieldComment(field, introspectedTable, introspectedColumn);
if (introspectedColumn.getRemarks() != null && !introspectedColumn.getRemarks().equals("")) {
field.addJavaDocLine("/**");
field.addJavaDocLine(" * " + introspectedColumn.getRemarks());
addJavadocTag(field, false);
field.addJavaDocLine(" */");
}
}
}
package org.xxpay.dal.dao.plugin;
import com.alibaba.druid.pool.DruidDataSource;
import com.github.pagehelper.PageHelper;
import org.apache.ibatis.plugin.Interceptor;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.bind.RelaxedPropertyResolver;
import org.springframework.context.ApplicationContextException;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.util.StringUtils;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.Properties;
/**
* @Description:
* @author dingzhiwei jmdhappy@126.com
* @date 2017-07-05
* @version V1.0
* @Copyright: www.xxpay.org
*/
@Configuration
@EnableTransactionManagement
@MapperScan(value = "org.xxpay.dal.dao.mapper")
public class DruidDataSourceConfig implements EnvironmentAware {
private Environment environment;
private RelaxedPropertyResolver propertyResolver;
public void setEnvironment(Environment environment) {
this.environment = environment;
this.propertyResolver = new RelaxedPropertyResolver(environment, "spring.datasource.");
}
//注册dataSource
@Bean(initMethod = "init", destroyMethod = "close")
public DruidDataSource dataSource() throws SQLException {
if (StringUtils.isEmpty(propertyResolver.getProperty("url"))) {
System.out.println("Your database connection pool configuration is incorrect!"
+ " Please check your Spring profile, current profiles are:"
+ Arrays.toString(environment.getActiveProfiles()));
throw new ApplicationContextException(
"Database connection pool is not configured correctly");
}
DruidDataSource druidDataSource = new DruidDataSource();
druidDataSource.setDriverClassName(propertyResolver.getProperty("driver-class-name"));
druidDataSource.setUrl(propertyResolver.getProperty("url"));
druidDataSource.setUsername(propertyResolver.getProperty("username"));
druidDataSource.setPassword(propertyResolver.getProperty("password"));
druidDataSource.setInitialSize(Integer.parseInt(propertyResolver.getProperty("initialSize")));
druidDataSource.setMinIdle(Integer.parseInt(propertyResolver.getProperty("minIdle")));
druidDataSource.setMaxActive(Integer.parseInt(propertyResolver.getProperty("maxActive")));
druidDataSource.setMaxWait(Integer.parseInt(propertyResolver.getProperty("maxWait")));
druidDataSource.setTimeBetweenEvictionRunsMillis(Long.parseLong(propertyResolver.getProperty("timeBetweenEvictionRunsMillis")));
druidDataSource.setMinEvictableIdleTimeMillis(Long.parseLong(propertyResolver.getProperty("minEvictableIdleTimeMillis")));
druidDataSource.setValidationQuery(propertyResolver.getProperty("validationQuery"));
druidDataSource.setTestWhileIdle(Boolean.parseBoolean(propertyResolver.getProperty("testWhileIdle")));
druidDataSource.setTestOnBorrow(Boolean.parseBoolean(propertyResolver.getProperty("testOnBorrow")));
druidDataSource.setTestOnReturn(Boolean.parseBoolean(propertyResolver.getProperty("testOnReturn")));
druidDataSource.setPoolPreparedStatements(Boolean.parseBoolean(propertyResolver.getProperty("poolPreparedStatements")));
druidDataSource.setMaxPoolPreparedStatementPerConnectionSize(Integer.parseInt(propertyResolver.getProperty("maxPoolPreparedStatementPerConnectionSize")));
druidDataSource.setFilters(propertyResolver.getProperty("filters"));
return druidDataSource;
}
@Bean
public SqlSessionFactory sqlSessionFactory() throws Exception {
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
sqlSessionFactoryBean.setDataSource(dataSource());
//mybatis分页
PageHelper pageHelper = new PageHelper();
Properties props = new Properties();
props.setProperty("dialect", "mysql");
props.setProperty("reasonable", "true");
props.setProperty("supportMethodsArguments", "true");
props.setProperty("returnPageInfo", "check");
props.setProperty("params", "count=countSql");
pageHelper.setProperties(props); //添加插件
sqlSessionFactoryBean.setPlugins(new Interceptor[]{pageHelper});
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
sqlSessionFactoryBean.setMapperLocations(resolver.getResources("classpath:org/xxpay/dal/dao/mapper/*.xml"));
return sqlSessionFactoryBean.getObject();
}
@Bean
public PlatformTransactionManager transactionManager() throws SQLException {
return new DataSourceTransactionManager(dataSource());
}
}
\ No newline at end of file
package org.xxpay.dal.dao.plugin;
import java.util.List;
/**
* @Description:
* @author dingzhiwei jmdhappy@126.com
* @date 2017-07-05
* @version V1.0
* @Copyright: www.xxpay.org
*/
public class PageModel<T> {
public List<T> list;
public Integer count = 0;
public String msg;
public Boolean rel;
public List<T> getList() {
return list;
}
public void setList(List<T> list) {
this.list = list;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Boolean getRel() {
return rel;
}
public void setRel(Boolean rel) {
this.rel = rel;
}
}
Supports Markdown
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