Authored by zhaojun2

fix storageprice dal

... ... @@ -5,6 +5,8 @@ import java.math.BigDecimal;
public class StoragePrice {
private Integer id;
private Integer skup;
private Integer productId;
private Integer goodsId;
... ... @@ -31,6 +33,14 @@ public class StoragePrice {
this.id = id;
}
public Integer getSkup() {
return skup;
}
public void setSkup(Integer skup) {
this.skup = skup;
}
public Integer getProductId() {
return productId;
}
... ...
... ... @@ -3,6 +3,7 @@
<mapper namespace="com.yohoufo.dal.product.StoragePriceMapper">
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.StoragePrice">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="skup" jdbcType="INTEGER" property="skup" />
<result column="product_id" jdbcType="INTEGER" property="productId" />
<result column="goods_id" jdbcType="INTEGER" property="goodsId" />
<result column="storage_id" jdbcType="INTEGER" property="storageId" />
... ... @@ -18,18 +19,19 @@
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yohoufo.dal.product.model.StoragePrice">
insert into storage_price (id, product_id, goods_id,
insert into storage_price (id, skup, product_id, goods_id,
storage_id, depot_num, seller_uid,
price, status, update_time,
create_time)
values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER},
values (#{id,jdbcType=INTEGER}, #{skup,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, #{goodsId,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},
set skup = #{skup,jdbcType=INTEGER},
product_id = #{productId,jdbcType=INTEGER},
goods_id = #{goodsId,jdbcType=INTEGER},
storage_id = #{storageId,jdbcType=INTEGER},
depot_num = #{depotNum,jdbcType=INTEGER},
... ... @@ -41,13 +43,13 @@
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, product_id, goods_id, storage_id, depot_num, seller_uid, price, status,
select id, skup, product_id, goods_id, storage_id, depot_num, seller_uid, price, status,
update_time, create_time
from storage_price
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, product_id, goods_id, storage_id, depot_num, seller_uid, price, status,
select id, skup, product_id, goods_id, storage_id, depot_num, seller_uid, price, status,
update_time, create_time
from storage_price
</select>
... ...