Blame view

src/main/java/com/objecteye/service/impl/VehicleCurrencyServiceImpl.java 20.4 KB
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
1
2
3
4
5
  package com.objecteye.service.impl;
  
  import com.alibaba.fastjson.JSONObject;
  import com.objecteye.common.CommonResult;
  import com.objecteye.dao.MongoTemplates;
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
6
7
8
  import com.objecteye.entity.SyVehicleModel;
  import com.objecteye.entity.SyVehicleNjbNumber;
  import com.objecteye.entity.SyVehicleType;
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
9
  import com.objecteye.pojo.*;
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
10
11
12
13
14
15
16
17
18
19
20
21
  import com.objecteye.service.VehicleCurrencyService;
  import com.objecteye.utils.*;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.data.domain.Sort;
  import org.springframework.data.mongodb.core.MongoTemplate;
  import org.springframework.data.mongodb.core.query.Criteria;
  import org.springframework.data.mongodb.core.query.Query;
  import org.springframework.data.redis.core.RedisTemplate;
  import org.springframework.stereotype.Service;
  import org.springframework.web.multipart.MultipartFile;
  
  import java.text.SimpleDateFormat;
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
22
23
24
25
  import java.util.ArrayList;
  import java.util.Date;
  import java.util.List;
  import java.util.Vector;
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
26
  import java.util.concurrent.CountDownLatch;
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
27
  import java.util.stream.Collectors;
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
28
29
30
31
32
33
  
  @Service
  public class VehicleCurrencyServiceImpl implements VehicleCurrencyService {
      @Autowired
      private MongoTemplate mongoTemplate;
      @Autowired
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
34
35
36
37
38
39
40
41
42
43
44
      public MongoTemplates mongoTemplates;
      @Autowired
      private RedisTemplate redisTemplate;
      @Autowired
      public HttpClientUtils httpClientUtils;
      @Autowired
      public VehicleDetailsUtils vehicleDetailsUtils;
      @Autowired
      public RabbitMQVehicleTools rabbitMQVehicleTools;
      @Autowired
      private CompareDistance compareDistance;
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
45
  
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  
      /**
       * 多条件查询
       *
       * @param vehicleCurrencyReques
       * @return
       */
      @Override
      public JSONObject findByCondition(VehicleCurrencyReques vehicleCurrencyReques) {
  
          JSONObject data = new JSONObject();
          int totalPage = 0;
          List<VehicleCurrencyResult> vehicleCurrencyResultList = null;
          try {
              Query query = new Query();
              //必须条件
              Criteria c = new Criteria();
  
              int currentpage = vehicleCurrencyReques.getCurrentpage();
              int pagevolume = vehicleCurrencyReques.getPagevolume();
              String hphm = vehicleCurrencyReques.getHphm();
              Long starttime = vehicleCurrencyReques.getStartTime();
              Long endtime = vehicleCurrencyReques.getEndTime();
              int[] condition = vehicleCurrencyReques.getCondition();
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
              String cllx = vehicleCurrencyReques.getCllx();
              Integer csys = vehicleCurrencyReques.getCsys();
              String brand = vehicleCurrencyReques.getBrand();
              String subbrand = vehicleCurrencyReques.getSubbrand();
              String birthday = vehicleCurrencyReques.getBirthday();
              Integer njbgs = vehicleCurrencyReques.getNjbgs();
              Integer hplx = vehicleCurrencyReques.getHplx();
  
              SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  
              //模糊号牌检索
              if (hphm != null && hphm.length() > 0) {
                  c.and("vehicle_plate_hphm").regex(".*" + hphm + ".*");
              }
  
              //时间段范围内
              if (starttime != 0L && endtime != 0L) {
                  c.and("pictime").gte(starttime).lte(endtime);
              }
  
              //车辆类型检索
              if (cllx != null && cllx.length() > 0) {
                  c.and("vehicle_recg_type").is(cllx);
              }
  
              //车身颜色检索
              if (csys != null) {
                  c.and("vehicle_color_index").is(csys);
              }
  
              //车辆型号检索
              if (brand != null && brand.length() > 0) {
                  //车辆品牌
                  c.and("vehicle_recg_brand").is(brand);
              }
              if (subbrand != null && subbrand.length() > 0) {
                  //车辆品牌
                  c.and("vehicle_recg_subbrand").is(subbrand);
              }
              if (birthday != null && birthday.length() > 0) {
                  //车辆出场日期
                  c.and("vehicle_recg_issue_year").is(birthday);
              }
  
              //年检标个数检索
              if (njbgs != null) {
                  //获取年检标个数
                  c.and("vehicle_pendant_detect_njbnumber").is(njbgs);
              }
  
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
              //号牌类型检索
              if (hplx != null) {
                  c.and("vehicleplatetype").is(hplx);
              }
  
              /*无号牌(nullhphm)1          污损号牌(stained)2          主驾驶安全带(driverbelt)3          副驾驶安全带(copilotbelt)4
               主驾驶打电话(drivercall)5         主驾驶吸烟(driversmoke)6         是否苫盖(cover)7     有挂摆件(pendant): 8     有遮阳板(sunlouver): 9*/
              //条件查询
              if (condition != null && condition.length > 0) {
                  for (int i : condition) {
                      switch (i) {
                          case 1:
                              //无号牌
                              c.and("vehicle_plate_numScore").is(0);
                              break;
                          case 2:
                              //污损号牌(stained)
                              //当识别度为负数时认为是污损号牌
                              c.and("vehicleplatedetectscore").is(-2);
                              //因目前sdk不支持污损号牌检测,所以此处略
                              break;
                          case 3:
                              //主驾驶未系安全带(driverbelt):
                              c.and("vehicle_illegal_driver_person_status").is(1004);
                              c.and("vehicle_illegal_driver_belt_status").is(1000);
                              break;
                          case 4:
                              //副驾驶未系安全带(copilotbelt):4
                              c.and("vehicle_illegal_copilot_person_status").is(1004);
                              c.and("vehicle_illegal_copilot_belt_status").is(1000);
                              break;
                          case 5:
                              //主驾驶打电话(drivercall):
                              c.and("vehicle_illegal_driver_person_status").is(1004);
                              c.and("vehicle_illegal_driver_phone_status").is(1000);
                              break;
                          case 6:
                              //主驾驶吸烟(driversmoke):
                              c.and("vehicle_illegal_driver_person_status").is(1004);
                              c.and("vehicle_illegal_driver_smoke_status").is(1000);
                              break;
                          case 7:
                              //是否苫盖(cover):
                              //因目前sdk不支持苫盖,所以此处略
                              break;
                          case 8:
                              //有挂摆件(pendant):
                              c.and("vehicle_pendant_detect_gjexis").is(1);
                              break;
                          case 9:
                              // 有遮阳板(sunlouver):
                              c.and("vehicle_pendant_detect_zybexis").is(1);
                              break;
                          default:
                              break;
                      }
                  }
              }
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
179
180
181
182
183
              query.addCriteria(c);
              long totalNumber = mongoTemplate.count(query, VehicleCurrencyResult.class, "rabbitMQVehicle");
  
              //按时间进行排序
              query.with(Sort.by(Sort.Order.desc("pictime")));
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
184
              // 分页
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
185
186
187
188
189
190
191
192
              query.skip((currentpage - 1) * pagevolume).limit(pagevolume);
  
              vehicleCurrencyResultList = mongoTemplate.find(query, VehicleCurrencyResult.class, "rabbitMQVehicle");
              //遍历list,转换时间
              for (VehicleCurrencyResult vehicleCurrencyResult : vehicleCurrencyResultList) {
                  vehicleCurrencyResult.setPhototime(sdf.format(Long.parseLong(vehicleCurrencyResult.getPhototime())));
                  //改变原有的全景图为现在的快照图 此处返回快照图的绝对路径
                  vehicleCurrencyResult.setPicurl(vehicleCurrencyResult.getSnapshoturl());
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
              }
              //根据总条数获取到总页数
              totalPage = (int) Math.ceil(((double) totalNumber) / pagevolume);
  
              data.put("total", totalPage);
              data.put("row", vehicleCurrencyResultList);
          } catch (Exception e) {
              data.put("total", totalPage);
              data.put("row", vehicleCurrencyResultList);
              e.printStackTrace();
          }
          return data;
      }
  
      @Override
fddd4673   Liu Haoyu   去掉设备相关内容;
208
      public CommonResult<PicVehicleDataResult> findVehicleByPic(int number, double threshold, int currentpage, int pagevolume, MultipartFile picfile, Long starttime, Long endtime) throws InterruptedException {
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
          //封装结果的对象
          if (picfile == null) {
              return CommonResult.success(201, "图片为空", null);
          }
  
          String vehicleInfoByBase64 = httpClientUtils.multiToVehicle(picfile);
          JSONObject dataJson = JSONObject.parseObject(vehicleInfoByBase64).getJSONObject("result");
  
          List<RabbitMQVehicle> rabbitMQVehicles = rabbitMQVehicleTools.sdkToRabbitVehicle(dataJson);
  
          //获取到用户选中的车辆
          int size = rabbitMQVehicles.size();
          if (number < size) {
              RabbitMQVehicle rabbitMqVehicle = rabbitMQVehicles.get(number);
  
              List<RabbitMQVehicle> vehcieListBy = mongoTemplates.getVehcieListBy(new VehicleCondition(0, 0, rabbitMqVehicle.getVehicle_plate_hphm(),
fddd4673   Liu Haoyu   去掉设备相关内容;
225
                      null, starttime, endtime, null, rabbitMqVehicle.getVehicle_color_index(), rabbitMqVehicle.getVehicle_recg_issue_year(),
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
                      rabbitMqVehicle.getVehicle_recg_brand(), rabbitMqVehicle.getVehicle_recg_type(), rabbitMqVehicle.getVehicle_recg_subbrand()));
  
              //获取该车辆的特征信息
              double[] currentFeature = rabbitMqVehicle.getVehicle_fea_feature();
              double currentFea = compareDistance.getDistance(currentFeature);
  
              Vector<PicVehicleCompare> pvc = new Vector<>();
              int arrCount = 1000;
              int threadNumber = (int) Math.ceil((double) vehcieListBy.size() / arrCount);
              final CountDownLatch countDownLatch = new CountDownLatch(threadNumber);
              for (int i = 0; i < threadNumber; i++) {
                  int index = i;
                  new Thread(() -> {
                      int fromIndex = index * arrCount;
                      int toIndex = fromIndex + arrCount;
                      toIndex = Math.min(toIndex, vehcieListBy.size());
                      for (RabbitMQVehicle rmqv : vehcieListBy.subList(fromIndex, toIndex)) {
                          double[] dbFeature = (double[]) redisTemplate.opsForHash().get(GlobalUtil.VEHICLE_FEATURE, rmqv.getId());
                          if (dbFeature != null) {
                              //进行比对
                              double dbFea = (double) redisTemplate.opsForHash().get(GlobalUtil.VEHICLE_FEATURE_DISTANCE, rmqv.getId());
                              double similar = compareDistance.simDistance(currentFeature, currentFea, dbFeature, dbFea);
                              if (threshold <= similar) {
                                  if (similar > 1) {
                                      similar = 1.00;
                                  }
                                  PicVehicleCompare picVehicleCompare = new PicVehicleCompare();
                                  picVehicleCompare.setSimilar(similar);
                                  picVehicleCompare.setRabbitMQVehicle(rmqv);
                                  pvc.add(picVehicleCompare);
                              }
                          }
                      }
                      countDownLatch.countDown();
                  }).start();
              }
              countDownLatch.await();
  
              //对row进行排序
              pvc.sort((o1, o2) -> {
                  if (o2.getSimilar() == o1.getSimilar()) {
                      return 0;
                  } else {
                      double similar = o2.getSimilar();
                      double similar1 = o1.getSimilar();
                      return similar > similar1 ? 1 : -1;
                  }
              });
  
              //对row进行分页查询
7a6dd2db   Liu Haoyu   手动分页功能代码重构;
276
277
278
              List<PicVehicleCompare> picVehicleComparesNew = UserTools.getPagedResultByBaseList(pvc, currentpage, pagevolume);
              //总页数
              int totalPage = UserTools.getPageTotalByBaseList(pvc, pagevolume);
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
279
280
281
282
283
284
285
286
  
              ArrayList<PicVehicleRow> picVehicleRows = new ArrayList<>();
              for (PicVehicleCompare next : picVehicleComparesNew) {
                  //获取id
                  RabbitMQVehicle rabbitMqVehicle1 = next.getRabbitMQVehicle();
                  // 新方法,如果不需要四舍五入,可以使用RoundingMode.DOWN
                  double similar = next.getSimilar();
                  String picurl = rabbitMqVehicle1.getPicurl();
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
287
288
                  //获取到快照路径
                  String snapshoturl = rabbitMqVehicle1.getSnapshoturl();
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
289
                  String bg = String.format("%.3f", similar);
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
290
291
                  //因为需要将快照图的值给picurl所以需要下面的返回方式
                  PicVehicleRow picVehicleRow = new PicVehicleRow(rabbitMqVehicle1.getId(), rabbitMqVehicle1.getRecordid(), rabbitMqVehicle1.getVehicle_plate_hphm(),
fddd4673   Liu Haoyu   去掉设备相关内容;
292
                          snapshoturl, picurl, bg,
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
293
294
295
296
297
298
                          simpleDateFormat.format(new Date(rabbitMqVehicle1.getPictime())));
  
                  picVehicleRows.add(picVehicleRow);
              }
  
              PicVehicleDataResult picVehicleDataResult = new PicVehicleDataResult(totalPage, picVehicleRows);
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
              if (picVehicleDataResult.getRow().size() <= 0) {
                  return CommonResult.success(201, "没有查询到任何数据", null);
              } else {
                  return CommonResult.success(picVehicleDataResult);
              }
          }
          return CommonResult.success(202, "没有符合要求的数据", null);
      }
  
  
      /**
       * 查询所有的车辆型号首字母
       *
       * @return
       */
      @Override
      public CommonResult<List<String>> selectDisplayForInitials() {
          CommonResult<List<String>> commonResult = null;
          try {
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
318
319
              List<String> initialsArr = mongoTemplate.find(new Query(), SyVehicleModel.class).stream()
                      .map(SyVehicleModel::getInitials).distinct().collect(Collectors.toList());
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
              commonResult = returnCommonResult(initialsArr);
          } catch (Exception e) {
              commonResult = CommonResult.success(null, "数据查询失败");
              e.printStackTrace();
          }
  
          return commonResult;
      }
  
      /**
       * 根据车辆首字母查询所有的车辆品牌
       *
       * @param initials
       * @return
       */
      @Override
      public CommonResult<List<String>> selectDisplayForBrand(String initials) {
          CommonResult<List<String>> commonResult = null;
          try {
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
339
340
              List<String> brandArr = mongoTemplate.find(Query.query(Criteria.where("initals").is(initials)), SyVehicleModel.class)
                      .stream().map(SyVehicleModel::getBrand).distinct().collect(Collectors.toList());
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
              commonResult = returnCommonResult(brandArr);
          } catch (Exception e) {
              commonResult = CommonResult.success(null, "数据查询失败");
              e.printStackTrace();
          }
          return commonResult;
      }
  
      /**
       * 根据车辆车辆品牌查询所有的车辆子品牌
       *
       * @param brand
       * @return
       */
      @Override
      public CommonResult<List<String>> selectDisplayForSubbrand(String brand) {
  
          CommonResult<List<String>> commonResult = null;
          try {
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
360
361
              List<String> subbrandArr = mongoTemplate.find(Query.query(Criteria.where("brand").is(brand)), SyVehicleModel.class)
                      .stream().map(SyVehicleModel::getSubbrand).distinct().collect(Collectors.toList());
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
              commonResult = returnCommonResult(subbrandArr);
          } catch (Exception e) {
              commonResult = CommonResult.success(null, "数据查询失败");
              e.printStackTrace();
          }
          return commonResult;
      }
  
      /**
       * 根据车辆子品牌查询所有的车辆年限
       *
       * @param subbrand
       * @return
       */
      @Override
      public CommonResult<List<String>> selectDisplayForBirthday(String subbrand) {
          CommonResult<List<String>> commonResult = null;
          try {
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
380
381
              List<String> birthdayArr = mongoTemplate.find(Query.query(Criteria.where("subbrand").is(subbrand)), SyVehicleModel.class)
                      .stream().map(SyVehicleModel::getBirthday).distinct().collect(Collectors.toList());
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
              commonResult = returnCommonResult(birthdayArr);
          } catch (Exception e) {
              commonResult = CommonResult.success(null, "数据查询失败");
              e.printStackTrace();
          }
          return commonResult;
      }
  
      /**
       * 返回所有车辆类型列表
       *
       * @return
       */
      @Override
      public CommonResult<List<String>> displayVehicleTypeList() {
          CommonResult<List<String>> commonResult = null;
          try {
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
399
400
              List<String> displayVehicleTypeList = mongoTemplate.find(new Query(), SyVehicleType.class)
                      .stream().map(SyVehicleType::getName).distinct().collect(Collectors.toList());
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
  
              commonResult = returnCommonResult(displayVehicleTypeList);
          } catch (Exception e) {
              commonResult = CommonResult.success(null, "数据查询失败");
              e.printStackTrace();
          }
  
          return commonResult;
      }
  
      /**
       * 返回所有车辆车身颜色列表
       *
       * @return
       */
      @Override
      public CommonResult<List<NameValue>> displayVehicleColorList() {
          CommonResult<List<NameValue>> commonResult = null;
          try {
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
420
421
              List<NameValue> displayVehicleColorList = mongoTemplate.find(new Query(), NameValue.class, "syVehicleColor")
                      .stream().distinct().collect(Collectors.toList());
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
              commonResult = returnCommonResult1(displayVehicleColorList);
          } catch (Exception e) {
              commonResult = CommonResult.success(null, "数据查询失败");
              e.printStackTrace();
          }
  
          return commonResult;
      }
  
  
      /**
       * 返回所有车辆号牌类型列表
       *
       * @return
       */
      @Override
      public CommonResult<List<NameValue>> displayVehiclePlateTypeList() {
          CommonResult<List<NameValue>> commonResult = null;
          try {
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
441
442
              List<NameValue> displayVehiclePlateTypeList = mongoTemplate
                      .find(new Query(), NameValue.class, "syVehiclePlateType").stream().distinct().collect(Collectors.toList());
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
              commonResult = returnCommonResult1(displayVehiclePlateTypeList);
          } catch (Exception e) {
              commonResult = CommonResult.success(null, "数据查询失败");
              e.printStackTrace();
          }
  
          return commonResult;
      }
  
      /**
       * 返回所有车辆年检标个数列表
       *
       * @return
       */
      @Override
      public CommonResult<List<String>> displayVehicleNjbNumberList() {
          CommonResult<List<String>> commonResult = null;
          try {
40c853a1   Liu Haoyu   去掉MySQL相关内容, 去掉my...
461
462
463
              List<String> displayVehicleNjbNumberList = mongoTemplate.find(new Query(), SyVehicleNjbNumber.class)
                      .stream().map(syVehicleNjbNumber -> String.valueOf(syVehicleNjbNumber.getNjbNumber()))
                      .distinct().collect(Collectors.toList());
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
              commonResult = returnCommonResult(displayVehicleNjbNumberList);
          } catch (Exception e) {
              commonResult = CommonResult.success(null, "数据查询失败");
              e.printStackTrace();
          }
  
          return commonResult;
      }
  
  
      public CommonResult<List<String>> returnCommonResult(List<String> list) {
          CommonResult<List<String>> commonResult;
          if (list.size() <= 0) {
              commonResult = CommonResult.success(201, "没有查询到任何数据", null);
          } else {
              commonResult = CommonResult.success(list);
          }
          return commonResult;
      }
  
      public CommonResult<List<NameValue>> returnCommonResult1(List<NameValue> list) {
          CommonResult<List<NameValue>> commonResult;
          if (list.size() <= 0) {
              commonResult = CommonResult.success(201, "没有查询到任何数据", null);
          } else {
              commonResult = CommonResult.success(list);
          }
          return commonResult;
      }
  
  
  }