package com.cyksj.mapper;

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

/*
 *项目名: netflix
 *文件名: GoodsClickUserRecordMapper
 *创建者: JavaZou
 *创建时间:2023/8/18 10:48
 */
public interface GoodsClickUserRecordMapper extends BaseMapper<GoodsClickUserRecord> {

	@Select("select COUNT(if(env_type = 'pc',1,NULL)) AS pcClick,COUNT(if(env_type = 'h5',1,NULL)) AS h5Click,COUNT(if(env_type = 'h5Tj',1,NULL)) AS h5TjClick, from goods_click_user_record where goods_id = #{goodsId}")
	GoodsDonCategoryGoodsView selectEnvTypeClickRecord(Long goodsId);
}
