Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

yuhongqi 2 недель назад
Родитель
Сommit
cedfb0a02e

+ 9 - 1
fs-service/src/main/java/com/fs/fastGpt/service/impl/AiHookServiceImpl.java

@@ -612,7 +612,7 @@ public class AiHookServiceImpl implements AiHookService {
             if(isNewVersion){
                 Gson gson = new Gson();
                 FastGptChatConversation fastGptChatConversation = gson.fromJson(contentKh, FastGptChatConversation.class);
-                content = fastGptChatConversation.getAiContent();
+                content = replace(fastGptChatConversation.getAiContent()).trim();
 
                 // 知识库未命中:异步写明细 + 归类统计(不阻塞主流程)
                 if ("0".equals(String.valueOf(fastGptChatConversation.getIsRepository()))) {
@@ -1831,6 +1831,14 @@ public class AiHookServiceImpl implements AiHookService {
             if(role.getUserInfo() != null){
                 for (String name : split) {
                     if (name != null) {
+                        //课程章节 看课状态
+                        if(name.equals("课程章节")){
+                            FsCourseWatchLogVO log = fsCourseWatchLogMapper.selectFsCourseWatchLogByExtId(fastGptChatSession.getQwExtId());
+                            String courseTitleName = log.getCourseName() + log.getTitle();
+                            courseTitleName = courseTitleName.replaceAll("[【】]", "");
+                            userInfo.put("课程章节",courseTitleName);
+                            userInfo.put("课程状态",log.getLogType()==3?"待看课":log.getLogType()==1?"已完课":log.getLogType()==2?"已完课":"看课中断");
+                        }
                         Object value = map.get(name);
                         if(value != null){
                             userInfo.put(name,value);

+ 0 - 3
fs-service/src/main/java/com/fs/fastgptApi/service/Impl/ChatServiceImpl.java

@@ -45,9 +45,6 @@ public class ChatServiceImpl implements ChatService {
                 if(JSON.parseObject(choices.get(0).toString()).getJSONObject("message").getString("content").contains("【转人工】")){
                     jsonObject.put("artificial", true);
                 }
-                if(JSON.parseObject(choices.get(0).toString()).getJSONObject("message").getString("aiContent").contains("【转人工】")){
-                    jsonObject.put("artificial", true);
-                }
                 if(JSON.parseObject(choices.get(0).toString()).getJSONObject("message").getString("content").contains("FunctionCallBegin")){
                     jsonObject.put("artificial", true);
                 }

+ 3 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderCreateParam.java

@@ -70,4 +70,7 @@ public class FsStoreOrderCreateParam implements Serializable
 
     //关联Id
     private Long associatedId;
+
+    // (叮当国医)自定义总价
+    private BigDecimal totalPrice;
 }

+ 1 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderCreateUserParam.java

@@ -32,4 +32,5 @@ public class FsStoreOrderCreateUserParam implements Serializable
     private BigDecimal amount; //货到付款代收金额
     private Integer orderType; //订单类型
     private Integer orderMedium; //媒体来源
+    private BigDecimal totalPrice; // (叮当国医)自定义总价
 }

+ 21 - 5
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -1239,7 +1239,11 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
             }
             storeOrder.setCartId(cartIds);
             storeOrder.setTotalNum(Long.parseLong(String.valueOf(carts.size())));
-            storeOrder.setTotalPrice(dto.getTotalPrice());
+            if(CloudHostUtils.hasCloudHostName("叮当国医")){
+                storeOrder.setTotalPrice(param.getTotalPrice());
+            } else {
+                storeOrder.setTotalPrice(dto.getTotalPrice());
+            }
             storeOrder.setTotalPostage(dto.getPayPostage());
 
             //优惠券处理
@@ -1292,8 +1296,14 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
 
             //后台制单处理
             if (param.getPayPrice() != null && param.getPayPrice().compareTo(BigDecimal.ZERO) > 0) {
-                if (param.getPayPrice().compareTo(dto.getTotalPrice()) > 0) {
-                    return R.error("改价价格不能大于商品总价");
+                if(CloudHostUtils.hasCloudHostName("叮当国医")){
+                    if (param.getPayPrice().compareTo(param.getTotalPrice()) > 0) {
+                        return R.error("改价价格不能大于商品总价");
+                    }
+                } else {
+                    if (param.getPayPrice().compareTo(dto.getTotalPrice()) > 0) {
+                        return R.error("改价价格不能大于商品总价");
+                    }
                 }
                 storeOrder.setPayPrice(param.getPayPrice());
             } else {
@@ -1318,8 +1328,13 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
                 BigDecimal amount = param.getAmount();  //货到付款 自定义代收金额
                 if (amount != null && amount.compareTo(BigDecimal.ZERO) > 0) {
                     storeOrder.setStatus(0);
-                    storeOrder.setPayMoney(amount);
-                    storeOrder.setPayDelivery(storeOrder.getPayPrice().subtract(amount));
+                    if(CloudHostUtils.hasCloudHostName("叮当国医")){
+                        storeOrder.setPayMoney(param.getPayPrice());
+                        storeOrder.setPayDelivery(amount);
+                    } else {
+                        storeOrder.setPayMoney(amount);
+                        storeOrder.setPayDelivery(storeOrder.getPayPrice().subtract(amount));
+                    }
                 } else {
                     storeOrder.setStatus(1);
                 }
@@ -2524,6 +2539,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
             createParam.setOrderCreateType(3); //后台制单
             createParam.setOrderType(param.getOrderType());
             createParam.setOrderMedium(param.getOrderMedium()); //后台制单
+            createParam.setTotalPrice(param.getTotalPrice());
             return this.createOrder(param.getUserId(), createParam);
         } else {
             throw new CustomException("创建失败");

+ 1 - 0
fs-service/src/main/resources/application-config-druid-sxjz.yml

@@ -103,6 +103,7 @@ ipad:
   voiceApi:
   commonApi:
   aiApiV2: http://1.95.196.10:3000/api
+  aiApiV3: http://129.28.170.206:3000/api
 wx_miniapp_temp:
   pay_order_temp_id:
   inquiry_temp_id:

+ 2 - 2
fs-service/src/main/resources/application-config-druid-sxsm.yml

@@ -50,8 +50,8 @@ wx:
         aesKey: Eswa6VjwtVcw03qZy6Wllgrv5aytIA1SZPEU0kU2 # 接口配置里的EncodingAESKey值
   # 开放平台app微信授权配置
   open:
-    app-id: wx974
-    secret: 32dfaa2b
+    app-id: wx134360220979c73d
+    secret: 6e9fdac615921b9a42fd27781f8e5761
 aifabu:  #爱链接
   appKey: 7b471be905ab17ef358c610dd117601d008
 watch:

+ 5 - 6
fs-service/src/main/resources/application-druid-sxsm.yml

@@ -183,16 +183,15 @@ spring:
                         config:
                             multi-statement-allow: true
 rocketmq:
-    enabled: false
-    name-server: tencenttdmq # RocketMQ NameServer 地址
+    name-server: rmq-16vj8de9bq.rocketmq.cd.qcloud.tencenttdmq.com:8080 # RocketMQ NameServer 地址
     producer:
         group: my-producer-group
-        access-key: ak16pknjrda5f27fdaa338ab # 替换为实际的 accessKey
-        secret-key: sk7d7d9b8d8d44d405 # 替换为实际的 secretKey
+        access-key: ak16vj8de9bq94afcd422462 # 替换为实际的 accessKey
+        secret-key: sk989bb2586d9c77b9 # 替换为实际的 secretKey
     consumer:
         group: voice-group
-        access-key: ak16pknjrda5f27fdaa338ab # 替换为实际的 accessKey
-        secret-key: sk7d7d9b8d8d44d405 # 替换为实际的 secretKey
+        access-key: ak16vj8de9bq94afcd422462 # 替换为实际的 accessKey
+        secret-key: sk989bb2586d9c77b9 # 替换为实际的 secretKey
 custom:
     token: "1o62d3YxvdHd4LEUiltnu7sK"
     encoding-aes-key: "UJfTQ5qKTKlegjkXtp1YuzJzxeHlUKvq5GyFbERN1iU"