@Test public void testDeleteCommodity() throws Exception { }
@Override public boolean deleteCommodity(Long accountId, Long commId) { if (null == accountId || null == commId) return false; ShoppingCart shopping = new ShoppingCart(); shopping.setUserAccountId(accountId); shopping.setCommodityId(commId); return mapper.delete(mapper.selectOne(shopping)) > 0; }
ShoppingCartServiceImpl implements IShoppingCartService { @Override public boolean deleteCommodity(Long accountId, Long commId) { if (null == accountId || null == commId) return false; ShoppingCart shopping = new ShoppingCart(); shopping.setUserAccountId(accountId); shopping.setCommodityId(commId); return mapper.delete(mapper.selectOne(shopping)) > 0; } }
ShoppingCartServiceImpl implements IShoppingCartService { @Override public boolean deleteCommodity(Long accountId, Long commId) { if (null == accountId || null == commId) return false; ShoppingCart shopping = new ShoppingCart(); shopping.setUserAccountId(accountId); shopping.setCommodityId(commId); return mapper.delete(mapper.selectOne(shopping)) > 0; }  }
ShoppingCartServiceImpl implements IShoppingCartService { @Override public boolean deleteCommodity(Long accountId, Long commId) { if (null == accountId || null == commId) return false; ShoppingCart shopping = new ShoppingCart(); shopping.setUserAccountId(accountId); shopping.setCommodityId(commId); return mapper.delete(mapper.selectOne(shopping)) > 0; }  @Override boolean addCommodityToCart(Long accountId, Long commId, Integer count); @Override boolean deleteCommodity(Long accountId, Long commId); @Override boolean updateCommodity(Long accountId, Long commId, Integer count); @Override List<Map<String, Object>> selectByAccount(Long accountId); }
ShoppingCartServiceImpl implements IShoppingCartService { @Override public boolean deleteCommodity(Long accountId, Long commId) { if (null == accountId || null == commId) return false; ShoppingCart shopping = new ShoppingCart(); shopping.setUserAccountId(accountId); shopping.setCommodityId(commId); return mapper.delete(mapper.selectOne(shopping)) > 0; }  @Override boolean addCommodityToCart(Long accountId, Long commId, Integer count); @Override boolean deleteCommodity(Long accountId, Long commId); @Override boolean updateCommodity(Long accountId, Long commId, Integer count); @Override List<Map<String, Object>> selectByAccount(Long accountId);  }