package com.iotechn.unimall.admin.api.market;


import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.market.MarketProdectInfo;
import com.iotechn.unimall.data.model.Page;

import java.util.Date;

/**
 * 商品信息Service接口
 *
 * @author jlb
 * @date 2022-08-01
 */
@HttpOpenApi(group = "admin.unimall.marketProdectInfo", description = "商品信息")
public interface IMarketProdectInfoService {
    @HttpMethod(description = "新增", permission = "admin:unimall:marketProdectInfo:add", permissionParentName = "宠物管理", permissionName = "商品信息管理")
    public Boolean add(@NotNull @HttpParam(name = "marketProdectInfo", type = HttpParamType.COMMON, description = "商品信息") MarketProdectInfo marketProdectInfo,
                       @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;

    @HttpMethod(description = "列表", permission = "admin:unimall:marketProdectInfo:list", permissionParentName = "宠物管理", permissionName = "商品信息管理")
    public Page<MarketProdectInfo> list(
            @HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
            @HttpParam(name = "prodectName", type = HttpParamType.COMMON, description = "商品名称") String prodectName,
            @HttpParam(name = "classificationKey", type = HttpParamType.COMMON, description = "商品分类key") String classificationKey,
            @HttpParam(name = "classification", type = HttpParamType.COMMON, description = "商品分类") String classification,
            @HttpParam(name = "url", type = HttpParamType.COMMON, description = "封面") String url,
            @HttpParam(name = "productDetails", type = HttpParamType.COMMON, description = "商品详情") String productDetails,
            @HttpParam(name = "commodity price", type = HttpParamType.COMMON, description = "商品售价") Double commodityPrice,
            @HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
            @HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "0：否（默认） 1：是") Integer deleteFlag,
            @HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
            @HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
            @HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
            @HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
            throws ServiceException;

    @HttpMethod(description = "删除", permission = "admin:unimall:marketProdectInfo:delete", permissionParentName = "宠物管理", permissionName = "商品信息管理")
    public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "") String id) throws ServiceException;

    @HttpMethod(description = "修改", permission = "admin:unimall:marketProdectInfo:update", permissionParentName = "宠物管理", permissionName = "商品信息管理")
    public Boolean update(@NotNull @HttpParam(name = "marketProdectInfo", type = HttpParamType.COMMON, description = "商品信息") MarketProdectInfo marketProdectInfo,
                          @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;

    @HttpMethod(description = "查询", permission = "admin:unimall:marketProdectInfo:get", permissionParentName = "宠物管理", permissionName = "商品信息管理")
    public MarketProdectInfo get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "") Long id) throws ServiceException;

    @HttpMethod(description = "导出excl表", permission = "admin:unimall:marketProdectInfo:export", permissionParentName = "宠物管理", permissionName = "商品信息管理")
    public String export(
            @HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
            @HttpParam(name = "prodectName", type = HttpParamType.COMMON, description = "商品名称") String prodectName,
            @HttpParam(name = "classificationKey", type = HttpParamType.COMMON, description = "商品分类key") String classificationKey,
            @HttpParam(name = "classification", type = HttpParamType.COMMON, description = "商品分类") String classification,
            @HttpParam(name = "url", type = HttpParamType.COMMON, description = "封面") String url,
            @HttpParam(name = "productDetails", type = HttpParamType.COMMON, description = "商品详情") String productDetails,
            @HttpParam(name = "commodity price", type = HttpParamType.COMMON, description = "商品售价") Double commodityPrice,
            @HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
            @HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "0：否（默认） 1：是") Integer deleteFlag,
            @HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
            @HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
            @HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
            @HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit) throws ServiceException;

}
