Commit fa0b6033 authored by 张永's avatar 张永

1

parent 6c59cb0c
......@@ -942,11 +942,11 @@ public class CartQueryServiceImpl implements CartQueryService {
+ "(" + sqlPromoTag + ") pn "
+ "WHERE pn.nTag&2 != 2 OR pn.nTag&1 = 1 OR GETDATE() < pn.dPromoBeginDate OR GETDATE() >= pn.dPromoEndDate";
String sqlClear = ""
+ "EXEC up_RestorePromoGiftRec '" + shopNo + "'" + Util.LINE_SEPARATOR
+ "EXEC up_RestorePromoGiftRec '" + shopNo + "'";
//+ "DELETE mmm FROM tCart mmm WHERE mmm.sShopNO = '" + shopNo + "' AND EXISTS ( SELECT NULL FROM tAgentContractGoods nnn WHERE nnn.nGoodsID = mmm.nGoodsID AND nnn.sAgentContractNO = mmm.sAgentContractNO AND (nnn.nTag & 16 = 0 or nnn.nTag & 1 = 1) AND mmm.sShopNO = '" + shopNo + "' )" + Util.LINE_SEPARATOR
+ "DELETE tCart WHERE sShopNO = '" + shopNo + "' AND nTag = 1 AND sPromoPaperNO IN (" + sqlClearPromoNo + ")" + Util.LINE_SEPARATOR
+ "UPDATE tCart SET sPromoGroupNO = NULL, sPromoPaperNO = NULL WHERE sShopNO = '" + shopNo + "' AND sPromoPaperNO IN (" + sqlClearPromoNo + ")" + Util.LINE_SEPARATOR
+ "UPDATE tCart SET sPromoGroupNO = NULL, sPromoPaperNO = NULL WHERE sShopNO = '" + shopNo + "' AND sPromoPaperNO NOT IN (" + sqlCustBwList + ")";
//+ "DELETE tCart WHERE sShopNO = '" + shopNo + "' AND nTag = 1 AND sPromoPaperNO IN (" + sqlClearPromoNo + ")" + Util.LINE_SEPARATOR
//+ "UPDATE tCart SET sPromoGroupNO = NULL, sPromoPaperNO = NULL WHERE sShopNO = '" + shopNo + "' AND sPromoPaperNO IN (" + sqlClearPromoNo + ")" + Util.LINE_SEPARATOR
//+ "UPDATE tCart SET sPromoGroupNO = NULL, sPromoPaperNO = NULL WHERE sShopNO = '" + shopNo + "' AND sPromoPaperNO NOT IN (" + sqlCustBwList + ")";
String sqlACart = "select t.*, ap.nRealSalePrice nApSalePrice from V_Cart t left join tAgentCustTypePrice ap on ap.sCustTypeID = '" + sCustTypeID + "' and ap.sAgentContractNO = t.sAgentContractNO and ap.nGoodsID = t.nGoodsID where t.sOrgNO = '" + orgNo + "' and t.sShopNO = '" + shopNo + "' order by t.nIdx";
String sqlp = ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment