陶杰
2025-01-08 ae1471f378f399f76518539ec8992e64a3673436
src/main/java/com/mzl/flower/mapper/flower/FlowerMapper.java
@@ -11,6 +11,7 @@
import com.mzl.flower.dto.response.flower.FlowerSupplierListDTO;
import com.mzl.flower.entity.flower.Flower;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;
@@ -46,4 +47,27 @@
    void updateFlowerCategoryInfo(Long category);
    List<Long> searchInvalidHistory(@Param("userId") String userId);
    void updateBatchTypeRank(@Param("list") List<Flower> flowerList);
    void deleteBatchPhysics(@Param("list")  List<Long> ids);
    void restoreFlowerBatch(@Param("list") List<Long> ids);
    List<Flower> getDeletdFlowByIds(@Param("list") List<Long> ids);
    void updateTypeRankNull(@Param("category") Long category, @Param("level") String level);
    @Select("select * from t_flower where id = #{id}")
    Flower selectFlowerById(Long id);
    @Select("<script>" +
            "SELECT * FROM t_flower WHERE id IN " +
            "<foreach item='id' collection='ids' open='(' separator=',' close=')'>" +
            "#{id}" +
            "</foreach>" +
            "</script>")
    List<Flower> selectFlowersByIds(@Param("ids") List<Long> ids);
}