dev:代码规范
This commit is contained in:
@@ -62,7 +62,9 @@ public class StageImageServiceImpl implements StageImageService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(StageImageDto dto) {
|
||||
StageImageDto entity = this.findById(dto.getImage_uuid());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
}
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -59,7 +59,9 @@ public class StageServiceImpl implements StageService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(StageDto dto) {
|
||||
StageDto entity = this.findById(dto.getStage_uuid());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
}
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -75,7 +75,9 @@ public class GridFieldServiceImpl implements GridFieldService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(GridFieldDto dto) {
|
||||
GridFieldDto entity = this.findById(dto.getId());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
}
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -72,7 +72,9 @@ public class GridServiceImpl implements GridService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(GridDto dto) {
|
||||
GridDto entity = this.findById(dto.getId());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
}
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
@@ -40,8 +40,9 @@ public class Calculate {
|
||||
|| s1.equals("/") || s1.equals("^") || s1.equals("(")
|
||||
|| s1.equals(")") || s1.equals("sqrt(")
|
||||
|| s1.equals("sin(") || s1.equals("cos(")
|
||||
|| s1.equals("pow("))
|
||||
|| s1.equals("pow(")) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
@@ -54,15 +55,16 @@ public class Calculate {
|
||||
Double f1 = new Double((String) (s));
|
||||
post.add(s);
|
||||
} catch (NumberFormatException e) {
|
||||
if (Operator.empty())
|
||||
if (Operator.empty()) {
|
||||
Operator.push(s);
|
||||
else {
|
||||
} else {
|
||||
int tmp = fix_compare(s);
|
||||
switch (tmp) {
|
||||
case 1:
|
||||
do {
|
||||
if (Operator.empty())
|
||||
if (Operator.empty()) {
|
||||
errReport();
|
||||
}
|
||||
post.add(Operator.pop());
|
||||
} while (stack_compare((String) Operator.peek()) != 1);
|
||||
String tmp_ss = (String) Operator.pop();
|
||||
|
||||
Reference in New Issue
Block a user