package com.iailab.module.pms.production.warehouse.dao; import com.iailab.framework.common.dao.BaseDao; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.mybatis.core.mapper.BaseMapperX; import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; import com.iailab.module.pms.production.warehouse.entity.McMzEntity; import com.iailab.module.pms.production.warehouse.vo.McMzPageReqVO; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Component; import java.util.List; @Mapper @Component public interface McMzDao extends BaseMapperX { @Select("SELECT * , SUM(proportion) OVER () as den FROM t_mc_mz WHERE mc = #{mc}") List selectMzList(@Param("mc") String mc); @Delete("DELETE FROM t_mc_mz WHERE mc = #{mc}") void deleteByMc(@Param("mc") String mc); default PageResult selectPage(McMzPageReqVO Entity) { return selectPage(Entity, new LambdaQueryWrapperX() .orderByDesc(McMzEntity::getCreateBy)); } }