获取配置接口数据

gstadmin
王家东 3 months ago
parent 87c80bf1ff
commit 9402529376
  1. 8
      jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/controller/SysConfigurationController.java
  2. 3
      jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/mapper/SysConfigurationMapper.java
  3. 1
      jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/service/ISysConfigurationService.java
  4. 8
      jeecg-boot-master/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/sysconfiguration/service/impl/SysConfigurationServiceImpl.java

@ -173,4 +173,12 @@ public class SysConfigurationController extends JeecgController<SysConfiguration
return super.importExcel(request, response, SysConfiguration.class); return super.importExcel(request, response, SysConfiguration.class);
} }
//提取获取数据
@AutoLog(value = "系统配置-获取")
@ApiOperation(value="系统配置-获取", notes="系统配置-获取")
@RequestMapping(value = "/findconfig", method = RequestMethod.POST)
public Result<SysConfiguration> findconfig(){
SysConfiguration sysConfiguration = sysConfigurationService.findconfig();
return Result.ok(sysConfiguration);
}
} }

@ -3,6 +3,7 @@ package org.jeecg.modules.sysconfiguration.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.sysconfiguration.entity.SysConfiguration; import org.jeecg.modules.sysconfiguration.entity.SysConfiguration;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -14,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface SysConfigurationMapper extends BaseMapper<SysConfiguration> { public interface SysConfigurationMapper extends BaseMapper<SysConfiguration> {
@Select("select * from sys_configuration ")
SysConfiguration findconfig();
} }

@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface ISysConfigurationService extends IService<SysConfiguration> { public interface ISysConfigurationService extends IService<SysConfiguration> {
SysConfiguration findconfig();
} }

@ -3,6 +3,7 @@ package org.jeecg.modules.sysconfiguration.service.impl;
import org.jeecg.modules.sysconfiguration.entity.SysConfiguration; import org.jeecg.modules.sysconfiguration.entity.SysConfiguration;
import org.jeecg.modules.sysconfiguration.mapper.SysConfigurationMapper; import org.jeecg.modules.sysconfiguration.mapper.SysConfigurationMapper;
import org.jeecg.modules.sysconfiguration.service.ISysConfigurationService; import org.jeecg.modules.sysconfiguration.service.ISysConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -16,4 +17,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service @Service
public class SysConfigurationServiceImpl extends ServiceImpl<SysConfigurationMapper, SysConfiguration> implements ISysConfigurationService { public class SysConfigurationServiceImpl extends ServiceImpl<SysConfigurationMapper, SysConfiguration> implements ISysConfigurationService {
@Autowired
private SysConfigurationMapper sysConfigurationMapper;
@Override
public SysConfiguration findconfig() {
return sysConfigurationMapper.findconfig();
}
} }

Loading…
Cancel
Save