diff --git a/skyeye-ai/ai-pro/src/main/java/com/skyeye/aiStreamModle/SparkListener.java b/skyeye-ai/ai-pro/src/main/java/com/skyeye/aiStreamModle/SparkListener.java index c82cef78..1c92845f 100644 --- a/skyeye-ai/ai-pro/src/main/java/com/skyeye/aiStreamModle/SparkListener.java +++ b/skyeye-ai/ai-pro/src/main/java/com/skyeye/aiStreamModle/SparkListener.java @@ -60,12 +60,4 @@ public class SparkListener extends SparkConsoleListener { } } - - /** - * 获取完整版答案 - * */ - public StringBuilder getStringBuilder(){ - return stringBuilder; - } - } diff --git a/skyeye-ai/ai-pro/src/main/java/com/skyeye/chat/controller/ChatController.java b/skyeye-ai/ai-pro/src/main/java/com/skyeye/chat/controller/ChatController.java index 013c5dee..ece218ba 100644 --- a/skyeye-ai/ai-pro/src/main/java/com/skyeye/chat/controller/ChatController.java +++ b/skyeye-ai/ai-pro/src/main/java/com/skyeye/chat/controller/ChatController.java @@ -50,7 +50,7 @@ public class ChatController { @ApiImplicitParam(id = "ids", name = "ids", value = "主键id列表,多个id用逗号分隔", required = "required")}) @RequestMapping("/post/ChatController/deleteChatMessageByIds") public void deleteChatMessageByIds(InputObject inputObject, OutputObject outputObject) { - chatService.deleteById(inputObject, outputObject); + chatService.deleteByIds(inputObject, outputObject); } diff --git a/skyeye-ai/ai-pro/src/main/java/com/skyeye/chat/service/impl/ChatServiceImpl.java b/skyeye-ai/ai-pro/src/main/java/com/skyeye/chat/service/impl/ChatServiceImpl.java index aa28fea4..31fbcef4 100644 --- a/skyeye-ai/ai-pro/src/main/java/com/skyeye/chat/service/impl/ChatServiceImpl.java +++ b/skyeye-ai/ai-pro/src/main/java/com/skyeye/chat/service/impl/ChatServiceImpl.java @@ -3,7 +3,6 @@ package com.skyeye.chat.service.impl; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import cn.hutool.json.JSONArray; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.alibaba.dashscope.aigc.generation.Generation; @@ -41,12 +40,10 @@ import com.skyeye.role.service.RoleService; import com.skyeye.websocket.AiMessageWebSocket; import io.github.briqt.spark4j.SparkClient; import io.github.briqt.spark4j.constant.SparkApiVersion; -import io.github.briqt.spark4j.listener.SparkConsoleListener; import io.github.briqt.spark4j.model.SparkMessage; import io.github.briqt.spark4j.model.request.SparkRequest; import io.github.briqt.spark4j.model.response.SparkResponse; import io.github.briqt.spark4j.model.response.SparkResponseUsage; -import io.github.briqt.spark4j.model.response.SparkTextUsage; import io.reactivex.Flowable; import okhttp3.WebSocket; import org.springframework.beans.factory.annotation.Autowired; @@ -55,8 +52,6 @@ import org.springframework.transaction.annotation.Transactional; import java.util.*; import java.util.concurrent.Executor; -import java.util.stream.Collectors; -import java.util.stream.Stream; /** * @ClassName: ChatServiceImpl @@ -109,19 +104,16 @@ public class ChatServiceImpl extends SkyeyeBusinessServiceImpl im chat.setMessage(content); chat.setPlatform(platform); chat.setApiKeyId(apiKeyId); - String id =""; + String id =createEntity(chat, userId); switch (aiModel) { case YI_YAN: - id = createEntity(chat, userId); QianFanResponse(content, userId, apiKeyId, id); break; case XUN_FEI: - id = createEntity(chat, userId); XunFeiResponse(content,userId,apiKeyId,id); break; case TONG_YI: try { - id = createEntity(chat, userId); TongYiResponse(content,userId,apiKeyId,id); break; } catch (Exception e) { @@ -360,33 +352,18 @@ public class ChatServiceImpl extends SkyeyeBusinessServiceImpl im chat.setApiKeyMation(aiApiKey); } outputObject.setBeans(chatList); - outputObject.settotal(page.size()); + outputObject.settotal(page.getTotal()); } @Override public void deleteAllByApiKeyId(InputObject inputObject, OutputObject outputObject) { Map params = inputObject.getParams(); String apiKeyId = params.get("apiKeyId").toString(); + String userId = InputObject.getLogParamsStatic().get("id").toString(); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq(MybatisPlusUtil.toColumns(Chat::getApiKeyId), apiKeyId); - List chatList = list(queryWrapper); - for (Chat chat : chatList) { - removeById(chat.getId()); - } - } - - - @Override - public void deleteById(InputObject inputObject, OutputObject outputObject) { - Map params = inputObject.getParams(); - String idsStr = params.get("ids").toString(); - if (idsStr == null || idsStr.isEmpty()) { - throw new CustomException("错误操作"); - } - List ids = Stream.of(idsStr.split(",")) - .map(String::trim) - .collect(Collectors.toList()); - deleteById(ids); + queryWrapper.eq(MybatisPlusUtil.toColumns(Chat::getCreateId), userId); + remove(queryWrapper); } } diff --git a/skyeye-shop/shop-store/src/main/java/com/skyeye/store/controller/ShopStoreController.java b/skyeye-shop/shop-store/src/main/java/com/skyeye/store/controller/ShopStoreController.java index 7b5e15fe..d4f68d89 100644 --- a/skyeye-shop/shop-store/src/main/java/com/skyeye/store/controller/ShopStoreController.java +++ b/skyeye-shop/shop-store/src/main/java/com/skyeye/store/controller/ShopStoreController.java @@ -79,6 +79,14 @@ public class ShopStoreController { shopStoreService.queryStoreListByParams(inputObject, outputObject); } + @ApiOperation(id = "queryStorePageListByParams", value = "商城分页获取门店列表信息", method = "POST", allUse = "0") + @ApiImplicitParams(classBean = CommonPageInfo.class, value = { + @ApiImplicitParam(id = "enabled", name = "enabled", value = "状态", required = "required,num", defaultValue = "1")}) + @RequestMapping("/post/ShopStoreController/queryStorePageListByParams") + public void queryStorePageListByParams(InputObject inputObject, OutputObject outputObject) { + shopStoreService.queryPageList(inputObject, outputObject); + } + @ApiOperation(id = "queryStoreOnlineById", value = "根据门店ID获取门店设置的线上预约信息(已结合当前登陆用户)", method = "GET", allUse = "2") @ApiImplicitParams({ @ApiImplicitParam(id = "id", name = "id", value = "主键id", required = "required")}) diff --git a/skyeye-shop/shop-store/src/main/java/com/skyeye/store/service/impl/ShopStoreServiceImpl.java b/skyeye-shop/shop-store/src/main/java/com/skyeye/store/service/impl/ShopStoreServiceImpl.java index f92094a7..a26c62ea 100644 --- a/skyeye-shop/shop-store/src/main/java/com/skyeye/store/service/impl/ShopStoreServiceImpl.java +++ b/skyeye-shop/shop-store/src/main/java/com/skyeye/store/service/impl/ShopStoreServiceImpl.java @@ -11,6 +11,7 @@ import com.skyeye.annotation.service.SkyeyeService; import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; import com.skyeye.common.client.ExecuteFeignClient; import com.skyeye.common.constans.CommonConstants; +import com.skyeye.common.entity.search.CommonPageInfo; import com.skyeye.common.enumeration.WhetherEnum; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; @@ -51,6 +52,15 @@ public class ShopStoreServiceImpl extends SkyeyeBusinessServiceImpl getQueryWrapper(CommonPageInfo commonPageInfo) { + QueryWrapper queryWrapper = super.getQueryWrapper(commonPageInfo); + if (commonPageInfo.getEnabled() != null) { + queryWrapper.eq(MybatisPlusUtil.toColumns(ShopStore::getEnabled), commonPageInfo.getEnabled()); + } + return queryWrapper; + } + @Override public List> queryPageDataList(InputObject inputObject) { List> beans = super.queryPageDataList(inputObject);