| | |
| | | package org.jeecg.modules.base.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.base.entity.Factory; |
| | | import org.jeecg.modules.base.entity.PrinterConfig; |
| | | import org.jeecg.modules.base.mapper.PrinterConfigMapper; |
| | | import org.jeecg.modules.base.service.IPrinterConfigService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: 打印机配置信息 |
| | |
| | | @Service |
| | | public class PrinterConfigServiceImpl extends ServiceImpl<PrinterConfigMapper, PrinterConfig> implements IPrinterConfigService { |
| | | |
| | | |
| | | @Override |
| | | public List<PrinterConfig> queryUserPrinterConfigList() { |
| | | //用户数据权限 |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if (sysUser == null) { |
| | | return Collections.emptyList(); |
| | | } |
| | | LambdaQueryWrapper<PrinterConfig> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(PrinterConfig::getDelFlag, CommonConstant.DEL_FLAG_0); |
| | | queryWrapper.eq(PrinterConfig::getPrinterStatus, "1"); |
| | | return super.list(queryWrapper); |
| | | } |
| | | } |