package com.cyksj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyksj.model.entity.DistributeGoodsSkuAlert;
import org.apache.ibatis.annotations.Select;

/**
 * 项目名: yhlxj
 * 文件名: DistributeGoodsSkuAlertMapper
 * 创建者: JavaZou
 * 创建时间:2023/11/8 14:10
 */
public interface DistributeGoodsSkuAlertMapper extends BaseMapper<DistributeGoodsSkuAlert> {

	@Select("select count(*) from distribute_goods_sku_alert da inner join goods_don_sku sku on sku.id = da.sku_id and sku.status is true" +
			" inner join goods_don g on g.id = da.goods_id and g.status is true and g.deleted is true and g.is_distribute is true")
	Integer selectCountByCondition();
}
