EquipmentMethodService.java
1.05 KB
package com.huaheng.pc.plc.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.huaheng.common.utils.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.pc.plc.domain.PlcEquipmentMethod;
import com.huaheng.pc.plc.mapper.PlcEquipmentMethodMapper;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @author:zhouhong
* 202203
*/
@Service("equipmentMethod")
public class EquipmentMethodService extends ServiceImpl<PlcEquipmentMethodMapper, PlcEquipmentMethod> {
public List<Map<String, Object>> getList(String equipmentId) {
LambdaQueryWrapper<PlcEquipmentMethod> lambda = Wrappers.lambdaQuery();
lambda.eq(StringUtils.isNotEmpty(equipmentId), PlcEquipmentMethod::getEquipmentId,equipmentId);
lambda.select(PlcEquipmentMethod::getId,PlcEquipmentMethod::getMethodName);
List<Map<String, Object>> result= this.listMaps(lambda);
return result;
}
}