Commit 6bc0110f by 朱海

[chg]升级springboot3

1 parent 0e92f1a5
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.1</version> <version>3.4.1</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
...@@ -56,14 +56,14 @@ ...@@ -56,14 +56,14 @@
<version>RELEASE</version> <version>RELEASE</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <!--<dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
</dependency> </dependency>-->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.47</version> <version>1.2.83</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<dependency> <dependency>
<groupId>net.minidev</groupId> <groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId> <artifactId>json-smart</artifactId>
<version>2.2.1</version> <version>2.5.2</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
...@@ -87,24 +87,35 @@ ...@@ -87,24 +87,35 @@
<artifactId>postgresql</artifactId> <artifactId>postgresql</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>2.2.10</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId> <artifactId>spring-boot-autoconfigure</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>5.8.9</version> <version>5.8.35</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>com.mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.15</version>
<exclusions>
<exclusion>
<artifactId>logback-core</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.5.15</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>VVAS-PicGroup</finalName> <finalName>VVAS-PicGroup</finalName>
...@@ -122,6 +133,21 @@ ...@@ -122,6 +133,21 @@
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>11.1.1</version>
<configuration>
<nvdApiKey>39a7e2ce-68e9-4228-aded-6a84f2d0d44e</nvdApiKey>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
\ No newline at end of file \ No newline at end of file
package com.viontech.keliu.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.write.builder.ExcelWriterBuilder;
import com.alibaba.fastjson.JSON;
import com.viontech.keliu.dao.DataCountDao;
import com.viontech.keliu.vo.MallVo;
import com.viontech.keliu.vo.PersonVo;
import com.viontech.keliu.vo.ResultVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Created with IntelliJ IDEA.
*
* @author: zhuhai
* Date: 2022-10-31
* Time: 21:00
*/
@RestController
public class DataCountController {
@Autowired
private DataCountDao dataCountDao;
private static final Logger logger = LoggerFactory.getLogger(DataCountController.class);
public DataCountController() {
}
@GetMapping({"/personGroup"})
public Object getPersonGroup(@RequestParam("countdate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date countdate, @RequestParam("accountid") Integer accountid) {
List<ResultVo> resultVos = new ArrayList();
try {
List<PersonVo> personVos = this.dataCountDao.get_person(countdate, accountid);
List<MallVo> mallVos = this.dataCountDao.get_malls(accountid);
resultVos = this.getPersonList(mallVos, personVos);
} catch (Exception ex) {
logger.info("抓拍数据分组出错{}",ex.getMessage());
}
HashMap<String, Object> result = new HashMap();
if (resultVos.size() > 0) {
List<ResultVo> resultVoList = resultVos.stream().sorted(Comparator.comparing(ResultVo::getCount_person).reversed()).collect(Collectors.toList());
result.put("msg_code", 200);
result.put("msg_info", "成功");
result.put("data", resultVoList);
} else {
result.put("msg_code", 506);
result.put("msg_info", "数据为空");
result.put("data", resultVos);
}
return result;
}
@GetMapping({"/personDownload"})
public void exportExcel(@RequestParam Integer accountid, @RequestParam("countdate") Date countdate, HttpServletResponse response) throws IOException {
List<PersonVo> personVos = this.dataCountDao.get_person(countdate, accountid);
List<MallVo> mallVos = this.dataCountDao.get_malls(accountid);
List<ResultVo> resultVos = this.getPersonList(mallVos, personVos);
try {
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("抓拍分组-" + DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now()), "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
((ExcelWriterBuilder) EasyExcel.write(response.getOutputStream(), ResultVo.class).head(this.titleHead())).autoCloseStream(Boolean.FALSE).sheet("模板").doWrite(resultVos);
} catch (IOException var9) {
response.reset();
response.setContentType("application/json");
response.setCharacterEncoding("utf-8");
Map<String, String> map = new HashMap(2);
map.put("status", "failure");
map.put("message", "下载文件失败" + var9.getMessage());
response.getWriter().println(JSON.toJSONString(map));
}
}
public List<ResultVo> getPersonList(List<MallVo> mallVos, List<PersonVo> personVos) {
List<ResultVo> resultVos = new ArrayList();
Iterator iterator = mallVos.iterator();
while(iterator.hasNext()) {
MallVo mall = (MallVo) iterator.next();
ResultVo resultVo = new ResultVo();
resultVo.setMall_name(mall.getName());
List<PersonVo> tempList = personVos.stream().filter((p) -> p.getMall_id().equals(mall.getId())).collect(Collectors.toList());
if (tempList.size() == 0) {
resultVo.setClerk_num("-");
resultVo.setCount_person("-");
resultVo.setCustomer_num("-");
resultVo.setCustomer_adult("-");
resultVo.setCustomer_child("-");
resultVo.setCustomer_alone("-");
resultVo.setCustomer_group("-");
resultVos.add(resultVo);
} else {
resultVo.setCount_person(String.valueOf(tempList.size()));
Integer clerkNum = (tempList.stream().filter((t) -> t.getPerson_type().equals(1)).collect(Collectors.toList())).size();
resultVo.setClerk_num(String.valueOf(clerkNum));
List<PersonVo> customerList = (tempList.stream().filter((t) -> t.getPerson_type().equals(0)).collect(Collectors.toList())).stream().sorted(Comparator.comparing(PersonVo::getCounttime)).collect(Collectors.toList());
resultVo.setCustomer_num(String.valueOf(customerList.size()));
Integer customerAdultNum = 0;
Integer customerChildNum = 0;
for (PersonVo personVo : customerList) {
Integer mood = personVo.getMood();
if (mood == null) {
continue;
}
if (mood.equals(108)) {
customerAdultNum += 1;
} else if (mood.equals(107)) {
customerChildNum += 1;
}
}
resultVo.setCustomer_adult(String.valueOf(customerAdultNum));
resultVo.setCustomer_child(String.valueOf(customerChildNum));
int customer_alone = 0;
int customer_group = 0;
StringBuilder str = new StringBuilder();
for (int i = 0; i < customerList.size() - 1; ++i) {
PersonVo pvo1 = customerList.get(i);
PersonVo pvo2 = customerList.get(i + 1);
Long time1 = pvo1.getCounttime().getTime();
Long time2 = pvo2.getCounttime().getTime();
int seconds = (int) ((time2 - time1) / 1000L);
if (i == 0) {
str.append(pvo1.getMood());
}
if (seconds <= 6) {
str.append(",").append(pvo2.getMood());
} else {
str.append("#").append(pvo2.getMood());
}
}
String[] group = str.toString().split("#");
for (String s : group) {
String[] split = s.split(",");
//单独的加一
if (split.length == 1) {
customer_alone += 1;
} else {
//分组加一
customer_group += 1;
}
}
resultVo.setCustomer_alone(String.valueOf(customer_alone));
resultVo.setCustomer_group(String.valueOf(customer_group));
resultVos.add(resultVo);
}
}
return resultVos;
}
private List<List<String>> titleHead() {
List<List<String>> list = new ArrayList();
List<String> head0 = new ArrayList();
head0.add("广场名称");
List<String> head1 = new ArrayList();
head1.add("总人数");
List<String> head2 = new ArrayList();
head2.add("店员人数");
List<String> head3 = new ArrayList();
head3.add("顾客人数");
List<String> head4 = new ArrayList();
head4.add("顾客组数(30秒)");
List<String> head5 = new ArrayList();
head5.add("顾客组数(60秒)");
list.add(head0);
list.add(head1);
list.add(head2);
list.add(head3);
list.add(head4);
list.add(head5);
return list;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -3,20 +3,13 @@ package com.viontech.keliu.controller; ...@@ -3,20 +3,13 @@ package com.viontech.keliu.controller;
import cn.hutool.core.date.DateField; import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.viontech.keliu.entity.DPersonRecord;
import com.viontech.keliu.service.PersonGroupService;
import com.viontech.keliu.service.PersonRecordService; import com.viontech.keliu.service.PersonRecordService;
import org.springframework.beans.factory.annotation.Value; import jakarta.annotation.Resource;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
......
...@@ -3,7 +3,7 @@ package com.viontech.keliu.dao; ...@@ -3,7 +3,7 @@ package com.viontech.keliu.dao;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import java.util.List; import java.util.List;
/** /**
......
...@@ -7,7 +7,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper; ...@@ -7,7 +7,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
......
...@@ -5,7 +5,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper; ...@@ -5,7 +5,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
......
...@@ -6,7 +6,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper; ...@@ -6,7 +6,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
......
...@@ -8,7 +8,7 @@ import org.springframework.jdbc.core.namedparam.SqlParameterSource; ...@@ -8,7 +8,7 @@ import org.springframework.jdbc.core.namedparam.SqlParameterSource;
import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils; import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
......
...@@ -7,7 +7,7 @@ import org.springframework.jdbc.core.namedparam.SqlParameterSource; ...@@ -7,7 +7,7 @@ import org.springframework.jdbc.core.namedparam.SqlParameterSource;
import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils; import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
......
...@@ -10,7 +10,7 @@ import org.springframework.jdbc.core.JdbcTemplate; ...@@ -10,7 +10,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
......
...@@ -3,14 +3,14 @@ package com.viontech.keliu.dao; ...@@ -3,14 +3,14 @@ package com.viontech.keliu.dao;
import com.viontech.keliu.entity.DateTimeParam; import com.viontech.keliu.entity.DateTimeParam;
import com.viontech.keliu.entity.Person; import com.viontech.keliu.entity.Person;
import com.viontech.keliu.service.DateTimeParamService; import com.viontech.keliu.service.DateTimeParamService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.boot.autoconfigure.batch.BatchProperties;
import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.util.CollectionUtils;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
......
...@@ -5,12 +5,13 @@ import cn.hutool.core.date.DateUtil; ...@@ -5,12 +5,13 @@ import cn.hutool.core.date.DateUtil;
import com.viontech.keliu.entity.DateTimeParam; import com.viontech.keliu.entity.DateTimeParam;
import com.viontech.keliu.entity.MallBusinessTime; import com.viontech.keliu.entity.MallBusinessTime;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.util.CollectionUtils;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
......
...@@ -10,11 +10,12 @@ import com.viontech.keliu.entity.Person; ...@@ -10,11 +10,12 @@ import com.viontech.keliu.entity.Person;
import com.viontech.keliu.entity.PersonGroupResult; import com.viontech.keliu.entity.PersonGroupResult;
import com.viontech.keliu.service.PersonGroupService; import com.viontech.keliu.service.PersonGroupService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.core.task.TaskExecutor; import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.util.CollectionUtils;
import java.util.Comparator; import java.util.Comparator;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
......
...@@ -14,7 +14,6 @@ import com.viontech.keliu.dao.FaceRecognitionDao; ...@@ -14,7 +14,6 @@ import com.viontech.keliu.dao.FaceRecognitionDao;
import com.viontech.keliu.entity.*; import com.viontech.keliu.entity.*;
import com.viontech.keliu.service.PersonRecordService; import com.viontech.keliu.service.PersonRecordService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.BeanPropertyRowMapper;
...@@ -23,9 +22,10 @@ import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; ...@@ -23,9 +22,10 @@ import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.jdbc.core.namedparam.SqlParameterSource; import org.springframework.jdbc.core.namedparam.SqlParameterSource;
import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils; import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
...@@ -177,7 +177,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -177,7 +177,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
List<DPersonRecord> noList = v.stream().filter(dPersonRecord -> dPersonRecord.getReceptionCount() == 0).collect(Collectors.toList()); List<DPersonRecord> noList = v.stream().filter(dPersonRecord -> dPersonRecord.getReceptionCount() == 0).collect(Collectors.toList());
//被接待的 //被接待的
List<DPersonRecord> yesList = v.stream().filter(dPersonRecord -> dPersonRecord.getReceptionCount() > 0).collect(Collectors.toList()); List<DPersonRecord> yesList = v.stream().filter(dPersonRecord -> dPersonRecord.getReceptionCount() > 0).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(noList)) { if (!CollectionUtils.isEmpty(noList)) {
//找出该组中被接待的一条记录 //找出该组中被接待的一条记录
DPersonRecord dPersonRecord1 = yesList.stream().min(Comparator.comparing(DPersonRecord::getReceptionTime)).orElse(null); DPersonRecord dPersonRecord1 = yesList.stream().min(Comparator.comparing(DPersonRecord::getReceptionTime)).orElse(null);
if (dPersonRecord1 != null) { if (dPersonRecord1 != null) {
...@@ -207,7 +207,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -207,7 +207,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
} }
personRecordList.add(dPersonRecord); personRecordList.add(dPersonRecord);
dPersonRecordDao.createDPersonRecordBatch(Collections.singletonList(dPersonRecord)); dPersonRecordDao.createDPersonRecordBatch(Collections.singletonList(dPersonRecord));
if (CollectionUtils.isNotEmpty(dPersonRecord.getPersonTrackDetailList())) { if (!CollectionUtils.isEmpty(dPersonRecord.getPersonTrackDetailList())) {
dPersonTrackDetailDao.createDPersonTrackDetailBatch(dPersonRecord.getPersonTrackDetailList()); dPersonTrackDetailDao.createDPersonTrackDetailBatch(dPersonRecord.getPersonTrackDetailList());
} }
...@@ -320,7 +320,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -320,7 +320,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
//处理接待数据 //处理接待数据
List<DPersonReception> personReceptionList = dPersonReceptionDao.getPersonReceptionList(dPersonRecord.getMallId(), dPersonRecord.getCountDate(), dPersonRecord.getPersonUnid(), dPersonRecord.getArriveTime(), dPersonRecord.getLeaveTime()); List<DPersonReception> personReceptionList = dPersonReceptionDao.getPersonReceptionList(dPersonRecord.getMallId(), dPersonRecord.getCountDate(), dPersonRecord.getPersonUnid(), dPersonRecord.getArriveTime(), dPersonRecord.getLeaveTime());
if (CollectionUtils.isNotEmpty(personReceptionList)) { if (!CollectionUtils.isEmpty(personReceptionList)) {
dPersonRecord.setReceptionCount(personReceptionList.size()); dPersonRecord.setReceptionCount(personReceptionList.size());
Date startTime = personReceptionList.stream().min(Comparator.comparing(DPersonReception::getStartTime)).get().getStartTime(); Date startTime = personReceptionList.stream().min(Comparator.comparing(DPersonReception::getStartTime)).get().getStartTime();
//接待时间早于到店时间,接待时间为进店时间+1秒 //接待时间早于到店时间,接待时间为进店时间+1秒
...@@ -346,7 +346,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -346,7 +346,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
List<DPersonTrackDetail> personTrackDetailList = new ArrayList<>(); List<DPersonTrackDetail> personTrackDetailList = new ArrayList<>();
gatePersonMap.forEach((key, value) -> { gatePersonMap.forEach((key, value) -> {
List<DPersonTrackDetail> personTrackDetails = getPersonTrackDetail(personInOutDetail.getGroupUnid(), value); List<DPersonTrackDetail> personTrackDetails = getPersonTrackDetail(personInOutDetail.getGroupUnid(), value);
if (CollectionUtils.isNotEmpty(personTrackDetails)) { if (!CollectionUtils.isEmpty(personTrackDetails)) {
personTrackDetailList.addAll(personTrackDetails); personTrackDetailList.addAll(personTrackDetails);
} }
}); });
...@@ -355,7 +355,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -355,7 +355,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
List<DPersonTrackDetail> engageList = personTrackDetailList.stream().filter(v -> v.getIsEngage() == 1) List<DPersonTrackDetail> engageList = personTrackDetailList.stream().filter(v -> v.getIsEngage() == 1)
.sorted(Comparator.comparing(DPersonTrackDetail::getEngageTime)).collect(Collectors.toList()); .sorted(Comparator.comparing(DPersonTrackDetail::getEngageTime)).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(engageList)) { if (!CollectionUtils.isEmpty(engageList)) {
dPersonRecord.setEngageCount(engageList.size()); dPersonRecord.setEngageCount(engageList.size());
dPersonRecord.setEngageTime(engageList.get(0).getEngageTime()); dPersonRecord.setEngageTime(engageList.get(0).getEngageTime());
} }
...@@ -364,7 +364,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -364,7 +364,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
List<DPersonTrackDetail> attentionList = personTrackDetailList.stream().filter(v -> v.getVisitDuration() != null && v.getVisitDuration() > attentionThreshold * 1000L) List<DPersonTrackDetail> attentionList = personTrackDetailList.stream().filter(v -> v.getVisitDuration() != null && v.getVisitDuration() > attentionThreshold * 1000L)
.sorted(Comparator.comparing(DPersonTrackDetail::getArriveTime)).collect(Collectors.toList()); .sorted(Comparator.comparing(DPersonTrackDetail::getArriveTime)).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(attentionList)) { if (!CollectionUtils.isEmpty(attentionList)) {
dPersonRecord.setAttentionCount(attentionList.size()); dPersonRecord.setAttentionCount(attentionList.size());
dPersonRecord.setAttentionTime(attentionList.get(0).getArriveTime()); dPersonRecord.setAttentionTime(attentionList.get(0).getArriveTime());
} }
...@@ -505,7 +505,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -505,7 +505,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
String sql = "select mall_id,countdate,counttime,person_count,staff_count,female_stage,male_stage from d_mall_day_face_recognition_sta where mall_id = ? and countdate = ?;"; String sql = "select mall_id,countdate,counttime,person_count,staff_count,female_stage,male_stage from d_mall_day_face_recognition_sta where mall_id = ? and countdate = ?;";
List<DMallDayFaceRecognitionSta> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(DMallDayFaceRecognitionSta.class), mallId, countDate); List<DMallDayFaceRecognitionSta> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(DMallDayFaceRecognitionSta.class), mallId, countDate);
if (CollectionUtils.isNotEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
DMallDayFaceRecognitionSta dMallDayFaceRecognitionSta = list.get(0); DMallDayFaceRecognitionSta dMallDayFaceRecognitionSta = list.get(0);
long newPersonCount = dMallDayFaceRecognitionSta.getStaffCount() + customerCount; long newPersonCount = dMallDayFaceRecognitionSta.getStaffCount() + customerCount;
String femaleStage = dMallDayFaceRecognitionSta.getFemaleStage(); String femaleStage = dMallDayFaceRecognitionSta.getFemaleStage();
...@@ -575,7 +575,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -575,7 +575,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
Map<Integer, Long> maleStageMap = new HashMap<>(); Map<Integer, Long> maleStageMap = new HashMap<>();
//女性年龄 //女性年龄
Map<Integer, Long> femaleStageMap = new HashMap<>(); Map<Integer, Long> femaleStageMap = new HashMap<>();
if (CollectionUtils.isNotEmpty(dPersonRecords)) { if (!CollectionUtils.isEmpty(dPersonRecords)) {
//顾客总人数 //顾客总人数
customerCount = dPersonRecords.stream().count(); customerCount = dPersonRecords.stream().count();
//男性顾客人数 //男性顾客人数
...@@ -614,7 +614,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -614,7 +614,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
updateSta.setFemaleStage(femaleStageStr); updateSta.setFemaleStage(femaleStageStr);
CustomerGroupResult customerGroupResult = new CustomerGroupResult(); CustomerGroupResult customerGroupResult = new CustomerGroupResult();
if (CollectionUtils.isNotEmpty(dPersonRecords)) { if (!CollectionUtils.isEmpty(dPersonRecords)) {
Map<String, List<DPersonRecord>> groupMap = dPersonRecords.stream().collect(Collectors.groupingBy(DPersonRecord::getGroupUnid)); Map<String, List<DPersonRecord>> groupMap = dPersonRecords.stream().collect(Collectors.groupingBy(DPersonRecord::getGroupUnid));
groupMap.forEach((k1,v1) -> { groupMap.forEach((k1,v1) -> {
calGroup(1, customerGroupResult, v1); calGroup(1, customerGroupResult, v1);
...@@ -630,7 +630,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -630,7 +630,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
updateList.add(updateSta); updateList.add(updateSta);
}); });
if (CollectionUtils.isNotEmpty(updateList)) { if (!CollectionUtils.isEmpty(updateList)) {
String updateSql = "update d_mall_hour_face_recognition_sta set person_count = :personCount,custom_count = :customCount,male_count = :maleCount,female_count = :femaleCount,male_stage = :maleStage, female_stage = :femaleStage, group_num = :groupNum, single_group_num = :singleGroupNum, double_group_num = :doubleGroupNum, multiple_group_num = :multipleGroupNum, family_group_num = :familyGroupNum, lover_group_num = :loverGroupNum, partner_group_num = :partnerGroupNum where mall_id = :mallId and countdate = :countdate and counttime = :counttime;"; String updateSql = "update d_mall_hour_face_recognition_sta set person_count = :personCount,custom_count = :customCount,male_count = :maleCount,female_count = :femaleCount,male_stage = :maleStage, female_stage = :femaleStage, group_num = :groupNum, single_group_num = :singleGroupNum, double_group_num = :doubleGroupNum, multiple_group_num = :multipleGroupNum, family_group_num = :familyGroupNum, lover_group_num = :loverGroupNum, partner_group_num = :partnerGroupNum where mall_id = :mallId and countdate = :countdate and counttime = :counttime;";
SqlParameterSource[] updateSources = SqlParameterSourceUtils.createBatch(updateList.toArray()); SqlParameterSource[] updateSources = SqlParameterSourceUtils.createBatch(updateList.toArray());
namedParameterJdbcTemplate.batchUpdate(updateSql, updateSources); namedParameterJdbcTemplate.batchUpdate(updateSql, updateSources);
...@@ -677,7 +677,7 @@ public class PersonRecordServiceImpl implements PersonRecordService { ...@@ -677,7 +677,7 @@ public class PersonRecordServiceImpl implements PersonRecordService {
} }
} }
// 删除过滤掉人员的数据 // 删除过滤掉人员的数据
if (CollectionUtils.isNotEmpty(deleteFaceResidences)) { if (!CollectionUtils.isEmpty(deleteFaceResidences)) {
String deleteSql = "delete from d_face_residence where mall_id = :mallId and countdate = :countdate and id = :id;"; String deleteSql = "delete from d_face_residence where mall_id = :mallId and countdate = :countdate and id = :id;";
SqlParameterSource[] updateSources = SqlParameterSourceUtils.createBatch(deleteFaceResidences.toArray()); SqlParameterSource[] updateSources = SqlParameterSourceUtils.createBatch(deleteFaceResidences.toArray());
namedParameterJdbcTemplate.batchUpdate(deleteSql, updateSources); namedParameterJdbcTemplate.batchUpdate(deleteSql, updateSources);
......
...@@ -5,10 +5,11 @@ import com.viontech.keliu.dao.FaceRecognitionDao; ...@@ -5,10 +5,11 @@ import com.viontech.keliu.dao.FaceRecognitionDao;
import com.viontech.keliu.entity.DPersonTrackDetail; import com.viontech.keliu.entity.DPersonTrackDetail;
import com.viontech.keliu.entity.Person; import com.viontech.keliu.entity.Person;
import com.viontech.keliu.service.PersonTrackDetailService; import com.viontech.keliu.service.PersonTrackDetailService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
...@@ -60,7 +61,7 @@ public class PersonTrackDetailServiceImpl implements PersonTrackDetailService { ...@@ -60,7 +61,7 @@ public class PersonTrackDetailServiceImpl implements PersonTrackDetailService {
Map<String, List<Person>> personUnidMap = personList.stream().collect(Collectors.groupingBy(Person::getPersonUnid)); Map<String, List<Person>> personUnidMap = personList.stream().collect(Collectors.groupingBy(Person::getPersonUnid));
personUnidMap.forEach((key, value) -> { personUnidMap.forEach((key, value) -> {
List<DPersonTrackDetail> personTrackDetailList = getPersonTrackDetail(value); List<DPersonTrackDetail> personTrackDetailList = getPersonTrackDetail(value);
if (CollectionUtils.isNotEmpty(personTrackDetailList)) { if (!CollectionUtils.isEmpty(personTrackDetailList)) {
//保存进数据库 //保存进数据库
dPersonTrackDetailDao.createDPersonTrackDetailBatch(personTrackDetailList); dPersonTrackDetailDao.createDPersonTrackDetailBatch(personTrackDetailList);
} }
......
debug=false debug=false
server.max-http-header-size=102400
################################## DATABASE ######################################## ################################## DATABASE ########################################
# \u6570\u636E\u5E93Url \u6237\u540D \u5BC6\u7801 \u914D\u7F6E # \u6570\u636E\u5E93Url \u6237\u540D \u5BC6\u7801 \u914D\u7F6E
spring.datasource.url=jdbc:postgresql://36.112.68.214:5432/VionCountStore spring.datasource.url=jdbc:postgresql://192.168.1.64:5432/vioncountstore
spring.datasource.username=postgres spring.datasource.username=postgres
spring.datasource.password=vion spring.datasource.password=vion
spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.driver-class-name=org.postgresql.Driver
server.port=33333 server.port=18282
thread.core.pool.size=20
thread.max.pool.size=40
...@@ -2,9 +2,9 @@ debug=false ...@@ -2,9 +2,9 @@ debug=false
server.max-http-header-size=102400 server.max-http-header-size=102400
################################## DATABASE ######################################## ################################## DATABASE ########################################
# \u6570\u636E\u5E93Url \u6237\u540D \u5BC6\u7801 \u914D\u7F6E # \u6570\u636E\u5E93Url \u6237\u540D \u5BC6\u7801 \u914D\u7F6E
spring.datasource.url=jdbc:postgresql://117.133.143.116:5432/VionCountStore spring.datasource.url=jdbc:postgresql://pgm-2ze3cjpyjgjw0bl5uo.pg.rds.aliyuncs.com:1921/ShoppingMall_retail2.0
spring.datasource.username=postgres spring.datasource.username=vion
spring.datasource.password=vion spring.datasource.password=jkou72j32m4K5d8k
spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.driver-class-name=org.postgresql.Driver
server.port=18282 server.port=18282
......
spring: spring:
profiles: profiles:
active: mysql active: dev
datasource: datasource:
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
aop: aop:
......
...@@ -9,8 +9,10 @@ ...@@ -9,8 +9,10 @@
<contextName>logback</contextName> <contextName>logback</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 --> <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
<property name="log.path" value="logs" /> <property name="log.path" value="logs" />
<property name="pattern" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] [%thread] %logger{50} - %msg%n" /> <property name="pattern" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] [%-5thread] [%49c{1}:%-4L] %msg%n"/>
<!--
<property name="pattern" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] [%thread] %logger{50} - %msg%n" />
-->
<!--输出到控制台--> <!--输出到控制台-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息--> <!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
...@@ -18,7 +20,7 @@ ...@@ -18,7 +20,7 @@
<level>info</level> <level>info</level>
</filter> </filter>
<encoder> <encoder>
<Pattern>%highlight(%-5level) %yellow(%d{yyyy-MM-dd HH:mm:ss.SSS}) [%thread] %green(%logger{50}) - %msg%n</Pattern> <Pattern>${pattern}</Pattern>
<!-- 设置字符集 --> <!-- 设置字符集 -->
</encoder> </encoder>
</appender> </appender>
...@@ -36,12 +38,10 @@ ...@@ -36,12 +38,10 @@
<charset>UTF-8</charset> <!-- 设置字符集 --> <charset>UTF-8</charset> <!-- 设置字符集 -->
</encoder> </encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- 日志归档 --> <!-- 日志归档 -->
<fileNamePattern>${log.path}/debug/debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>100MB</maxFileSize>
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数--> <!--日志文件保留天数-->
<maxHistory>15</maxHistory> <maxHistory>15</maxHistory>
</rollingPolicy> </rollingPolicy>
...@@ -63,12 +63,10 @@ ...@@ -63,12 +63,10 @@
<charset>UTF-8</charset> <charset>UTF-8</charset>
</encoder> </encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- 每天日志归档路径以及格式 --> <!-- 每天日志归档路径以及格式 -->
<fileNamePattern>${log.path}/info/info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>100MB</maxFileSize>
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数--> <!--日志文件保留天数-->
<maxHistory>15</maxHistory> <maxHistory>15</maxHistory>
</rollingPolicy> </rollingPolicy>
...@@ -76,6 +74,11 @@ ...@@ -76,6 +74,11 @@
<filter class="ch.qos.logback.classic.filter.LevelFilter"> <filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>info</level> <level>info</level>
<onMatch>ACCEPT</onMatch> <onMatch>ACCEPT</onMatch>
<onMismatch>NEUTRAL</onMismatch>
</filter>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>warn</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch> <onMismatch>DENY</onMismatch>
</filter> </filter>
</appender> </appender>
...@@ -90,11 +93,9 @@ ...@@ -90,11 +93,9 @@
<charset>UTF-8</charset> <!-- 此处设置字符集 --> <charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder> </encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/warn/warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>100MB</maxFileSize>
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数--> <!--日志文件保留天数-->
<maxHistory>5</maxHistory> <maxHistory>5</maxHistory>
</rollingPolicy> </rollingPolicy>
...@@ -117,11 +118,9 @@ ...@@ -117,11 +118,9 @@
<charset>UTF-8</charset> <!-- 此处设置字符集 --> <charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder> </encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error/error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>100MB</maxFileSize>
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数--> <!--日志文件保留天数-->
<maxHistory>15</maxHistory> <maxHistory>15</maxHistory>
</rollingPolicy> </rollingPolicy>
...@@ -159,39 +158,44 @@ ...@@ -159,39 +158,44 @@
可以包含零个或多个元素,标识这个appender将会添加到这个logger。 可以包含零个或多个元素,标识这个appender将会添加到这个logger。
--> -->
<logger name="jdbc.sqlonly" level="off"> <appender name="INFO_FILE_ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
<discardingThreshold>0</discardingThreshold>
<!-- 队列的最大容量,该值会影响性能.默认值为256 -->
<queueSize>2048</queueSize>
<!-- 队列满了,是否阻塞,默认为false;如果配置为true,则队列满了就丢弃日志; -->
<neverBlock>false</neverBlock>
<!-- 添加附加的appender,最多只能添加一个 -->
<appender-ref ref="INFO_FILE"/>
</appender>
<!--开发环境:打印控制台-->
<logger name="jdbc.sqlonly" level="off">
</logger> </logger>
<logger name="jdbc.audit" level="off"> <logger name="jdbc.audit" level="off">
</logger> </logger>
<logger name="jdbc.resultset" level="debug"> <logger name="jdbc.resultset" level="off">
</logger> </logger>
<logger name="jdbc.connection" level="off"> <logger name="jdbc.connection" level="off">
</logger> </logger>
<logger name="jdbc.sqltiming" level="debug"> <logger name="jdbc.sqltiming" level="off">
</logger>
<logger name="com.netflix.discovery" level="off">
</logger>
<logger name="org.springframework.batch" level="info" additivity="false">
<appender-ref ref="INFO_FILE_ASYNC" />
<appender-ref ref="WARN_FILE" />
<appender-ref ref="ERROR_FILE" />
</logger>
<logger name="com.viontech.keliu" level="debug">
<appender-ref ref="DEBUG_FILE" />
</logger> </logger>
<root level="DEBUG"> <root level="info">
<appender-ref ref="CONSOLE" /> <appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" /> <appender-ref ref="INFO_FILE_ASYNC" />
<appender-ref ref="INFO_FILE" />
<appender-ref ref="WARN_FILE" /> <appender-ref ref="WARN_FILE" />
<appender-ref ref="ERROR_FILE" /> <appender-ref ref="ERROR_FILE" />
</root> </root>
<!--生产环境:输出到文件-->
<!--<springProfile name="pro">-->
<!--<root level="info">-->
<!--<appender-ref ref="CONSOLE" />-->
<!--<appender-ref ref="DEBUG_FILE" />-->
<!--<appender-ref ref="INFO_FILE" />-->
<!--<appender-ref ref="ERROR_FILE" />-->
<!--<appender-ref ref="WARN_FILE" />-->
<!--</root>-->
<!--</springProfile>-->
</configuration> </configuration>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!