package com.ruoyi.frequency.mallshoppingcar.service;

import java.util.List;

import com.ruoyi.controller.req.InsertShoppingCarReq;
import com.ruoyi.controller.req.ShoppingCarCreateOrderReq;
import com.ruoyi.controller.req.ShoppingCartSettlementReq;
import com.ruoyi.frequency.mallshoppingcar.entity.MallShoppingCar;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.response.ResponseData;
import com.ruoyi.vo.PayVo;
import com.ruoyi.vo.UserVo;

/**
 * 购物车Service接口
 *
 * @author liwenlong
 * @date 2024-01-25
 */
public interface MallShoppingCarService extends IService<MallShoppingCar>
{
    /**
     * 查询购物车
     *
     * @param id 购物车主键
     * @return 购物车
     */
    public MallShoppingCar selectMallShoppingCarById(Long id);

    /**
     * 查询购物车列表
     *
     * @param mallShoppingCar 购物车
     * @return 购物车集合
     */
    public List<MallShoppingCar> selectMallShoppingCarList(MallShoppingCar mallShoppingCar);

    /**
     * 新增购物车
     *
     * @param mallShoppingCar 购物车
     * @return 结果
     */
    public int insertMallShoppingCar(MallShoppingCar mallShoppingCar);

    /**
     * 修改购物车
     *
     * @param mallShoppingCar 购物车
     * @return 结果
     */
    public int updateMallShoppingCar(MallShoppingCar mallShoppingCar);

    /**
     * 批量删除购物车
     *
     * @param ids 需要删除的购物车主键集合
     * @return 结果
     */
    public int deleteMallShoppingCarByIds(Long[] ids,Integer delFlag);

    /**
     * 购物车列表
     * @param userVo
     * @return
     */
    ResponseData shoppingCarList(UserVo userVo);

    /**
     * 购物车结算
     * @param req
     * @param userVo
     * @return
     */
    PayVo shoppingCarSettlement(ShoppingCartSettlementReq req, UserVo userVo);

    ResponseData insertShoppingCar(InsertShoppingCarReq req, UserVo userVo);

    ResponseData removeShoppingCarGoods(List<Long> ids, UserVo userVo);

    ResponseData shoppingCarCreateOrder(ShoppingCarCreateOrderReq req, UserVo userVo);

}
