jdbcTemplate.executeUpdate("update tCart set sPromoPaperNO = ?, sPromoGroupNO = ? where sOrgNO = ? and sShopNO = ? and sAgentContractNO = ? and nGoodsID = ? and nTag = ? and (sPromoPaperNO is null or sPromoPaperNO = '')",sPromoPaperNO,sPromoGroupNO,orgNo,shopNO,sAgentContractNO,nGoodsID,nGoodsTypeID);
jdbcTemplate.executeUpdate("update tCart set sPromoPaperNO = ?, sPromoGroupNO = ? where sOrgNO = ? and sShopNO = ? and sAgentContractNO = ? and nGoodsID = ? and nTag = ? and (sPromoPaperNO is null or sPromoPaperNO = '')",sPromoPaperNO,sPromoGroupNO,orgNo,shopNO,sAgentContractNO,nGoodsID,nGoodsTypeID);
Stringsql="select sPromoPaperNO from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"' and nTag = 0"+StringUtil.join(", "," and nIdx in (",")",nIdx);
Stringsql="select sPromoPaperNO from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"' and nTag = 0"+StringUtil.join(", "," and nIdx in (",")",nIdx);
sql="delete from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"' and nTag = 1 and sPromoPaperNO in ("+sql+")";
Stringsql1="delete from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"' and nTag = 1 and sPromoPaperNO in ("+sql+")";
jdbcTemplate.executeUpdate(sql);
Stringsql2="delete from tCartTempItem where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"' and nTag = 1 and sPromoPaperNO in ("+sql+")";
jdbcTemplate.executeUpdate("delete from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"'"+StringUtil.join(", "," and nIdx in (",")",nIdx));