| | |
| | | package com.yuanchu.limslaboratory.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.yuanchu.limslaboratory.pojo.Enterprise; |
| | | import com.yuanchu.limslaboratory.mapper.EnterpriseMapper; |
| | | import com.yuanchu.limslaboratory.service.EnterpriseService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper, Enterprise> implements EnterpriseService { |
| | | |
| | | @Resource |
| | | private EnterpriseMapper enterpriseMapper; |
| | | |
| | | @Override |
| | | public String getFirstEnterpriseName() { |
| | | LambdaQueryWrapper<Enterprise> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.select(Enterprise::getName); |
| | | Enterprise enterprise = enterpriseMapper.selectOne(wrapper); |
| | | return enterprise.getName(); |
| | | } |
| | | } |