From 937524f19e63298a2ade69d663dfd1b37fd6accd Mon Sep 17 00:00:00 2001 From: SUCH HAVE YOU <2207141659@qq.com> Date: Sun, 3 Nov 2024 20:01:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E5=B9=BF?= =?UTF-8?q?=E5=91=8A=E4=BD=8D=E6=8E=A5=E5=8F=A3=E3=80=90=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=B7=B2=E5=90=AF=E7=94=A8=E7=9A=84=E5=B9=BF=E5=91=8A=E4=BD=8D?= =?UTF-8?q?=E3=80=91=E6=9F=A5=E8=AF=A2=E5=87=BA=E5=85=A8=E9=83=A8=E3=80=90?= =?UTF-8?q?=E5=8C=85=E6=8B=AC=E6=9C=AA=E5=90=AF=E7=94=A8=E3=80=91=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/skyeye/adsense/service/Impl/AdsenseServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/skyeye-shop/shop-store/src/main/java/com/skyeye/adsense/service/Impl/AdsenseServiceImpl.java b/skyeye-shop/shop-store/src/main/java/com/skyeye/adsense/service/Impl/AdsenseServiceImpl.java index 6b140715..3d4473ac 100644 --- a/skyeye-shop/shop-store/src/main/java/com/skyeye/adsense/service/Impl/AdsenseServiceImpl.java +++ b/skyeye-shop/shop-store/src/main/java/com/skyeye/adsense/service/Impl/AdsenseServiceImpl.java @@ -12,8 +12,10 @@ import com.skyeye.adsense.service.AdsenseService; import com.skyeye.annotation.service.SkyeyeService; import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; import com.skyeye.common.constans.CommonCharConstants; +import com.skyeye.common.enumeration.EnableEnum; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; +import com.skyeye.common.util.mybatisplus.MybatisPlusUtil; import org.springframework.stereotype.Service; import java.util.Arrays; @@ -41,6 +43,7 @@ public class AdsenseServiceImpl extends SkyeyeBusinessServiceImpl> queryDataList(InputObject inputObject) { QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq(MybatisPlusUtil.toColumns(Adsense::getEnabled), EnableEnum.ENABLE_USING.getKey()); List beans = list(queryWrapper); return JSONUtil.toList(JSONUtil.toJsonStr(beans), null); } From 265423252c2df203ef79e343df4c742c2b0c4180 Mon Sep 17 00:00:00 2001 From: SUCH HAVE YOU <2207141659@qq.com> Date: Sun, 3 Nov 2024 21:11:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat.=E4=BF=AE=E6=94=B9ai=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=92=8C=E8=A7=92=E8=89=B2=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../key/service/impl/AiApiKeyServiceImpl.java | 10 ++++--- .../role/controller/RoleController.java | 2 +- .../com/skyeye/role/service/RoleService.java | 2 +- .../role/service/impl/RoleServiceImpl.java | 26 ++----------------- 4 files changed, 11 insertions(+), 29 deletions(-) diff --git a/skyeye-ai/ai-pro/src/main/java/com/skyeye/key/service/impl/AiApiKeyServiceImpl.java b/skyeye-ai/ai-pro/src/main/java/com/skyeye/key/service/impl/AiApiKeyServiceImpl.java index 37af582c..e2ca3782 100644 --- a/skyeye-ai/ai-pro/src/main/java/com/skyeye/key/service/impl/AiApiKeyServiceImpl.java +++ b/skyeye-ai/ai-pro/src/main/java/com/skyeye/key/service/impl/AiApiKeyServiceImpl.java @@ -5,8 +5,11 @@ package com.skyeye.key.service.impl; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.skyeye.common.enumeration.EnableEnum; +import com.skyeye.common.util.mybatisplus.MybatisPlusUtil; import com.skyeye.key.dao.AiApiKeyDao; import com.skyeye.key.entity.AiApiKey; import com.skyeye.key.service.AiApiKeyService; @@ -44,17 +47,17 @@ public class AiApiKeyServiceImpl extends SkyeyeBusinessServiceImpl> queryDataList(InputObject inputObject) { QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq(MybatisPlusUtil.toColumns(AiApiKey::getEnabled), EnableEnum.ENABLE_USING.getKey()); List beans = list(queryWrapper); return JSONUtil.toList(JSONUtil.toJsonStr(beans), null); } diff --git a/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/controller/RoleController.java b/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/controller/RoleController.java index 2422707e..ccfe5bf9 100644 --- a/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/controller/RoleController.java +++ b/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/controller/RoleController.java @@ -92,7 +92,7 @@ public class RoleController{ * @param inputObject 入参以及用户信息等获取对象 * @param outputObject 出参以及提示信息的返回值对象 */ - @ApiOperation(id = "queryRoleList", value = "获取广告位管理信息", method = "POST", allUse = "0") + @ApiOperation(id = "queryRoleList", value = "获取AI角色", method = "POST", allUse = "0") @RequestMapping("/post/roleController/queryRoleList") public void queryRoleList(InputObject inputObject, OutputObject outputObject) { roleService.queryList(inputObject, outputObject); diff --git a/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/service/RoleService.java b/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/service/RoleService.java index deba7997..e8dea79a 100644 --- a/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/service/RoleService.java +++ b/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/service/RoleService.java @@ -18,5 +18,5 @@ import java.util.List; * 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的 */ public interface RoleService extends SkyeyeBusinessService { - List queryRoleList(String id); + } diff --git a/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/service/impl/RoleServiceImpl.java b/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/service/impl/RoleServiceImpl.java index ac20fa47..39147b64 100644 --- a/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/service/impl/RoleServiceImpl.java +++ b/skyeye-ai/ai-pro/src/main/java/com/skyeye/role/service/impl/RoleServiceImpl.java @@ -4,7 +4,6 @@ package com.skyeye.role.service.impl; -import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.skyeye.role.dao.RoleDao; @@ -12,7 +11,6 @@ import com.skyeye.role.entity.Role; import com.skyeye.role.service.RoleService; import com.skyeye.annotation.service.SkyeyeService; import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; -import com.skyeye.common.entity.search.CommonPageInfo; import com.skyeye.common.object.InputObject; import com.skyeye.common.util.mybatisplus.MybatisPlusUtil; import org.springframework.stereotype.Service; @@ -31,28 +29,14 @@ import java.util.Map; @Service @SkyeyeService(name = "AI角色", groupName = "AI角色") public class RoleServiceImpl extends SkyeyeBusinessServiceImpl implements RoleService { - - /** - * 分页查询AI角色信息 - * @param commonPageInfo - * @return - */ - @Override - public QueryWrapper getQueryWrapper(CommonPageInfo commonPageInfo) { - QueryWrapper queryWrapper = super.getQueryWrapper(commonPageInfo); - String keyword = commonPageInfo.getKeyword(); - if (StrUtil.isNotEmpty(keyword)) { - queryWrapper.like(MybatisPlusUtil.toColumns(Role::getName), keyword); - } - return queryWrapper; - } - + /** * 获取全部AI角色信息 * * @param inputObject 入参以及用户信息等获取对象 * @return */ + @Override public List> queryDataList(InputObject inputObject) { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -60,10 +44,4 @@ public class RoleServiceImpl extends SkyeyeBusinessServiceImpl im return JSONUtil.toList(JSONUtil.toJsonStr(beans), null); } - @Override - public List queryRoleList(String id){ - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq(MybatisPlusUtil.toColumns(Role::getId), id); - return list(queryWrapper); - } }