package com.bohuikeji.delivery.backstage.service;

import com.bohuikeji.delivery.backstage.entity.TOpen;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bohuikeji.delivery.backstage.entity.TOrder;
import com.bohuikeji.frame.module.admin.base.ServiceBase;

/**
 * <p>
 * 开放平台账户 服务类
 * </p>
 *
 * @author 10552
 * @since 2021-05-19
 */
public interface ITOpenService extends ServiceBase<TOpen> {

    /**
     * 使用appKey和appSecret查询账户
     * @param appKey
     * @param appSecret
     * @return
     */
    TOpen getOpenBySecret(String appKey,String appSecret);

    /**
     * 是否存在
     * @param openId
     * @return
     */
    boolean isExist(Integer openId);

    /**
     * 使用缓存查询开放平台账户
     * @param id
     * @return
     */
    TOpen getCacheById(Integer id);

    /**
     * 开放平台创建订单初始化
     * @param customerId 客户ID
     * @return
     */
    TOrder openOrderInit(Integer customerId,TOrder order);


}
