Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
micro_app
gk
Commits
521fb109
Commit
521fb109
authored
Jun 23, 2020
by
yangshuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
切换榜单
parent
ec06ad3a
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
52 additions
and
8 deletions
+52
-8
CmptMapper.java
...com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.java
+2
-0
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+6
-1
Cmpt.java
...n/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Cmpt.java
+1
-0
CmptService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
+4
-0
CmptController.java
...va/com/dlbridge/jadp/plugins/cmpt/web/CmptController.java
+9
-2
scoreSetting.jsp
src/main/webapp/WEB-INF/views/cmpt/scoreSetting.jsp
+18
-1
menu.jsp
src/main/webapp/WEB-INF/views/common/menu.jsp
+12
-4
func_white.png
src/main/webapp/static/images/manage/func_white.png
+0
-0
setting_gray.png
src/main/webapp/static/images/manage/setting_gray.png
+0
-0
setting_red.png
src/main/webapp/static/images/manage/setting_red.png
+0
-0
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.java
View file @
521fb109
...
@@ -71,4 +71,6 @@ public interface CmptMapper {
...
@@ -71,4 +71,6 @@ public interface CmptMapper {
String
getDefaultPartnerId
(
Integer
cmptid
);
String
getDefaultPartnerId
(
Integer
cmptid
);
Partner
getParnterByParnterId
(
String
partnerId
);
Partner
getParnterByParnterId
(
String
partnerId
);
void
updateDayRank
(
@Param
(
"cmptId"
)
int
cmptId
,
@Param
(
"status"
)
int
status
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
521fb109
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
date_format(start_time,'%Y-%m-%d %H:%s:%i') as startTime,
date_format(start_time,'%Y-%m-%d %H:%s:%i') as startTime,
logo,
logo,
bg_color as cmptbgColor,
bg_color as cmptbgColor,
del_flag AS "delFlag"
del_flag AS "delFlag"
,is_day_rank isDayRank
FROM `gk_cmpt`
FROM `gk_cmpt`
WHERE cmpt_id = #{id} LIMIT 1
WHERE cmpt_id = #{id} LIMIT 1
</select>
</select>
...
@@ -224,4 +224,9 @@
...
@@ -224,4 +224,9 @@
from gk_app_info
from gk_app_info
where partner_id=#{partnerId}
where partner_id=#{partnerId}
</select>
</select>
<update
id=
"updateDayRank"
>
update gk_cmpt set is_day_rank=#{status}
where cmpt_id = #{cmptId}
</update>
</mapper>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Cmpt.java
View file @
521fb109
...
@@ -35,4 +35,5 @@ public class Cmpt extends JaapRecord<Cmpt> {
...
@@ -35,4 +35,5 @@ public class Cmpt extends JaapRecord<Cmpt> {
private
String
startTime
;
private
String
startTime
;
@ApiModelProperty
(
value
=
"赛事结束时间"
,
notes
=
"赛事结束时间"
)
@ApiModelProperty
(
value
=
"赛事结束时间"
,
notes
=
"赛事结束时间"
)
private
String
endTime
;
private
String
endTime
;
private
boolean
isDayRank
;
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
View file @
521fb109
...
@@ -184,4 +184,8 @@ public class CmptService {
...
@@ -184,4 +184,8 @@ public class CmptService {
public
Partner
getPartnerById
(
String
parnter
)
{
public
Partner
getPartnerById
(
String
parnter
)
{
return
cmptMapper
.
getParnterByParnterId
(
parnter
);
return
cmptMapper
.
getParnterByParnterId
(
parnter
);
}
}
public
void
updateDayRank
(
int
cmptId
,
int
status
)
{
cmptMapper
.
updateDayRank
(
cmptId
,
status
);
}
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/CmptController.java
View file @
521fb109
...
@@ -228,6 +228,15 @@ public class CmptController {
...
@@ -228,6 +228,15 @@ public class CmptController {
}
}
@RequestMapping
(
"/updateDayRank"
)
@ResponseBody
public
com
.
neusoft
.
www
.
utils
.
web
.
Result
updateDayRank
(
@RequestParam
(
"cmptId"
)
int
cmptId
,
@RequestParam
(
"status"
)
int
status
)
{
cmptService
.
updateDayRank
(
cmptId
,
status
);
return
new
com
.
neusoft
.
www
.
utils
.
web
.
Result
().
success
().
setMsg
(
"设置成功!"
);
}
// 以POST方式获得请求,图片上传成功后,以JSON格式将图片返回,用于回显
// 以POST方式获得请求,图片上传成功后,以JSON格式将图片返回,用于回显
@ResponseBody
@ResponseBody
public
Result
handleFileUpload
(
HttpServletRequest
request
)
{
public
Result
handleFileUpload
(
HttpServletRequest
request
)
{
...
@@ -254,7 +263,5 @@ public class CmptController {
...
@@ -254,7 +263,5 @@ public class CmptController {
}
}
}
}
return
Result
.
error
();
return
Result
.
error
();
}
}
}
}
src/main/webapp/WEB-INF/views/cmpt/scoreSetting.jsp
View file @
521fb109
...
@@ -121,7 +121,7 @@
...
@@ -121,7 +121,7 @@
<div
class=
"section"
style=
"display: flex;justify-content: space-between;align-items: center;"
>
<div
class=
"section"
style=
"display: flex;justify-content: space-between;align-items: center;"
>
<span
style=
"font-size:24px;color: #333"
>
榜单设置
</span>
<span
style=
"font-size:24px;color: #333"
>
榜单设置
</span>
<div>
<div>
<input
type=
"checkbox"
>
<input
type=
"checkbox"
name=
"dayRank"
${
cmpt
.
dayRank
?
'
checked
'
:
''}
>
<span
style=
"font-size:20px;color: #333"
>
启用日榜
</span>
<span
style=
"font-size:20px;color: #333"
>
启用日榜
</span>
</div>
</div>
...
@@ -157,6 +157,23 @@
...
@@ -157,6 +157,23 @@
}
}
})
})
});
});
$
(
'input[name=dayRank]'
).
click
(
function
()
{
let
status
=
$
(
this
).
get
(
0
).
checked
?
1
:
0
;
$
.
ajax
({
url
:
'/gk/cmpt/updateDayRank'
,
data
:{
cmptId
:
getCId
(),
"status"
:
status
},
success
:
function
(
data
)
{
if
(
data
.
code
==
200
){
layer
.
msg
(
"切换成功!"
,{
icon
:
1
,
duraion
:
1500
});
}
else
{
layer
.
msg
(
"切换失败!"
,{
icon
:
5
,
duraion
:
1500
});
}
},
complete
:
function
()
{
}
});
})
//
//
});
});
</script>
</script>
...
...
src/main/webapp/WEB-INF/views/common/menu.jsp
View file @
521fb109
...
@@ -56,16 +56,21 @@
...
@@ -56,16 +56,21 @@
left
:
45px
;
left
:
45px
;
top
:
6px
;
top
:
6px
;
}
}
.icon-function
{
.icon-function
{
width
:
32px
;
width
:
32px
;
height
:
32px
;
height
:
32px
;
display
:
inline-block
;
display
:
inline-block
;
background
:
url('/static/images/manage/func
tion
.png')
no-repeat
center
;
background
:
url('/static/images/manage/func
_white
.png')
no-repeat
center
;
background-size
:
50%
;
background-size
:
50%
;
position
:
absolute
;
position
:
absolute
;
left
:
45px
;
left
:
45px
;
top
:
6px
;
top
:
6px
;
}
}
.active
.icon-function
{
background
:
url('/static/images/manage/function.png')
no-repeat
center
;
background-size
:
50%
;
}
.icon-base-setting
{
.icon-base-setting
{
width
:
32px
;
width
:
32px
;
height
:
32px
;
height
:
32px
;
...
@@ -80,7 +85,7 @@
...
@@ -80,7 +85,7 @@
position
:
relative
;
position
:
relative
;
}
}
.arrow
{
.
meun-
arrow
{
width
:
24px
;
width
:
24px
;
height
:
12px
;
height
:
12px
;
display
:
inline-block
;
display
:
inline-block
;
...
@@ -113,7 +118,7 @@
...
@@ -113,7 +118,7 @@
<a
href=
"/gk/cmpt/cmptSetting/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<a
href=
"/gk/cmpt/cmptSetting/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"icon-function"
></span>
<span
class=
"icon-function"
></span>
<span
class=
"menu-txt"
>
功能管理
</span>
<span
class=
"menu-txt"
>
功能管理
</span>
<span
class=
"arrow"
></span>
<span
class=
"
meun-
arrow"
></span>
</a>
</a>
</li>
</li>
<ul
class=
"collapse list-unstyled show"
>
<ul
class=
"collapse list-unstyled show"
>
...
@@ -186,7 +191,7 @@
...
@@ -186,7 +191,7 @@
<ul>
<ul>
<li
class=
"base menu-item"
>
<li
class=
"base menu-item"
>
<a
href=
"
/gk/cmpt/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}
"
>
<a
href=
"
#
"
>
<span
class=
"icon-base-setting"
></span>
<span
class=
"icon-base-setting"
></span>
<span
class=
"menu-txt"
>
基础设置
</span>
<span
class=
"menu-txt"
>
基础设置
</span>
<span
class=
"arrow"
></span>
<span
class=
"arrow"
></span>
...
@@ -243,6 +248,9 @@
...
@@ -243,6 +248,9 @@
for
(
var
i
in
classes
)
{
for
(
var
i
in
classes
)
{
if
(
url
.
indexOf
(
classes
[
i
])
>
-
1
)
{
if
(
url
.
indexOf
(
classes
[
i
])
>
-
1
)
{
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
classList
.
add
(
'active'
);
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
classList
.
add
(
'active'
);
if
(
classes
[
i
]
!=
'cmptSetting'
){
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
parentNode
.
parentNode
.
firstElementChild
.
classList
.
add
(
'active'
);
}
done
=
true
;
done
=
true
;
break
;
break
;
}
}
...
...
src/main/webapp/static/images/manage/func_white.png
0 → 100644
View file @
521fb109
133 Bytes
src/main/webapp/static/images/manage/setting_gray.png
0 → 100644
View file @
521fb109
1.19 KB
src/main/webapp/static/images/manage/setting_red.png
0 → 100644
View file @
521fb109
1.26 KB
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