@@ -91,8 +92,8 @@ public class CartServiceImpl implements CartService {
* @return: Integer
* @throws
*/
publicIntegercount(StringshopNO){
returnjdbcTemplate.queryForInt("select count(1) from tCart where sShopNO = '"+shopNO+"'");
publicIntegercount(StringorgNo,StringshopNO){
returnjdbcTemplate.queryForInt("select count(1) from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"'");
}
...
...
@@ -108,6 +109,7 @@ public class CartServiceImpl implements CartService {
*/
@Override
publicStringremove(JSONObjectobj,Stringterminal){
StringorgNo=obj.getString("orgNo");
StringshopNO=obj.getString("shopNO");
JSONArrayidxArray=obj.getJSONArray("idxs");
System.out.println("idxArray----"+idxArray);
...
...
@@ -120,13 +122,13 @@ public class CartServiceImpl implements CartService {
}
}
Stringsql="select sPromoPaperNO from tCart where sShopNO = '"+shopNO+"' and nTag = 0"+StringUtil.join(", "," and nIdx in (",")",nIdx);
sql="delete from tCart where sShopNO = '"+shopNO+"' and nTag = 1 and sPromoPaperNO in ("+sql+")";
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 sShopNO = '"+shopNO+"'"+StringUtil.join(", "," and nIdx in (",")",nIdx));
jdbcTemplate.executeUpdate("delete from tCart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNO+"'"+StringUtil.join(", "," and nIdx in (",")",nIdx));