a.id AS "id", a.organizeId AS "organizeId", a.productId AS "productId", a.ladderPriceFlag AS "ladderPriceFlag", a.price AS "price", a.includedTax AS "includedTax", a.invoiceType AS "invoiceType", a.clubTaxPoint, a.shopTaxPoint, a.minBuyNumber AS "minBuyNumber", a.costType AS "costType", a.costPrice AS "costPrice", a.costProportional AS "costProportional", a.status AS "status", a.addTime AS "addTime", a.delFlag AS "delFlag", p.name AS "productName", p.mainImage AS "productImage", s.name AS "shopName" left join product p on a.productId = p.productID left join shop s on p.shopID = s.shopID update cm_mall_organize_products set validFlag = #{validFlag} where id = #{id} INSERT INTO cm_mall_organize_products (organizeID, productID, normalPrice, costPrice, ladderPriceFlag, retailPrice, minBuyNumber, validFlag, ADDTIME, updateTime, delFlag) VALUES (#{organizeId}, #{productId}, #{normalPrice}, #{costPrice}, #{ladderPriceFlag}, #{retailPrice}, #{minBuyNumber}, #{status}, #{addTime}, #{updateTime}, #{delFlag}) INSERT INTO cm_mall_product_sku(productId, mallProductId, minBuyNumber, price) VALUES (#{productId}, #{mallProductId}, #{minBuyNumber}, #{price}) update cm_mall_organize_products retailPrice = #{retailPrice}, minBuyNumber = #{minBuyNumber} where id =#{id} update cm_mall_product_sku price = #{price}, minBuyNumber = #{minBuyNumber}, organizePercent = #{organizePercent}, shopPercent = #{shopPercent}, cmPercent = #{cmPercent} where id =#{id} update cm_mall_organize_products set delFlag = 1 where id = #{id} delete from cm_mall_product_sku where mallProductId = #{id}