商品SKU功能优化
This commit is contained in:
@@ -60,14 +60,8 @@ public class OmsCartItemServiceImpl implements OmsCartItemService {
|
||||
OmsCartItemExample example = new OmsCartItemExample();
|
||||
OmsCartItemExample.Criteria criteria = example.createCriteria().andMemberIdEqualTo(cartItem.getMemberId())
|
||||
.andProductIdEqualTo(cartItem.getProductId()).andDeleteStatusEqualTo(0);
|
||||
if (!StringUtils.isEmpty(cartItem.getSp1())) {
|
||||
criteria.andSp1EqualTo(cartItem.getSp1());
|
||||
}
|
||||
if (!StringUtils.isEmpty(cartItem.getSp2())) {
|
||||
criteria.andSp2EqualTo(cartItem.getSp2());
|
||||
}
|
||||
if (!StringUtils.isEmpty(cartItem.getSp3())) {
|
||||
criteria.andSp3EqualTo(cartItem.getSp3());
|
||||
if (!StringUtils.isEmpty(cartItem.getProductSkuId())) {
|
||||
criteria.andProductSkuIdEqualTo(cartItem.getProductSkuId());
|
||||
}
|
||||
List<OmsCartItem> cartItemList = cartItemMapper.selectByExample(example);
|
||||
if (!CollectionUtils.isEmpty(cartItemList)) {
|
||||
|
||||
@@ -5,20 +5,18 @@
|
||||
insert into oms_order_item (order_id, order_sn, product_id,
|
||||
product_pic, product_name, product_brand,
|
||||
product_sn, product_price, product_quantity,
|
||||
product_sku_id, product_category_id, product_sku_code,
|
||||
sp1, sp2, sp3, promotion_name,
|
||||
product_sku_id, product_category_id, product_sku_code,promotion_name,
|
||||
promotion_amount, coupon_amount, integration_amount,
|
||||
real_amount) values
|
||||
real_amount,product_attr) values
|
||||
<foreach collection="list" item="item" separator="," index="index">
|
||||
(#{item.orderId,jdbcType=BIGINT}, #{item.orderSn,jdbcType=VARCHAR}, #{item.productId,jdbcType=BIGINT},
|
||||
#{item.productPic,jdbcType=VARCHAR}, #{item.productName,jdbcType=VARCHAR}, #{item.productBrand,jdbcType=VARCHAR},
|
||||
#{item.productSn,jdbcType=VARCHAR}, #{item.productPrice,jdbcType=DECIMAL}, #{item.productQuantity,jdbcType=INTEGER},
|
||||
#{item.productSkuId,jdbcType=BIGINT}, #{item.productCategoryId,jdbcType=BIGINT}, #{item.productSkuCode,jdbcType=VARCHAR},
|
||||
#{item.sp1,jdbcType=VARCHAR}, #{item.sp2,jdbcType=VARCHAR}, #{item.sp3,jdbcType=VARCHAR},
|
||||
#{item.promotionName,jdbcType=VARCHAR},
|
||||
#{item.promotionAmount,jdbcType=DECIMAL}, #{item.couponAmount,jdbcType=DECIMAL},
|
||||
#{item.integrationAmount,jdbcType=DECIMAL},
|
||||
#{item.realAmount,jdbcType=DECIMAL})
|
||||
#{item.realAmount,jdbcType=DECIMAL},#{item.productAttr,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -31,9 +31,6 @@
|
||||
ps.id sku_id,
|
||||
ps.sku_code sku_code,
|
||||
ps.price sku_price,
|
||||
ps.sp1 sku_sp1,
|
||||
ps.sp2 sku_sp2,
|
||||
ps.sp3 sku_sp3,
|
||||
ps.stock sku_stock,
|
||||
ps.pic sku_pic
|
||||
FROM
|
||||
|
||||
Reference in New Issue
Block a user