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
ab0f076f
Commit
ab0f076f
authored
Aug 28, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(guide): 组委会列表接口重写
parent
e71cde67
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
4 deletions
+80
-4
CmptMapper.java
...com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.java
+4
-0
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+62
-0
CmptService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
+12
-0
GuideController.java
...a/com/dlbridge/jadp/plugins/cmpt/web/GuideController.java
+1
-1
guide.jsp
src/main/webapp/WEB-INF/views/cmpt/guide.jsp
+1
-3
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.java
View file @
ab0f076f
...
...
@@ -44,6 +44,10 @@ public interface CmptMapper {
List
<
Cmpt
>
queryCmpt
(
@Param
(
"page"
)
Pageable
page
,
@Param
(
"param"
)
Map
<
String
,
String
>
param
);
long
countCommitteeCmpt
(
@Param
(
"param"
)
Map
<
String
,
String
>
param
);
List
<
Cmpt
>
queryCommitteeCmpt
(
@Param
(
"page"
)
Pageable
page
,
@Param
(
"param"
)
Map
<
String
,
String
>
param
);
void
updateCmpt
(
Cmpt
cmpt
);
Integer
getCommonUserId
(
Integer
userId
);
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
ab0f076f
...
...
@@ -197,6 +197,68 @@
and c.createUserId=#{param.userId}
and a.cmpt_status = 2
</if>
<if
test=
"param.userId lt 0"
>
AND c.createUserId NOT IN (SELECT user_id from gksite.gk_app_info WHERE user_id>0)
and a.cmpt_status = 2
</if>
<if
test=
"param.partnerId == 'PRODF4E96E99A2B48AEA' "
>
AND '2022-12-12 22:20:00' > a.create_date
</if>
<if
test=
"param.partnerId == 'zOA0p24qhnrdxXeCZU' "
>
AND c.type != 5 and c.type != 10
</if>
</sql>
<select
id=
"countCommitteeCmpt"
resultType=
"long"
>
select count(1)
from gk_cmpt a left join common.neucmpt b on a.cmpt_id=b.gtCmptId
left join raceenroll.competition c on b.gcmptid=c.cmptid
where a.del_flag=0
<include
refid=
"committee-cmpt-where-sql"
/>
</select>
<select
id=
"queryCommitteeCmpt"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt"
>
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 raceenroll.competition c on b.gcmptid=c.cmptid
where a.del_flag=0
<include
refid=
"committee-cmpt-where-sql"
/>
order by c.startTime desc
limit #{page.offset},#{page.size}
</select>
<sql
id=
"committee-cmpt-where-sql"
>
<if
test=
"@org.apache.commons.lang3.StringUtils@isNotBlank(param.keyword)"
>
and a.cmpt_name like concat('%',#{param.keyword},'%')
</if>
<if
test=
"param.type == 1"
>
and now() >= c.openTime and c.deadLine >= now()
</if>
<if
test=
"param.type == 2"
>
and now() >= c.startTime and c.endTime >= now()
</if>
<if
test=
"param.userId > 0"
>
and c.createUserId=#{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)
</if>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
View file @
ab0f076f
...
...
@@ -259,6 +259,18 @@ public class CmptService {
return
PageFactory
.
setContent
(
list
,
page
,
count
);
}
/**
* 查询组委会的赛事列表
* @param page 分页参数
* @param param 查询参数
* @return 组委会的赛事列表
*/
public
Page
<
List
<
Cmpt
>>
queryCommitteeCmpt
(
Pageable
page
,
Map
<
String
,
String
>
param
)
{
long
count
=
cmptMapper
.
countCommitteeCmpt
(
param
);
List
<
Cmpt
>
list
=
cmptMapper
.
queryCommitteeCmpt
(
page
,
param
);
return
PageFactory
.
setContent
(
list
,
page
,
count
);
}
public
void
update
(
Cmpt
cmpt
)
{
// 不知道为什么要更新计时的赛事名称更新成null,注释掉 by linc 2023/04/04
// cmptMapper.updateGeerunnerCmptName(cmpt.getCmptId(),cmpt.getCmptName());
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/GuideController.java
View file @
ab0f076f
...
...
@@ -55,7 +55,7 @@ public class GuideController {
Map
<
String
,
String
>
param
=
new
HashMap
<>();
param
.
put
(
"partnerId"
,
partnerId
);
param
.
put
(
"userId"
,
partner
.
getUserId
()+
""
);
Page
<
List
<
Cmpt
>>
result
=
cmptService
.
queryCmpt
(
cmptPageDTO
.
toPageable
(),
param
);
Page
<
List
<
Cmpt
>>
result
=
cmptService
.
queryC
ommitteeC
mpt
(
cmptPageDTO
.
toPageable
(),
param
);
result
.
setCode
(
200
);
return
result
;
}
...
...
src/main/webapp/WEB-INF/views/cmpt/guide.jsp
View file @
ab0f076f
...
...
@@ -56,11 +56,9 @@
<title>
赛事引导
</title>
<style>
.inner
{
width
:
100%
;
height
:
180px
;
background
:
#ce3939
;
border-radius
:
4px
;
margin
:
20px
20px
;
position
:
relative
;
color
:
white
;
}
...
...
@@ -84,7 +82,7 @@
<div
class=
"page"
>
<jsp:include
page=
"../common/header.jsp"
></jsp:include>
<div
id=
"app"
class=
"page-content main-body grid grid-cols-3 gap-5 box-border"
>
class=
"page-content main-body grid grid-cols-3 gap-5
p-3
box-border"
>
<div
class=
"inner p-3 shadow-sm"
style=
"background: #ce3939;"
v-for=
"item in cmpts"
@
click=
"toDetail(item)"
:key=
"item.cmptId"
>
...
...
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