whycrzg
2021-02-23 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.fgkj.services.ram;
 
import com.fgkj.dto.JhState;
import com.fgkj.dto.ServiceModel;
import com.fgkj.mapper.impl.ram.JhStateMapper;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
/**
 * @author 81041
 */
@Service
public class JhStateService {
 
    @Resource
    private JhStateMapper mapper;;
    
    //根据设备id查询设备均衡供电模块的信息
    public ServiceModel serchByCondition(JhState jh) {
        ServiceModel model = new ServiceModel();
        List<JhState> list=mapper.serchByCondition(jh);
        if(list!=null&&list.size()>0){
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功");
        }else{
            model.setCode(0);
            model.setMsg("查询失败");
        }
        return model;
    }
    
}