Compare commits
6 Commits
c47dc56e0a
...
c8b737855a
Author | SHA1 | Date |
---|---|---|
|
c8b737855a | 10 months ago |
|
6678f112cb | 10 months ago |
|
4fcd16d94e | 10 months ago |
|
caeb8e118f | 10 months ago |
|
2f644dbd6f | 10 months ago |
|
7a66074ce9 | 10 months ago |
@ -0,0 +1,109 @@
|
||||
package com.wsk.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/22.
|
||||
*/
|
||||
public class GoodsCarBean implements Serializable{
|
||||
private int id;
|
||||
private int uid;
|
||||
private int sid;
|
||||
private String name;
|
||||
private Date modified;
|
||||
private int quantity;
|
||||
private int level;
|
||||
private String remark;
|
||||
private String sort;
|
||||
private String image;
|
||||
private double price;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(int sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified;
|
||||
}
|
||||
|
||||
public int getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(int quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(String sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(double price) {
|
||||
this.price = price;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.AdminInformation;
|
||||
|
||||
public interface AdminInformationMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(AdminInformation record);
|
||||
|
||||
int insertSelective(AdminInformation record);
|
||||
|
||||
AdminInformation selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(AdminInformation record);
|
||||
|
||||
int updateByPrimaryKey(AdminInformation record);
|
||||
|
||||
AdminInformation selectByNo(int ano);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.GoodsCar;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface GoodsCarMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(GoodsCar record);
|
||||
|
||||
int insertSelective(GoodsCar record);
|
||||
|
||||
GoodsCar selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(GoodsCar record);
|
||||
|
||||
int updateByPrimaryKey(GoodsCar record);
|
||||
|
||||
List<GoodsCar> selectByUid(int uid);
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class AdminInformation implements Serializable{
|
||||
private Integer id;
|
||||
|
||||
private String ano;
|
||||
|
||||
private String password;
|
||||
|
||||
private Date modified;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAno() {
|
||||
return ano;
|
||||
}
|
||||
|
||||
public void setAno(String ano) {
|
||||
this.ano = ano == null ? null : ano.trim();
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password == null ? null : password.trim();
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = (Date) modified.clone();
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class GoodsCar implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer sid;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private Integer display;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Integer sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
<?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.wsk.dao.GoodsCarMapper">
|
||||
<resultMap id="BaseResultMap" type="com.wsk.pojo.GoodsCar">
|
||||
<id column="id" property="id" jdbcType="INTEGER"/>
|
||||
<result column="modified" property="modified" jdbcType="TIMESTAMP"/>
|
||||
<result column="sid" property="sid" jdbcType="INTEGER"/>
|
||||
<result column="uid" property="uid" jdbcType="INTEGER"/>
|
||||
<result column="quantity" property="quantity" jdbcType="INTEGER"/>
|
||||
<result column="display" property="display" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="table">
|
||||
goodscar
|
||||
</sql>
|
||||
|
||||
<sql id="all">
|
||||
id, modified, sid, uid, quantity, display
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
||||
select
|
||||
<include refid="all"/>
|
||||
from
|
||||
<include refid="table"/>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectByUid" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
||||
select
|
||||
<include refid="all"/>
|
||||
from
|
||||
<include refid="table"/>
|
||||
where uid = #{uid,jdbcType=INTEGER} and display=1 order by id DESC
|
||||
limit 12
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from
|
||||
<include refid="table"/>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.wsk.pojo.GoodsCar">
|
||||
insert into
|
||||
<include refid="table"/>
|
||||
(id, modified, sid,
|
||||
uid, quantity, display
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{modified,jdbcType=TIMESTAMP}, #{sid,jdbcType=INTEGER},
|
||||
#{uid,jdbcType=INTEGER}, #{quantity,jdbcType=INTEGER}, #{display,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.wsk.pojo.GoodsCar">
|
||||
insert into
|
||||
<include refid="table"/>
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modified != null">
|
||||
modified,
|
||||
</if>
|
||||
<if test="sid != null">
|
||||
sid,
|
||||
</if>
|
||||
<if test="uid != null">
|
||||
uid,
|
||||
</if>
|
||||
<if test="quantity != null">
|
||||
quantity,
|
||||
</if>
|
||||
<if test="display != null">
|
||||
display,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="modified != null">
|
||||
#{modified,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="sid != null">
|
||||
#{sid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="uid != null">
|
||||
#{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="quantity != null">
|
||||
#{quantity,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="display != null">
|
||||
#{display,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.wsk.pojo.GoodsCar">
|
||||
update
|
||||
<include refid="table"/>
|
||||
<set>
|
||||
<if test="modified != null">
|
||||
modified = #{modified,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="sid != null">
|
||||
sid = #{sid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="uid != null">
|
||||
uid = #{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="quantity != null">
|
||||
quantity = #{quantity,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="display != null">
|
||||
display = #{display,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.wsk.pojo.GoodsCar">
|
||||
update
|
||||
<include refid="table"/>
|
||||
set modified = #{modified,jdbcType=TIMESTAMP},
|
||||
sid = #{sid,jdbcType=INTEGER},
|
||||
uid = #{uid,jdbcType=INTEGER},
|
||||
quantity = #{quantity,jdbcType=INTEGER},
|
||||
display = #{display,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in new issue