/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 */

package com.yami.shop.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yami.shop.bean.model.ShopWithdrawCash;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.dao.ShopWalletMapper;
import com.yami.shop.bean.model.ShopWallet;
import com.yami.shop.service.ShopWalletService;
import lombok.AllArgsConstructor;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * 商家钱包信息
 *
 * @author Dwl
 * @date 2019-09-19 14:02:57
 */
@Service
@AllArgsConstructor
public class ShopWalletServiceImpl extends ServiceImpl<ShopWalletMapper, ShopWallet> implements ShopWalletService {

    private final ShopWalletMapper shopWalletMapper;


    @Override
    public ShopWallet getShopWalletByShopId(Long shopId) {
        return shopWalletMapper.selectOne(new LambdaQueryWrapper<ShopWallet>().eq(ShopWallet::getShopId,shopId));
    }

    @Override
    public IPage<ShopWallet> pageShopWallet(PageParam<ShopWallet> page, ShopWallet shopWallet) {
        return shopWalletMapper.pageShopWallet(page, shopWallet);
    }
}
