Showing
6 changed files
with
398 additions
and
0 deletions
1 | +package com.yohoufo.dal.product; | ||
2 | + | ||
3 | + | ||
4 | +import com.yohoufo.dal.product.model.ProductSelfShelves; | ||
5 | + | ||
6 | +public interface ProductSelfShelvesMapper { | ||
7 | + int deleteByPrimaryKey(Integer id); | ||
8 | + | ||
9 | + int insert(ProductSelfShelves record); | ||
10 | + | ||
11 | + int insertSelective(ProductSelfShelves record); | ||
12 | + | ||
13 | + ProductSelfShelves selectByPrimaryKey(Integer id); | ||
14 | + | ||
15 | + int updateByPrimaryKeySelective(ProductSelfShelves record); | ||
16 | + | ||
17 | + int updateByPrimaryKey(ProductSelfShelves record); | ||
18 | +} |
1 | +package com.yohoufo.dal.product; | ||
2 | + | ||
3 | + | ||
4 | +import com.yohoufo.dal.product.model.ProductSelfShelvesPic; | ||
5 | + | ||
6 | +public interface ProductSelfShelvesPicMapper { | ||
7 | + int deleteByPrimaryKey(Integer id); | ||
8 | + | ||
9 | + int insert(ProductSelfShelvesPic record); | ||
10 | + | ||
11 | + int insertSelective(ProductSelfShelvesPic record); | ||
12 | + | ||
13 | + ProductSelfShelvesPic selectByPrimaryKey(Integer id); | ||
14 | + | ||
15 | + int updateByPrimaryKeySelective(ProductSelfShelvesPic record); | ||
16 | + | ||
17 | + int updateByPrimaryKey(ProductSelfShelvesPic record); | ||
18 | +} |
1 | +package com.yohoufo.dal.product.model; | ||
2 | + | ||
3 | +import java.math.BigDecimal; | ||
4 | + | ||
5 | +public class ProductSelfShelves { | ||
6 | + private Integer id; | ||
7 | + | ||
8 | + private String brand; | ||
9 | + | ||
10 | + private String productName; | ||
11 | + | ||
12 | + private BigDecimal price; | ||
13 | + | ||
14 | + private Integer saleTime; | ||
15 | + | ||
16 | + private String productCode; | ||
17 | + | ||
18 | + private Integer status; | ||
19 | + | ||
20 | + private Integer uid; | ||
21 | + | ||
22 | + private Integer createTime; | ||
23 | + | ||
24 | + private Integer updateTime; | ||
25 | + | ||
26 | + public Integer getId() { | ||
27 | + return id; | ||
28 | + } | ||
29 | + | ||
30 | + public void setId(Integer id) { | ||
31 | + this.id = id; | ||
32 | + } | ||
33 | + | ||
34 | + public String getBrand() { | ||
35 | + return brand; | ||
36 | + } | ||
37 | + | ||
38 | + public void setBrand(String brand) { | ||
39 | + this.brand = brand == null ? null : brand.trim(); | ||
40 | + } | ||
41 | + | ||
42 | + public String getProductName() { | ||
43 | + return productName; | ||
44 | + } | ||
45 | + | ||
46 | + public void setProductName(String productName) { | ||
47 | + this.productName = productName == null ? null : productName.trim(); | ||
48 | + } | ||
49 | + | ||
50 | + public BigDecimal getPrice() { | ||
51 | + return price; | ||
52 | + } | ||
53 | + | ||
54 | + public void setPrice(BigDecimal price) { | ||
55 | + this.price = price; | ||
56 | + } | ||
57 | + | ||
58 | + public Integer getSaleTime() { | ||
59 | + return saleTime; | ||
60 | + } | ||
61 | + | ||
62 | + public void setSaleTime(Integer saleTime) { | ||
63 | + this.saleTime = saleTime; | ||
64 | + } | ||
65 | + | ||
66 | + public String getProductCode() { | ||
67 | + return productCode; | ||
68 | + } | ||
69 | + | ||
70 | + public void setProductCode(String productCode) { | ||
71 | + this.productCode = productCode == null ? null : productCode.trim(); | ||
72 | + } | ||
73 | + | ||
74 | + public Integer getStatus() { | ||
75 | + return status; | ||
76 | + } | ||
77 | + | ||
78 | + public void setStatus(Integer status) { | ||
79 | + this.status = status; | ||
80 | + } | ||
81 | + | ||
82 | + public Integer getUid() { | ||
83 | + return uid; | ||
84 | + } | ||
85 | + | ||
86 | + public void setUid(Integer uid) { | ||
87 | + this.uid = uid; | ||
88 | + } | ||
89 | + | ||
90 | + public Integer getCreateTime() { | ||
91 | + return createTime; | ||
92 | + } | ||
93 | + | ||
94 | + public void setCreateTime(Integer createTime) { | ||
95 | + this.createTime = createTime; | ||
96 | + } | ||
97 | + | ||
98 | + public Integer getUpdateTime() { | ||
99 | + return updateTime; | ||
100 | + } | ||
101 | + | ||
102 | + public void setUpdateTime(Integer updateTime) { | ||
103 | + this.updateTime = updateTime; | ||
104 | + } | ||
105 | +} |
1 | +package com.yohoufo.dal.product.model; | ||
2 | + | ||
3 | +public class ProductSelfShelvesPic { | ||
4 | + private Integer id; | ||
5 | + | ||
6 | + private Integer selfShelvesId; | ||
7 | + | ||
8 | + private String pictureUrl; | ||
9 | + | ||
10 | + public Integer getId() { | ||
11 | + return id; | ||
12 | + } | ||
13 | + | ||
14 | + public void setId(Integer id) { | ||
15 | + this.id = id; | ||
16 | + } | ||
17 | + | ||
18 | + public Integer getSelfShelvesId() { | ||
19 | + return selfShelvesId; | ||
20 | + } | ||
21 | + | ||
22 | + public void setSelfShelvesId(Integer selfShelvesId) { | ||
23 | + this.selfShelvesId = selfShelvesId; | ||
24 | + } | ||
25 | + | ||
26 | + public String getPictureUrl() { | ||
27 | + return pictureUrl; | ||
28 | + } | ||
29 | + | ||
30 | + public void setPictureUrl(String pictureUrl) { | ||
31 | + this.pictureUrl = pictureUrl == null ? null : pictureUrl.trim(); | ||
32 | + } | ||
33 | +} |
1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | +<mapper namespace="com.yohoufo.dal.product.ProductSelfShelvesMapper" > | ||
4 | + <resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.ProductSelfShelves" > | ||
5 | + <id column="id" property="id" jdbcType="INTEGER" /> | ||
6 | + <result column="brand" property="brand" jdbcType="VARCHAR" /> | ||
7 | + <result column="product_name" property="productName" jdbcType="VARCHAR" /> | ||
8 | + <result column="price" property="price" jdbcType="DECIMAL" /> | ||
9 | + <result column="sale_time" property="saleTime" jdbcType="INTEGER" /> | ||
10 | + <result column="product_code" property="productCode" jdbcType="VARCHAR" /> | ||
11 | + <result column="status" property="status" jdbcType="INTEGER" /> | ||
12 | + <result column="uid" property="uid" jdbcType="INTEGER" /> | ||
13 | + <result column="create_time" property="createTime" jdbcType="INTEGER" /> | ||
14 | + <result column="update_time" property="updateTime" jdbcType="INTEGER" /> | ||
15 | + </resultMap> | ||
16 | + <sql id="Base_Column_List" > | ||
17 | + id, brand, product_name, price, sale_time, product_code, status, uid, create_time, | ||
18 | + update_time | ||
19 | + </sql> | ||
20 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
21 | + select | ||
22 | + <include refid="Base_Column_List" /> | ||
23 | + from product_self_shelves | ||
24 | + where id = #{id,jdbcType=INTEGER} | ||
25 | + </select> | ||
26 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | ||
27 | + delete from product_self_shelves | ||
28 | + where id = #{id,jdbcType=INTEGER} | ||
29 | + </delete> | ||
30 | + <insert id="insert" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" > | ||
31 | + insert into product_self_shelves (id, brand, product_name, | ||
32 | + price, sale_time, product_code, | ||
33 | + status, uid, create_time, | ||
34 | + update_time) | ||
35 | + values (#{id,jdbcType=INTEGER}, #{brand,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, | ||
36 | + #{price,jdbcType=DECIMAL}, #{saleTime,jdbcType=INTEGER}, #{productCode,jdbcType=VARCHAR}, | ||
37 | + #{status,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, | ||
38 | + #{updateTime,jdbcType=INTEGER}) | ||
39 | + </insert> | ||
40 | + <insert id="insertSelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" > | ||
41 | + insert into product_self_shelves | ||
42 | + <trim prefix="(" suffix=")" suffixOverrides="," > | ||
43 | + <if test="id != null" > | ||
44 | + id, | ||
45 | + </if> | ||
46 | + <if test="brand != null" > | ||
47 | + brand, | ||
48 | + </if> | ||
49 | + <if test="productName != null" > | ||
50 | + product_name, | ||
51 | + </if> | ||
52 | + <if test="price != null" > | ||
53 | + price, | ||
54 | + </if> | ||
55 | + <if test="saleTime != null" > | ||
56 | + sale_time, | ||
57 | + </if> | ||
58 | + <if test="productCode != null" > | ||
59 | + product_code, | ||
60 | + </if> | ||
61 | + <if test="status != null" > | ||
62 | + status, | ||
63 | + </if> | ||
64 | + <if test="uid != null" > | ||
65 | + uid, | ||
66 | + </if> | ||
67 | + <if test="createTime != null" > | ||
68 | + create_time, | ||
69 | + </if> | ||
70 | + <if test="updateTime != null" > | ||
71 | + update_time, | ||
72 | + </if> | ||
73 | + </trim> | ||
74 | + <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
75 | + <if test="id != null" > | ||
76 | + #{id,jdbcType=INTEGER}, | ||
77 | + </if> | ||
78 | + <if test="brand != null" > | ||
79 | + #{brand,jdbcType=VARCHAR}, | ||
80 | + </if> | ||
81 | + <if test="productName != null" > | ||
82 | + #{productName,jdbcType=VARCHAR}, | ||
83 | + </if> | ||
84 | + <if test="price != null" > | ||
85 | + #{price,jdbcType=DECIMAL}, | ||
86 | + </if> | ||
87 | + <if test="saleTime != null" > | ||
88 | + #{saleTime,jdbcType=INTEGER}, | ||
89 | + </if> | ||
90 | + <if test="productCode != null" > | ||
91 | + #{productCode,jdbcType=VARCHAR}, | ||
92 | + </if> | ||
93 | + <if test="status != null" > | ||
94 | + #{status,jdbcType=INTEGER}, | ||
95 | + </if> | ||
96 | + <if test="uid != null" > | ||
97 | + #{uid,jdbcType=INTEGER}, | ||
98 | + </if> | ||
99 | + <if test="createTime != null" > | ||
100 | + #{createTime,jdbcType=INTEGER}, | ||
101 | + </if> | ||
102 | + <if test="updateTime != null" > | ||
103 | + #{updateTime,jdbcType=INTEGER}, | ||
104 | + </if> | ||
105 | + </trim> | ||
106 | + </insert> | ||
107 | + <update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" > | ||
108 | + update product_self_shelves | ||
109 | + <set > | ||
110 | + <if test="brand != null" > | ||
111 | + brand = #{brand,jdbcType=VARCHAR}, | ||
112 | + </if> | ||
113 | + <if test="productName != null" > | ||
114 | + product_name = #{productName,jdbcType=VARCHAR}, | ||
115 | + </if> | ||
116 | + <if test="price != null" > | ||
117 | + price = #{price,jdbcType=DECIMAL}, | ||
118 | + </if> | ||
119 | + <if test="saleTime != null" > | ||
120 | + sale_time = #{saleTime,jdbcType=INTEGER}, | ||
121 | + </if> | ||
122 | + <if test="productCode != null" > | ||
123 | + product_code = #{productCode,jdbcType=VARCHAR}, | ||
124 | + </if> | ||
125 | + <if test="status != null" > | ||
126 | + status = #{status,jdbcType=INTEGER}, | ||
127 | + </if> | ||
128 | + <if test="uid != null" > | ||
129 | + uid = #{uid,jdbcType=INTEGER}, | ||
130 | + </if> | ||
131 | + <if test="createTime != null" > | ||
132 | + create_time = #{createTime,jdbcType=INTEGER}, | ||
133 | + </if> | ||
134 | + <if test="updateTime != null" > | ||
135 | + update_time = #{updateTime,jdbcType=INTEGER}, | ||
136 | + </if> | ||
137 | + </set> | ||
138 | + where id = #{id,jdbcType=INTEGER} | ||
139 | + </update> | ||
140 | + <update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" > | ||
141 | + update product_self_shelves | ||
142 | + set brand = #{brand,jdbcType=VARCHAR}, | ||
143 | + product_name = #{productName,jdbcType=VARCHAR}, | ||
144 | + price = #{price,jdbcType=DECIMAL}, | ||
145 | + sale_time = #{saleTime,jdbcType=INTEGER}, | ||
146 | + product_code = #{productCode,jdbcType=VARCHAR}, | ||
147 | + status = #{status,jdbcType=INTEGER}, | ||
148 | + uid = #{uid,jdbcType=INTEGER}, | ||
149 | + create_time = #{createTime,jdbcType=INTEGER}, | ||
150 | + update_time = #{updateTime,jdbcType=INTEGER} | ||
151 | + where id = #{id,jdbcType=INTEGER} | ||
152 | + </update> | ||
153 | +</mapper> |
1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | +<mapper namespace="com.yohoufo.dal.product.ProductSelfShelvesPicMapper" > | ||
4 | + <resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.ProductSelfShelvesPic" > | ||
5 | + <id column="id" property="id" jdbcType="INTEGER" /> | ||
6 | + <result column="self_shelves_id" property="selfShelvesId" jdbcType="INTEGER" /> | ||
7 | + <result column="picture_url" property="pictureUrl" jdbcType="VARCHAR" /> | ||
8 | + </resultMap> | ||
9 | + <sql id="Base_Column_List" > | ||
10 | + id, self_shelves_id, picture_url | ||
11 | + </sql> | ||
12 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
13 | + select | ||
14 | + <include refid="Base_Column_List" /> | ||
15 | + from product_self_shelves_pic | ||
16 | + where id = #{id,jdbcType=INTEGER} | ||
17 | + </select> | ||
18 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | ||
19 | + delete from product_self_shelves_pic | ||
20 | + where id = #{id,jdbcType=INTEGER} | ||
21 | + </delete> | ||
22 | + <insert id="insert" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" > | ||
23 | + insert into product_self_shelves_pic (id, self_shelves_id, picture_url | ||
24 | + ) | ||
25 | + values (#{id,jdbcType=INTEGER}, #{selfShelvesId,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR} | ||
26 | + ) | ||
27 | + </insert> | ||
28 | + <insert id="insertSelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" > | ||
29 | + insert into product_self_shelves_pic | ||
30 | + <trim prefix="(" suffix=")" suffixOverrides="," > | ||
31 | + <if test="id != null" > | ||
32 | + id, | ||
33 | + </if> | ||
34 | + <if test="selfShelvesId != null" > | ||
35 | + self_shelves_id, | ||
36 | + </if> | ||
37 | + <if test="pictureUrl != null" > | ||
38 | + picture_url, | ||
39 | + </if> | ||
40 | + </trim> | ||
41 | + <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
42 | + <if test="id != null" > | ||
43 | + #{id,jdbcType=INTEGER}, | ||
44 | + </if> | ||
45 | + <if test="selfShelvesId != null" > | ||
46 | + #{selfShelvesId,jdbcType=INTEGER}, | ||
47 | + </if> | ||
48 | + <if test="pictureUrl != null" > | ||
49 | + #{pictureUrl,jdbcType=VARCHAR}, | ||
50 | + </if> | ||
51 | + </trim> | ||
52 | + </insert> | ||
53 | + <update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" > | ||
54 | + update product_self_shelves_pic | ||
55 | + <set > | ||
56 | + <if test="selfShelvesId != null" > | ||
57 | + self_shelves_id = #{selfShelvesId,jdbcType=INTEGER}, | ||
58 | + </if> | ||
59 | + <if test="pictureUrl != null" > | ||
60 | + picture_url = #{pictureUrl,jdbcType=VARCHAR}, | ||
61 | + </if> | ||
62 | + </set> | ||
63 | + where id = #{id,jdbcType=INTEGER} | ||
64 | + </update> | ||
65 | + <update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" > | ||
66 | + update product_self_shelves_pic | ||
67 | + set self_shelves_id = #{selfShelvesId,jdbcType=INTEGER}, | ||
68 | + picture_url = #{pictureUrl,jdbcType=VARCHAR} | ||
69 | + where id = #{id,jdbcType=INTEGER} | ||
70 | + </update> | ||
71 | +</mapper> |
-
Please register or login to post a comment