| 5432 |
amar.kumar |
1 |
package in.shop2020.user.persistence;
|
|
|
2 |
|
|
|
3 |
import java.util.Date;
|
|
|
4 |
import java.util.List;
|
|
|
5 |
|
|
|
6 |
import org.apache.ibatis.annotations.Param;
|
|
|
7 |
|
|
|
8 |
import in.shop2020.model.v1.user.CartStatus;
|
|
|
9 |
import in.shop2020.model.v1.user.LineStatus;
|
|
|
10 |
import in.shop2020.user.domain.Cart;
|
|
|
11 |
import in.shop2020.user.domain.Line;
|
|
|
12 |
|
|
|
13 |
public interface CartMapper {
|
|
|
14 |
|
|
|
15 |
void createCart(Cart cart);
|
|
|
16 |
|
|
|
17 |
void setUser(@Param("userId") long userId, @Param("id") long id);
|
|
|
18 |
|
|
|
19 |
Cart getCart(long id);
|
|
|
20 |
|
|
|
21 |
List<Cart> getCartsForUser(@Param("userId") long userId, @Param("status") CartStatus status);
|
|
|
22 |
|
|
|
23 |
void changeCartStatus(@Param("cartId") long cartId, @Param("status") int status);
|
|
|
24 |
|
|
|
25 |
List<Cart> getCartsByStatus(int status);
|
|
|
26 |
|
|
|
27 |
List<Cart> getCartsByTime(@Param("from_time") long from_time, @Param("to_time") long to_time,
|
|
|
28 |
@Param("value") int value);
|
|
|
29 |
|
|
|
30 |
long getCartsWithCouponCount(String couponCode);
|
|
|
31 |
|
|
|
32 |
Line getLine(@Param("itemId") long itemId, @Param("cartId") long cartId, @Param("status") long status);
|
|
|
33 |
|
|
|
34 |
void updateLine(Line line);
|
|
|
35 |
|
|
|
36 |
void updateCartUpdatedTime(@Param("date") Date date, @Param("cartId") long cartId);
|
|
|
37 |
|
|
|
38 |
void addAddressToCart(@Param("cartId") long cartId, @Param("addressId") long addressId);
|
|
|
39 |
|
|
|
40 |
void insertDiscount(in.shop2020.user.domain.Discount discount);
|
|
|
41 |
|
|
|
42 |
void updateCart(Cart cart);
|
|
|
43 |
|
|
|
44 |
void insertLine(Line line);
|
|
|
45 |
|
|
|
46 |
void updateLineQuantity(@Param("quantity") long quantity, @Param("cartId") long cartId,
|
|
|
47 |
@Param("itemId") long itemId, @Param("date") Date date);
|
|
|
48 |
|
|
|
49 |
void deleteDiscountForLine(@Param("cartId") long cartId, @Param("itemId") long itemId);
|
|
|
50 |
|
|
|
51 |
void deleteLine(@Param("cartId")long cartId, @Param("itemId")long itemId);
|
|
|
52 |
|
|
|
53 |
void changeCartIdForLine(@Param("fromCartId") long fromCartId, @Param("itemId") long item_id,
|
|
|
54 |
@Param("toCartId")long toCartId);
|
|
|
55 |
|
|
|
56 |
void deActivateCart(long id);
|
|
|
57 |
|
|
|
58 |
void removeLineDiscount(@Param("cartId")long cartId, @Param("itemId")long itemId);
|
|
|
59 |
}
|