From 64fa2c33cd645e86d4e2a8c34c7881ea4aa678cf Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期二, 17 六月 2025 18:33:37 +0800 Subject: [PATCH] 代码初始化 --- server/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/server/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java b/server/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java index d0e044f..6f46c50 100644 --- a/server/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java +++ b/server/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java @@ -1,5 +1,10 @@ package com.doumee.service.system.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.doumee.core.constants.Constants; +import com.doumee.dao.system.SystemDictDataMapper; +import com.doumee.dao.system.model.SystemDictData; +import com.doumee.dao.system.vo.SystemQrcodeListVO; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.doumee.core.model.PageData; @@ -11,11 +16,13 @@ import com.doumee.service.system.SystemDictService; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.List; /** @@ -28,6 +35,8 @@ @Autowired private SystemDictMapper systemDictMapper; + @Autowired + private SystemDictDataMapper systemDictDataMapper; @Override public Integer create(SystemDict systemDict) { @@ -88,6 +97,31 @@ PageHelper.startPage(pageWrap.getPage(), pageWrap.getCapacity()); return PageData.from(new PageInfo<>(systemDictMapper.selectManageList(pageWrap.getModel(), pageWrap.getOrderByClause()))); } + @Override + public List<SystemQrcodeListVO> qrcodeList(QuerySystemDictDTO pageWrap) { + List<SystemQrcodeListVO> list = new ArrayList<>(); + SystemDict dict =systemDictMapper.selectOne(new LambdaQueryWrapper<SystemDict>(). + eq(SystemDict::getCode,Constants.QRCODE_URLS) + .last("limit 1")) ; + if(dict!=null){ + List<SystemDictData> dataList = systemDictDataMapper.selectList(new LambdaQueryWrapper<SystemDictData>(). + eq(SystemDictData::getDictId,dict.getId())) ; + if(dataList!=null && dataList.size()>0){ + for(SystemDictData data :dataList){ + SystemQrcodeListVO t = new SystemQrcodeListVO(); + t.setId(data.getId()+""); + t.setName(data.getRemark()); + t.setUrl(data.getCode()); + if(StringUtils.equals(data.getLabel(),Constants.SHE_QRCODES_URL) + ||StringUtils.equals(data.getLabel(),Constants.DCA_QRCODES_URL) + ||StringUtils.equals(data.getLabel(),Constants.DBH_QRCODES_URL)){ + list.add(t); + } + } + } + } + return list; + } @Override public long count(SystemDict systemDict) { -- Gitblit v1.9.3