From ee0a877345a601c26b178e4e1036e9c496274f0c Mon Sep 17 00:00:00 2001 From: Iamasoldier <1272745473@qq.com> Date: Wed, 14 May 2025 16:06:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=80=9A=E7=9F=A5):=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zlt-business/device-center/pom.xml | 1 + .../controller/LiveStreamController.java | 2 - .../src/main/resources/bootstrap.yml | 8 +- zlt-business/order-center/pom.xml | 6 + .../central/order/config/WxMaProperties.java | 9 ++ .../order/config/WxMpConfiguration.java | 19 ++++ .../controller/AutoCutVideoController.java | 5 +- .../order/feign/DeviceCenterService.java | 2 +- .../listener/OrderStatusChangeListener.java | 12 +- .../order/service/WxMiniSubscribeService.java | 11 ++ .../service/impl/VideoEditServiceImpl.java | 48 ++++++++ .../impl/WxMiniSubscribeServiceImpl.java | 105 +++++++----------- .../src/main/resources/application.yml | 20 +++- .../main/resources/application-dev.properties | 10 +- .../orders/Refund/components/UpdateForm.less | 14 +++ .../orders/Refund/components/UpdateForm.tsx | 25 ++++- 16 files changed, 208 insertions(+), 89 deletions(-) create mode 100644 zlt-business/order-center/src/main/java/com/central/order/config/WxMaProperties.java diff --git a/zlt-business/device-center/pom.xml b/zlt-business/device-center/pom.xml index d928ee12..4631efb4 100644 --- a/zlt-business/device-center/pom.xml +++ b/zlt-business/device-center/pom.xml @@ -99,6 +99,7 @@ hutool-all 5.8.25 + diff --git a/zlt-business/device-center/src/main/java/com/central/device/controller/LiveStreamController.java b/zlt-business/device-center/src/main/java/com/central/device/controller/LiveStreamController.java index 54e767fe..0cdbf33a 100644 --- a/zlt-business/device-center/src/main/java/com/central/device/controller/LiveStreamController.java +++ b/zlt-business/device-center/src/main/java/com/central/device/controller/LiveStreamController.java @@ -4,12 +4,10 @@ import com.alibaba.fastjson.JSONObject; import com.central.device.service.LiveStreamService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController -@RequestMapping("/live") public class LiveStreamController { @Autowired diff --git a/zlt-business/file-center/src/main/resources/bootstrap.yml b/zlt-business/file-center/src/main/resources/bootstrap.yml index 005bb0d4..e15c1688 100644 --- a/zlt-business/file-center/src/main/resources/bootstrap.yml +++ b/zlt-business/file-center/src/main/resources/bootstrap.yml @@ -4,10 +4,10 @@ server: spring: application: name: file-center - cloud: - nacos: - discovery: - ip: 119.45.169.13 +# cloud: +# nacos: +# discovery: +# ip: 119.45.169.13 servlet: multipart: max-file-size: 20MB diff --git a/zlt-business/order-center/pom.xml b/zlt-business/order-center/pom.xml index e13e0627..6a3cd9a6 100644 --- a/zlt-business/order-center/pom.xml +++ b/zlt-business/order-center/pom.xml @@ -113,6 +113,12 @@ weixin-java-miniapp 4.6.0 + + + com.github.binarywang + weixin-java-common + 4.6.0 + javax.servlet javax.servlet-api diff --git a/zlt-business/order-center/src/main/java/com/central/order/config/WxMaProperties.java b/zlt-business/order-center/src/main/java/com/central/order/config/WxMaProperties.java new file mode 100644 index 00000000..66b79b90 --- /dev/null +++ b/zlt-business/order-center/src/main/java/com/central/order/config/WxMaProperties.java @@ -0,0 +1,9 @@ +package com.central.order.config; + +import lombok.Data; + +@Data +public class WxMaProperties { + private String appId; + private String secret; +} diff --git a/zlt-business/order-center/src/main/java/com/central/order/config/WxMpConfiguration.java b/zlt-business/order-center/src/main/java/com/central/order/config/WxMpConfiguration.java index f73cdf9e..a5d9d1b4 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/config/WxMpConfiguration.java +++ b/zlt-business/order-center/src/main/java/com/central/order/config/WxMpConfiguration.java @@ -1,5 +1,8 @@ package com.central.order.config; +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl; +import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.RequiredArgsConstructor; import me.chanjar.weixin.mp.api.WxMpService; @@ -46,4 +49,20 @@ public class WxMpConfiguration { public ObjectMapper objectMapper() { return new ObjectMapper(); } + + @Bean + @ConfigurationProperties(prefix = "wx.mini") + public WxMaProperties wxMaProperties() { + return new WxMaProperties(); + } + + @Bean + public WxMaService wxMaService(WxMaProperties wxMaProperties) { + WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); + config.setAppid(wxMaProperties.getAppId()); + config.setSecret(wxMaProperties.getSecret()); + WxMaService service = new WxMaServiceImpl(); + service.setWxMaConfig(config); + return service; + } } diff --git a/zlt-business/order-center/src/main/java/com/central/order/controller/AutoCutVideoController.java b/zlt-business/order-center/src/main/java/com/central/order/controller/AutoCutVideoController.java index af646c79..b6ed639d 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/controller/AutoCutVideoController.java +++ b/zlt-business/order-center/src/main/java/com/central/order/controller/AutoCutVideoController.java @@ -10,6 +10,7 @@ import com.central.order.model.*; import com.central.order.model.dto.CallbackDTO; import com.central.order.model.params.EditTaskQueryParams; import com.central.order.service.*; +import com.central.order.util.DateUtils; import com.central.order.util.StringUtils; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -184,7 +185,7 @@ public class AutoCutVideoController { } Tourism tourism = tourismService.getTourismById(order.getTourismId()); - String result = "您的视频已制作完成,可前往相册页查看和下载!"; + String result = "视频已生成请查阅"; wxMiniSubscribeService.sendPaySuccessMsg( user.getOpenId(), @@ -192,7 +193,7 @@ public class AutoCutVideoController { orderNo, result, StringUtils.fenToYuan(order.getOrderAmount()), - order.getPayTime().toString() + DateUtils.sdf.format(order.getPayTime()) ); log.info("已发送一键成片完成通知: userId={}, openId={}, orderNo={}", userId, user.getOpenId(), orderNo); } catch (Exception e) { diff --git a/zlt-business/order-center/src/main/java/com/central/order/feign/DeviceCenterService.java b/zlt-business/order-center/src/main/java/com/central/order/feign/DeviceCenterService.java index c70bef6f..c9e23c04 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/feign/DeviceCenterService.java +++ b/zlt-business/order-center/src/main/java/com/central/order/feign/DeviceCenterService.java @@ -28,6 +28,6 @@ public interface DeviceCenterService { @GetMapping("/wayline/sign/{id}") String getLineFileSign(@PathVariable("id") String id); - @GetMapping("/live/stream-urls") + @GetMapping("/stream-urls") JSONObject getStreamUrls(@RequestParam("deviceId") String deviceId) ; } diff --git a/zlt-business/order-center/src/main/java/com/central/order/listener/OrderStatusChangeListener.java b/zlt-business/order-center/src/main/java/com/central/order/listener/OrderStatusChangeListener.java index afa643f3..5a953b40 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/listener/OrderStatusChangeListener.java +++ b/zlt-business/order-center/src/main/java/com/central/order/listener/OrderStatusChangeListener.java @@ -10,6 +10,7 @@ import com.central.order.event.OrderStatusChangeEvent; import com.central.order.feign.UserCenterService; import com.central.order.model.*; import com.central.order.service.*; +import com.central.order.util.DateUtils; import com.central.order.util.StringUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -154,7 +155,7 @@ public class OrderStatusChangeListener { /** * 处理支付成功逻辑 */ - + private void handlePaymentSuccess(Order order, Tourism tourism) { try { // 1. 发送微信通知 @@ -165,8 +166,7 @@ public class OrderStatusChangeListener { // 发送小程序订阅消息 if (sysUser.getOpenId() != null) { - String payTime = order.getPayTime() != null ? order.getPayTime().toString() : ""; - String tip = "您的订单已支付成功,您当前排在第"+queue+"位,欢迎体验!"; + String tip = "支付成功,当前排第"+queue+"位"; String amount = StringUtils.fenToYuan(order.getOrderAmount()); String orderName = tourism.getTourismName(); wxMiniSubscribeService.sendPaySuccessMsg( @@ -175,7 +175,7 @@ public class OrderStatusChangeListener { order.getOrderNo(), tip, amount, - payTime + DateUtils.sdf.format(order.getPayTime()) ); } @@ -225,7 +225,7 @@ public class OrderStatusChangeListener { Tourism tourism = tourismService.getTourismById(nextOrder.getTourismId()); if (nextUser != null && nextUser.getOpenId() != null && tourism != null) { String activityName = tourism.getTourismName(); // 活动名称 - String remark = "请您准备,当前排队序列的下一位就轮到您啦!"; + String remark = "即将为您进行拍摄服务"; String activityNo = nextOrder.getOrderNo(); // 活动编号 wxMiniSubscribeService.sendPaySuccessMsg( nextUser.getOpenId(), @@ -233,7 +233,7 @@ public class OrderStatusChangeListener { activityNo, remark, activityNo, - nextOrder.getPayTime().toString() + DateUtils.sdf.format(nextOrder.getPayTime()) ); log.info("已通知下一个排队用户: userId={}, openId={}, orderNo={}", nextUser.getId(), nextUser.getOpenId(), activityNo); } diff --git a/zlt-business/order-center/src/main/java/com/central/order/service/WxMiniSubscribeService.java b/zlt-business/order-center/src/main/java/com/central/order/service/WxMiniSubscribeService.java index 7d8e05c8..7ca438da 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/service/WxMiniSubscribeService.java +++ b/zlt-business/order-center/src/main/java/com/central/order/service/WxMiniSubscribeService.java @@ -21,4 +21,15 @@ public interface WxMiniSubscribeService { * 一键成片制作完成通知 */ void sendVideoEditCompleteMsg(String openId, String taskName, String orderNo, String result); + + /** + * 服务进度提醒订阅消息 + * @param openId + * @param taskName + * @param processDesc + * @param orderNo + * @param orderTime + * @param result + */ + void sendServiceProcessMsg(String openId, String taskName,String processDesc, String orderNo,String orderTime, String result, String pageUrl); } diff --git a/zlt-business/order-center/src/main/java/com/central/order/service/impl/VideoEditServiceImpl.java b/zlt-business/order-center/src/main/java/com/central/order/service/impl/VideoEditServiceImpl.java index 4f51764c..2a1a330a 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/service/impl/VideoEditServiceImpl.java +++ b/zlt-business/order-center/src/main/java/com/central/order/service/impl/VideoEditServiceImpl.java @@ -2,13 +2,18 @@ package com.central.order.service.impl; import com.central.common.exception.BusinessException; import com.central.common.model.FileInfo; +import com.central.common.model.SysUser; import com.central.order.constants.EditTaskStatus; import com.central.order.feign.FileCenterService; +import com.central.order.feign.UserCenterService; import com.central.order.model.EditTask; import com.central.order.model.Order; import com.central.order.model.OrderFile; +import com.central.order.model.Tourism; import com.central.order.model.dto.VideoEditStatus; import com.central.order.service.*; +import com.central.order.util.DateUtils; +import com.central.order.util.StringUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -35,6 +40,12 @@ public class VideoEditServiceImpl implements IVideoEditService { private FileCenterService fileCenterService; @Autowired private IOrderService orderService; + @Autowired + private UserCenterService userCenterService; + @Autowired + private ITourismService tourismService; + @Autowired + private WxMiniSubscribeService wxMiniSubscribeService; @Override @Transactional(rollbackFor = Exception.class) @@ -108,6 +119,10 @@ public class VideoEditServiceImpl implements IVideoEditService { log.info("视频编辑任务处理完成: jobId={}, orderNo={}, outputUrl={}", jobId, task.getOrderSn(), outputUrl); + + // 发送小程序通知 + notifyUser(task.getUserId(),task.getOrderSn()); + } catch (Exception e) { log.error("处理任务成功状态失败: jobId={}", jobId, e); throw new BusinessException("处理任务成功状态失败: " + e.getMessage()); @@ -163,4 +178,37 @@ public class VideoEditServiceImpl implements IVideoEditService { } } + private void notifyUser(Long userId,String orderNo) { + try { + // 1. 获取用户信息 + SysUser user = userCenterService.findUserById(userId); + if (user == null || user.getOpenId() == null) { + log.warn("未找到用户或用户未绑定小程序openId,无法发送成片完成通知: userId={}", userId); + return; + } + + // 2. 获取任务和订单信息 + // 假设 message 里包含订单号或任务名,实际可根据 EditTask 查找 + Order order = orderService.getOrderByNumber(orderNo); + if (order == null) { + log.warn("未找到订单信息,无法发送成片完成通知: orderNo={}", orderNo); + return; + } + + Tourism tourism = tourismService.getTourismById(order.getTourismId()); + String result = "视频已生成请查阅"; + + wxMiniSubscribeService.sendPaySuccessMsg( + user.getOpenId(), + tourism.getTourismName(), + orderNo, + result, + StringUtils.fenToYuan(order.getOrderAmount()), + DateUtils.sdf.format(order.getPayTime()) + ); + log.info("已发送一键成片完成通知: userId={}, openId={}, orderNo={}", userId, user.getOpenId(), orderNo); + } catch (Exception e) { + log.error("发送一键成片完成通知失败: userId={}, message={}", userId, orderNo, e); + } + } } diff --git a/zlt-business/order-center/src/main/java/com/central/order/service/impl/WxMiniSubscribeServiceImpl.java b/zlt-business/order-center/src/main/java/com/central/order/service/impl/WxMiniSubscribeServiceImpl.java index 62a0ae39..a4aa125c 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/service/impl/WxMiniSubscribeServiceImpl.java +++ b/zlt-business/order-center/src/main/java/com/central/order/service/impl/WxMiniSubscribeServiceImpl.java @@ -1,16 +1,16 @@ package com.central.order.service.impl; -import com.central.order.service.IWxAccessTokenService; +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.bean.WxMaSubscribeMessage; import com.central.order.service.WxMiniSubscribeService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import org.springframework.web.client.RestTemplate; -import javax.annotation.Resource; -import java.util.HashMap; -import java.util.Map; +import java.util.ArrayList; +import java.util.List; + @Slf4j @Service @@ -18,43 +18,28 @@ public class WxMiniSubscribeServiceImpl implements WxMiniSubscribeService { @Value("${wx.mini.template.pay-success}") private String templateId; - @Value("${wx.mini.template.activity-start}") - private String activityStartTemplateId; - @Value("${wx.mini.template.video-edit-complete}") - private String videoEditCompleteTemplateId; - - @Resource - private RestTemplate restTemplate; @Autowired - private IWxAccessTokenService wxAccessTokenService; + private WxMaService wxMaService; -// @Retryable(value = {ConnectException.class, SocketTimeoutException.class}, -// maxAttempts = 3, -// backoff = @Backoff(delay = 2000)) @Override public void sendPaySuccessMsg(String openId, String orderName, String orderNo, String tip, String amount, String orderTime) { try { - String accessToken = wxAccessTokenService.getAccessToken(); - String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + accessToken; + WxMaSubscribeMessage msg = new WxMaSubscribeMessage(); + msg.setToUser(openId); + msg.setTemplateId(templateId); + msg.setPage("pages/task/task"); // 可选跳转页面 + List dataList = new ArrayList<>(); + dataList.add(new WxMaSubscribeMessage.MsgData("thing1", orderName)); // 订单名称 + dataList.add(new WxMaSubscribeMessage.MsgData("character_string2", orderNo)); // 订单编号 + dataList.add(new WxMaSubscribeMessage.MsgData("thing4", tip)); // 温馨提示 + dataList.add(new WxMaSubscribeMessage.MsgData("amount9", amount)); // 已付金额 + dataList.add(new WxMaSubscribeMessage.MsgData("time10", orderTime)); // 下单时间 + msg.setData(dataList); - - Map data = new HashMap<>(); - data.put("thing1", Map.of("value", orderName)); // 订单名称 - data.put("character_string2", Map.of("value", orderNo)); // 订单编号 - data.put("thing4", Map.of("value", tip)); // 温馨提示 - data.put("amount9", Map.of("value", amount)); // 已付金额 - data.put("time10", Map.of("value", orderTime)); // 下单时间 - - Map body = new HashMap<>(); - body.put("touser", openId); - body.put("template_id", templateId); - body.put("data", data); - body.put("page", "pages/task/task"); // 可选跳转 - - String resp = restTemplate.postForObject(url, body, String.class); - log.info("小程序支付成功订阅消息发送结果: {}", resp); + wxMaService.getSubscribeService().sendSubscribeMsg(msg); + log.info("小程序支付成功订阅消息发送成功: openId={}, orderNo={}", openId, orderNo); } catch (Exception e) { log.error("小程序支付成功订阅消息发送失败: openId={}, orderNo={}, error={}", openId, orderNo, e.getMessage(), e); } @@ -62,48 +47,34 @@ public class WxMiniSubscribeServiceImpl implements WxMiniSubscribeService { @Override public void sendActivityStartMsg(String openId, String place, String activityName, String remark, String activityNo) { - try { - String accessToken = wxAccessTokenService.getAccessToken(); - String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + accessToken; - Map data = new HashMap<>(); - data.put("thing4", Map.of("value", place)); // 活动地点 - data.put("thing1", Map.of("value", activityName)); // 活动名称 - data.put("thing5", Map.of("value", remark)); // 备注 - data.put("character_string10", Map.of("value", activityNo)); // 活动编号 - - Map body = new HashMap<>(); - body.put("touser", openId); - body.put("template_id", activityStartTemplateId); - body.put("data", data); - - String resp = restTemplate.postForObject(url, body, String.class); - log.info("小程序活动即将开始提醒发送结果: {}", resp); - } catch (Exception e) { - log.error("小程序活动即将开始提醒发送失败: openId={}, activityNo={}, error={}", openId, activityNo, e.getMessage(), e); - } } @Override public void sendVideoEditCompleteMsg(String openId, String taskName, String orderNo, String result) { + + } + + @Override + public void sendServiceProcessMsg(String openId, String taskName, String processDesc, String orderNo, String orderTime, String result, String pageUrl) { try { - String accessToken = wxAccessTokenService.getAccessToken(); - String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + accessToken; + WxMaSubscribeMessage msg = new WxMaSubscribeMessage(); + msg.setToUser(openId); + msg.setTemplateId(templateId); + msg.setPage(pageUrl); // 可选跳转页面 "pages/task/task" - Map data = new HashMap<>(); - data.put("thing7", Map.of("value", taskName)); // 任务名称 - data.put("character_string13", Map.of("value", orderNo)); // 订单编号 - data.put("thing14", Map.of("value", result)); // 制作结果 + List dataList = new ArrayList<>(); + dataList.add(new WxMaSubscribeMessage.MsgData("thing1", taskName)); // 服务名称 + dataList.add(new WxMaSubscribeMessage.MsgData("character_string2", orderNo)); // 订单编号 + dataList.add(new WxMaSubscribeMessage.MsgData("thing4", processDesc)); // 服务阶段 + dataList.add(new WxMaSubscribeMessage.MsgData("time8", orderTime)); // 已付金额 + dataList.add(new WxMaSubscribeMessage.MsgData("thing6", result)); // 备注 + msg.setData(dataList); - Map body = new HashMap<>(); - body.put("touser", openId); - body.put("template_id", videoEditCompleteTemplateId); - body.put("data", data); - - String resp = restTemplate.postForObject(url, body, String.class); - log.info("小程序一键成片完成通知发送结果: {}", resp); + wxMaService.getSubscribeService().sendSubscribeMsg(msg); + log.info("小程序服务进度订阅消息发送成功: openId={}, orderNo={}", openId, orderNo); } catch (Exception e) { - log.error("小程序一键成片完成通知发送失败: openId={}, orderNo={}, error={}", openId, orderNo, e.getMessage(), e); + log.error("小程序服务进度订阅消息发送失败: openId={}, orderNo={}, error={}", openId, orderNo, e.getMessage(), e); } } } diff --git a/zlt-business/order-center/src/main/resources/application.yml b/zlt-business/order-center/src/main/resources/application.yml index f817e556..9b5023fd 100644 --- a/zlt-business/order-center/src/main/resources/application.yml +++ b/zlt-business/order-center/src/main/resources/application.yml @@ -26,7 +26,24 @@ knife4j: enable: true setting: swagger-model-name: 订单中心接口文档 - +zlt: + #多租户配置 + tenant: + enable: false + ignoreTables: + - edit_task + - home_carousel + - sys_message + - wx_message_record + - wx_subscribe_status + - video_template + - profit_sharing + - order_statistics + ignoreSqls: + # 用户关联角色时,显示所有角色 + - com.central.order.mapper.findList + # 用户列表显示用户所关联的所有角色 + - com.central.user.mapper.SysUserRoleMapper.findRolesByUserIds # 微信支付商户号 tencent: merchantId: ${zlt.wxpay.merchantId} @@ -99,6 +116,7 @@ wx: secret: ${zlt.security.tencent.app-secret} template: pay-success: nSy7NGq1443YCfhgR81fgkeOVv9cSM5Ysp3nMoQYVpc + service-process: rgQCI3fMKPpgO-9nO3TzP-omohraGxX2suVioq7hQhk activity-start: lgwkRnbdDc3mEwk3RMob43LpLHnLfglZtTkbFRPsPCA order-complete: ZeIlAA6ImQLxBiLmo-53lM7wkL4KnuKKTGKWBZwYAdM video-edit-complete: IXpL-Voztm3GM-zFj3sxA39qy8oRtAcxTiT7_Qsyz9Q diff --git a/zlt-config/src/main/resources/application-dev.properties b/zlt-config/src/main/resources/application-dev.properties index 67d2e37b..95919716 100644 --- a/zlt-config/src/main/resources/application-dev.properties +++ b/zlt-config/src/main/resources/application-dev.properties @@ -1,11 +1,11 @@ ########################## 统一变量配置 ########################## ##### 数据库配置 -#zlt.datasource.ip=127.0.0.1 -#zlt.datasource.username=root -#zlt.datasource.password=root -zlt.datasource.ip=sh-cdb-i6yxaaec.sql.tencentcdb.com:58797 +zlt.datasource.ip=127.0.0.1 zlt.datasource.username=root -zlt.datasource.password=ZXC_zxc!@#123+ +zlt.datasource.password=root +#zlt.datasource.ip=sh-cdb-i6yxaaec.sql.tencentcdb.com:58797 +#zlt.datasource.username=root +#zlt.datasource.password=ZXC_zxc!@#123+ ##### redis配置 spring.data.redis.host=192.168.2.20 diff --git a/zlt-web/react-web/src/main/frontend/src/pages/orders/Refund/components/UpdateForm.less b/zlt-web/react-web/src/main/frontend/src/pages/orders/Refund/components/UpdateForm.less index 5963e80f..637366e5 100644 --- a/zlt-web/react-web/src/main/frontend/src/pages/orders/Refund/components/UpdateForm.less +++ b/zlt-web/react-web/src/main/frontend/src/pages/orders/Refund/components/UpdateForm.less @@ -65,4 +65,18 @@ &:hover, &:focus { border-color: #1890ff; } +} + +.imageList { + display: flex; + flex-wrap: wrap; + gap: 8px; + + :global { + .ant-image { + border-radius: 4px; + overflow: hidden; + border: 1px solid #f0f0f0; + } + } } \ No newline at end of file diff --git a/zlt-web/react-web/src/main/frontend/src/pages/orders/Refund/components/UpdateForm.tsx b/zlt-web/react-web/src/main/frontend/src/pages/orders/Refund/components/UpdateForm.tsx index d6563d87..f80c8b5f 100644 --- a/zlt-web/react-web/src/main/frontend/src/pages/orders/Refund/components/UpdateForm.tsx +++ b/zlt-web/react-web/src/main/frontend/src/pages/orders/Refund/components/UpdateForm.tsx @@ -4,7 +4,7 @@ import { ProFormSelect, ProFormTextArea, } from '@ant-design/pro-components'; -import { Typography, Descriptions, Space, Tag } from 'antd'; +import { Typography, Descriptions, Space, Tag, Image } from 'antd'; import React from 'react'; import { ORDER_STATUS, REFUND_STATUS } from '../constants'; import styles from './UpdateForm.less'; @@ -63,6 +63,29 @@ const UpdateForm: React.FC = (props) => { {REFUND_STATUS[values?.state]?.text || '未知状态'} + + {values?.refundReason || '-'} + + + {values?.refundImgs ? ( +
+ {values.refundImgs.split(',').map((url: string, index: number) => ( + + ))} +
+ ) : ( + '-' + )} +
{values?.createTime}