Commit b3f95a20 by zzrdark

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

parent 2c3f0dc6
spring: spring:
profiles: profiles:
active: prod active: dev
application: application:
name: cneeds-server-authorization name: cneeds-server-authorization
server: server:
......
...@@ -22,7 +22,8 @@ public interface DeviceClient { ...@@ -22,7 +22,8 @@ public interface DeviceClient {
PageDto seriesList(@RequestParam Integer page, PageDto seriesList(@RequestParam Integer page,
@RequestParam("limit") Integer pageSize, @RequestParam("limit") Integer pageSize,
@RequestParam("sidx") String orderField, @RequestParam("sidx") String orderField,
@RequestParam("order") String order); @RequestParam("order") String order,
@RequestParam("seriesNum") String seriesNum);
@PostMapping("/device/series/listAll") @PostMapping("/device/series/listAll")
List<SeriesDto> seriesListAll(); List<SeriesDto> seriesListAll();
...@@ -44,7 +45,9 @@ public interface DeviceClient { ...@@ -44,7 +45,9 @@ public interface DeviceClient {
PageDto deviceList(@RequestParam Integer page, PageDto deviceList(@RequestParam Integer page,
@RequestParam("limit") Integer pageSize, @RequestParam("limit") Integer pageSize,
@RequestParam("sidx") String orderField, @RequestParam("sidx") String orderField,
@RequestParam("order") String order); @RequestParam("order") String order,
@RequestParam("seriesId") Long seriesId,
@RequestParam("imei") String imei);
@PostMapping("/device/info/infoByImei") @PostMapping("/device/info/infoByImei")
DeviceInfoDto queryDeviceByImei(@RequestBody String imei); DeviceInfoDto queryDeviceByImei(@RequestBody String imei);
...@@ -73,7 +76,8 @@ public interface DeviceClient { ...@@ -73,7 +76,8 @@ public interface DeviceClient {
PageDto deviceChannelList(@RequestParam Integer page, PageDto deviceChannelList(@RequestParam Integer page,
@RequestParam("limit") Integer pageSize, @RequestParam("limit") Integer pageSize,
@RequestParam("sidx") String orderField, @RequestParam("sidx") String orderField,
@RequestParam("order") String order); @RequestParam("order") String order,
@RequestParam("channelNum") String channelNum);
/** /**
* 增加一个渠道号 * 增加一个渠道号
* @param dto * @param dto
......
...@@ -80,7 +80,8 @@ public class DeviceController { ...@@ -80,7 +80,8 @@ public class DeviceController {
@PostMapping("/series/list") @PostMapping("/series/list")
public R seriesList(@RequestParam(required = false) Integer page, public R seriesList(@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer pageSize, @RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String sort){ @RequestParam(required = false) String sort,
@RequestParam(required = false) String seriesNum){
String orderField = null; String orderField = null;
String order = null; String order = null;
...@@ -104,7 +105,7 @@ public class DeviceController { ...@@ -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); return new R().put("data",pageDto);
} }
...@@ -153,7 +154,9 @@ public class DeviceController { ...@@ -153,7 +154,9 @@ public class DeviceController {
@PostMapping("/device/list") @PostMapping("/device/list")
public R deviceList(@RequestParam(required = false) Integer page, public R deviceList(@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer pageSize, @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 orderField = null;
String order = null; String order = null;
...@@ -175,7 +178,7 @@ public class DeviceController { ...@@ -175,7 +178,7 @@ public class DeviceController {
orderField = sort.substring(1); orderField = sort.substring(1);
orderField = RequestParamterConverter.toLine(orderField); 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); return new R().put("data",pageDto);
} }
...@@ -221,7 +224,8 @@ public class DeviceController { ...@@ -221,7 +224,8 @@ public class DeviceController {
@PostMapping("/deviceChannel/list") @PostMapping("/deviceChannel/list")
public R deivceChannelList(@RequestParam(required = false) Integer page, public R deivceChannelList(@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer pageSize, @RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String sort){ @RequestParam(required = false) String sort,
@RequestParam(required = false) String channelNum){
String orderField = null; String orderField = null;
String order = null; String order = null;
...@@ -245,7 +249,7 @@ public class DeviceController { ...@@ -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); return new R().put("data",pageDto);
} }
......
spring: spring:
profiles: profiles:
active: prod active: dev
application: application:
name: cneeds-server-datashow name: cneeds-server-datashow
server: server:
......
...@@ -20,9 +20,17 @@ public class DeviceChannelServiceImpl extends ServiceImpl<DeviceChannelDao, Devi ...@@ -20,9 +20,17 @@ public class DeviceChannelServiceImpl extends ServiceImpl<DeviceChannelDao, Devi
@Override @Override
public PageUtils queryPage(Map<String, Object> params) { 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( IPage<DeviceChannelEntity> page = this.page(
new Query<DeviceChannelEntity>().getPage(params), new Query<DeviceChannelEntity>().getPage(params),
new QueryWrapper<DeviceChannelEntity>() queryWrapper
); );
return new PageUtils(page); return new PageUtils(page);
......
...@@ -28,9 +28,24 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoDao, DeviceInfo ...@@ -28,9 +28,24 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoDao, DeviceInfo
@Override @Override
public PageUtils queryPage(Map<String, Object> params) { 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( IPage<DeviceInfoEntity> page = this.page(
new Query<DeviceInfoEntity>().getPage(params), new Query<DeviceInfoEntity>().getPage(params),
new QueryWrapper<DeviceInfoEntity>() queryWrapper
); );
Set<Long> set = new HashSet<>(); Set<Long> set = new HashSet<>();
......
...@@ -22,9 +22,16 @@ public class ProductSeriesServiceImpl extends ServiceImpl<ProductSeriesDao, Prod ...@@ -22,9 +22,16 @@ public class ProductSeriesServiceImpl extends ServiceImpl<ProductSeriesDao, Prod
@Override @Override
public PageUtils queryPage(Map<String, Object> params) { 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( IPage<ProductSeriesEntity> page = this.page(
new Query<ProductSeriesEntity>().getPage(params), new Query<ProductSeriesEntity>().getPage(params),
new QueryWrapper<ProductSeriesEntity>() queryWrapper
); );
return new PageUtils(page); return new PageUtils(page);
......
spring: spring:
profiles: profiles:
active: prod active: dev
application: application:
name: cneeds-server-device name: cneeds-server-device
......
spring: spring:
profiles: profiles:
active: prod active: dev
application: application:
name: cneeds-server-logupload name: cneeds-server-logupload
......
...@@ -63,7 +63,7 @@ public class MqttConfiguration { ...@@ -63,7 +63,7 @@ public class MqttConfiguration {
@Bean @Bean
public MessageProducer inbound(@Autowired MessageChannel mqttInputChannel) { public MessageProducer inbound(@Autowired MessageChannel mqttInputChannel) {
MqttPahoMessageDrivenChannelAdapter adapter = MqttPahoMessageDrivenChannelAdapter adapter =
new MqttPahoMessageDrivenChannelAdapter(mqttProperties.getClientId()+"_inbound", mqttClientFactory()); new MqttPahoMessageDrivenChannelAdapter(mqttProperties.getClientId()+"_inbound_a", mqttClientFactory());
adapter.setCompletionTimeout(Integer.valueOf(mqttProperties.getCompletionTimeout())); adapter.setCompletionTimeout(Integer.valueOf(mqttProperties.getCompletionTimeout()));
adapter.setConverter(new DefaultPahoMessageConverter()); adapter.setConverter(new DefaultPahoMessageConverter());
adapter.setQos(1); adapter.setQos(1);
......
spring: spring:
profiles: profiles:
active: prod active: dev
application: application:
name: cneeds-server-user 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