2024-09-16 注册页申请流程

pull/379/head
zhp 1 year ago
parent 17c9ba5cab
commit d5f5355b1e

@ -57,7 +57,7 @@ public class ChannelController extends BaseController
*/ */
@RequiresPermissions("system:channel:query") @RequiresPermissions("system:channel:query")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Integer id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
return success(channelService.selectChannelById(id)); return success(channelService.selectChannelById(id));
} }

@ -19,7 +19,7 @@ public interface ChannelMapper extends BaseMapper<Channel>
* @param id * @param id
* @return * @return
*/ */
public Channel selectChannelById(Integer id); public Channel selectChannelById(Long id);
/** /**
* *

@ -18,7 +18,7 @@ public interface IChannelService
* @param id * @param id
* @return * @return
*/ */
public Channel selectChannelById(Integer id); public Channel selectChannelById(Long id);
/** /**
* *
@ -34,7 +34,7 @@ public interface IChannelService
* @param channel * @param channel
* @return * @return
*/ */
public int insertChannel(Channel channel); public long insertChannel(Channel channel);
/** /**
* *

@ -38,7 +38,7 @@ public class ChannelServiceImpl implements IChannelService
* @return * @return
*/ */
@Override @Override
public Channel selectChannelById(Integer id) public Channel selectChannelById(Long id)
{ {
return channelMapper.selectChannelById(id); return channelMapper.selectChannelById(id);
} }
@ -63,14 +63,14 @@ public class ChannelServiceImpl implements IChannelService
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int insertChannel(Channel channel) public long insertChannel(Channel channel)
{ {
if (StringUtils.isEmpty(channel.getChannelSign())) { if (StringUtils.isEmpty(channel.getChannelSign())) {
channel.setChannelSign(RandomStringUtils.random(16, true, false)); channel.setChannelSign(RandomStringUtils.random(16, true, false));
} }
channel.setCreateTime(DateUtils.getNowDate()); channel.setCreateTime(DateUtils.getNowDate());
channel.setUpdateTime(DateUtils.getNowDate()); channel.setUpdateTime(DateUtils.getNowDate());
int i = channelMapper.insertChannel(channel); long i = channelMapper.insertChannel(channel);
//新增插入缓存 //新增插入缓存
Channel channelById = channelMapper.selectChannelById(i); Channel channelById = channelMapper.selectChannelById(i);
redisService.setCacheObject(CacheConstants.CHANNEL_ID+i,channelById); redisService.setCacheObject(CacheConstants.CHANNEL_ID+i,channelById);

@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </select>
<select id="selectChannelById" parameterType="java.lang.Integer" resultMap="ChannelResult"> <select id="selectChannelById" parameterType="java.lang.Long" resultMap="ChannelResult">
<include refid="selectChannelVo"/> <include refid="selectChannelVo"/>
where id = #{id} where id = #{id}
</select> </select>

Loading…
Cancel
Save