package com.doumee.dao.business;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.doumee.dao.business.model.PlanorderDetail;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.Date;
|
|
/**
|
* @author 江蹄蹄
|
* @date 2023/03/21 15:48
|
*/
|
public interface PlanorderDetailMapper extends BaseMapper<PlanorderDetail> {
|
|
|
/**
|
* 获取最后一期的日期
|
* @param memberId
|
* @param goodsId
|
* @return
|
*/
|
@Select(" select max(p.KD_PLAN_DATE) from planorder_detail p inner join goodsorder_detail gd on p.ORDER_ID = gd.ORDER_ID " +
|
" inner join goods_sku gs on gd.GOODS_SKU_ID = gs.id " +
|
" where 1 = 1 and gs.GOODS_ID = #{goodsId} and p.CREATOR = #{memberId} ")
|
Date getMaxPlanDate(@Param("memberId") Integer memberId , @Param("goodsId") Integer goodsId);
|
|
|
|
}
|