增加金额格式化、异常抛出
This commit is contained in:
parent
415b3134a7
commit
4dca35da61
|
|
@ -39,12 +39,12 @@ public class HomeIndexServiceImpl implements HomeIndexService {
|
|||
@Override
|
||||
public ServerResponse getDataPreviewData(BackParamsDto dto) {
|
||||
HomeDataPreviewVo vo = new HomeDataPreviewVo();
|
||||
List<Integer> fList = new ArrayList<>(2);
|
||||
List<Integer> fList2 = new ArrayList<>(2);
|
||||
List<Integer> fList3 = new ArrayList<>(2);
|
||||
List<Integer> fList4 = new ArrayList<>(2);
|
||||
List<Object> fList5 = new ArrayList<>(2);
|
||||
List<Object> fList6 = new ArrayList<>(2);
|
||||
List<Integer> fList;
|
||||
List<Integer> fList2;
|
||||
List<Integer> fList3;
|
||||
List<Integer> fList4;
|
||||
List<Object> fList5;
|
||||
List<Object> fList6;
|
||||
try {
|
||||
Future<List<Integer>> future = testTaskExecutor.submit(() -> {
|
||||
log.info("数据概览-工程数量{}", Thread.currentThread().getName());
|
||||
|
|
@ -132,6 +132,9 @@ public class HomeIndexServiceImpl implements HomeIndexService {
|
|||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
BigDecimal bd = new BigDecimal(vo.getEstimateMoney());
|
||||
bd = bd.setScale(2, RoundingMode.HALF_UP); // 四舍五入
|
||||
vo.setEstimateMoney(bd.doubleValue());
|
||||
return ServerResponse.createSuccess(vo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class JWTTokenService {
|
|||
|
||||
public static void main(String[] args) {
|
||||
String token = IdUtils.fastUUID();
|
||||
Map<String, Object> claimsMap = new HashMap<String, Object>();
|
||||
Map<String, Object> claimsMap = new HashMap<>();
|
||||
claimsMap.put(SecurityConstants.USER_KEY, token);
|
||||
claimsMap.put(SecurityConstants.DETAILS_USER_ID, 1);
|
||||
claimsMap.put(SecurityConstants.DETAILS_USERNAME, "!Admin");
|
||||
|
|
@ -107,6 +107,7 @@ public class JWTTokenService {
|
|||
return user;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue