zj
2025-03-07 5be80b796dd5885604aeab891e410b994b1d4dbe
时间
4 files modified
21 ■■■■ changed files
src/main/java/project/futures/internal/FuturesOrderLocalServiceImpl.java 2 ●●● patch | view | raw | blame | history
src/main/java/project/futures/internal/FuturesOrderServiceImpl.java 3 ●●●● patch | view | raw | blame | history
src/main/java/project/web/api/RealtimeController.java 12 ●●●●● patch | view | raw | blame | history
src/main/resources/config/email.properties 4 ●●●● patch | view | raw | blame | history
src/main/java/project/futures/internal/FuturesOrderLocalServiceImpl.java
@@ -80,7 +80,7 @@
        DecimalFormat df_symbol = new DecimalFormat(decimals);
        df_symbol.setRoundingMode(RoundingMode.FLOOR);// 向下取整
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss a", Locale.ENGLISH);
        sdf.setTimeZone(TimeZone.getTimeZone("Asia/Taipei"));
        sdf.setTimeZone(TimeZone.getTimeZone("America/New_York"));
        DecimalFormat df = new DecimalFormat("#.##");
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("order_no", order.getOrder_no());
src/main/java/project/futures/internal/FuturesOrderServiceImpl.java
@@ -576,8 +576,7 @@
        DecimalFormat df_symbol = new DecimalFormat(decimals);
        df_symbol.setRoundingMode(RoundingMode.FLOOR);// 向下取整
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss a", Locale.ENGLISH);
        // 设置时区为台湾(Asia/Taipei)
        sdf.setTimeZone(TimeZone.getTimeZone("Asia/Taipei"));
        sdf.setTimeZone(TimeZone.getTimeZone("America/New_York"));
        DecimalFormat df = new DecimalFormat("#.##");
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("order_no", order.getOrder_no());
src/main/java/project/web/api/RealtimeController.java
@@ -2,6 +2,7 @@
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -83,7 +84,7 @@
        }
    }
    private List<Map<String, Object>> revise(List<Realtime> data) {
    private List<Map<String, Object>> revise(List<Realtime> data) throws ParseException {
        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
        for (int i = 0; i < data.size(); i++) {
            Realtime realtime = data.get(i);
@@ -91,10 +92,11 @@
            map.put("symbol", realtime.getSymbol());
            map.put("ts", realtime.getTs());
            String currentTime = realtime.getCurrent_time();
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss a", Locale.ENGLISH);
            // 设置时区为台湾(Asia/Taipei)
            sdf.setTimeZone(TimeZone.getTimeZone("Asia/Taipei"));
            map.put("current_time",sdf.format(currentTime));
            // 设置时区为纽约的冬令时(Eastern Standard Time, EST)
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
            sdf.setTimeZone(TimeZone.getTimeZone("America/New_York"));
            Date parsedDate = sdf.parse(currentTime);
            map.put("current_time",sdf.format(parsedDate));
            map.put("name", realtime.getName());
            map.put("change_ratio", realtime.getChange_ratio());
            Item item = this.itemService.cacheBySymbol(realtime.getSymbol(), true);
src/main/resources/config/email.properties
@@ -1,4 +1,4 @@
email.host=smtp.mxhichina.com
email.username=post@usdtone.com
email.password=qxq&w7ery
email.username=coinzne.com@gmail.com
email.password=pqupwyxoqedhxlfq
email.from=smtp.mxhichina.com