package com.imdroid.secapi.dto;

import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface GnssDeviceMapper extends MPJBaseMapper<GnssDevice> {
    @Select({"select * from gnssdevices where deviceid = #{deviceId} limit 1"})
    GnssDevice queryByDeviceId(String deviceId);

    @Update({"update gnssdevices set syn=false where group_id=#{group_id}"})
    int setSynFlagByGroupId(int group_id);

    @Update({"update gnssdevices set iccid=#{iccid} where deviceid=#{deviceId}"})
    int updateIccidByDeviceId(String deviceId, String iccid);

}
