3 changed files with 409 additions and 0 deletions
@ -0,0 +1,299 @@ |
|||||
|
package cn.chjyj.szwh.bean; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 订单用户,与订单关联查询 |
||||
|
*/ |
||||
|
public class OrderUser implements Serializable { |
||||
|
/** |
||||
|
* order_user |
||||
|
* id,batchcode,islicode,`name`,uscc,userType,authType,certType,idNumber,cellPhone,publicAccount, |
||||
|
* legalsName,legalsType,legalsIdnum,legalsCellPhone,bankCardType,bankType,bankName,bankAccountName, |
||||
|
* certIdnum,bankCellPhone,bankAddress,`state`,registertime,attesttime,tickettime,ticketid, |
||||
|
* ticketmoney,ticketurl,ticketimage,ticket_status as ticketStatus, |
||||
|
*/ |
||||
|
private Integer id; |
||||
|
private String batchcode;//订单号
|
||||
|
private String islicode;//用户ISLI标识码
|
||||
|
private String name;//用户名称
|
||||
|
private String uscc;//机构代码
|
||||
|
private String usertype;//机构类型;个人;组织
|
||||
|
private String authtype;//认证类型
|
||||
|
private String certtype;//个人-证件类型
|
||||
|
private String idnumber;//个人-证件号码
|
||||
|
private String cellphone; //个人-手机号码
|
||||
|
private String publicaccount;//银行账户
|
||||
|
private String legalsname;//机构-法人名称
|
||||
|
private String legalstype;//机构-法人证件类型
|
||||
|
private String legalsidnum;//机构-法人证件号
|
||||
|
private String legalscellphone;//机构-法人手机号
|
||||
|
private String bankcardtype;//银行卡类型
|
||||
|
private String banktype;//银行行别
|
||||
|
private String bankname;//开户行名称
|
||||
|
private String bankaccountname;//开户人姓名
|
||||
|
private String certidnum;//开户人身份证号码
|
||||
|
private String bankcellphone;//开户行预留手机号码
|
||||
|
private String bankaddress;//开户行所在地
|
||||
|
private Integer state;//0-认证中 1-认证成功 2-认证失败
|
||||
|
private Date registertime;//注册时间
|
||||
|
private Date attesttime;//认证时间
|
||||
|
private Date tickettime;//开票时间
|
||||
|
private Integer ticketid;//开票编号
|
||||
|
private BigDecimal ticketmoney;//开票金额
|
||||
|
private String ticketurl;//开票下载url
|
||||
|
private String ticketimage;//开票图片url
|
||||
|
private Integer ticketStatus;//开票状态(1:未开票,2:开票中,3:已开票;4:开票失败)
|
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public Integer getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(Integer id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getBatchcode() { |
||||
|
return batchcode; |
||||
|
} |
||||
|
|
||||
|
public void setBatchcode(String batchcode) { |
||||
|
this.batchcode = batchcode; |
||||
|
} |
||||
|
|
||||
|
public String getIslicode() { |
||||
|
return islicode; |
||||
|
} |
||||
|
|
||||
|
public void setIslicode(String islicode) { |
||||
|
this.islicode = islicode; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getUscc() { |
||||
|
return uscc; |
||||
|
} |
||||
|
|
||||
|
public void setUscc(String uscc) { |
||||
|
this.uscc = uscc; |
||||
|
} |
||||
|
|
||||
|
public String getUsertype() { |
||||
|
return usertype; |
||||
|
} |
||||
|
|
||||
|
public void setUsertype(String usertype) { |
||||
|
this.usertype = usertype; |
||||
|
} |
||||
|
|
||||
|
public String getAuthtype() { |
||||
|
return authtype; |
||||
|
} |
||||
|
|
||||
|
public void setAuthtype(String authtype) { |
||||
|
this.authtype = authtype; |
||||
|
} |
||||
|
|
||||
|
public String getCerttype() { |
||||
|
return certtype; |
||||
|
} |
||||
|
|
||||
|
public void setCerttype(String certtype) { |
||||
|
this.certtype = certtype; |
||||
|
} |
||||
|
|
||||
|
public String getIdnumber() { |
||||
|
return idnumber; |
||||
|
} |
||||
|
|
||||
|
public void setIdnumber(String idnumber) { |
||||
|
this.idnumber = idnumber; |
||||
|
} |
||||
|
|
||||
|
public String getCellphone() { |
||||
|
return cellphone; |
||||
|
} |
||||
|
|
||||
|
public void setCellphone(String cellphone) { |
||||
|
this.cellphone = cellphone; |
||||
|
} |
||||
|
|
||||
|
public String getPublicaccount() { |
||||
|
return publicaccount; |
||||
|
} |
||||
|
|
||||
|
public void setPublicaccount(String publicaccount) { |
||||
|
this.publicaccount = publicaccount; |
||||
|
} |
||||
|
|
||||
|
public String getLegalsname() { |
||||
|
return legalsname; |
||||
|
} |
||||
|
|
||||
|
public void setLegalsname(String legalsname) { |
||||
|
this.legalsname = legalsname; |
||||
|
} |
||||
|
|
||||
|
public String getLegalstype() { |
||||
|
return legalstype; |
||||
|
} |
||||
|
|
||||
|
public void setLegalstype(String legalstype) { |
||||
|
this.legalstype = legalstype; |
||||
|
} |
||||
|
|
||||
|
public String getLegalsidnum() { |
||||
|
return legalsidnum; |
||||
|
} |
||||
|
|
||||
|
public void setLegalsidnum(String legalsidnum) { |
||||
|
this.legalsidnum = legalsidnum; |
||||
|
} |
||||
|
|
||||
|
public String getLegalscellphone() { |
||||
|
return legalscellphone; |
||||
|
} |
||||
|
|
||||
|
public void setLegalscellphone(String legalscellphone) { |
||||
|
this.legalscellphone = legalscellphone; |
||||
|
} |
||||
|
|
||||
|
public String getBankcardtype() { |
||||
|
return bankcardtype; |
||||
|
} |
||||
|
|
||||
|
public void setBankcardtype(String bankcardtype) { |
||||
|
this.bankcardtype = bankcardtype; |
||||
|
} |
||||
|
|
||||
|
public String getBanktype() { |
||||
|
return banktype; |
||||
|
} |
||||
|
|
||||
|
public void setBanktype(String banktype) { |
||||
|
this.banktype = banktype; |
||||
|
} |
||||
|
|
||||
|
public String getBankname() { |
||||
|
return bankname; |
||||
|
} |
||||
|
|
||||
|
public void setBankname(String bankname) { |
||||
|
this.bankname = bankname; |
||||
|
} |
||||
|
|
||||
|
public String getBankaccountname() { |
||||
|
return bankaccountname; |
||||
|
} |
||||
|
|
||||
|
public void setBankaccountname(String bankaccountname) { |
||||
|
this.bankaccountname = bankaccountname; |
||||
|
} |
||||
|
|
||||
|
public String getCertidnum() { |
||||
|
return certidnum; |
||||
|
} |
||||
|
|
||||
|
public void setCertidnum(String certidnum) { |
||||
|
this.certidnum = certidnum; |
||||
|
} |
||||
|
|
||||
|
public String getBankcellphone() { |
||||
|
return bankcellphone; |
||||
|
} |
||||
|
|
||||
|
public void setBankcellphone(String bankcellphone) { |
||||
|
this.bankcellphone = bankcellphone; |
||||
|
} |
||||
|
|
||||
|
public String getBankaddress() { |
||||
|
return bankaddress; |
||||
|
} |
||||
|
|
||||
|
public void setBankaddress(String bankaddress) { |
||||
|
this.bankaddress = bankaddress; |
||||
|
} |
||||
|
|
||||
|
public Integer getState() { |
||||
|
return state; |
||||
|
} |
||||
|
|
||||
|
public void setState(Integer state) { |
||||
|
this.state = state; |
||||
|
} |
||||
|
|
||||
|
public Date getRegistertime() { |
||||
|
return registertime; |
||||
|
} |
||||
|
|
||||
|
public void setRegistertime(Date registertime) { |
||||
|
this.registertime = registertime; |
||||
|
} |
||||
|
|
||||
|
public Date getAttesttime() { |
||||
|
return attesttime; |
||||
|
} |
||||
|
|
||||
|
public void setAttesttime(Date attesttime) { |
||||
|
this.attesttime = attesttime; |
||||
|
} |
||||
|
|
||||
|
public Date getTickettime() { |
||||
|
return tickettime; |
||||
|
} |
||||
|
|
||||
|
public void setTickettime(Date tickettime) { |
||||
|
this.tickettime = tickettime; |
||||
|
} |
||||
|
|
||||
|
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; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package cn.chjyj.szwh.mapper; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 用户订单mapper |
||||
|
*/ |
||||
|
@Component |
||||
|
public interface OrderUserMapper { |
||||
|
} |
||||
@ -0,0 +1,100 @@ |
|||||
|
<?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.OrderUserMapper"> |
||||
|
|
||||
|
<sql id="column"> |
||||
|
id,batchcode,islicode,`name`,uscc,userType,authType,certType,idNumber,cellPhone,publicAccount, |
||||
|
legalsName,legalsType,legalsIdnum,legalsCellPhone,bankCardType,bankType,bankName,bankAccountName, |
||||
|
certIdnum,bankCellPhone,bankAddress,`state`,registertime,attesttime,tickettime,ticketid, |
||||
|
ticketmoney,ticketurl,ticketimage,ticket_status as ticketStatus, |
||||
|
</sql> |
||||
|
<sql id="tbName">order_user</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