package com.example.demo.mapper; import com.example.demo.entity.SceneLightEntity; import com.example.demo.vo.request.RequestSceneLight; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import org.springframework.stereotype.Component; import java.util.List; /** * Created by Hb_zzZ on 2020/10/29. */ @Mapper @Component("ISceneLightMapper") public interface ISceneLightMapper extends IBaseMapper { @Select("SELECT * FROM tb_scene_light WHERE scene_style_id = #{sceneStyleId} AND is_show = 1 AND rec_status = #{recStatus}") List findLightBySceneTypeIdAndRecStatus(RequestSceneLight style); @Update("UPDATE tb_scene_light SET is_cover = 0 where scene_style_id = #{sceneStyleId}") int updateIsCoverBySceneStyleId(@Param("sceneStyleId")Long sceneStyleId); }