Browse Source

增加复制商品功能

abiao 5 years ago
parent
commit
501d06e867
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/product/copy_product.rb

+ 1 - 1
lib/product/copy_product.rb

@@ -61,7 +61,7 @@ module RailsAdmin
               end
               
               # 复制商品图片
-              pictures = ProductPicture.find_by_sql("select * from product_pictures where pit_type=0 and product_id = #{@object.id} limit 1")
+              pictures = ProductPicture.find_by_sql("select * from product_pictures where pic_type=0 and product_id = #{@object.id} limit 1")
               # 创建商品图片
               pictures.each do |u|
                 ProductPicture.create({