GoodsDonMapper.java 606 B

1234567891011121314151617181920
  1. package com.cyksj.mapper;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.cyksj.model.entity.GoodsDon;
  4. import org.apache.ibatis.annotations.Select;
  5. import java.math.BigDecimal;
  6. /**
  7. * @author chan
  8. * @date 2022/9/27 5:31 PM
  9. */
  10. public interface GoodsDonMapper extends BaseMapper<GoodsDon> {
  11. @Select("select gdk.price from goods_don gd left join goods_don_sku gdk on gdk.goods_id = gd.id" +
  12. " where gd.id = #{goodsId} and gd.deleted is true" +
  13. " and gd.status is true and gd.type = 2" +
  14. " order by gdk.price limit 1")
  15. BigDecimal selectMinPriceSkuByGoodsId(Long goodsId);
  16. }