From c6008344fa9344809fe0ecce03e7ed3ac6da4e3d Mon Sep 17 00:00:00 2001 From: wangshuai Date: Tue, 23 Jul 2024 11:09:17 +0800 Subject: [PATCH] =?UTF-8?q?1=EF=BC=9B=E6=B8=A0=E9=81=93=E5=88=A4=E6=96=AD?= =?UTF-8?q?=EF=BC=8C=E9=BB=98=E8=AE=A4ai=202=EF=BC=9B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E6=B8=85=E7=A9=BA=203?= =?UTF-8?q?=EF=BC=9B=E7=89=B9=E6=AE=8A=E8=AE=A2=E5=8D=95=E6=8E=92=E9=99=A4?= =?UTF-8?q?=E6=8B=89=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/service/impl/AiServiceImpl.java | 4 +++- .../service/impl/MeituanServiceImpl.java | 21 ++++++++++++------- .../mapper/business/BusStoreInfoMapper.xml | 2 +- ruoyi-ui/src/views/market/self/index.vue | 2 +- ruoyi-ui/src/views/market/whole/index.vue | 2 +- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/AiServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/AiServiceImpl.java index 07591b9..36b21b1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/AiServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/AiServiceImpl.java @@ -362,8 +362,10 @@ public class AiServiceImpl implements IAiService { System.out.println("话术:" + content + "; order" + busOrderInfo.toString()); if("AI".equals(busStoreInfo.getMarketingChannels())){ sendAiTask(content,busOrderInfo); - }else{ + }else if("sms".equals(busStoreInfo.getMarketingChannels())){ sendSmsTask(); + }else{ + sendAiTask(content,busOrderInfo); } }else { BusAgentInfo busAgentInfo = agentInfoL.get(0); diff --git a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/MeituanServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/MeituanServiceImpl.java index a230226..1e9fdc9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/MeituanServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/business/service/impl/MeituanServiceImpl.java @@ -386,9 +386,18 @@ public class MeituanServiceImpl implements IMeituanService { JSONObject commonInfo = oj.getJSONObject("commonInfo"); JSONObject order1 = order0.getJSONObject("orderInfo"); JSONObject foodInfo = order0.getJSONObject("foodInfo"); - JSONObject userLabelVo = foodInfo.getJSONObject("userLabelVo"); - JSONArray array1 = userLabelVo.getJSONArray("contents"); - String info = array1.getJSONObject(0).getString("info"); + if(foodInfo != null){ + JSONObject userLabelVo = foodInfo.getJSONObject("userLabelVo"); + JSONArray array1 = userLabelVo.getJSONArray("contents"); + String info = array1.getJSONObject(0).getString("info"); + if ("门店新客".equals(info)){ + orderInfo.setOrderCount("1"); + } else if (info.contains("下单")){ + orderInfo.setOrderCount(info.substring(info.indexOf("下单")+2,info.length()-1)); + }else{ + continue; + } + } JSONObject expectTimeVo = order1.getJSONObject("expectTimeVo"); String daySeq = order1.getString("dayseq"); String wmOrderViewId = order1.getString("wmOrderViewId"); @@ -427,11 +436,7 @@ public class MeituanServiceImpl implements IMeituanService { orderInfo.setCompleteTime("2024-"+expectTime); orderInfo.setOrderStatus(statusDesc); orderInfo.setCustomId(userId); - if ("门店新客".equals(info)){ - orderInfo.setOrderCount("1"); - } else if (info.contains("下单")){ - orderInfo.setOrderCount(info.substring(info.indexOf("下单")+2,info.length()-1)); - } + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); try { orderInfo.setOrderTime(format.parse("2024-"+orderTimeFmt)); diff --git a/ruoyi-system/src/main/resources/mapper/business/BusStoreInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/business/BusStoreInfoMapper.xml index bfa4265..aae64f3 100644 --- a/ruoyi-system/src/main/resources/mapper/business/BusStoreInfoMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/business/BusStoreInfoMapper.xml @@ -165,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{saleBindName}, #{saleBindTime}, #{price}, - #{price}, + #{marketingChannels}, diff --git a/ruoyi-ui/src/views/market/self/index.vue b/ruoyi-ui/src/views/market/self/index.vue index 4078c2d..0de8874 100644 --- a/ruoyi-ui/src/views/market/self/index.vue +++ b/ruoyi-ui/src/views/market/self/index.vue @@ -441,7 +441,7 @@ export default { grantStatus: undefined, returnVisitStatus: undefined, selfDeliveryStatus: 2, - marketingChannels: 'AI' + marketingChannels: undefined }, saleList: [], timeRange: undefined, diff --git a/ruoyi-ui/src/views/market/whole/index.vue b/ruoyi-ui/src/views/market/whole/index.vue index eef9051..b0ec321 100644 --- a/ruoyi-ui/src/views/market/whole/index.vue +++ b/ruoyi-ui/src/views/market/whole/index.vue @@ -511,7 +511,7 @@ export default { grantStatus: undefined, returnVisitStatus: undefined, selfDeliveryStatus: 1, - marketingChannels: 'AI' + marketingChannels: undefined }, queryParams1: { content: undefined