| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.mapper.ConfigMapper; |
| | | import com.zy.system.service.ConfigService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @Service("configService") |
| | | public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> implements ConfigService { |
| | | @Override |
| | | public List<String> getMatCode() { |
| | | Config config = baseMapper.selectByCode(); |
| | | if (Cools.isEmpty(config)) { |
| | | return null; |
| | | } |
| | | String[] split = config.getValue().split(","); |
| | | return Arrays.asList(split); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getMatCode2() { |
| | | Config config = baseMapper.selectByCode2(); |
| | | if (Cools.isEmpty(config)) { |
| | | return null; |
| | | } |
| | | String[] split = config.getValue().split(","); |
| | | return Arrays.asList(split); |
| | | } |
| | | } |