Commit b3f95a20 by zzrdark

1.增加系统模块查询 完成

parent 2c3f0dc6
spring:
profiles:
active: prod
active: dev
application:
name: cneeds-server-authorization
server:
......
......@@ -20,9 +20,10 @@ public interface DeviceClient {
@PostMapping("/device/series/list")
PageDto seriesList(@RequestParam Integer page,
@RequestParam("limit") Integer pageSize,
@RequestParam("sidx") String orderField,
@RequestParam("order") String order);
@RequestParam("limit") Integer pageSize,
@RequestParam("sidx") String orderField,
@RequestParam("order") String order,
@RequestParam("seriesNum") String seriesNum);
@PostMapping("/device/series/listAll")
List<SeriesDto> seriesListAll();
......@@ -44,7 +45,9 @@ public interface DeviceClient {
PageDto deviceList(@RequestParam Integer page,
@RequestParam("limit") Integer pageSize,
@RequestParam("sidx") String orderField,
@RequestParam("order") String order);
@RequestParam("order") String order,
@RequestParam("seriesId") Long seriesId,
@RequestParam("imei") String imei);
@PostMapping("/device/info/infoByImei")
DeviceInfoDto queryDeviceByImei(@RequestBody String imei);
......@@ -71,9 +74,10 @@ public interface DeviceClient {
@PostMapping("/device/devicechannel/list")
PageDto deviceChannelList(@RequestParam Integer page,
@RequestParam("limit") Integer pageSize,
@RequestParam("sidx") String orderField,
@RequestParam("order") String order);
@RequestParam("limit") Integer pageSize,
@RequestParam("sidx") String orderField,
@RequestParam("order") String order,
@RequestParam("channelNum") String channelNum);
/**
* 增加一个渠道号
* @param dto
......
......@@ -79,8 +79,9 @@ public class DeviceController {
@PostMapping("/series/list")
public R seriesList(@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String sort){
@RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String sort,
@RequestParam(required = false) String seriesNum){
String orderField = null;
String order = null;
......@@ -104,7 +105,7 @@ public class DeviceController {
}
PageDto pageDto = deviceClient.seriesList(page,pageSize,orderField,order);
PageDto pageDto = deviceClient.seriesList(page,pageSize,orderField,order,seriesNum);
return new R().put("data",pageDto);
}
......@@ -153,7 +154,9 @@ public class DeviceController {
@PostMapping("/device/list")
public R deviceList(@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String sort){
@RequestParam(required = false) String sort,
@RequestParam(required = false) Long seriesId,
@RequestParam(required = false) String imei){
String orderField = null;
String order = null;
......@@ -175,7 +178,7 @@ public class DeviceController {
orderField = sort.substring(1);
orderField = RequestParamterConverter.toLine(orderField);
}
PageDto pageDto = deviceClient.deviceList(page,pageSize,orderField,order);
PageDto pageDto = deviceClient.deviceList(page,pageSize,orderField,order,seriesId,imei);
return new R().put("data",pageDto);
}
......@@ -221,7 +224,8 @@ public class DeviceController {
@PostMapping("/deviceChannel/list")
public R deivceChannelList(@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String sort){
@RequestParam(required = false) String sort,
@RequestParam(required = false) String channelNum){
String orderField = null;
String order = null;
......@@ -245,7 +249,7 @@ public class DeviceController {
}
PageDto pageDto = deviceClient.deviceChannelList(page,pageSize,orderField,order);
PageDto pageDto = deviceClient.deviceChannelList(page,pageSize,orderField,order,channelNum);
return new R().put("data",pageDto);
}
......
spring:
profiles:
active: prod
active: dev
application:
name: cneeds-server-datashow
server:
......
......@@ -20,9 +20,17 @@ public class DeviceChannelServiceImpl extends ServiceImpl<DeviceChannelDao, Devi
@Override
public PageUtils queryPage(Map<String, Object> params) {
QueryWrapper<DeviceChannelEntity> queryWrapper = new QueryWrapper<>();
String channelNum = (String) params.get("channelNum");
if (channelNum != null && !"".equals(channelNum)){
queryWrapper.eq("channel_num",channelNum);
}
IPage<DeviceChannelEntity> page = this.page(
new Query<DeviceChannelEntity>().getPage(params),
new QueryWrapper<DeviceChannelEntity>()
queryWrapper
);
return new PageUtils(page);
......
......@@ -28,9 +28,24 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoDao, DeviceInfo
@Override
public PageUtils queryPage(Map<String, Object> params) {
QueryWrapper<DeviceInfoEntity> queryWrapper =new QueryWrapper<DeviceInfoEntity>();
String seriesIdStr = (String) params.get("seriesId");
String imei = (String) params.get("imei");
if ( seriesIdStr != null && !"".equals(seriesIdStr)){
queryWrapper.eq("series_id",Long.valueOf(seriesIdStr));
}
if (imei != null && !"".equals(imei)){
queryWrapper.eq("imei",imei);
}
IPage<DeviceInfoEntity> page = this.page(
new Query<DeviceInfoEntity>().getPage(params),
new QueryWrapper<DeviceInfoEntity>()
queryWrapper
);
Set<Long> set = new HashSet<>();
......
......@@ -22,9 +22,16 @@ public class ProductSeriesServiceImpl extends ServiceImpl<ProductSeriesDao, Prod
@Override
public PageUtils queryPage(Map<String, Object> params) {
QueryWrapper<ProductSeriesEntity> queryWrapper =new QueryWrapper<ProductSeriesEntity>();
String seriesNum = (String) params.get("seriesNum");
if (seriesNum != null && !"".equals(seriesNum)){
queryWrapper.eq("series_num",seriesNum);
}
IPage<ProductSeriesEntity> page = this.page(
new Query<ProductSeriesEntity>().getPage(params),
new QueryWrapper<ProductSeriesEntity>()
queryWrapper
);
return new PageUtils(page);
......
spring:
profiles:
active: prod
active: dev
application:
name: cneeds-server-device
......
spring:
profiles:
active: prod
active: dev
application:
name: cneeds-server-logupload
......
......@@ -63,7 +63,7 @@ public class MqttConfiguration {
@Bean
public MessageProducer inbound(@Autowired MessageChannel mqttInputChannel) {
MqttPahoMessageDrivenChannelAdapter adapter =
new MqttPahoMessageDrivenChannelAdapter(mqttProperties.getClientId()+"_inbound", mqttClientFactory());
new MqttPahoMessageDrivenChannelAdapter(mqttProperties.getClientId()+"_inbound_a", mqttClientFactory());
adapter.setCompletionTimeout(Integer.valueOf(mqttProperties.getCompletionTimeout()));
adapter.setConverter(new DefaultPahoMessageConverter());
adapter.setQos(1);
......
spring:
profiles:
active: prod
active: dev
application:
name: cneeds-server-user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment