package com.gree.mall.miniapp.commonmapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gree.mall.miniapp.bean.activity.PromotionActivityBean;
import com.gree.mall.miniapp.bean.chargingstandard.ChargingStandardBean;
import com.gree.mall.miniapp.bean.es.ESGoodsBean;
import com.gree.mall.miniapp.bean.material.MyDataCountBean;
import com.gree.mall.miniapp.bean.order.LeaseOrderVO;
import com.gree.mall.miniapp.bean.user.SettleMonthWagesWorkerBean;
import com.gree.mall.miniapp.bean.websit.WebsitVO;
import com.gree.mall.miniapp.plus.entity.GoodsCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommonMapper {


    /**
     * 收费标准
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    public IPage<ChargingStandardBean> queryChargingStandrdList(IPage page,
                                                                @Param("twoCategoryId") String twoCateogryId,
                                                                @Param("brandId") String brandId,
                                                                @Param("chargingStandardTypeId") String chargingStandardTypeId,
                                                                @Param("type") Integer type,
                                                                @Param("id") String id,
                                                                @Param("companyWechatId") String companyWechatId);

    /**
     * 收费标准
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    public List<ChargingStandardBean> queryChargingStandrdDetailList(
            @Param("twoCategoryId") String twoCateogryId,
            @Param("brandId") String brandId,
            @Param("chargingStandardTypeId") String chargingStandardTypeId,
            @Param("type") Integer type,
            @Param("content1") String content1);


    /**
     * 网点列表
     * @return
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    public List<WebsitVO> websitList(
            @Param("lng") String lng,
            @Param("lat") String lat,
            @Param("websitIds") List<String> websitIds,
            @Param("isIncre") Boolean isIncre,
            @Param("companyWechatId") String companyWechatId);

    /**
     * 我的安维费
     */
    IPage<SettleMonthWagesWorkerBean> queryUserSettle(IPage page, @Param("companyWechatId") String companyWechatId, @Param("userId") String userId);

    /**
     * 租赁商品分类列表
     * @param currentCompanyWechatId
     * @param categoryName
     * @return
     */
    List<GoodsCategory> goodsLeaseCategoryList(@Param("companyWechatId") String currentCompanyWechatId, @Param("categoryName") String categoryName);

    /**
     * 租赁订单列表
     * @param objectPage
     * @param userId
     * @param keyword
     * @param payStatus
     * @param status
     * @param isEndDate
     * @return
     */
    IPage<LeaseOrderVO> leaseOrderList(Page<Object> objectPage,
                                       @Param("userId") String userId,
                                       @Param("keyword") String keyword,
                                       @Param("payStatus") Boolean payStatus,
                                       @Param("status") String status,
                                       @Param("isEndDate") Boolean isEndDate);

    /**
     * 配件申请统计
     * @param userId
     * @return
     */
    MyDataCountBean partsApplyCount(@Param("userId") String userId);

    /**
     * 活动单列表
     * @param page
     * @param companyWechatId
     * @param userId
     * @param promotionQuestionnaireId
     * @return
     */
    List<PromotionActivityBean> promotionActivity(IPage page,
                                                  @Param("companyWechatId") String companyWechatId,
                                                  @Param("userId") String userId,
                                                  @Param("promotionQuestionnaireId") String promotionQuestionnaireId);

    /**
     * 二手商品列表
     * @param page
     * @param companyWechatId
     * @param sortType
     * @param goodsName
     * @param categoryId
     * @param userId
     * @param brand
     * @param power
     * @param mark
     * @param status
     * @return
     */
    IPage<ESGoodsBean> esGoodsList(IPage page,
                                   @Param("companyWechatId") String companyWechatId,
                                   @Param("sortType") String sortType,
                                   @Param("goodsName") String goodsName,
                                   @Param("categoryId") String categoryId,
                                   @Param("userId") String userId,
                                   @Param("brand") String brand,
                                   @Param("power") String power,
                                   @Param("mark") String mark,
                                   @Param("statusList") List<String> status);

    /**
     * 二手置顶商品列表
     * @param companyWechatId
     * @return
     */
    List<ESGoodsBean> esGoodsTopList(@Param("companyWechatId") String companyWechatId);

    /**
     * 二手猜你喜欢
     * @param companyWechatId
     * @param typeName
     * @return
     */
    List<String> guessList(@Param("companyWechatId") String companyWechatId, @Param("typeName") String typeName);
}
