3 changed files with 406 additions and 0 deletions
@ -0,0 +1,292 @@ |
|||||
|
package cn.chjyj.szwh.bean; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 订单实体 |
||||
|
*/ |
||||
|
public class Order implements Serializable { |
||||
|
/** |
||||
|
* `order` |
||||
|
* id,user_id as userId,buy_islicode as buyIslicode,batchcode,account_ratio_id as accountRatioId,history_buy_name as historyBuyName, |
||||
|
* history_buy_code as historyBuyCode,total_service_charge as totalServiceCharge,total_money as totalMoney, |
||||
|
* `type`,`status`,transaction_islicode as transactionIslicode,ticketid,ticketmoney,ticketurl,ticketimage, |
||||
|
* ticket_status as ticketStatus,charge_channel as chargeChannel,pay_status as payStatus,close_status as closeStatus, |
||||
|
* is_close as isClose,close_serial_number as closeSerialNumber,payid,createtime,paymenttime,receivetime,closetime, |
||||
|
* completetime,shuttime,tickettime |
||||
|
*/ |
||||
|
private Integer id; |
||||
|
private Integer userId;//用户ID
|
||||
|
private String buyIslicode;//购买方isli标识码
|
||||
|
private String batchcode;//订单号
|
||||
|
private Integer accountRatioId; // 分账比例ID
|
||||
|
private String historyBuyName; // 历史购买方名称
|
||||
|
private String historyBuyCode; // 历史购买方组织机构代码
|
||||
|
private BigDecimal totalServiceCharge; //订单服务费金额
|
||||
|
private BigDecimal totalMoney; //订单总金额
|
||||
|
private Integer type;//订单类型;1:委托订单;2:认证订单;3:服务订单
|
||||
|
private Integer status;//订单状态;1:待付款;2:待交付;3:待结算;4:已完成;5:已关闭;
|
||||
|
private String transactionIslicode; //交易isli标识码
|
||||
|
private Integer ticketid;//开票编号
|
||||
|
private BigDecimal ticketmoney;//开票金额
|
||||
|
private String ticketurl;//开票下载地址
|
||||
|
private String ticketimage;//发票图片url
|
||||
|
private Integer ticketStatus;//开票状态(1:未开票,2:开票中,3:已开票;4:开票失败)
|
||||
|
private Integer chargeChannel;//收费类型;1:微信;2:支付宝;3:银联
|
||||
|
private Integer payStatus;//支付状态;1:未支付;2:支付成功;3:支付失败
|
||||
|
private Integer closeStatus;//结算状态;1:无结算信息;2:结算中;3:用户名和收款人不一致;4:收款信息错误;5:结算成功
|
||||
|
private Integer isClose;//是否发送结算请求
|
||||
|
private String closeSerialNumber;//结算流水号
|
||||
|
private String payid; |
||||
|
private Date createtime;//订单创建时间
|
||||
|
private Date paymenttime; //订单付款时间
|
||||
|
private Date receivetime;//订单交付时间
|
||||
|
private Date closetime;//订单结算时间
|
||||
|
private Date completetime;//订单完成时间
|
||||
|
private Date shuttime;//订单关闭时间
|
||||
|
private Date tickettime;//订单开票时间
|
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public Integer getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(Integer id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Integer getUserId() { |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(Integer userId) { |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public String getBuyIslicode() { |
||||
|
return buyIslicode; |
||||
|
} |
||||
|
|
||||
|
public void setBuyIslicode(String buyIslicode) { |
||||
|
this.buyIslicode = buyIslicode; |
||||
|
} |
||||
|
|
||||
|
public String getBatchcode() { |
||||
|
return batchcode; |
||||
|
} |
||||
|
|
||||
|
public void setBatchcode(String batchcode) { |
||||
|
this.batchcode = batchcode; |
||||
|
} |
||||
|
|
||||
|
public Integer getAccountRatioId() { |
||||
|
return accountRatioId; |
||||
|
} |
||||
|
|
||||
|
public void setAccountRatioId(Integer accountRatioId) { |
||||
|
this.accountRatioId = accountRatioId; |
||||
|
} |
||||
|
|
||||
|
public String getHistoryBuyName() { |
||||
|
return historyBuyName; |
||||
|
} |
||||
|
|
||||
|
public void setHistoryBuyName(String historyBuyName) { |
||||
|
this.historyBuyName = historyBuyName; |
||||
|
} |
||||
|
|
||||
|
public String getHistoryBuyCode() { |
||||
|
return historyBuyCode; |
||||
|
} |
||||
|
|
||||
|
public void setHistoryBuyCode(String historyBuyCode) { |
||||
|
this.historyBuyCode = historyBuyCode; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getTotalServiceCharge() { |
||||
|
return totalServiceCharge; |
||||
|
} |
||||
|
|
||||
|
public void setTotalServiceCharge(BigDecimal totalServiceCharge) { |
||||
|
this.totalServiceCharge = totalServiceCharge; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getTotalMoney() { |
||||
|
return totalMoney; |
||||
|
} |
||||
|
|
||||
|
public void setTotalMoney(BigDecimal totalMoney) { |
||||
|
this.totalMoney = totalMoney; |
||||
|
} |
||||
|
|
||||
|
public Integer getType() { |
||||
|
return type; |
||||
|
} |
||||
|
|
||||
|
public void setType(Integer type) { |
||||
|
this.type = type; |
||||
|
} |
||||
|
|
||||
|
public Integer getStatus() { |
||||
|
return status; |
||||
|
} |
||||
|
|
||||
|
public void setStatus(Integer status) { |
||||
|
this.status = status; |
||||
|
} |
||||
|
|
||||
|
public String getTransactionIslicode() { |
||||
|
return transactionIslicode; |
||||
|
} |
||||
|
|
||||
|
public void setTransactionIslicode(String transactionIslicode) { |
||||
|
this.transactionIslicode = transactionIslicode; |
||||
|
} |
||||
|
|
||||
|
public Integer getTicketid() { |
||||
|
return ticketid; |
||||
|
} |
||||
|
|
||||
|
public void setTicketid(Integer ticketid) { |
||||
|
this.ticketid = ticketid; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getTicketmoney() { |
||||
|
return ticketmoney; |
||||
|
} |
||||
|
|
||||
|
public void setTicketmoney(BigDecimal ticketmoney) { |
||||
|
this.ticketmoney = ticketmoney; |
||||
|
} |
||||
|
|
||||
|
public String getTicketurl() { |
||||
|
return ticketurl; |
||||
|
} |
||||
|
|
||||
|
public void setTicketurl(String ticketurl) { |
||||
|
this.ticketurl = ticketurl; |
||||
|
} |
||||
|
|
||||
|
public String getTicketimage() { |
||||
|
return ticketimage; |
||||
|
} |
||||
|
|
||||
|
public void setTicketimage(String ticketimage) { |
||||
|
this.ticketimage = ticketimage; |
||||
|
} |
||||
|
|
||||
|
public Integer getTicketStatus() { |
||||
|
return ticketStatus; |
||||
|
} |
||||
|
|
||||
|
public void setTicketStatus(Integer ticketStatus) { |
||||
|
this.ticketStatus = ticketStatus; |
||||
|
} |
||||
|
|
||||
|
public Integer getChargeChannel() { |
||||
|
return chargeChannel; |
||||
|
} |
||||
|
|
||||
|
public void setChargeChannel(Integer chargeChannel) { |
||||
|
this.chargeChannel = chargeChannel; |
||||
|
} |
||||
|
|
||||
|
public Integer getPayStatus() { |
||||
|
return payStatus; |
||||
|
} |
||||
|
|
||||
|
public void setPayStatus(Integer payStatus) { |
||||
|
this.payStatus = payStatus; |
||||
|
} |
||||
|
|
||||
|
public Integer getCloseStatus() { |
||||
|
return closeStatus; |
||||
|
} |
||||
|
|
||||
|
public void setCloseStatus(Integer closeStatus) { |
||||
|
this.closeStatus = closeStatus; |
||||
|
} |
||||
|
|
||||
|
public Integer getIsClose() { |
||||
|
return isClose; |
||||
|
} |
||||
|
|
||||
|
public void setIsClose(Integer isClose) { |
||||
|
this.isClose = isClose; |
||||
|
} |
||||
|
|
||||
|
public String getCloseSerialNumber() { |
||||
|
return closeSerialNumber; |
||||
|
} |
||||
|
|
||||
|
public void setCloseSerialNumber(String closeSerialNumber) { |
||||
|
this.closeSerialNumber = closeSerialNumber; |
||||
|
} |
||||
|
|
||||
|
public String getPayid() { |
||||
|
return payid; |
||||
|
} |
||||
|
|
||||
|
public void setPayid(String payid) { |
||||
|
this.payid = payid; |
||||
|
} |
||||
|
|
||||
|
public Date getCreatetime() { |
||||
|
return createtime; |
||||
|
} |
||||
|
|
||||
|
public void setCreatetime(Date createtime) { |
||||
|
this.createtime = createtime; |
||||
|
} |
||||
|
|
||||
|
public Date getPaymenttime() { |
||||
|
return paymenttime; |
||||
|
} |
||||
|
|
||||
|
public void setPaymenttime(Date paymenttime) { |
||||
|
this.paymenttime = paymenttime; |
||||
|
} |
||||
|
|
||||
|
public Date getReceivetime() { |
||||
|
return receivetime; |
||||
|
} |
||||
|
|
||||
|
public void setReceivetime(Date receivetime) { |
||||
|
this.receivetime = receivetime; |
||||
|
} |
||||
|
|
||||
|
public Date getClosetime() { |
||||
|
return closetime; |
||||
|
} |
||||
|
|
||||
|
public void setClosetime(Date closetime) { |
||||
|
this.closetime = closetime; |
||||
|
} |
||||
|
|
||||
|
public Date getCompletetime() { |
||||
|
return completetime; |
||||
|
} |
||||
|
|
||||
|
public void setCompletetime(Date completetime) { |
||||
|
this.completetime = completetime; |
||||
|
} |
||||
|
|
||||
|
public Date getShuttime() { |
||||
|
return shuttime; |
||||
|
} |
||||
|
|
||||
|
public void setShuttime(Date shuttime) { |
||||
|
this.shuttime = shuttime; |
||||
|
} |
||||
|
|
||||
|
public Date getTickettime() { |
||||
|
return tickettime; |
||||
|
} |
||||
|
|
||||
|
public void setTickettime(Date tickettime) { |
||||
|
this.tickettime = tickettime; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
package cn.chjyj.szwh.mapper; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 订单信息 |
||||
|
*/ |
||||
|
@Component |
||||
|
public interface OrderMapper { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,103 @@ |
|||||
|
<?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="cn.chjyj.szwh.mapper.OrderMapper"> |
||||
|
|
||||
|
<sql id="column"> |
||||
|
id,user_id as userId,buy_islicode as buyIslicode,batchcode,account_ratio_id as accountRatioId, |
||||
|
history_buy_name as historyBuyName, |
||||
|
history_buy_code as historyBuyCode,total_service_charge as totalServiceCharge,total_money as totalMoney, |
||||
|
`type`,`status`,transaction_islicode as transactionIslicode,ticketid,ticketmoney,ticketurl,ticketimage, |
||||
|
ticket_status as ticketStatus,charge_channel as chargeChannel,pay_status as payStatus,close_status as closeStatus, |
||||
|
is_close as isClose,close_serial_number as closeSerialNumber,payid,createtime,paymenttime,receivetime,closetime, |
||||
|
completetime,shuttime,tickettime |
||||
|
</sql> |
||||
|
<sql id="tbName">`order`</sql> |
||||
|
|
||||
|
<!--查询记录列表--> |
||||
|
<select id="getGoodsList" parameterType="java.lang.Integer" resultType="cn.chjyj.szwh.bean.Goods"> |
||||
|
WITH mm as (select * from |
||||
|
<include refid="tbName"/> |
||||
|
where id>#{startRs} limit #{pageSize} |
||||
|
)SELECT * FROM mm ORDER BY id DESC; |
||||
|
</select> |
||||
|
|
||||
|
<!--根据uid查询用户--> |
||||
|
<select id="getUserByUid" parameterType="java.lang.Integer" resultType="cn.chjyj.szwh.bean.Goods"> |
||||
|
select <include refid="column"/> |
||||
|
from <include refid="tbName"/> |
||||
|
where uid=#{uid} |
||||
|
</select> |
||||
|
|
||||
|
<!--查询用户名,加上密码--> |
||||
|
<select id="getUserByUname" parameterType="java.lang.String" resultType="cn.chjyj.szwh.bean.Goods"> |
||||
|
select <include refid="column"/>,password |
||||
|
from <include refid="tbName"/> |
||||
|
where uname=#{uname} limit 1; |
||||
|
</select> |
||||
|
|
||||
|
<!--查询用户--> |
||||
|
<select id="getSingleUserByOpenid" parameterType="java.lang.String" resultType="cn.chjyj.szwh.bean.Goods"> |
||||
|
select <include refid="column"/> from |
||||
|
<include refid="tbName"/> |
||||
|
where openid=#{openid}; |
||||
|
</select> |
||||
|
|
||||
|
<!--新增用户--> |
||||
|
<insert id="addUser" parameterType="cn.chjyj.szwh.bean.Goods" useGeneratedKeys="true" keyColumn="uid"> |
||||
|
insert into <include refid="tbName"/> |
||||
|
(uname,password,gender,urealname,ubirth,nickname,avatarurl,platfrom,sessionkey,openid) |
||||
|
values ( |
||||
|
#{uname}, |
||||
|
#{password}, |
||||
|
#{gender}, |
||||
|
#{urealname}, |
||||
|
#{ubirth}, |
||||
|
#{nickname}, |
||||
|
#{avatarurl}, |
||||
|
#{platfrom}, |
||||
|
#{sessionkey}, |
||||
|
#{openid} |
||||
|
) |
||||
|
</insert> |
||||
|
|
||||
|
<update id="upUser" parameterType="cn.chjyj.szwh.bean.Goods"> |
||||
|
update <include refid="tbName"/> |
||||
|
set |
||||
|
|
||||
|
<if test="password!=null"> |
||||
|
password=#{password}, |
||||
|
</if> |
||||
|
<if test="urealname!=null"> |
||||
|
urealname=#{urealname}, |
||||
|
</if> |
||||
|
<if test="ubirth!=null"> |
||||
|
ubirth =#{ubirth}, |
||||
|
</if> |
||||
|
<if test="gender!=null"> |
||||
|
gender=#{gender}, |
||||
|
</if> |
||||
|
<if test="nickName!=null"> |
||||
|
nickname=#{nickName}, |
||||
|
</if> |
||||
|
<if test="avatarurl!=null"> |
||||
|
avatarurl=#{avatarurl}, |
||||
|
</if> |
||||
|
<if test="nickname!=null"> |
||||
|
nickname=#{nickname}, |
||||
|
</if> |
||||
|
<if test="platfrom!=null"> |
||||
|
platfrom=#{platfrom}, |
||||
|
</if> |
||||
|
<if test="sessionkey!=null"> |
||||
|
sessionkey=#{sessionkey}, |
||||
|
</if> |
||||
|
<if test="openid!=null"> |
||||
|
openid=#{openid}, |
||||
|
</if> |
||||
|
uname=#{uname} |
||||
|
where uid=#{uid}; |
||||
|
</update> |
||||
|
|
||||
|
</mapper> |
||||
Loading…
Reference in new issue