liujie
2026-09-16 a3a56121a476cd23d0f29bc391c07374dc5008f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.tourguide.modules.user.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tourguide.modules.user.entity.GuideScenicConfig;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;
 
public interface GuideScenicConfigMapper extends BaseMapper<GuideScenicConfig> {
    @Update("UPDATE guide_scenic_config SET deleted = 1 WHERE guide_id = #{guideId} AND deleted = 0")
    int markDeletedByGuideId(Long guideId);
 
    @Insert("INSERT INTO guide_scenic_config (guide_id, scenic_name, city_name, deleted) " +
            "VALUES (#{guideId}, #{scenicName}, #{cityName}, 0) " +
            "ON DUPLICATE KEY UPDATE city_name = VALUES(city_name), deleted = 0")
    int upsert(GuideScenicConfig config);
}