|
@@ -1,13 +1,18 @@
|
|
|
package com.usky.system.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
|
+import com.usky.common.security.utils.SecurityUtils;
|
|
|
import com.usky.system.domain.SysMobileTenantConfig;
|
|
|
+import com.usky.system.mapper.SysMobileRoleMenuMapper;
|
|
|
import com.usky.system.mapper.SysMobileTenantConfigMapper;
|
|
|
import com.usky.system.service.SysMobileTenantConfigService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -21,12 +26,33 @@ import java.util.List;
|
|
|
@Service
|
|
|
public class SysMobileTenantConfigServiceImpl extends AbstractCrudService<SysMobileTenantConfigMapper, SysMobileTenantConfig> implements SysMobileTenantConfigService {
|
|
|
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<SysMobileTenantConfig> getAppTenantConfig(String url){
|
|
|
+ List<SysMobileTenantConfig> list = baseMapper.getAppTenantConfig(url);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
- public List<SysMobileTenantConfig> getMobileTenantConfig(String url) {
|
|
|
+ public List<SysMobileTenantConfig> getMobileTenantConfig(Integer tenantId) {
|
|
|
LambdaQueryWrapper<SysMobileTenantConfig> query = Wrappers.lambdaQuery();
|
|
|
- query.eq(SysMobileTenantConfig::getLoginDomain, url);
|
|
|
+ query.eq(SysMobileTenantConfig::getTenantId, tenantId);
|
|
|
List<SysMobileTenantConfig> list = this.list(query);
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void addMobileTenantConfig(SysMobileTenantConfig sysMobileTenantConfig){
|
|
|
+ sysMobileTenantConfig.setCreateBy(SecurityUtils.getUsername());
|
|
|
+ sysMobileTenantConfig.setCreateTime(LocalDateTime.now());
|
|
|
+ this.save(sysMobileTenantConfig);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void updateMobileTenantConfig(SysMobileTenantConfig sysMobileTenantConfig){
|
|
|
+ sysMobileTenantConfig.setCreateBy(SecurityUtils.getUsername());
|
|
|
+ sysMobileTenantConfig.setCreateTime(LocalDateTime.now());
|
|
|
+ this.updateById(sysMobileTenantConfig);
|
|
|
+ }
|
|
|
+
|
|
|
}
|