From d5f5355b1ec6b1925bad57440db137c351c4bbae Mon Sep 17 00:00:00 2001 From: zhp <746006956@qq.com> Date: Tue, 17 Sep 2024 14:25:18 +0800 Subject: [PATCH] =?UTF-8?q?2024-09-16=20=E6=B3=A8=E5=86=8C=E9=A1=B5?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/system/controller/ChannelController.java | 2 +- .../main/java/com/ruoyi/system/mapper/ChannelMapper.java | 2 +- .../main/java/com/ruoyi/system/service/IChannelService.java | 4 ++-- .../com/ruoyi/system/service/impl/ChannelServiceImpl.java | 6 +++--- .../src/main/resources/mapper/system/ChannelMapper.xml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ChannelController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ChannelController.java index 79ac62d9..3901de0e 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ChannelController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ChannelController.java @@ -57,7 +57,7 @@ public class ChannelController extends BaseController */ @RequiresPermissions("system:channel:query") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Integer id) + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(channelService.selectChannelById(id)); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ChannelMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ChannelMapper.java index 07f07ef8..07560c50 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ChannelMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ChannelMapper.java @@ -19,7 +19,7 @@ public interface ChannelMapper extends BaseMapper * @param id 渠道配置主键 * @return 渠道配置 */ - public Channel selectChannelById(Integer id); + public Channel selectChannelById(Long id); /** * 查询渠道配置列表 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IChannelService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IChannelService.java index b25a077f..83ebbc13 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IChannelService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IChannelService.java @@ -18,7 +18,7 @@ public interface IChannelService * @param id 渠道配置主键 * @return 渠道配置 */ - public Channel selectChannelById(Integer id); + public Channel selectChannelById(Long id); /** * 查询渠道配置列表 @@ -34,7 +34,7 @@ public interface IChannelService * @param channel 渠道配置 * @return 结果 */ - public int insertChannel(Channel channel); + public long insertChannel(Channel channel); /** * 修改渠道配置 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java index 0304394e..b8e550d8 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java @@ -38,7 +38,7 @@ public class ChannelServiceImpl implements IChannelService * @return 渠道配置 */ @Override - public Channel selectChannelById(Integer id) + public Channel selectChannelById(Long id) { return channelMapper.selectChannelById(id); } @@ -63,14 +63,14 @@ public class ChannelServiceImpl implements IChannelService */ @Override @Transactional(rollbackFor = Exception.class) - public int insertChannel(Channel channel) + public long insertChannel(Channel channel) { if (StringUtils.isEmpty(channel.getChannelSign())) { channel.setChannelSign(RandomStringUtils.random(16, true, false)); } channel.setCreateTime(DateUtils.getNowDate()); channel.setUpdateTime(DateUtils.getNowDate()); - int i = channelMapper.insertChannel(channel); + long i = channelMapper.insertChannel(channel); //新增插入缓存 Channel channelById = channelMapper.selectChannelById(i); redisService.setCacheObject(CacheConstants.CHANNEL_ID+i,channelById); diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ChannelMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ChannelMapper.xml index f693439b..5254043c 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ChannelMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ChannelMapper.xml @@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - where id = #{id}