package com.doumee.dao.business;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.doumee.dao.business.model.Shopcart;
|
import com.doumee.dao.web.response.goods.CartGoodsResponse;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
/**
|
* @author 江蹄蹄
|
* @date 2023/03/21 15:48
|
*/
|
public interface ShopcartMapper extends BaseMapper<Shopcart> {
|
|
@Select(" select s.id as shopCartId , s.GOODS_SKU_ID as goodsSkuId , s.PRODUCT_ID as goodsId , g.name as goodsName , gs.`NAME` as skuName , s.num , gs.PRICE , ifnull(gs.STATUS,1) as status ," +
|
"case when gs.IMGURL = '' then g.IMGURL when gs.IMGURL is null then g.IMGURL else gs.IMGURL end imgUrl " +
|
" from shopcart s left join goods g on s.PRODUCT_ID = g.ID left join goods_sku gs ON s.GOODS_SKU_ID = gs.id " +
|
" where 1 = 1 and s.member_id = #{memberId} order by s.CREATE_DATE desc ")
|
IPage<CartGoodsResponse> cartGoodsPage(IPage page, @Param("memberId") Integer memberId);
|
|
|
|
}
|