Authored by mali

自助上架

package com.yohoufo.dal.product;
import com.yohoufo.dal.product.model.ProductSelfShelves;
public interface ProductSelfShelvesMapper {
int deleteByPrimaryKey(Integer id);
int insert(ProductSelfShelves record);
int insertSelective(ProductSelfShelves record);
ProductSelfShelves selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(ProductSelfShelves record);
int updateByPrimaryKey(ProductSelfShelves record);
}
\ No newline at end of file
... ...
package com.yohoufo.dal.product;
import com.yohoufo.dal.product.model.ProductSelfShelvesPic;
public interface ProductSelfShelvesPicMapper {
int deleteByPrimaryKey(Integer id);
int insert(ProductSelfShelvesPic record);
int insertSelective(ProductSelfShelvesPic record);
ProductSelfShelvesPic selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(ProductSelfShelvesPic record);
int updateByPrimaryKey(ProductSelfShelvesPic record);
}
\ No newline at end of file
... ...
package com.yohoufo.dal.product.model;
import java.math.BigDecimal;
public class ProductSelfShelves {
private Integer id;
private String brand;
private String productName;
private BigDecimal price;
private Integer saleTime;
private String productCode;
private Integer status;
private Integer uid;
private Integer createTime;
private Integer updateTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand == null ? null : brand.trim();
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName == null ? null : productName.trim();
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public Integer getSaleTime() {
return saleTime;
}
public void setSaleTime(Integer saleTime) {
this.saleTime = saleTime;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode == null ? null : productCode.trim();
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getUid() {
return uid;
}
public void setUid(Integer uid) {
this.uid = uid;
}
public Integer getCreateTime() {
return createTime;
}
public void setCreateTime(Integer createTime) {
this.createTime = createTime;
}
public Integer getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Integer updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
... ...
package com.yohoufo.dal.product.model;
public class ProductSelfShelvesPic {
private Integer id;
private Integer selfShelvesId;
private String pictureUrl;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getSelfShelvesId() {
return selfShelvesId;
}
public void setSelfShelvesId(Integer selfShelvesId) {
this.selfShelvesId = selfShelvesId;
}
public String getPictureUrl() {
return pictureUrl;
}
public void setPictureUrl(String pictureUrl) {
this.pictureUrl = pictureUrl == null ? null : pictureUrl.trim();
}
}
\ No newline at end of file
... ...
<?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.yohoufo.dal.product.ProductSelfShelvesMapper" >
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.ProductSelfShelves" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="brand" property="brand" jdbcType="VARCHAR" />
<result column="product_name" property="productName" jdbcType="VARCHAR" />
<result column="price" property="price" jdbcType="DECIMAL" />
<result column="sale_time" property="saleTime" jdbcType="INTEGER" />
<result column="product_code" property="productCode" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="uid" property="uid" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
id, brand, product_name, price, sale_time, product_code, status, uid, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from product_self_shelves
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from product_self_shelves
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" >
insert into product_self_shelves (id, brand, product_name,
price, sale_time, product_code,
status, uid, create_time,
update_time)
values (#{id,jdbcType=INTEGER}, #{brand,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR},
#{price,jdbcType=DECIMAL}, #{saleTime,jdbcType=INTEGER}, #{productCode,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER},
#{updateTime,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" >
insert into product_self_shelves
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="brand != null" >
brand,
</if>
<if test="productName != null" >
product_name,
</if>
<if test="price != null" >
price,
</if>
<if test="saleTime != null" >
sale_time,
</if>
<if test="productCode != null" >
product_code,
</if>
<if test="status != null" >
status,
</if>
<if test="uid != null" >
uid,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="updateTime != null" >
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="brand != null" >
#{brand,jdbcType=VARCHAR},
</if>
<if test="productName != null" >
#{productName,jdbcType=VARCHAR},
</if>
<if test="price != null" >
#{price,jdbcType=DECIMAL},
</if>
<if test="saleTime != null" >
#{saleTime,jdbcType=INTEGER},
</if>
<if test="productCode != null" >
#{productCode,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="uid != null" >
#{uid,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=INTEGER},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" >
update product_self_shelves
<set >
<if test="brand != null" >
brand = #{brand,jdbcType=VARCHAR},
</if>
<if test="productName != null" >
product_name = #{productName,jdbcType=VARCHAR},
</if>
<if test="price != null" >
price = #{price,jdbcType=DECIMAL},
</if>
<if test="saleTime != null" >
sale_time = #{saleTime,jdbcType=INTEGER},
</if>
<if test="productCode != null" >
product_code = #{productCode,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="uid != null" >
uid = #{uid,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=INTEGER},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" >
update product_self_shelves
set brand = #{brand,jdbcType=VARCHAR},
product_name = #{productName,jdbcType=VARCHAR},
price = #{price,jdbcType=DECIMAL},
sale_time = #{saleTime,jdbcType=INTEGER},
product_code = #{productCode,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
uid = #{uid,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
<?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.yohoufo.dal.product.ProductSelfShelvesPicMapper" >
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.ProductSelfShelvesPic" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="self_shelves_id" property="selfShelvesId" jdbcType="INTEGER" />
<result column="picture_url" property="pictureUrl" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, self_shelves_id, picture_url
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from product_self_shelves_pic
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from product_self_shelves_pic
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" >
insert into product_self_shelves_pic (id, self_shelves_id, picture_url
)
values (#{id,jdbcType=INTEGER}, #{selfShelvesId,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" >
insert into product_self_shelves_pic
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="selfShelvesId != null" >
self_shelves_id,
</if>
<if test="pictureUrl != null" >
picture_url,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="selfShelvesId != null" >
#{selfShelvesId,jdbcType=INTEGER},
</if>
<if test="pictureUrl != null" >
#{pictureUrl,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" >
update product_self_shelves_pic
<set >
<if test="selfShelvesId != null" >
self_shelves_id = #{selfShelvesId,jdbcType=INTEGER},
</if>
<if test="pictureUrl != null" >
picture_url = #{pictureUrl,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" >
update product_self_shelves_pic
set self_shelves_id = #{selfShelvesId,jdbcType=INTEGER},
picture_url = #{pictureUrl,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...