若依修改

修改记录
1.代码生成:
sql.vm


declare
parentId NUMBER;

begin

-- 菜单 SQL
insert into sys_menu (menu_id,menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values(seq_sys_menu.nextval,'${tableComment}', '3', '1', '/${moduleName}/${classname}', 'C', '0', '${moduleName}:${classname}:view', '#', 'admin', sysdate, 'ry', sysdate, '${tableComment}菜单');

-- 按钮父菜单ID
select seq_sys_menu.currval into parentId from dual;

-- 按钮 SQL
insert into sys_menu (menu_id,menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values(seq_sys_menu.nextval,'${tableComment}查询', parentId, '1', '#', 'F', '0', '${moduleName}:${classname}:list', '#', 'admin',sysdate, 'ry', sysdate, '');

insert into sys_menu (menu_id,menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values(seq_sys_menu.nextval,'${tableComment}新增', parentId, '2', '#', 'F', '0', '${moduleName}:${classname}:add', '#', 'admin', sysdate, 'ry', sysdate, '');

insert into sys_menu (menu_id,menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values(seq_sys_menu.nextval,'${tableComment}修改', parentId, '3', '#', 'F', '0', '${moduleName}:${classname}:edit', '#', 'admin', sysdate, 'ry', sysdate, '');

insert into sys_menu (menu_id,menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values(seq_sys_menu.nextval,'${tableComment}删除', parentId, '4', '#', 'F', '0', '${moduleName}:${classname}:remove', '#', 'admin', sysdate, 'ry', sysdate, '');

commit;
end;

2. GenUtils工具类

3.在线用户监控:
SysUserOnlineController

public AjaxResult batchForceLogout(@RequestParam("ids[]") String[] ids)
public AjaxResult forceLogout(String sessionId)
方法中:userOnlineService.saveOnline(online)修改为 userOnlineService.deleteOnlineById(sessionId);

4.SysNoticeMapper.xml
新增方法使用序列:
<insert id="insertNotice" parameterType="SysNotice">

<selectKey keyProperty="noticeId" order="BEFORE" resultType="Long">
select seq_sys_notice .nextval as noticeId from DUAL
</selectKey>
insert into sys_notice (
<if test="noticeId != null and noticeId != 0 ">notice_id, </if>
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
<if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
<if test="status != null and status != '' ">status, </if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="noticeId != null and noticeId != 0 ">#{noticeId},</if>
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
<if test="noticeType != null and noticeType != ''">#{noticeType}, </if>
<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if>
<if test="status != null and status != ''">#{status}, </if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate
)
</insert>

5 SysUserOnlineMapper.xml

<select id="selectOnlineByExpired" parameterType="String" resultMap="SysUserOnlineResult">
<include refid="selectOnlineVo"/> o
WHERE to_char(o.last_access_time ,'yyyy-mm-dd hh24-mi-ss')<![CDATA[ <= ]]> #{lastAccessTime} ORDER BY o.last_access_time ASC
</select>

 

posted @ 2019-03-08 14:53  八方鱼  阅读(108)  评论(0)    收藏  举报