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);
sql="delete from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"' and nTag = 1 and sPromoPaperNO in ("+sql+")";
jdbcTemplate.executeUpdate(sql);
jdbcTemplate.executeUpdate("delete from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"'"+StringUtil.join(", "," and nIdx in (",")",nIdx));
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);
Stringsql1="delete from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"' and nTag = 1 and sPromoPaperNO in ("+sql+")";
Stringsql2="delete from tCartTempItem where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"' and nTag = 1 and sPromoPaperNO in ("+sql+")";
jdbcTemplate.executeUpdate(sql1);
jdbcTemplate.executeUpdate(sql2);
jdbcTemplate.executeUpdate("delete from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"'"+StringUtil.join(", "," and nIdx in (",")",nIdx));