From 85cbcc762ab8dc3938be07a17f43e2fc10415dea Mon Sep 17 00:00:00 2001 From: wangguorui <2069821375@qq.com> Date: Sun, 12 Apr 2026 12:00:33 +0800 Subject: [PATCH] =?UTF-8?q?20260411=20=E4=B8=9A=E7=BB=A9=E5=BD=92=E5=B1=9E?= =?UTF-8?q?=E3=80=81=E8=B5=84=E9=87=91=E6=B5=81=E6=B0=B4=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/cash/CashCollectionController.java | 44 ++++++++++++++++++++++ .../demo/controller/cash/CashRefundController.java | 33 ++++++++++++++++ src/main/resources/cashMapper/CashRefundMapper.xml | 12 ++++-- 3 files changed, 85 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/example/demo/controller/cash/CashCollectionController.java b/src/main/java/com/example/demo/controller/cash/CashCollectionController.java index 3d884d6..bdf97c3 100644 --- a/src/main/java/com/example/demo/controller/cash/CashCollectionController.java +++ b/src/main/java/com/example/demo/controller/cash/CashCollectionController.java @@ -639,6 +639,22 @@ public class CashCollectionController { if (performance.getReceivedCurrency() != null) { performance.setReceivedCurrency(languageTranslationUtil.translate(performance.getReceivedCurrency(), lang)); } + // 翻译支付方式 + if (performance.getPayType() != null) { + performance.setPayType(languageTranslationUtil.translate(performance.getPayType(), lang)); + } + // 翻译收款地区名称 + if (performance.getReceivedMarketName() != null) { + performance.setReceivedMarketName(languageTranslationUtil.translate(performance.getReceivedMarketName(), lang)); + } + // 翻译到账地区名称 + if (performance.getPerformanceMarketName() != null) { + performance.setPerformanceMarketName(languageTranslationUtil.translate(performance.getPerformanceMarketName(), lang)); + } + // 翻译商品名称 + if (performance.getGoodsName() != null) { + performance.setGoodsName(languageTranslationUtil.translate(performance.getGoodsName(), lang)); + } } } @@ -833,6 +849,34 @@ public class CashCollectionController { performanceVO.getReceivedCurrency(), languageCode); performanceVO.setReceivedCurrency(chineseReceivedCurrency); } + + // 转换到账地区名称 + if (performanceVO.getReceivedMarketName() != null && !performanceVO.getReceivedMarketName().isEmpty()) { + String chineseReceivedMarketName = translationService.findChineseSimplifiedByTranslation( + performanceVO.getReceivedMarketName(), languageCode); + performanceVO.setReceivedMarketName(chineseReceivedMarketName); + } + + // 转换收款地区名称 + if (performanceVO.getPerformanceMarketName() != null && !performanceVO.getPerformanceMarketName().isEmpty()) { + String chinesePerformanceMarketName = translationService.findChineseSimplifiedByTranslation( + performanceVO.getPerformanceMarketName(), languageCode); + performanceVO.setPerformanceMarketName(chinesePerformanceMarketName); + } + + // 转换商品名称 + if (performanceVO.getGoodsName() != null && !performanceVO.getGoodsName().isEmpty()) { + String chineseGoodsName = translationService.findChineseSimplifiedByTranslation( + performanceVO.getGoodsName(), languageCode); + performanceVO.setGoodsName(chineseGoodsName); + } + + // 转换支付方式 + if (performanceVO.getPayType() != null && !performanceVO.getPayType().isEmpty()) { + String chinesePayType = translationService.findChineseSimplifiedByTranslation( + performanceVO.getPayType(), languageCode); + performanceVO.setPayType(chinesePayType); + } } } diff --git a/src/main/java/com/example/demo/controller/cash/CashRefundController.java b/src/main/java/com/example/demo/controller/cash/CashRefundController.java index 97ff479..4c4d597 100644 --- a/src/main/java/com/example/demo/controller/cash/CashRefundController.java +++ b/src/main/java/com/example/demo/controller/cash/CashRefundController.java @@ -683,6 +683,18 @@ public class CashRefundController { String statusName = convertStatusToString(funds.getStatus()); funds.setStatusName(languageTranslationUtil.translate(statusName, lang)); } + // 翻译商品名称 + if (funds.getGoodsName() != null) { + funds.setGoodsName(languageTranslationUtil.translate(funds.getGoodsName(), lang)); + } + // 翻译到账地区 + if (funds.getReceivedMarket() != null) { + funds.setReceivedMarket(languageTranslationUtil.translate(funds.getReceivedMarket(), lang)); + } + // 翻译业绩归属地区 + if (funds.getPerformanceMarket() != null) { + funds.setPerformanceMarket(languageTranslationUtil.translate(funds.getPerformanceMarket(), lang)); + } } } @@ -844,6 +856,27 @@ public class CashRefundController { fundsDTO.getPayType(), languageCode); fundsDTO.setPayType(chinesePayType); } + + // 转换商品名称 + if (fundsDTO.getGoodsName() != null && !fundsDTO.getGoodsName().isEmpty()) { + String chineseGoodsName = translationService.findChineseSimplifiedByTranslation( + fundsDTO.getGoodsName(), languageCode); + fundsDTO.setGoodsName(chineseGoodsName); + } + + // 转换到账地区 + if (fundsDTO.getReceivedMarket() != null && !fundsDTO.getReceivedMarket().isEmpty()) { + String chineseMarket = translationService.findChineseSimplifiedByTranslation( + fundsDTO.getReceivedMarket(), languageCode); + fundsDTO.setReceivedMarket(chineseMarket); + } + + // 转换业绩归属地区 + if (fundsDTO.getPerformanceMarket() != null && !fundsDTO.getPerformanceMarket().isEmpty()) { + String chineseMarket = translationService.findChineseSimplifiedByTranslation( + fundsDTO.getPerformanceMarket(), languageCode); + fundsDTO.setPerformanceMarket(chineseMarket); + } } } diff --git a/src/main/resources/cashMapper/CashRefundMapper.xml b/src/main/resources/cashMapper/CashRefundMapper.xml index 54b0293..33a2064 100644 --- a/src/main/resources/cashMapper/CashRefundMapper.xml +++ b/src/main/resources/cashMapper/CashRefundMapper.xml @@ -456,8 +456,8 @@ crc.goods_name, crc.remark, crc.good_num, - crc.performance_market, - crc.received_market, + m1.name AS performanceMarket, + m2.name AS receivedMarket, crc.name, crc.market, crc.order_code, @@ -479,6 +479,8 @@ 0 as isRefundRow FROM cash_record_collection crc left join recharge_activity ra on ra.id = crc.activity + LEFT JOIN market m1 ON m1.id = crc.performance_market + LEFT JOIN market m2 ON m2.id = crc.received_market WHERE 1=1 and crc.jwcode = #{jwcode} @@ -540,8 +542,8 @@ crc.goods_name, crc.remark, crc.good_num, - crc.performance_market, - crc.received_market, + m1.name AS performanceMarket, + m2.name AS receivedMarket, crc.name, crc.market, CONCAT('TK', crc.order_code) as order_code, @@ -564,6 +566,8 @@ FROM cash_record_refund crr INNER JOIN cash_record_collection crc ON crr.related_id = crc.id left join recharge_activity ra on ra.id = crc.activity + LEFT JOIN market m1 ON m1.id = crc.performance_market + LEFT JOIN market m2 ON m2.id = crc.received_market WHERE crr.status =41 and crc.jwcode = #{jwcode}