Authored by zhaojun2

fix mapper & model

Showing 25 changed files with 216 additions and 155 deletions
... ... @@ -4,11 +4,11 @@ import com.yohoufo.dal.product.model.Brand;
import java.util.List;
public interface BrandMapper {
int deleteByPrimaryKey(Short id);
int deleteByPrimaryKey(Integer id);
int insert(Brand record);
Brand selectByPrimaryKey(Short id);
Brand selectByPrimaryKey(Integer id);
List<Brand> selectAll();
... ...
... ... @@ -4,11 +4,11 @@ import com.yohoufo.dal.product.model.BrandSeries;
import java.util.List;
public interface BrandSeriesMapper {
int deleteByPrimaryKey(Short id);
int deleteByPrimaryKey(Integer id);
int insert(BrandSeries record);
BrandSeries selectByPrimaryKey(Short id);
BrandSeries selectByPrimaryKey(Integer id);
List<BrandSeries> selectAll();
... ...
... ... @@ -4,11 +4,11 @@ import com.yohoufo.dal.product.model.ProductColor;
import java.util.List;
public interface ProductColorMapper {
int deleteByPrimaryKey(Short id);
int deleteByPrimaryKey(Integer id);
int insert(ProductColor record);
ProductColor selectByPrimaryKey(Short id);
ProductColor selectByPrimaryKey(Integer id);
List<ProductColor> selectAll();
... ...
... ... @@ -4,11 +4,11 @@ import com.yohoufo.dal.product.model.ProductSort;
import java.util.List;
public interface ProductSortMapper {
int deleteByPrimaryKey(Short id);
int deleteByPrimaryKey(Integer id);
int insert(ProductSort record);
ProductSort selectByPrimaryKey(Short id);
ProductSort selectByPrimaryKey(Integer id);
List<ProductSort> selectAll();
... ...
... ... @@ -4,11 +4,11 @@ import com.yohoufo.dal.product.model.Size;
import java.util.List;
public interface SizeMapper {
int deleteByPrimaryKey(Short id);
int deleteByPrimaryKey(Integer id);
int insert(Size record);
Size selectByPrimaryKey(Short id);
Size selectByPrimaryKey(Integer id);
List<Size> selectAll();
... ...
package com.yohoufo.dal.product.model;
public class Brand {
private Short id;
private Integer id;
private String brandName;
... ... @@ -11,7 +11,7 @@ public class Brand {
private String brandSearch;
private Byte status;
private Integer status;
private Integer createTime;
... ... @@ -19,11 +19,13 @@ public class Brand {
private Integer editPid;
public Short getId() {
private Integer orderBy;
public Integer getId() {
return id;
}
public void setId(Short id) {
public void setId(Integer id) {
this.id = id;
}
... ... @@ -59,11 +61,11 @@ public class Brand {
this.brandSearch = brandSearch;
}
public Byte getStatus() {
public Integer getStatus() {
return status;
}
public void setStatus(Byte status) {
public void setStatus(Integer status) {
this.status = status;
}
... ... @@ -90,4 +92,12 @@ public class Brand {
public void setEditPid(Integer editPid) {
this.editPid = editPid;
}
public Integer getOrderBy() {
return orderBy;
}
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
}
\ No newline at end of file
... ...
package com.yohoufo.dal.product.model;
public class BrandSeries {
private Short id;
private Integer id;
private String seriesName;
private String seriesSearch;
private Byte status;
private Integer status;
private Integer createTime;
... ... @@ -15,11 +15,11 @@ public class BrandSeries {
private Integer brandId;
public Short getId() {
public Integer getId() {
return id;
}
public void setId(Short id) {
public void setId(Integer id) {
this.id = id;
}
... ... @@ -39,11 +39,11 @@ public class BrandSeries {
this.seriesSearch = seriesSearch;
}
public Byte getStatus() {
public Integer getStatus() {
return status;
}
public void setStatus(Byte status) {
public void setStatus(Integer status) {
this.status = status;
}
... ...
... ... @@ -5,7 +5,7 @@ public class Goods {
private Integer productId;
private Short colorId;
private Integer colorId;
private String colorName;
... ... @@ -31,11 +31,11 @@ public class Goods {
this.productId = productId;
}
public Short getColorId() {
public Integer getColorId() {
return colorId;
}
public void setColorId(Short colorId) {
public void setColorId(Integer colorId) {
this.colorId = colorId;
}
... ...
... ... @@ -11,7 +11,7 @@ public class GoodsImages {
private String imageUrl;
private Byte orderBy;
private Integer orderBy;
public Integer getId() {
return id;
... ... @@ -53,11 +53,11 @@ public class GoodsImages {
this.imageUrl = imageUrl;
}
public Byte getOrderBy() {
public Integer getOrderBy() {
return orderBy;
}
public void setOrderBy(Byte orderBy) {
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
}
\ No newline at end of file
... ...
... ... @@ -9,11 +9,13 @@ public class Product {
private String productCode;
private Short sortId;
private Integer maxSortId;
private Short brandId;
private Integer midSortId;
private Short seriesId;
private Integer brandId;
private Integer seriesId;
private String gender;
... ... @@ -31,13 +33,14 @@ public class Product {
private Integer editTime;
private Byte shelveStatus;
private Integer shelveStatus;
private Integer storage;
private String keyWords;
private Byte delStatus;
private Integer delStatus;
public Integer getId() {
return id;
... ... @@ -63,27 +66,35 @@ public class Product {
this.productCode = productCode;
}
public Short getSortId() {
return sortId;
public Integer getMaxSortId() {
return maxSortId;
}
public void setMaxSortId(Integer maxSortId) {
this.maxSortId = maxSortId;
}
public Integer getMidSortId() {
return midSortId;
}
public void setSortId(Short sortId) {
this.sortId = sortId;
public void setMidSortId(Integer midSortId) {
this.midSortId = midSortId;
}
public Short getBrandId() {
public Integer getBrandId() {
return brandId;
}
public void setBrandId(Short brandId) {
public void setBrandId(Integer brandId) {
this.brandId = brandId;
}
public Short getSeriesId() {
public Integer getSeriesId() {
return seriesId;
}
public void setSeriesId(Short seriesId) {
public void setSeriesId(Integer seriesId) {
this.seriesId = seriesId;
}
... ... @@ -151,11 +162,11 @@ public class Product {
this.editTime = editTime;
}
public Byte getShelveStatus() {
public Integer getShelveStatus() {
return shelveStatus;
}
public void setShelveStatus(Byte shelveStatus) {
public void setShelveStatus(Integer shelveStatus) {
this.shelveStatus = shelveStatus;
}
... ... @@ -175,11 +186,11 @@ public class Product {
this.keyWords = keyWords;
}
public Byte getDelStatus() {
public Integer getDelStatus() {
return delStatus;
}
public void setDelStatus(Byte delStatus) {
public void setDelStatus(Integer delStatus) {
this.delStatus = delStatus;
}
}
\ No newline at end of file
... ...
package com.yohoufo.dal.product.model;
public class ProductColor {
private Short id;
private Integer id;
private String colorName;
... ... @@ -13,11 +13,11 @@ public class ProductColor {
private Integer updateTime;
public Short getId() {
public Integer getId() {
return id;
}
public void setId(Short id) {
public void setId(Integer id) {
this.id = id;
}
... ...
package com.yohoufo.dal.product.model;
public class ProductSort {
private Short id;
private Integer id;
private String sortName;
private Byte status;
private Integer level;
private Integer parentId;
private Integer status;
private Integer createTime;
private Integer updateTime;
public Short getId() {
private Integer orderBy;
public Integer getId() {
return id;
}
public void setId(Short id) {
public void setId(Integer id) {
this.id = id;
}
... ... @@ -27,11 +33,27 @@ public class ProductSort {
this.sortName = sortName;
}
public Byte getStatus() {
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Byte status) {
public void setStatus(Integer status) {
this.status = status;
}
... ... @@ -50,4 +72,12 @@ public class ProductSort {
public void setUpdateTime(Integer updateTime) {
this.updateTime = updateTime;
}
public Integer getOrderBy() {
return orderBy;
}
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
}
\ No newline at end of file
... ...
package com.yohoufo.dal.product.model;
public class Size {
private Short id;
private Integer id;
private String sizeName;
private Short sortId;
private Integer sortId;
private Integer orderBy;
... ... @@ -13,11 +13,11 @@ public class Size {
private Integer updateTime;
public Short getId() {
public Integer getId() {
return id;
}
public void setId(Short id) {
public void setId(Integer id) {
this.id = id;
}
... ... @@ -29,11 +29,11 @@ public class Size {
this.sizeName = sizeName;
}
public Short getSortId() {
public Integer getSortId() {
return sortId;
}
public void setSortId(Short sortId) {
public void setSortId(Integer sortId) {
this.sortId = sortId;
}
... ...
... ... @@ -7,7 +7,7 @@ public class Storage {
private Integer goodsId;
private Short sizeId;
private Integer sizeId;
private Integer storageNum;
... ... @@ -39,11 +39,11 @@ public class Storage {
this.goodsId = goodsId;
}
public Short getSizeId() {
public Integer getSizeId() {
return sizeId;
}
public void setSizeId(Short sizeId) {
public void setSizeId(Integer sizeId) {
this.sizeId = sizeId;
}
... ...
... ... @@ -9,7 +9,7 @@ public class StoragePrice {
private Integer goodsId;
private Short storageId;
private Integer storageId;
private Integer depotNum;
... ... @@ -17,7 +17,7 @@ public class StoragePrice {
private BigDecimal price;
private Byte status;
private Integer status;
private Integer updateTime;
... ... @@ -47,11 +47,11 @@ public class StoragePrice {
this.goodsId = goodsId;
}
public Short getStorageId() {
public Integer getStorageId() {
return storageId;
}
public void setStorageId(Short storageId) {
public void setStorageId(Integer storageId) {
this.storageId = storageId;
}
... ... @@ -79,11 +79,11 @@ public class StoragePrice {
this.price = price;
}
public Byte getStatus() {
public Integer getStatus() {
return status;
}
public void setStatus(Byte status) {
public void setStatus(Integer status) {
this.status = status;
}
... ...
... ... @@ -2,28 +2,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yohoufo.dal.product.BrandMapper">
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.Brand">
<id column="id" jdbcType="SMALLINT" property="id" />
<id column="id" jdbcType="INTEGER" property="id" />
<result column="brand_name" jdbcType="VARCHAR" property="brandName" />
<result column="brand_name_en" jdbcType="VARCHAR" property="brandNameEn" />
<result column="brand_log" jdbcType="VARCHAR" property="brandLog" />
<result column="brand_search" jdbcType="VARCHAR" property="brandSearch" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="INTEGER" property="createTime" />
<result column="edit_time" jdbcType="INTEGER" property="editTime" />
<result column="edit_pid" jdbcType="INTEGER" property="editPid" />
<result column="order_by" jdbcType="INTEGER" property="orderBy" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from brand
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yohoufo.dal.product.model.Brand">
insert into brand (id, brand_name, brand_name_en,
brand_log, brand_search, status,
create_time, edit_time, edit_pid
create_time, edit_time, edit_pid, order_by
)
values (#{id,jdbcType=SMALLINT}, #{brandName,jdbcType=VARCHAR}, #{brandNameEn,jdbcType=VARCHAR},
#{brandLog,jdbcType=VARCHAR}, #{brandSearch,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT},
#{createTime,jdbcType=INTEGER}, #{editTime,jdbcType=INTEGER}, #{editPid,jdbcType=INTEGER}
values (#{id,jdbcType=INTEGER}, #{brandName,jdbcType=VARCHAR}, #{brandNameEn,jdbcType=VARCHAR},
#{brandLog,jdbcType=VARCHAR}, #{brandSearch,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=INTEGER}, #{editTime,jdbcType=INTEGER}, #{editPid,jdbcType=INTEGER}, #{orderBy,jdbcType=INTEGER}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.Brand">
... ... @@ -32,21 +33,22 @@
brand_name_en = #{brandNameEn,jdbcType=VARCHAR},
brand_log = #{brandLog,jdbcType=VARCHAR},
brand_search = #{brandSearch,jdbcType=VARCHAR},
status = #{status,jdbcType=TINYINT},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER},
edit_time = #{editTime,jdbcType=INTEGER},
edit_pid = #{editPid,jdbcType=INTEGER}
where id = #{id,jdbcType=SMALLINT}
edit_pid = #{editPid,jdbcType=INTEGER},
order_by = #{orderBy,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, brand_name, brand_name_en, brand_log, brand_search, status, create_time,
edit_time, edit_pid
edit_time, edit_pid, order_by
from brand
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, brand_name, brand_name_en, brand_log, brand_search, status, create_time,
edit_time, edit_pid
edit_time, edit_pid, order_by
from brand
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -2,40 +2,40 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yohoufo.dal.product.BrandSeriesMapper">
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.BrandSeries">
<id column="id" jdbcType="SMALLINT" property="id" />
<id column="id" jdbcType="INTEGER" property="id" />
<result column="series_name" jdbcType="VARCHAR" property="seriesName" />
<result column="series_search" jdbcType="VARCHAR" property="seriesSearch" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="INTEGER" property="createTime" />
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
<result column="brand_id" jdbcType="INTEGER" property="brandId" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from brand_series
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yohoufo.dal.product.model.BrandSeries">
insert into brand_series (id, series_name, series_search,
status, create_time, update_time,
brand_id)
values (#{id,jdbcType=SMALLINT}, #{seriesName,jdbcType=VARCHAR}, #{seriesSearch,jdbcType=VARCHAR},
#{status,jdbcType=TINYINT}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER},
values (#{id,jdbcType=INTEGER}, #{seriesName,jdbcType=VARCHAR}, #{seriesSearch,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER},
#{brandId,jdbcType=INTEGER})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.BrandSeries">
update brand_series
set series_name = #{seriesName,jdbcType=VARCHAR},
series_search = #{seriesSearch,jdbcType=VARCHAR},
status = #{status,jdbcType=TINYINT},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER},
brand_id = #{brandId,jdbcType=INTEGER}
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, series_name, series_search, status, create_time, update_time, brand_id
from brand_series
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, series_name, series_search, status, create_time, update_time, brand_id
... ...
... ... @@ -7,7 +7,7 @@
<result column="product_id" jdbcType="INTEGER" property="productId" />
<result column="is_default" jdbcType="CHAR" property="isDefault" />
<result column="image_url" jdbcType="VARCHAR" property="imageUrl" />
<result column="order_by" jdbcType="TINYINT" property="orderBy" />
<result column="order_by" jdbcType="INTEGER" property="orderBy" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from goods_images
... ... @@ -18,7 +18,7 @@
is_default, image_url, order_by
)
values (#{id,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER},
#{isDefault,jdbcType=CHAR}, #{imageUrl,jdbcType=VARCHAR}, #{orderBy,jdbcType=TINYINT}
#{isDefault,jdbcType=CHAR}, #{imageUrl,jdbcType=VARCHAR}, #{orderBy,jdbcType=INTEGER}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.GoodsImages">
... ... @@ -27,7 +27,7 @@
product_id = #{productId,jdbcType=INTEGER},
is_default = #{isDefault,jdbcType=CHAR},
image_url = #{imageUrl,jdbcType=VARCHAR},
order_by = #{orderBy,jdbcType=TINYINT}
order_by = #{orderBy,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
... ...
... ... @@ -4,7 +4,7 @@
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.Goods">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="product_id" jdbcType="INTEGER" property="productId" />
<result column="color_id" jdbcType="SMALLINT" property="colorId" />
<result column="color_id" jdbcType="INTEGER" property="colorId" />
<result column="color_name" jdbcType="VARCHAR" property="colorName" />
<result column="goods_name" jdbcType="VARCHAR" property="goodsName" />
<result column="color_image" jdbcType="VARCHAR" property="colorImage" />
... ... @@ -18,14 +18,14 @@
insert into goods (id, product_id, color_id,
color_name, goods_name, color_image,
is_default)
values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, #{colorId,jdbcType=SMALLINT},
values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, #{colorId,jdbcType=INTEGER},
#{colorName,jdbcType=VARCHAR}, #{goodsName,jdbcType=VARCHAR}, #{colorImage,jdbcType=VARCHAR},
#{isDefault,jdbcType=CHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.Goods">
update goods
set product_id = #{productId,jdbcType=INTEGER},
color_id = #{colorId,jdbcType=SMALLINT},
color_id = #{colorId,jdbcType=INTEGER},
color_name = #{colorName,jdbcType=VARCHAR},
goods_name = #{goodsName,jdbcType=VARCHAR},
color_image = #{colorImage,jdbcType=VARCHAR},
... ...
... ... @@ -2,22 +2,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yohoufo.dal.product.ProductColorMapper">
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.ProductColor">
<id column="id" jdbcType="SMALLINT" property="id" />
<id column="id" jdbcType="INTEGER" property="id" />
<result column="color_name" jdbcType="VARCHAR" property="colorName" />
<result column="color_code" jdbcType="VARCHAR" property="colorCode" />
<result column="color_value" jdbcType="VARCHAR" property="colorValue" />
<result column="create_time" jdbcType="INTEGER" property="createTime" />
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from product_color
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yohoufo.dal.product.model.ProductColor">
insert into product_color (id, color_name, color_code,
color_value, create_time, update_time
)
values (#{id,jdbcType=SMALLINT}, #{colorName,jdbcType=VARCHAR}, #{colorCode,jdbcType=VARCHAR},
values (#{id,jdbcType=INTEGER}, #{colorName,jdbcType=VARCHAR}, #{colorCode,jdbcType=VARCHAR},
#{colorValue,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}
)
</insert>
... ... @@ -28,12 +28,12 @@
color_value = #{colorValue,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER}
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, color_name, color_code, color_value, create_time, update_time
from product_color
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, color_name, color_code, color_value, create_time, update_time
... ...
... ... @@ -5,9 +5,10 @@
<id column="id" jdbcType="INTEGER" property="id" />
<result column="product_name" jdbcType="VARCHAR" property="productName" />
<result column="product_code" jdbcType="VARCHAR" property="productCode" />
<result column="sort_id" jdbcType="SMALLINT" property="sortId" />
<result column="brand_id" jdbcType="SMALLINT" property="brandId" />
<result column="series_id" jdbcType="SMALLINT" property="seriesId" />
<result column="max_sort_id" jdbcType="INTEGER" property="maxSortId" />
<result column="mid_sort_id" jdbcType="INTEGER" property="midSortId" />
<result column="brand_id" jdbcType="INTEGER" property="brandId" />
<result column="series_id" jdbcType="INTEGER" property="seriesId" />
<result column="gender" jdbcType="CHAR" property="gender" />
<result column="sale_time" jdbcType="INTEGER" property="saleTime" />
<result column="min_price" jdbcType="DECIMAL" property="minPrice" />
... ... @@ -16,10 +17,10 @@
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
<result column="shelve_time" jdbcType="INTEGER" property="shelveTime" />
<result column="edit_time" jdbcType="INTEGER" property="editTime" />
<result column="shelve_status" jdbcType="TINYINT" property="shelveStatus" />
<result column="shelve_status" jdbcType="INTEGER" property="shelveStatus" />
<result column="storage" jdbcType="INTEGER" property="storage" />
<result column="key_words" jdbcType="VARCHAR" property="keyWords" />
<result column="del_status" jdbcType="TINYINT" property="delStatus" />
<result column="del_status" jdbcType="INTEGER" property="delStatus" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from product
... ... @@ -27,27 +28,28 @@
</delete>
<insert id="insert" parameterType="com.yohoufo.dal.product.model.Product">
insert into product (id, product_name, product_code,
sort_id, brand_id, series_id,
max_sort_id, mid_sort_id, brand_id, series_id,
gender, sale_time, min_price,
max_price, create_time, update_time,
shelve_time, edit_time, shelve_status,
storage, key_words, del_status
)
values (#{id,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR}, #{productCode,jdbcType=VARCHAR},
#{sortId,jdbcType=SMALLINT}, #{brandId,jdbcType=SMALLINT}, #{seriesId,jdbcType=SMALLINT},
#{maxSortId,jdbcType=INTEGER}, #{midSortId,jdbcType=INTEGER}, #{brandId,jdbcType=INTEGER}, #{seriesId,jdbcType=INTEGER},
#{gender,jdbcType=CHAR}, #{saleTime,jdbcType=INTEGER}, #{minPrice,jdbcType=DECIMAL},
#{maxPrice,jdbcType=DECIMAL}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER},
#{shelveTime,jdbcType=INTEGER}, #{editTime,jdbcType=INTEGER}, #{shelveStatus,jdbcType=TINYINT},
#{storage,jdbcType=INTEGER}, #{keyWords,jdbcType=VARCHAR}, #{delStatus,jdbcType=TINYINT}
#{shelveTime,jdbcType=INTEGER}, #{editTime,jdbcType=INTEGER}, #{shelveStatus,jdbcType=INTEGER},
#{storage,jdbcType=INTEGER}, #{keyWords,jdbcType=VARCHAR}, #{delStatus,jdbcType=INTEGER}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.Product">
update product
set product_name = #{productName,jdbcType=VARCHAR},
product_code = #{productCode,jdbcType=VARCHAR},
sort_id = #{sortId,jdbcType=SMALLINT},
brand_id = #{brandId,jdbcType=SMALLINT},
series_id = #{seriesId,jdbcType=SMALLINT},
max_sort_id = #{maxSortId,jdbcType=INTEGER},
mid_sort_id = #{midSortId,jdbcType=INTEGER},
brand_id = #{brandId,jdbcType=INTEGER},
series_id = #{seriesId,jdbcType=INTEGER},
gender = #{gender,jdbcType=CHAR},
sale_time = #{saleTime,jdbcType=INTEGER},
min_price = #{minPrice,jdbcType=DECIMAL},
... ... @@ -56,21 +58,21 @@
update_time = #{updateTime,jdbcType=INTEGER},
shelve_time = #{shelveTime,jdbcType=INTEGER},
edit_time = #{editTime,jdbcType=INTEGER},
shelve_status = #{shelveStatus,jdbcType=TINYINT},
shelve_status = #{shelveStatus,jdbcType=INTEGER},
storage = #{storage,jdbcType=INTEGER},
key_words = #{keyWords,jdbcType=VARCHAR},
del_status = #{delStatus,jdbcType=TINYINT}
del_status = #{delStatus,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, product_name, product_code, sort_id, brand_id, series_id, gender, sale_time,
select id, product_name, product_code, max_sort_id, mid_sort_id, brand_id, series_id, gender, sale_time,
min_price, max_price, create_time, update_time, shelve_time, edit_time, shelve_status,
storage, key_words, del_status
from product
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, product_name, product_code, sort_id, brand_id, series_id, gender, sale_time,
select id, product_name, product_code, max_sort_id, mid_sort_id, brand_id, series_id, gender, sale_time,
min_price, max_price, create_time, update_time, shelve_time, edit_time, shelve_status,
storage, key_words, del_status
from product
... ...
... ... @@ -2,37 +2,43 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yohoufo.dal.product.ProductSortMapper">
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.ProductSort">
<id column="id" jdbcType="SMALLINT" property="id" />
<id column="id" jdbcType="INTEGER" property="id" />
<result column="sort_name" jdbcType="VARCHAR" property="sortName" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="INTEGER" property="createTime" />
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
<result column="order_by" jdbcType="INTEGER" property="orderBy" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from product_sort
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yohoufo.dal.product.model.ProductSort">
insert into product_sort (id, sort_name, status,
create_time, update_time)
values (#{id,jdbcType=SMALLINT}, #{sortName,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT},
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER})
insert into product_sort (id, sort_name, `level`, parent_id, status,
create_time, update_time, order_by)
values (#{id,jdbcType=INTEGER}, #{sortName,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{orderBy,jdbcType=INTEGER})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.ProductSort">
update product_sort
set sort_name = #{sortName,jdbcType=VARCHAR},
status = #{status,jdbcType=TINYINT},
status = #{status,jdbcType=INTEGER},
`level` = #{level,jdbcType=INTEGER},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER}
where id = #{id,jdbcType=SMALLINT}
update_time = #{updateTime,jdbcType=INTEGER},
order_by = #{orderBy,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
select id, sort_name, status, create_time, update_time
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, sort_name, `level`, parent_id, status, create_time, update_time, order_by
from product_sort
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, sort_name, status, create_time, update_time
select id, sort_name, `level`, parent_id, status, create_time, update_time, order_by
from product_sort
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -2,38 +2,38 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yohoufo.dal.product.SizeMapper">
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.Size">
<id column="id" jdbcType="SMALLINT" property="id" />
<id column="id" jdbcType="INTEGER" property="id" />
<result column="size_name" jdbcType="VARCHAR" property="sizeName" />
<result column="sort_id" jdbcType="SMALLINT" property="sortId" />
<result column="sort_id" jdbcType="INTEGER" property="sortId" />
<result column="order_by" jdbcType="INTEGER" property="orderBy" />
<result column="create_time" jdbcType="INTEGER" property="createTime" />
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from size
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yohoufo.dal.product.model.Size">
insert into size (id, size_name, sort_id,
order_by, create_time, update_time
)
values (#{id,jdbcType=SMALLINT}, #{sizeName,jdbcType=VARCHAR}, #{sortId,jdbcType=SMALLINT},
values (#{id,jdbcType=INTEGER}, #{sizeName,jdbcType=VARCHAR}, #{sortId,jdbcType=INTEGER},
#{orderBy,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.Size">
update size
set size_name = #{sizeName,jdbcType=VARCHAR},
sort_id = #{sortId,jdbcType=SMALLINT},
sort_id = #{sortId,jdbcType=INTEGER},
order_by = #{orderBy,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER}
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, size_name, sort_id, order_by, create_time, update_time
from size
where id = #{id,jdbcType=SMALLINT}
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, size_name, sort_id, order_by, create_time, update_time
... ...
... ... @@ -5,7 +5,7 @@
<id column="id" jdbcType="INTEGER" property="id" />
<result column="product_id" jdbcType="INTEGER" property="productId" />
<result column="goods_id" jdbcType="INTEGER" property="goodsId" />
<result column="size_id" jdbcType="SMALLINT" property="sizeId" />
<result column="size_id" jdbcType="INTEGER" property="sizeId" />
<result column="storage_num" jdbcType="INTEGER" property="storageNum" />
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
<result column="create_time" jdbcType="INTEGER" property="createTime" />
... ... @@ -19,14 +19,14 @@
size_id, storage_num, update_time,
create_time)
values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER},
#{sizeId,jdbcType=SMALLINT}, #{storageNum,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER},
#{sizeId,jdbcType=INTEGER}, #{storageNum,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER},
#{createTime,jdbcType=INTEGER})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.Storage">
update storage
set product_id = #{productId,jdbcType=INTEGER},
goods_id = #{goodsId,jdbcType=INTEGER},
size_id = #{sizeId,jdbcType=SMALLINT},
size_id = #{sizeId,jdbcType=INTEGER},
storage_num = #{storageNum,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER}
... ...
... ... @@ -5,11 +5,11 @@
<id column="id" jdbcType="INTEGER" property="id" />
<result column="product_id" jdbcType="INTEGER" property="productId" />
<result column="goods_id" jdbcType="INTEGER" property="goodsId" />
<result column="storage_id" jdbcType="SMALLINT" property="storageId" />
<result column="storage_id" jdbcType="INTEGER" property="storageId" />
<result column="depot_num" jdbcType="INTEGER" property="depotNum" />
<result column="seller_uid" jdbcType="INTEGER" property="sellerUid" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
<result column="create_time" jdbcType="INTEGER" property="createTime" />
</resultMap>
... ... @@ -23,15 +23,15 @@
price, status, update_time,
create_time)
values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER},
#{storageId,jdbcType=SMALLINT}, #{depotNum,jdbcType=INTEGER}, #{sellerUid,jdbcType=INTEGER},
#{price,jdbcType=DECIMAL}, #{status,jdbcType=TINYINT}, #{updateTime,jdbcType=INTEGER},
#{storageId,jdbcType=INTEGER}, #{depotNum,jdbcType=INTEGER}, #{sellerUid,jdbcType=INTEGER},
#{price,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER},
#{createTime,jdbcType=INTEGER})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.StoragePrice">
update storage_price
set product_id = #{productId,jdbcType=INTEGER},
goods_id = #{goodsId,jdbcType=INTEGER},
storage_id = #{storageId,jdbcType=SMALLINT},
storage_id = #{storageId,jdbcType=INTEGER},
depot_num = #{depotNum,jdbcType=INTEGER},
seller_uid = #{sellerUid,jdbcType=INTEGER},
price = #{price,jdbcType=DECIMAL},
... ...