Commit 94192156 authored by tianyiming's avatar tianyiming

修改一码通认领接口返回值

parent 80bd2f8b
...@@ -1328,7 +1328,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1328,7 +1328,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
EquipmentCategoryServiceImpl categoryService = (EquipmentCategoryServiceImpl) AopContext.currentProxy(); EquipmentCategoryServiceImpl categoryService = (EquipmentCategoryServiceImpl) AopContext.currentProxy();
//生成码 //生成码
//集群模式使用 //集群模式使用
RLock lock = redissonClient.getLock(LOCK_KEY); // RLock lock = redissonClient.getLock(LOCK_KEY);
// lock.lock(); // 获取锁 // lock.lock(); // 获取锁
// log.info("加锁成功"); // log.info("加锁成功");
// codeMap = categoryService.creatCode(city, county, equCategory, code96333, supervisionCode); // codeMap = categoryService.creatCode(city, county, equCategory, code96333, supervisionCode);
...@@ -1337,16 +1337,16 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1337,16 +1337,16 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
// log.info("释放锁"); // log.info("释放锁");
// log.info("已生成对应监管码或96333电梯识别码"); // log.info("已生成对应监管码或96333电梯识别码");
//单机模式使用 //单机模式使用
boolean flag = false; // boolean flag = false;
if (lock.tryLock(3, 5, TimeUnit.SECONDS)) { // if (lock.tryLock(3, 5, TimeUnit.SECONDS)) {
codeMap = categoryService.creatCode(city, county, equCategory, code96333, supervisionCode); codeMap = categoryService.creatCode(city, county, equCategory, code96333, supervisionCode);
log.info("已生成对应监管码或96333电梯识别码"); log.info("已生成对应监管码或96333电梯识别码");
flag = true; // flag = true;
} // }
if (flag) { // if (flag) {
lock.unlock(); // 释放锁 // lock.unlock(); // 释放锁
log.info("释放锁"); // log.info("释放锁");
} // }
//添加对应监管码和96333码调用通用新增保存接口进行修改 //添加对应监管码和96333码调用通用新增保存接口进行修改
supervisionMap.put("CODE96333", codeMap.get("code96333")); supervisionMap.put("CODE96333", codeMap.get("code96333"));
supervisionMap.put("SUPERVISORY_CODE", codeMap.get("superviseCode")); supervisionMap.put("SUPERVISORY_CODE", codeMap.get("superviseCode"));
...@@ -1423,7 +1423,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1423,7 +1423,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
response.setStatus(HttpStatus.BAD_REQUEST.value()); response.setStatus(HttpStatus.BAD_REQUEST.value());
return response; return response;
} }
return ResponseHelper.buildResponse("SUCCESS"); return ResponseHelper.buildResponse(record);
} }
@Autowired @Autowired
......
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