| | |
| | | package com.lf.server.service.data; |
| | | |
| | | import com.lf.server.entity.data.DictEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.data.DictMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 字典管理 |
| | | * @author sws |
| | | * @date 2022-09-26 |
| | | * 字典 |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | public class DictService implements DictMapper { |
| | |
| | | DictMapper dictMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(String tab) { |
| | | return dictMapper.selectCount(tab); |
| | | public Integer selectCount(String ns, String tab) { |
| | | ns = StringHelper.isNull(ns) ? null : ns.trim(); |
| | | tab = StringHelper.getLikeStr(tab); |
| | | |
| | | return dictMapper.selectCount(ns, tab); |
| | | } |
| | | |
| | | @Override |
| | | public List<DictEntity> selectByPage(String tab, Integer limit, Integer offset) { |
| | | return dictMapper.selectByPage(tab, limit, offset); |
| | | public List<DictEntity> selectByPage(String ns, String tab, Integer limit, Integer offset) { |
| | | ns = StringHelper.isNull(ns) ? null : ns.trim(); |
| | | tab = StringHelper.getLikeStr(tab); |
| | | |
| | | return dictMapper.selectByPage(ns, tab, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertDict(DictEntity dictEntity) { |
| | | return dictMapper.insertDict(dictEntity); |
| | | public List<DictEntity> selectAll() { |
| | | return dictMapper.selectAll(); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertDicts(List<DictEntity> dictEntity) { |
| | | return dictMapper.insertDicts(dictEntity); |
| | | public DictEntity selectById(int id) { |
| | | return dictMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deleteDict(int id) { |
| | | return dictMapper.deleteDict(id); |
| | | public Integer insert(DictEntity entity) { |
| | | return dictMapper.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deleteDicts(List<Integer> ids) { |
| | | return dictMapper.deleteDicts(ids); |
| | | public Integer inserts(List<DictEntity> list) { |
| | | return dictMapper.inserts(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateDict(DictEntity dictEntity) { |
| | | return dictMapper.updateDict(dictEntity); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public DictEntity selectDict(int id) { |
| | | return dictMapper.selectDict(id); |
| | | public Integer delete(int id) { |
| | | return dictMapper.delete(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<DictEntity> selectDictAll() { |
| | | return dictMapper.selectDictAll(); |
| | | public Integer deletes(List<Integer> ids) { |
| | | return dictMapper.deletes(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<DictEntity> selectDictTab() { |
| | | return dictMapper.selectDictTab(); |
| | | public Integer update(DictEntity entity) { |
| | | return dictMapper.update(entity); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Integer updates(List<DictEntity> list) { |
| | | return dictMapper.updates(list); |
| | | } |
| | | } |