更新
This commit is contained in:
@@ -7,6 +7,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.modules.log.service.RootLogService;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
@@ -93,17 +94,25 @@ public class RootLogServiceImpl implements RootLogService {
|
||||
.lte(end_time));
|
||||
}
|
||||
|
||||
//根据条件得到的总条数
|
||||
|
||||
Pageable pageable = PageRequest.of(page.getPageNumber(), page.getPageSize());
|
||||
long totalCount = mongoTemplate.count(query,device_code);
|
||||
|
||||
List<Map> result = mongoTemplate.find(query.with(pageable), Map.class, device_code);
|
||||
|
||||
long totalPage = totalCount % page.getPageSize() == 0 ? totalCount / page.getPageSize() : totalCount / page.getPageSize() + 1;
|
||||
/* //根据条件得到的总条数
|
||||
long totalSize = mongoTemplate.count(query, Map.class, device_code);
|
||||
|
||||
//处理分页
|
||||
query.skip(page.getPageNumber()).limit(page.getPageSize());
|
||||
List<Map> list = mongoTemplate.find(query,Map.class, device_code);
|
||||
|
||||
List<Map> list = mongoTemplate.find(query,Map.class, device_code);*/
|
||||
//封装前端分页查询结果
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("content", list);
|
||||
result.put("totalElements", totalSize);
|
||||
return result;
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("content", result);
|
||||
jo.put("totalElements", totalCount);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,12 +8,12 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:hl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:hl_acs_one}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.46.225}:${DB_PORT:3306}/${DB_NAME:hl_acs_one}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:Root.123456}
|
||||
#password: ${DB_PWD:password}
|
||||
#password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:password}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
@@ -59,13 +59,13 @@ spring:
|
||||
multi-statement-alagvslow: true
|
||||
data:
|
||||
mongodb:
|
||||
host: 47.111.78.178
|
||||
host: 127.0.0.1
|
||||
port: 27017
|
||||
database: nlacs
|
||||
redis:
|
||||
#数据库索引
|
||||
database: ${REDIS_DB:10}
|
||||
host: ${REDIS_HOST:47.111.78.178}
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PWD:}
|
||||
#连接超时时间
|
||||
@@ -162,5 +162,5 @@ jetcache:
|
||||
maxIdle: 200
|
||||
maxTotal: 1000
|
||||
uri:
|
||||
- redis://47.111.78.178:6379
|
||||
- redis://127.0.0.1:6379
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
<el-radio-button :label="1">是</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="空想请求成功" prop="fullrequireSucess" label-width="120px">
|
||||
<el-form-item label="空箱请求成功" prop="fullrequireSucess" label-width="120px">
|
||||
<el-radio-group v-model="form.fullrequireSucess">
|
||||
<el-radio-button :label="0">否</el-radio-button>
|
||||
<el-radio-button :label="1">是</el-radio-button>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="datetimerange"
|
||||
:picker-options="pickerOptions"
|
||||
class="filter-item"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
|
||||
Reference in New Issue
Block a user