新火炬后端单体项目初始化代码
Houjie
昨天 58f19f978b2e0794c4569d67ad79ee53e3541fcd
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
36
37
38
39
40
41
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: 打印机配置信息
 * @Author: jeecg-boot
 * @Date:   2025-06-24
 * @Version: V1.0
 */
@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);
    }
}