EquipmentService.java
890 Bytes
package com.huaheng.pc.plc.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huaheng.pc.plc.domain.PlcEquipment;
import com.huaheng.pc.plc.mapper.PlcEquipmentMapper;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @author:zhouhong
* 202203
*/
@Service("equipment")
public class EquipmentService extends ServiceImpl<PlcEquipmentMapper, PlcEquipment> {
public List<Map<String, Object>> getList() {
LambdaQueryWrapper<PlcEquipment> lambda = Wrappers.lambdaQuery();
lambda.select(PlcEquipment::getId,PlcEquipment::getId,PlcEquipment::getEquipmentName);
List<Map<String, Object>> result= this.listMaps(lambda);
return result;
}
}