package com.mortals.xhx.module.device.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.device.dao.DeviceDao;
import com.mortals.xhx.module.device.model.DeviceEntity;
import com.mortals.xhx.module.device.service.DeviceService;
import lombok.extern.slf4j.Slf4j;
/**
* DeviceService
* 设备管理 service实现
*
* @author zxfei
* @date 2023-05-22
*/
@Service("deviceService")
@Slf4j
public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, DeviceEntity, Long> implements DeviceService {


    @Override
    protected void saveAfter(DeviceEntity entity, Context context) throws AppException {
        super.saveAfter(entity, context);
        //todo 通知设备管理系统
    }

    @Override
    protected void updateAfter(DeviceEntity entity, Context context) throws AppException {
        super.updateAfter(entity, context);
        //todo 通知设备管理系统
    }

    @Override
    public void active(String deviceCode, Context context) {

    }

    @Override
    public void deviceEnabled(Long id, Integer status, Context context) {

    }
}