johnswang
2022-01-15 22907b8763fc073011872b637dc23023ef7fb4f4
src/com/yc/api/service/QrService.java
@@ -70,7 +70,6 @@
    }
    @Override
    public Integer updateCart(CartEntity cartEntity) {
        String sql = " set nocount on ;  \n"
                + " update a set Quantity = ?  from t710205 a where CartId = ? \n"
@@ -79,7 +78,7 @@
        Integer ret = null;
        try {
            ret = this.jdbcTemplate.queryForObject(sql, new Object[]{cartEntity.getQuantity(), cartEntity.getCartId()}, Integer.class);
            ret = this.jdbcTemplate.queryForObject(sql, Integer.class,new Object[]{cartEntity.getQuantity(), cartEntity.getCartId()});
        } catch (DataAccessException e) {
            if (e instanceof EmptyResultDataAccessException) {
                return null;
@@ -429,6 +428,7 @@
                throw new ApplicationException("保存购物车商品,删除原有商品不成功");
            }
        }
        for (CartEntity cartEntity : carts) {
            Map<String, Integer> map = new HashMap<>();
            BeanUtils.copyProperties(cartEntity, cart);
@@ -464,7 +464,9 @@
            //cart.set
            //不刷新价格
            cart.setRefreshPrice(false);
            map.put(cart.getMatCode(), cartIfc.addToCart(cart));
            cart.setShopCcCode(null);
            map.put(cart.getMatCode(), cartIfc.addToCartAndReturnCartId(cart));
            result.add(map);
        }
        return result;