修改模块jeecg-spectrum-analysis配置信息
新增字典表及字典实体表实体类及相关方法 实现分页查询获取数据库中交互分析基础数据接口
This commit is contained in:
parent
d6914426fa
commit
87c470fa8f
|
@ -0,0 +1,33 @@
|
|||
package org.jeecg.modules.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.base.entity.GardsSampleData;
|
||||
import org.jeecg.modules.service.ISpectrumAnalysisService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("spectrumAnalysis")
|
||||
@Api(value = "人工交互分析管理", tags = "人工交互分析管理")
|
||||
public class SpectrumAnalysesController {
|
||||
|
||||
@Autowired
|
||||
private ISpectrumAnalysisService spectrumAnalysisService;
|
||||
|
||||
@GetMapping("getDBSpectrumList")
|
||||
@ApiOperation(value = "获取数据库中交互分析基础数据", notes = "获取数据库中交互分析基础数据")
|
||||
public Result getDBSpectrumList(QueryRequest queryRequest, GardsSampleData gardsSampleData, String dbName, String menuType,boolean CollectStop, boolean AcqStart,
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate, @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||
return spectrumAnalysisService.getDBSpectrumList(queryRequest, gardsSampleData, dbName, menuType, CollectStop, AcqStart, startDate, endDate);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("GARDS_ANALYSES")
|
||||
public class GardsAnalyses implements Serializable {
|
||||
|
||||
@TableField(value = "IDANALYSIS")
|
||||
private Integer IDANALYSIS;
|
||||
|
||||
@TableField(value = "SAMPLE_ID")
|
||||
private Integer sampleId;
|
||||
|
||||
@TableField(value = "ANALYSISBEGIN")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date analysisBegin;
|
||||
|
||||
@TableField(value = "ANALYSISEND")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date analysisEnd;
|
||||
|
||||
@TableField(value = "TYPE")
|
||||
private String type;
|
||||
|
||||
@TableField(value = "SOFTWARE")
|
||||
private String software;
|
||||
|
||||
@TableField(value = "SWVERSION")
|
||||
private String swversion;
|
||||
|
||||
@TableField(value = "ANALYST")
|
||||
private String analyst;
|
||||
|
||||
@TableField(value = "BASELINEMETHOD")
|
||||
private String baselineMethod;
|
||||
|
||||
@TableField(value = "PEAKSMETHOD")
|
||||
private String peaksMethod;
|
||||
|
||||
@TableField(value = "NUCLIDEMETHOD")
|
||||
private String nuclideMethod;
|
||||
|
||||
@TableField(value = "UNCCALCMETHOD")
|
||||
private String unccalcMethod;
|
||||
|
||||
@TableField(value = "LCMETHOD")
|
||||
private String lcMethod;
|
||||
|
||||
@TableField(value = "SEARCHSTARTCHANNEL")
|
||||
private Integer searchStartChannel;
|
||||
|
||||
@TableField(value = "SEARCHENDCHANNEL")
|
||||
private Integer searchEndChannel;
|
||||
|
||||
@TableField(value = "SEARCHTHRESHOLD")
|
||||
private Double searchThreshold;
|
||||
|
||||
@TableField(value = "NUMBEROFPEAKS")
|
||||
private Integer numberOfPeaks;
|
||||
|
||||
@TableField(value = "TOTALCOUNTS")
|
||||
private Double totalCounts;
|
||||
|
||||
@TableField(value = "CATEGORY")
|
||||
private Integer category;
|
||||
|
||||
@TableField(value = "COMMENTS")
|
||||
private String comments;
|
||||
|
||||
@TableField(value = "MODDATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date moddate;
|
||||
|
||||
@TableField(value = "USEDGASPHD")
|
||||
private String usedGasPHD;
|
||||
|
||||
@TableField(value = "USEDDETPHD")
|
||||
private String usedDetPHD;
|
||||
|
||||
@TableField(value = "USEDGASPHD_ID")
|
||||
private Integer usedGasPHDId;
|
||||
|
||||
@TableField(value = "USEDDETPHD_ID")
|
||||
private Integer usedDetPHDId;
|
||||
|
||||
@TableField(value = "BASELINE_PATH")
|
||||
private String baseLinePath;
|
||||
|
||||
@TableField(value = "LC_PATH")
|
||||
private String lcPath;
|
||||
|
||||
@TableField(value = "SCAC_PATH")
|
||||
private String scacPath;
|
||||
|
||||
@TableField(value = "LOG_PATH")
|
||||
private String logPath;
|
||||
|
||||
@TableField(value = "REPORT_PAHT")
|
||||
private String reportPath;
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName(value = "sys_dict")
|
||||
public class SysDict implements Serializable {
|
||||
|
||||
@TableField(value = "id")
|
||||
private String id;
|
||||
|
||||
@TableField(value = "dict_name")
|
||||
private String dictName;
|
||||
|
||||
@TableField(value = "dict_code")
|
||||
private String dictCode;
|
||||
|
||||
@TableField(value = "description")
|
||||
private String description;
|
||||
|
||||
@TableField(value = "del_flag")
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
@TableField(value = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
@TableField(value = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(value = "type")
|
||||
private Integer type;
|
||||
|
||||
@TableField(value = "tenant_id")
|
||||
private Integer tenantId;
|
||||
|
||||
@TableField(value = "low_app_id")
|
||||
private String lowAppId;
|
||||
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @Author zhangweijian
|
||||
* @since 2018-12-28
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "sys_dict_item")
|
||||
public class SysDictItem implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 字典id
|
||||
*/
|
||||
@TableField(value = "dict_id")
|
||||
private String dictId;
|
||||
|
||||
/**
|
||||
* 字典项文本
|
||||
*/
|
||||
@TableField(value = "item_text")
|
||||
private String itemText;
|
||||
|
||||
/**
|
||||
* 字典项值
|
||||
*/
|
||||
@TableField(value = "item_value")
|
||||
private String itemValue;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@TableField(value = "description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@TableField(value = "sort_order")
|
||||
private Integer sortOrder;
|
||||
|
||||
|
||||
/**
|
||||
* 状态(1启用 0不启用)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
private Integer status;
|
||||
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
@TableField(value = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
@TableField(value = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.base.entity.GardsSampleData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SpectrumAnalysisMapper {
|
||||
|
||||
Page<GardsSampleData> getDBSpectrumList(IPage<GardsSampleData> page, GardsSampleData gardsSampleData, String dbName, List<String> stationTypes, boolean CollectStop, boolean AcqStart, String startTime, String endTime);
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.entity.SysDictItem;
|
||||
|
||||
public interface SysDictItemMapper extends BaseMapper<SysDictItem> {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.entity.SysDict;
|
||||
|
||||
public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.mapper.SpectrumAnalysisMapper">
|
||||
|
||||
<select id="getDBSpectrumList" resultType="org.jeecg.modules.base.entity.GardsSampleData">
|
||||
select c.sample_id,
|
||||
b.station_code,
|
||||
a.detector_code,
|
||||
c.sample_type,
|
||||
c.data_type,
|
||||
c.spectral_qualifie,
|
||||
c.collect_stop,
|
||||
c.acquisition_start,
|
||||
c.acquisition_real_sec,
|
||||
c.acquisition_live_sec,
|
||||
d.analyst,
|
||||
c.status,
|
||||
c.input_file_name
|
||||
from
|
||||
CONFIGURATION.GARDS_DETECTORS a,
|
||||
CONFIGURATION.GARDS_STATIONS b,
|
||||
ORIGINAL.GARDS_SAMPLE_DATA c,
|
||||
${dbName} d,
|
||||
(SELECT analyses.sample_id FROM ${dbName} analyses) analyses_sample_ids
|
||||
<where>
|
||||
c.sample_id = analyses_sample_ids.sample_id
|
||||
and c.detector_id = a.detector_id
|
||||
and c.station_id = b.station_id
|
||||
and c.sample_id = d.sample_id
|
||||
and b.type in
|
||||
<foreach collection="stationTypes" item="stationType" open="(" close=")" separator=",">
|
||||
#{stationType}
|
||||
</foreach>
|
||||
<if test=" gardsSampleData.sampleId != null ">
|
||||
and c.sample_id = #{gardsSampleData.sampleId}
|
||||
</if>
|
||||
<if test=" gardsSampleData.stationName != null and gardsSampleData.stationName != '' ">
|
||||
and b.station_code = #{gardsSampleData.stationName}
|
||||
</if>
|
||||
<if test=" gardsSampleData.detectorsName != null and gardsSampleData.detectorsName != '' ">
|
||||
and a.detector_code = #{gardsSampleData.detectorsName}
|
||||
</if>
|
||||
<if test=" gardsSampleData.sampleType != null and gardsSampleData.sampleType != '' ">
|
||||
and c.sample_type = #{gardsSampleData.sampleType}
|
||||
</if>
|
||||
<if test=" gardsSampleData.dataType != null and gardsSampleData.dataType != '' ">
|
||||
and c.data_type = #{gardsSampleData.dataType}
|
||||
</if>
|
||||
<if test=" gardsSampleData.spectralQualifie != null and gardsSampleData.spectralQualifie != '' ">
|
||||
and c.spectral_qualifie = #{gardsSampleData.spectralQualifie}
|
||||
</if>
|
||||
<if test=" gardsSampleData.status != null and gardsSampleData.status != '' ">
|
||||
and c.status = #{gardsSampleData.status}
|
||||
</if>
|
||||
<if test=" CollectStop == true ">
|
||||
and c.collect_stop between TO_DATE(#{startTime}, 'yyyy-mm-dd hh24:mi:ss') and TO_DATE(#{endTime}, 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
<if test=" AcqStart == true ">
|
||||
and c.acquisition_start between TO_DATE(#{startTime}, 'yyyy-mm-dd hh24:mi:ss') and TO_DATE(#{endTime}, 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
<!--<if test=" ">
|
||||
and b.station_code in (%1)
|
||||
</if>-->
|
||||
</where>
|
||||
ORDER BY c.collect_stop DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,13 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.base.entity.GardsSampleData;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public interface ISpectrumAnalysisService {
|
||||
|
||||
Result getDBSpectrumList(QueryRequest queryRequest, GardsSampleData gardsSampleData, String dbName, String menuType, boolean CollectStop, boolean AcqStart, Date startDate, Date endDate);
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.entity.SysDict;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ISysDictService extends IService<SysDict> {
|
||||
|
||||
List<String> findStationType(String menuType);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.modules.base.entity.GardsSampleData;
|
||||
import org.jeecg.modules.mapper.SpectrumAnalysisMapper;
|
||||
import org.jeecg.modules.service.ISpectrumAnalysisService;
|
||||
import org.jeecg.modules.service.ISysDictService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service("spectrumAnalysisService")
|
||||
@DS("auo")
|
||||
public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||
|
||||
@Autowired
|
||||
private SpectrumAnalysisMapper spectrumAnalysisMapper;
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
|
||||
@Override
|
||||
public Result getDBSpectrumList(QueryRequest queryRequest, GardsSampleData gardsSampleData, String dbName, String menuType, boolean CollectStop, boolean AcqStart, Date startDate, Date endDate) {
|
||||
Result result = new Result();
|
||||
if (Objects.isNull(startDate)){
|
||||
result.error500("开始时间不能为空");
|
||||
return result;
|
||||
}
|
||||
String startTime = DateUtils.formatDate(startDate, "yyyy-MM-dd") + " 00:00:00";
|
||||
if (Objects.isNull(endDate)) {
|
||||
result.error500("结束时间不能为空");
|
||||
return result;
|
||||
}
|
||||
String endTime = DateUtils.formatDate(endDate, "yyyy-MM-dd") + " 23:59:59";
|
||||
if (StringUtils.isBlank(menuType)){
|
||||
result.error500("谱类型不能为空");
|
||||
return result;
|
||||
}
|
||||
List<String> stationTypes = sysDictService.findStationType(menuType);
|
||||
if (CollectionUtils.isEmpty(stationTypes)) {
|
||||
result.error500("请先补充数据字典中当前系统类型对应的台站类型信息");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isBlank(dbName)){
|
||||
result.error500("请勾选数据库类型");
|
||||
return result;
|
||||
}
|
||||
if (dbName.equalsIgnoreCase("auto")){
|
||||
dbName = "RNAUTO.GARDS_ANALYSES";
|
||||
}else if (dbName.equalsIgnoreCase("man")){
|
||||
dbName = "RNMAN.GARDS_ANALYSES";
|
||||
}else {
|
||||
result.error500("数据库类型不存在");
|
||||
return result;
|
||||
}
|
||||
//从redis中获取台站信息
|
||||
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
|
||||
//从redis中获取探测器信息
|
||||
Map<Integer, String> detectorsMap = (Map<Integer, String>)redisUtil.get("detectorsMap");
|
||||
//声明分页page
|
||||
Page<GardsSampleData> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
||||
Page<GardsSampleData> sampleDataPage = spectrumAnalysisMapper.getDBSpectrumList(page, gardsSampleData, dbName, stationTypes, CollectStop, AcqStart, startTime, endTime);
|
||||
result.setSuccess(true);
|
||||
result.setResult(sampleDataPage);
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.entity.SysDict;
|
||||
import org.jeecg.modules.entity.SysDictItem;
|
||||
import org.jeecg.modules.mapper.SysDictItemMapper;
|
||||
import org.jeecg.modules.mapper.SysDictMapper;
|
||||
import org.jeecg.modules.service.ISysDictService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service("sysDictService")
|
||||
@DS("master")
|
||||
public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> implements ISysDictService {
|
||||
|
||||
@Autowired
|
||||
private SysDictItemMapper sysDictItemMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
public List<String> findStationType(String menuType) {
|
||||
List<String> menuTypes = new LinkedList<>();
|
||||
if (menuType.equals("B")) {
|
||||
menuTypes.add("Noble Gas Beta-Gamma");
|
||||
}else if (menuType.equals("G")) {
|
||||
menuTypes.add("Particulate");
|
||||
menuTypes.add("Noble Gas HPGe");
|
||||
}
|
||||
LambdaQueryWrapper<SysDict> dictQueryWrapper = new LambdaQueryWrapper<>();
|
||||
dictQueryWrapper.in(SysDict::getDictName, menuTypes);
|
||||
List<SysDict> sysDicts = this.baseMapper.selectList(dictQueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(sysDicts)) {
|
||||
List<String> dictIds = sysDicts.stream().map(SysDict::getId).distinct().collect(Collectors.toList());
|
||||
LambdaQueryWrapper<SysDictItem> dictItemQueryWrapper = new LambdaQueryWrapper<>();
|
||||
dictItemQueryWrapper.in(SysDictItem::getDictId, dictIds);
|
||||
List<SysDictItem> sysDictItems = sysDictItemMapper.selectList(dictItemQueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(sysDictItems)){
|
||||
List<String> result = sysDictItems.stream().map(SysDictItem::getItemValue).distinct().collect(Collectors.toList());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
server:
|
||||
port: 7007
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: jeecg-spectrum-analysis
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
server-addr: @config.server-addr@
|
||||
group: @config.group@
|
||||
namespace: @config.namespace@
|
||||
discovery:
|
||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:jeecg.yaml
|
||||
- optional:nacos:jeecg-@profile.name@.yaml
|
|
@ -0,0 +1,29 @@
|
|||
#code_generate_project_path
|
||||
project_path=E:\\workspace\\jeecg-boot
|
||||
#bussi_package[User defined]
|
||||
bussi_package=org.jeecg.modules.demo
|
||||
|
||||
|
||||
#default code path
|
||||
#source_root_package=src
|
||||
#webroot_package=WebRoot
|
||||
|
||||
#maven code path
|
||||
source_root_package=src.main.java
|
||||
webroot_package=src.main.webapp
|
||||
|
||||
#ftl resource url
|
||||
templatepath=/jeecg/code-template
|
||||
system_encoding=utf-8
|
||||
|
||||
#db Table id [User defined]
|
||||
db_table_id=id
|
||||
|
||||
#db convert flag[true/false]
|
||||
db_filed_convert=true
|
||||
|
||||
#page Search Field num [User defined]
|
||||
page_search_filed_num=1
|
||||
#page_filter_fields
|
||||
page_filter_fields=create_time,create_by,update_time,update_by
|
||||
exclude_table=act_,ext_act_,design_,onl_,sys_,qrtz_
|
|
@ -0,0 +1,27 @@
|
|||
#mysql
|
||||
diver_name=com.mysql.jdbc.Driver
|
||||
url=jdbc:mysql://localhost:3306/jeecg-boot?useUnicode=true&characterEncoding=UTF-8
|
||||
username=root
|
||||
password=root
|
||||
database_name=jeecg-boot
|
||||
|
||||
#oracle
|
||||
#diver_name=oracle.jdbc.driver.OracleDriver
|
||||
#url=jdbc:oracle:thin:@192.168.1.200:1521:ORCL
|
||||
#username=scott
|
||||
#password=tiger
|
||||
#database_name=ORCL
|
||||
|
||||
#postgre
|
||||
#diver_name=org.postgresql.Driver
|
||||
#url=jdbc:postgresql://localhost:5432/jeecg
|
||||
#username=postgres
|
||||
#password=postgres
|
||||
#database_name=jeecg
|
||||
|
||||
#SQLServer2005\u4ee5\u4e0a
|
||||
#diver_name=org.hibernate.dialect.SQLServerDialect
|
||||
#url=jdbc:sqlserver://192.168.1.200:1433;DatabaseName=jeecg
|
||||
#username=sa
|
||||
#password=SA
|
||||
#database_name=jeecg
|
|
@ -0,0 +1,77 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 -->
|
||||
<property name="LOG_HOME" value="../logs" />
|
||||
|
||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{50}:%L) - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${LOG_HOME}/jeecg-system-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 生成 error html格式日志开始 -->
|
||||
<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<file>${LOG_HOME}/error-log.html</file>
|
||||
</appender>
|
||||
<!-- 生成 error html格式日志结束 -->
|
||||
|
||||
<!-- 每天生成一个html格式的日志开始 -->
|
||||
<appender name="FILE_HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${LOG_HOME}/jeecg-system-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<MaxFileSize>10MB</MaxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
</appender>
|
||||
<!-- 每天生成一个html格式的日志结束 -->
|
||||
|
||||
<!--myibatis log configure -->
|
||||
<logger name="com.apache.ibatis" level="TRACE" />
|
||||
<logger name="java.sql.Connection" level="DEBUG" />
|
||||
<logger name="java.sql.Statement" level="DEBUG" />
|
||||
<logger name="java.sql.PreparedStatement" level="DEBUG" />
|
||||
|
||||
<!-- 日志输出级别 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
<appender-ref ref="HTML" />
|
||||
<appender-ref ref="FILE_HTML" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user