opt:优化空指针异常提示
This commit is contained in:
@@ -518,11 +518,13 @@ public class BakingServiceImpl implements BakingService {
|
||||
hotParam.put("task_id", task_id);
|
||||
hotParam.put("start_point_code", point_code1);
|
||||
hotParam.put("end_point_code", point_code2);
|
||||
Object pt = redisUtils.hget(point_code1, "temperature");
|
||||
if (ObjectUtil.isEmpty(pt)) {
|
||||
boolean exists = redisUtils.hHasKey(point_code1, "temperature");
|
||||
String point_temperature = "";
|
||||
if(exists){
|
||||
point_temperature = (String) redisUtils.hget(point_code1, "temperature");
|
||||
}else{
|
||||
throw new BadRequestException("当前操作点位设备:"+point_code1+",无法获取温度,请稍后再试!");
|
||||
}
|
||||
String point_temperature = String.valueOf(pt);
|
||||
hotParam.put("temperature", point_temperature);
|
||||
if (ObjectUtil.isEmpty(last_hot_mst)) {
|
||||
hotParam.put("oven_time", "480");
|
||||
|
||||
Reference in New Issue
Block a user