package tech.glinfo.enbao.modules.sh.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import tech.glinfo.enbao.modules.sh.entity.ShDeviceTempEntity;

import java.util.Map;

/**
 * 智能开关电量表
 * 
 * @author linzhenjie
 * @email linzhenjie@gltech.com
 * @date 2020-05-18 15:37:05
 */
@Mapper
public interface OtherShDeviceTempDao extends BaseMapper<ShDeviceTempEntity> {

    @Update("<script>" +
            "  update sh_device_temp set "
            + " 	<if test='params.status != null and params.status != \"\" '> "
            + "	        `status` = ${params.status}"
            + "	    </if>"
            + " 	<if test='params.statusT != null and params.statusT != \"\" '> "
            + "	        `status_t` = ${params.statusT}"
            + "	    </if>"
            + "	    WHERE id = ${params.id}"
            + " </script>")
    void updateStatus(Map<String, Object> params);


}
