package com.tcm.training.admin.live.mapper; import com.tcm.training.admin.live.entity.LiveRoomSetting; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; @Mapper public interface LiveRoomSettingMapper { @Select("SELECT banner_image_url, live_room_url FROM tcm_live_room_setting LIMIT 1") LiveRoomSetting selectCurrent(); @Insert("INSERT INTO tcm_live_room_setting (banner_image_url, live_room_url) VALUES (#{bannerImageUrl}, #{liveRoomUrl})") int insertCurrent(LiveRoomSetting setting); @Update("UPDATE tcm_live_room_setting SET banner_image_url = #{bannerImageUrl}, live_room_url = #{liveRoomUrl}") int updateCurrent(LiveRoomSetting setting); }