/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.distribution.comment.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yami.shop.distribution.comment.dao.DistributionProdBindMapper;
import com.yami.shop.distribution.comment.model.DistributionProdBind;
import com.yami.shop.distribution.comment.service.DistributionProdBindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 分销商品绑定表
 *
 * @author xwc
 * @date 2019-04-22 10:01:44
 */
@Service
public class DistributionProdBindServiceImpl extends ServiceImpl<DistributionProdBindMapper, DistributionProdBind> implements DistributionProdBindService {

    @Autowired
   private  DistributionProdBindMapper distributionProdBindMapper;


    @Override
    public Long getDistributionUserIdByUserIdAndProdId(String userId, Long shopId,Integer state) {
        return distributionProdBindMapper.getDistributionUserIdByUserIdAndProdId(userId,shopId,state);
    }

    @Override
    public void updateStateByUserIdByUserIdAndProdId(String userId, Long prodId, Integer state) {
        distributionProdBindMapper.updateStateByUserIdByUserIdAndProdId(userId,prodId,state);
    }
}
