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",
# p.unit,
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(skuId, productId, mallProductId, minBuyNumber, price)
VALUES (#{skuId}, #{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}
INSERT INTO cm_organize_product(
organizeId,
productId,
ladderPriceFlag,
price,
includedTax,
invoiceType,
clubTaxPoint,
shopTaxPoint,
minBuyNumber,
costType,
costPrice,
costProportional,
addTime
) VALUES (
#{organizeId},
#{productId},
#{ladderPriceFlag},
#{price},
#{includedTax},
#{invoiceType},
#{clubTaxPoint},
#{shopTaxPoint},
#{minBuyNumber},
#{costType},
#{costPrice},
#{costProportional},
#{addTime}
)
insert into organize_product_ladder_price(
productId, ladderNum, buyNum, buyPrice
) values (#{productId},#{ladderNum},#{buyNum},#{buyPrice})
UPDATE cm_organize_product SET
ladderPriceFlag = #{ladderPriceFlag},
price = #{price},
includedTax = #{includedTax},
invoiceType = #{invoiceType},
clubTaxPoint = #{clubTaxPoint},
shopTaxPoint = #{shopTaxPoint},
minBuyNumber = #{minBuyNumber},
costType = #{costType},
costPrice = #{costPrice},
costProportional = #{costProportional},
status = #{status},
addTime = #{addTime},
delFlag = #{delFlag}
WHERE id = #{id}
UPDATE cm_organize_product SET
status = #{status}
WHERE id = #{id}
update organize_product_ladder_price
set productId = #{productId},ladderNum = #{ladderNum},buyNum=#{buyNum},buyPrice=#{buyPrice}
where id = #{id}
update cm_organize_product set ladderPriceFlag = #{ladderPriceFlag} where id = #{productId}
UPDATE cm_organize_product set delFlag = 1 where id = #{id}
delete from organize_product_ladder_price where id = #{ladderId}