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
ec793150
Commit
ec793150
authored
Oct 10, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(cmpt): guide赛事列表更新
parent
3765abd6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
7 deletions
+63
-7
News.java
src/main/java/com/dlbridge/feign/bean/News.java
+2
-0
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+49
-6
news.jsp
src/main/webapp/WEB-INF/views/cmpt/news.jsp
+8
-0
news.js
src/main/webapp/static/js/news.js
+4
-1
No files found.
src/main/java/com/dlbridge/feign/bean/News.java
View file @
ec793150
...
...
@@ -38,4 +38,6 @@ public class News implements Serializable {
private
Double
lat
;
private
Double
lng
;
private
int
openType
;
// 排序
private
int
sort
;
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
ec793150
...
...
@@ -211,15 +211,29 @@
<select
id=
"countCommitteeCmpt"
resultType=
"long"
>
select count(1)
from gk_cmpt a left join common.neucmpt b on a.cmpt_id=b.gtCmptId
from (
select a.cmpt_id
from gk_cmpt a
left join common.neucmpt b on a.cmpt_id=b.gtCmptId
left join common.neuuser nu on b.neuUserId=nu.neuUserId
left join raceenroll.competition c on b.gcmptid=c.cmptid
where a.del_flag=0
<include
refid=
"committee-cmpt-where-sql"
/>
union all
select a.cmpt_id
from gk_cmpt a
left join common.neucmpt b on a.cmpt_id=b.gtCmptId
left join common.neuuser nu on nu.neuUserId=b.committeeNeuUserId
left join raceenroll.competition c on b.gcmptid=c.cmptid
where a.del_flag=0
<include
refid=
"committee-cmpt-where-sql"
/>
) tmp
</select>
<select
id=
"queryCommitteeCmpt"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt"
>
select a.cmpt_id,
(
select a.cmpt_id,
a.cmpt_name as cmptName,
a.logo,
b.gCmptId,
...
...
@@ -239,11 +253,40 @@
c.province as province,
c.area as area,
c.location as location
from gk_cmpt a left join common.neucmpt b on a.cmpt_id=b.gtCmptId
from gk_cmpt a
left join common.neucmpt b on a.cmpt_id=b.gtCmptId
left join common.neuuser nu on b.neuUserId=nu.neuUserId
left join raceenroll.competition c on b.gcmptid=c.cmptid
where a.del_flag=0
<include
refid=
"committee-cmpt-where-sql"
/>
order by c.startTime desc
<include
refid=
"committee-cmpt-where-sql"
/>
)
union all
(select a.cmpt_id,
a.cmpt_name as cmptName,
a.logo,
b.gCmptId,
date_format(start_time,'%Y-%m-%d') startTime,
date_format(end_time,'%Y-%m-%d') endTime,
date_format(a.start_time,'%Y-%m-%d %H:%i:%s') as startTimeStr,
date_format(a.end_time,'%Y-%m-%d %H:%i:%s') as endTimeStr,
date_format(c.openTime,'%Y-%m-%d %H:%i:%s') as openTime,
date_format(c.deadLine,'%Y-%m-%d %H:%i:%s') as deadLine,
a.bg_color as cmptbgColor,
a.create_by AS "createBy",
a.create_date AS "createDate",
a.update_by AS "updateBy",
a.update_date AS "updateDate",
a.del_flag AS "delFlag",
c.city as city,
c.province as province,
c.area as area,
c.location as location
from gk_cmpt a
left join common.neucmpt b on a.cmpt_id=b.gtCmptId
left join common.neuuser nu on nu.neuUserId =b.committeeNeuUserId
left join raceenroll.competition c on b.gcmptid=c.cmptid
where a.del_flag=0
<include
refid=
"committee-cmpt-where-sql"
/>
)
order by startTime desc
limit #{page.offset},#{page.size}
</select>
<sql
id=
"committee-cmpt-where-sql"
>
...
...
@@ -257,7 +300,7 @@
and now() >= c.startTime and c.endTime >= now()
</if>
<if
test=
"param.userId > 0"
>
and
c.create
UserId=#{param.userId}
and
nu.g
UserId=#{param.userId}
</if>
<if
test=
"param.userId lt 0"
>
AND c.createUserId NOT IN (SELECT user_id from gksite.gk_app_info WHERE user_id>0)
...
...
src/main/webapp/WEB-INF/views/cmpt/news.jsp
View file @
ec793150
...
...
@@ -497,6 +497,14 @@
placeholder=
"小程序appId"
id=
"appId"
cols=
"50"
rows=
"10"
></textarea>
</div>
</div>
<div
class=
"input-group"
id=
"sort-input"
style=
"height: 120px;margin-bottom: 10px;"
>
<label
for=
""
>
排序
</label>
<div>
<input
type=
"number"
style=
"float: right;"
class=
"title-area"
type=
"text"
placeholder=
"数字越小越靠前"
id=
"sort"
></input>
</div>
</div>
<div
class=
"input-group hidden"
id=
"lat-input"
style=
"height: 120px;margin-bottom: 10px;"
>
<label
for=
""
>
经度
</label>
...
...
src/main/webapp/static/js/news.js
View file @
ec793150
...
...
@@ -54,6 +54,7 @@ $(document).ready(function () {
const
path
=
$
(
'#path'
).
val
();
const
lat
=
$
(
'#lat'
).
val
();
const
lng
=
$
(
'#lng'
).
val
();
const
sort
=
$
(
'#sort'
).
val
();
const
appId
=
$
(
'#appId'
).
val
();
if
(
!
content
)
{
layer
.
alert
(
"内容不能为空!"
);
...
...
@@ -77,7 +78,8 @@ $(document).ready(function () {
openType
:
openType
,
path
:
path
,
lat
:
lat
??
0
,
lng
:
lng
??
0
lng
:
lng
??
0
,
sort
:
sort
??
1
}),
success
:
function
(
data
)
{
layer
.
msg
(
'保存成功'
)
...
...
@@ -355,6 +357,7 @@ function getNews(id) {
$
(
'#lat'
).
val
(
data
.
content
.
lat
);
$
(
'#lng'
).
val
(
data
.
content
.
lng
);
$
(
'#appId'
).
val
(
data
.
content
.
appId
);
$
(
'#sort'
).
val
(
data
.
content
.
sort
);
updateViews
(
data
.
content
.
openType
)
if
(
data
.
content
.
cover
)
{
$
(
'.cover'
).
css
(
'background-image'
,
"url("
+
data
.
content
.
cover
+
")"
)
...
...
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