whycxzp
2025-06-10 73bb5617e6aeb4ee8f7dfd4ad54b61d477969d86
src/main/java/com/whyc/service/RtStateService.java
@@ -1,14 +1,12 @@
package com.whyc.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.whyc.dto.BattDTO;
import com.whyc.dto.Response;
import com.whyc.mapper.RtStateMapper;
import com.whyc.pojo.RtState;
import com.whyc.pojo.db_real_batt.RtState;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * packageName com.whyc.service
@@ -17,7 +15,7 @@
 * @version JDK 8
 * @className RtStateService (此处以class为例)
 * @date 2024/6/15
 * @description TODO
 * @description
 */
@Service
public class RtStateService {
@@ -30,6 +28,9 @@
        wrapper.eq("binf_id",binfId);
        wrapper.last("limit 1");
        RtState rtState=mapper.selectOne(wrapper);
        if(rtState!=null){
            rtState.setBattStateName(BattDTO.getBattState(rtState.getBattState()));
        }
        return new Response().setII(1,rtState!=null,rtState,"在用电池模块实时推送组端信息");
    }
}