Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5portal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
管理员
jfV5portal
Commits
2bee77eb
Commit
2bee77eb
authored
Sep 07, 2018
by
周王清
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
快速链接模块修改
parent
f69d2c34
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
27 deletions
+47
-27
friendlinkTab.js
WebContent/jwapp/pages/friendlink/js/friendlinkTab.js
+8
-8
FriendLinkBusiness.java
src_jwapp/com/jw/app/business/FriendLinkBusiness.java
+2
-1
FriendLinkBusinessImpl.java
...om/jw/app/business/friendlink/FriendLinkBusinessImpl.java
+7
-9
friendlinkDAO.java
src_jwapp/com/jw/app/business/friendlink/friendlinkDAO.java
+1
-1
friendlinkDAO.xml
src_jwapp/com/jw/app/business/friendlink/friendlinkDAO.xml
+19
-5
actAction.java
src_jwapp/com/jw/app/friendlink/action/actAction.java
+10
-3
No files found.
WebContent/jwapp/pages/friendlink/js/friendlinkTab.js
View file @
2bee77eb
...
@@ -45,13 +45,13 @@ var ls_ywlx = 'YBYW';
...
@@ -45,13 +45,13 @@ var ls_ywlx = 'YBYW';
* 备注:需更改
* 备注:需更改
**/
**/
//定义grid列表
//定义grid列表
var
ls_title
=
"
友情
链接"
;
var
ls_title
=
"
快速
链接"
;
var
is_column
=
[
[
var
is_column
=
[
[
{
field
:
'TITLE'
,
title
:
'标题'
,
width
:
3
80
,
align
:
'left
'
},
{
field
:
'TITLE'
,
title
:
'标题'
,
width
:
3
00
,
align
:
'left'
,
halign
:
'center
'
},
{
field
:
'URL'
,
title
:
'链接'
,
width
:
3
80
,
align
:
'left
'
},
{
field
:
'URL'
,
title
:
'链接'
,
width
:
3
00
,
align
:
'left'
,
halign
:
'center
'
},
{
field
:
'SORT'
,
title
:
'排序'
,
width
:
50
,
align
:
'left
'
},
{
field
:
'SORT'
,
title
:
'排序'
,
width
:
80
,
align
:
'center
'
},
{
field
:
'CREATE_
ID
'
,
title
:
'创建人员'
,
width
:
100
,
align
:
'center'
},
{
field
:
'CREATE_
USER_NAME
'
,
title
:
'创建人员'
,
width
:
100
,
align
:
'center'
},
{
field
:
'CREATE_TIME'
,
title
:
'创建时间'
,
width
:
1
2
0
,
align
:
'center'
}
{
field
:
'CREATE_TIME'
,
title
:
'创建时间'
,
width
:
1
0
0
,
align
:
'center'
}
]
];
]
];
//列表加载完成回调
//列表加载完成回调
function
dataOnLoadSuccess
(){
function
dataOnLoadSuccess
(){
...
@@ -167,7 +167,7 @@ function deleteRow(index){
...
@@ -167,7 +167,7 @@ function deleteRow(index){
$
.
messager
.
confirm
(
'提示'
,
'确定删除?'
,
function
(
r
)
{
$
.
messager
.
confirm
(
'提示'
,
'确定删除?'
,
function
(
r
)
{
if
(
r
)
{
if
(
r
)
{
var
v_query
=
{};
var
v_query
=
{};
v_query
.
UUID
=
code
;
v_query
.
FIELD_CODE
=
code
;
var
v_result
=
friendlinkModule
.
act
.
removeFriendLinkInfo
(
v_query
);
var
v_result
=
friendlinkModule
.
act
.
removeFriendLinkInfo
(
v_query
);
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
$
(
'#list'
).
datagrid
(
'reload'
);
$
(
'#list'
).
datagrid
(
'reload'
);
...
@@ -202,7 +202,7 @@ function deleteBatchRow(){
...
@@ -202,7 +202,7 @@ function deleteBatchRow(){
$
.
messager
.
confirm
(
'提示'
,
'确定删除?'
,
function
(
r
)
{
$
.
messager
.
confirm
(
'提示'
,
'确定删除?'
,
function
(
r
)
{
if
(
r
)
{
if
(
r
)
{
var
v_query
=
{};
var
v_query
=
{};
v_query
.
UUID
=
code
;
v_query
.
FIELD_CODE
=
code
;
var
v_result
=
friendlinkModule
.
act
.
removeFriendLinkInfo
(
v_query
);
var
v_result
=
friendlinkModule
.
act
.
removeFriendLinkInfo
(
v_query
);
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
$
(
'#list'
).
datagrid
(
'reload'
);
$
(
'#list'
).
datagrid
(
'reload'
);
...
...
src_jwapp/com/jw/app/business/FriendLinkBusiness.java
View file @
2bee77eb
package
com
.
jw
.
app
.
business
;
package
com
.
jw
.
app
.
business
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -12,6 +13,6 @@ public interface FriendLinkBusiness {
...
@@ -12,6 +13,6 @@ public interface FriendLinkBusiness {
Map
<
String
,
Object
>
save_friendlink
(
Map
<
String
,
Object
>
info
)
throws
BusinessException
;
Map
<
String
,
Object
>
save_friendlink
(
Map
<
String
,
Object
>
info
)
throws
BusinessException
;
void
delete_friendlink
(
String
uuid
)
throws
BusinessException
;
void
delete_friendlink
(
List
<
String
>
list
)
throws
BusinessException
;
}
}
src_jwapp/com/jw/app/business/friendlink/FriendLinkBusinessImpl.java
View file @
2bee77eb
...
@@ -36,7 +36,7 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
...
@@ -36,7 +36,7 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
if
(
query
.
get
(
"USER_ID"
)
==
null
||
""
.
equals
(
query
.
get
(
"USER_ID"
)))
{
if
(
query
.
get
(
"USER_ID"
)
==
null
||
""
.
equals
(
query
.
get
(
"USER_ID"
)))
{
// 默认查询当前登陆人
// 默认查询当前登陆人
query
.
put
(
"USER_ID"
,
SessionUtil
.
get
Emid
());
query
.
put
(
"USER_ID"
,
SessionUtil
.
get
Code
());
}
}
// 计算起始记录
// 计算起始记录
...
@@ -58,7 +58,7 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
...
@@ -58,7 +58,7 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
if
(
info
.
get
(
"UUID"
)
==
null
||
""
.
equals
(
info
.
get
(
"UUID"
)))
{
if
(
info
.
get
(
"UUID"
)
==
null
||
""
.
equals
(
info
.
get
(
"UUID"
)))
{
//判断目前总条数是不是<=8条
//判断目前总条数是不是<=8条
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
query
.
put
(
"
CREATE_ID"
,
SessionUtil
.
getEmid
());
query
.
put
(
"
USER_ID"
,
SessionUtil
.
getCode
());
int
count
=
friendlinkDAO
.
list_count_friendlink
(
query
);
int
count
=
friendlinkDAO
.
list_count_friendlink
(
query
);
if
(
count
>=
8
){
if
(
count
>=
8
){
info
.
put
(
"ERROR"
,
"-1"
);
info
.
put
(
"ERROR"
,
"-1"
);
...
@@ -68,12 +68,12 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
...
@@ -68,12 +68,12 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
info
.
put
(
"UUID"
,
UUID
.
randomUUID
().
toString
());
info
.
put
(
"UUID"
,
UUID
.
randomUUID
().
toString
());
if
(
info
.
get
(
"USER_ID"
)
==
null
||
""
.
equals
(
info
.
get
(
"USER_ID"
)))
{
if
(
info
.
get
(
"USER_ID"
)
==
null
||
""
.
equals
(
info
.
get
(
"USER_ID"
)))
{
// 如果没有传USER_ID过来,则使用当前登录人id
// 如果没有传USER_ID过来,则使用当前登录人id
info
.
put
(
"USER_ID"
,
SessionUtil
.
get
Emid
());
info
.
put
(
"USER_ID"
,
SessionUtil
.
get
Code
());
}
}
info
.
put
(
"CREATE_ID"
,
SessionUtil
.
get
Emid
());
info
.
put
(
"CREATE_ID"
,
SessionUtil
.
get
Code
());
info
.
put
(
"CREATE_TIME"
,
new
Date
());
info
.
put
(
"CREATE_TIME"
,
new
Date
());
info
.
put
(
"UPDATE_ID"
,
SessionUtil
.
get
Emid
());
info
.
put
(
"UPDATE_ID"
,
SessionUtil
.
get
Code
());
info
.
put
(
"UPDATE_TIME"
,
new
Date
());
info
.
put
(
"UPDATE_TIME"
,
new
Date
());
List
<
Map
<
String
,
Object
>>
listField
=
new
ArrayList
<
Map
<
String
,
Object
>>();
List
<
Map
<
String
,
Object
>>
listField
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
String
k
:
info
.
keySet
())
{
for
(
String
k
:
info
.
keySet
())
{
...
@@ -108,9 +108,7 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
...
@@ -108,9 +108,7 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
}
}
@Override
@Override
public
void
delete_friendlink
(
String
uuid
)
throws
BusinessException
{
public
void
delete_friendlink
(
List
<
String
>
list
)
throws
BusinessException
{
for
(
String
u
:
uuid
.
split
(
","
))
{
friendlinkDAO
.
delete_friendlink
(
list
);
friendlinkDAO
.
delete_friendlink
(
u
);
}
}
}
}
}
src_jwapp/com/jw/app/business/friendlink/friendlinkDAO.java
View file @
2bee77eb
...
@@ -18,5 +18,5 @@ public interface friendlinkDAO {
...
@@ -18,5 +18,5 @@ public interface friendlinkDAO {
void
update_friendlink
(
Map
<
String
,
Object
>
info
)
throws
BusinessException
;
void
update_friendlink
(
Map
<
String
,
Object
>
info
)
throws
BusinessException
;
void
delete_friendlink
(
String
uuid
)
throws
BusinessException
;
void
delete_friendlink
(
List
<
String
>
list
)
throws
BusinessException
;
}
}
src_jwapp/com/jw/app/business/friendlink/friendlinkDAO.xml
View file @
2bee77eb
...
@@ -22,7 +22,11 @@
...
@@ -22,7 +22,11 @@
<select
id=
"list_friendlink"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
<select
id=
"list_friendlink"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
<![CDATA[
<![CDATA[
select * from friendlink t
select t.* ,
uu1.REAL_NAME AS CREATE_USER_NAME
from friendlink t
LEFT JOIN uicm_user_info uu1 ON t.CREATE_ID = uu1.USER_ID
]]>
]]>
<include
refid=
"where"
/>
<include
refid=
"where"
/>
ORDER BY t.sort
ORDER BY t.sort
...
@@ -30,7 +34,9 @@
...
@@ -30,7 +34,9 @@
<select
id=
"list_count_friendlink"
parameterType=
"map"
resultType=
"int"
>
<select
id=
"list_count_friendlink"
parameterType=
"map"
resultType=
"int"
>
<![CDATA[
<![CDATA[
select count(*) from friendlink t
select count(*)
from friendlink t
LEFT JOIN uicm_user_info uu1 ON t.CREATE_ID = uu1.USER_ID
]]>
]]>
<include
refid=
"where"
/>
<include
refid=
"where"
/>
ORDER BY t.sort
ORDER BY t.sort
...
@@ -61,8 +67,15 @@
...
@@ -61,8 +67,15 @@
</trim>
</trim>
where UUID=#{UUID}
where UUID=#{UUID}
</update>
</update>
<delete
id=
"delete_friendlink"
parameterType=
"String"
>
<delete
id=
"delete_friendlink"
parameterType=
"list"
>
delete from friendlink where UUID=#{uuid}
<![CDATA[
delete from friendlink where UUID IN
]]>
<foreach
collection=
"list"
item=
"UUID"
open=
"("
separator=
","
close=
")"
>
#{UUID}
</foreach>
</delete>
</delete>
</mapper>
</mapper>
\ No newline at end of file
src_jwapp/com/jw/app/friendlink/action/actAction.java
View file @
2bee77eb
package
com
.
jw
.
app
.
friendlink
.
action
;
package
com
.
jw
.
app
.
friendlink
.
action
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.gaowj.business.StudentBusiness
;
import
com.gaowj.business.SystemOpeBusiness
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.exception.BusinessException
;
...
@@ -28,7 +31,7 @@ public class actAction extends BasicAction {
...
@@ -28,7 +31,7 @@ public class actAction extends BasicAction {
}
}
/**
/**
* 保存
友情
链接信息
* 保存
快速
链接信息
*
*
* @return
* @return
* @throws BusinessException
* @throws BusinessException
...
@@ -55,15 +58,19 @@ public class actAction extends BasicAction {
...
@@ -55,15 +58,19 @@ public class actAction extends BasicAction {
}
}
/**
/**
* 删除
友情
链接信息
* 删除
快速
链接信息
*
*
* @return
* @return
* @throws BusinessException
* @throws BusinessException
*/
*/
public
String
removeFriendLinkInfo
()
throws
BusinessException
{
public
String
removeFriendLinkInfo
()
throws
BusinessException
{
FriendLinkBusiness
business
=
BusinessManager
.
getBusiness
(
FriendLinkBusiness
.
class
);
FriendLinkBusiness
business
=
BusinessManager
.
getBusiness
(
FriendLinkBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
String
deletekey
=
(
String
)
entity
.
get
(
"CODE"
);
List
<
String
>
ListKey
=
QueryParamUtil
.
StringToList
(
deletekey
);
try
{
try
{
business
.
delete_friendlink
(
RequestUtils
.
getString
(
request
,
"UUID"
)
);
business
.
delete_friendlink
(
ListKey
);
jsonObject
.
putAll
(
Status
.
getStatus
(
Status
.
DELETE_OK
));
jsonObject
.
putAll
(
Status
.
getStatus
(
Status
.
DELETE_OK
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
jsonObject
.
putAll
(
Status
.
getStatus
(
Status
.
DELETE_ERR
));
jsonObject
.
putAll
(
Status
.
getStatus
(
Status
.
DELETE_ERR
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment