package com.changhong.epc.tenant.service.system.impl; import com.changhong.epc.bean.tenant.system.SystemConfig; import com.changhong.epc.tenant.mapper.tenant.system.SystemConfigMapper; import com.changhong.epc.tenant.service.system.SystemConfigService; import com.iemsoft.framework.cloud.core.tools.ObjectUtil; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; /** * 系统配置 * @author yuezhw * @date 2017-10-17 * */ @Service("SystemConfigServiceImpl") public class SystemConfigServiceImpl implements SystemConfigService{ @Resource private SystemConfigMapper systemConfigMapper; /** * 查询系统配置 * @return List */ @Override public List selectSytem() { return this.systemConfigMapper.selectSystem(); } /** * 添加系统配置 * @return Integer */ @Override public Integer insert(List systemConfigs) { Integer count = 0; if(ObjectUtil.empty(systemConfigs)){ return count; } for(SystemConfig syc: systemConfigs){ count++; syc.initParam(); this.systemConfigMapper.insert(syc); } return count; } /** * 修改全部系统配置 * @return Integer */ @Override public Integer update(List systemConfigs) { Integer count = 0; if(ObjectUtil.empty(systemConfigs)){ return count; } for(SystemConfig syc: systemConfigs){ count++; syc.updateIngParam(); this.systemConfigMapper.updateByPrimaryKeySelective(syc); } return count; } @Override public List querySysConfigByGroupKey(SystemConfig systemConfig) { return this.systemConfigMapper.querySysConfigByGroupKey(systemConfig); } }