package com.ruoyi.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.demo.entity.Equipment;
import com.ruoyi.demo.entity.vo.EquipmentVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface EquipmentMapper extends BaseMapper<Equipment> {
    @Update("update dl_equipment set equipment_name=#{equipmentName},addr_info=#{addrInfo},addr_code=#{addrCode},lat=#{lat},lng=#{lng},store_id=#{storeId},manufacturers=#{manufacturers},maintain_name=#{maintainName},maintain_telephone=#{maintainTelephone} where equipmentId = #{equipmentId}")
    void updateEquipment(EquipmentVo equipmentVo);

    @Update("update dl_equipment set store_id=#{storeId} where equipmentId = #{equipmentId}")
    void addStoreEquipment(EquipmentVo equipmentVo);
}
