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

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.model.Page;
import com.iotechn.unimall.data.domain.CustomerInfoDO;
import com.iotechn.unimall.data.dto.CustomerInfoDTO;

/**
 * Generate Code By Unimall
 */
@HttpOpenApi(group = "admin.customerinfo", description = "unimall_customer_infoService")
public interface CustomerInfoService {

    @HttpMethod(description = "删除", permission = "customerInfo:customerinfo:delete", permissionParentName = "其他", permissionName = "CustomerInfo")
    public boolean delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;


    @HttpMethod(description = "查询", permission = "customerInfo:customerinfo:list", permissionParentName = "其他", permissionName = "CustomerInfo")
    public Page<CustomerInfoDO> list(
            @HttpParam(name = "CustomerInfoDTO", type = HttpParamType.COMMON, description = "CustomerInfoDTO") CustomerInfoDTO selectDTO,
            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "添加", permission = "customerInfo:customerinfo:create", permissionParentName = "其他", permissionName = "CustomerInfo")
    public CustomerInfoDO create(
            @HttpParam(name = "CustomerInfoDTO", type = HttpParamType.COMMON, description = "CustomerInfoDTO") CustomerInfoDTO insertDTO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "编辑", permission = "customerInfo:customerinfo:edit", permissionParentName = "其他", permissionName = "CustomerInfo")
    public String edit(
            @HttpParam(name = "CustomerInfoDTO", type = HttpParamType.COMMON, description = "CustomerInfoDTO") CustomerInfoDTO editDTO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    }