Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-api
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
李伟
cust-api
Commits
b2286e37
Commit
b2286e37
authored
Mar 24, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了活动报名的bug
parent
c34a92cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
CmsActivityServiceImpl.java
...ness/cmsActivity/service/impl/CmsActivityServiceImpl.java
+10
-2
CmsApplicationServiceImpl.java
...msApplication/service/impl/CmsApplicationServiceImpl.java
+2
-0
CmsActivityMapper.xml
.../mapper/business/cmsActivity.mapper/CmsActivityMapper.xml
+4
-2
No files found.
src/main/java/org/rcisoft/business/cmsActivity/service/impl/CmsActivityServiceImpl.java
View file @
b2286e37
...
@@ -202,8 +202,16 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
...
@@ -202,8 +202,16 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
long
time
=
TimeUtil
.
getTimeSecond
(
new
Date
(),
endTime
);
long
time
=
TimeUtil
.
getTimeSecond
(
new
Date
(),
endTime
);
cyRedisServiceImpl
.
set
(
RedisCons
.
ACTIVITY_DETAIL
+
":"
+
businessId
,
info
,
time
);
cyRedisServiceImpl
.
set
(
RedisCons
.
ACTIVITY_DETAIL
+
":"
+
businessId
,
info
,
time
);
cyRedisServiceImpl
.
set
(
RedisCons
.
ACTIVITY_COUNT
+
":"
+
businessId
,
info
.
getMaxApplicationCount
()
-
cmsActivity
.
getAlreadyApplicationCount
(),
time
);
cyRedisServiceImpl
.
set
(
RedisCons
.
ACTIVITY_COUNT
+
":"
+
businessId
,
info
.
getMaxApplicationCount
()
-
cmsActivity
.
getAlreadyApplicationCount
(),
time
);
cyRedisServiceImpl
.
set
(
RedisCons
.
ACTIVITY_COUNT_MALE
+
":"
+
businessId
,
info
.
getMaleCount
()
-
cmsActivity
.
getAlreadyMaleCount
(),
time
);
if
(
info
.
getMaleCount
()
==
0
||
info
.
getMaleCount
()
==
null
){
cyRedisServiceImpl
.
set
(
RedisCons
.
ACTIVITY_COUNT_FEMALE
+
":"
+
businessId
,
info
.
getFemaleCount
()
-
cmsActivity
.
getAlreadyFemaleCount
(),
time
);
cyRedisServiceImpl
.
set
(
RedisCons
.
ACTIVITY_COUNT_MALE
+
":"
+
businessId
,
0
,
time
);
}
else
{
cyRedisServiceImpl
.
set
(
RedisCons
.
ACTIVITY_COUNT_MALE
+
":"
+
businessId
,
info
.
getMaleCount
()
-
cmsActivity
.
getAlreadyMaleCount
(),
time
);
}
if
(
info
.
getFemaleCount
()
==
0
||
info
.
getFemaleCount
()
==
null
){
cyRedisServiceImpl
.
set
(
RedisCons
.
ACTIVITY_COUNT_FEMALE
+
":"
+
businessId
,
0
,
time
);
}
else
{
cyRedisServiceImpl
.
set
(
RedisCons
.
ACTIVITY_COUNT_FEMALE
+
":"
+
businessId
,
info
.
getFemaleCount
()
-
cmsActivity
.
getAlreadyFemaleCount
(),
time
);
}
}
else
{
}
else
{
//如果取消发布,加redis锁
//如果取消发布,加redis锁
boolean
isGetLock
=
false
;
boolean
isGetLock
=
false
;
...
...
src/main/java/org/rcisoft/business/cmsApplication/service/impl/CmsApplicationServiceImpl.java
View file @
b2286e37
...
@@ -73,6 +73,8 @@ public class CmsApplicationServiceImpl extends ServiceImpl<CmsApplicationReposit
...
@@ -73,6 +73,8 @@ public class CmsApplicationServiceImpl extends ServiceImpl<CmsApplicationReposit
@Override
@Override
public
CyPersistModel
remove
(
CmsApplication
cmsApplication
)
{
public
CyPersistModel
remove
(
CmsApplication
cmsApplication
)
{
//删除redis
cyRedisServiceImpl
.
del
(
ORDER_ACTIVITY
+
':'
+
cmsApplication
.
getActivityId
()+
':'
+
cmsApplication
.
getOrderId
());
//删除redis
//删除redis
cyRedisServiceImpl
.
del
(
ORDER_ACTIVITY
+
':'
+
cmsApplication
.
getActivityId
()+
':'
+
cmsApplication
.
getOrderId
());
cyRedisServiceImpl
.
del
(
ORDER_ACTIVITY
+
':'
+
cmsApplication
.
getActivityId
()+
':'
+
cmsApplication
.
getOrderId
());
//删除报名表数据
//删除报名表数据
...
...
src/main/resources/mapper/business/cmsActivity.mapper/CmsActivityMapper.xml
View file @
b2286e37
...
@@ -262,7 +262,7 @@
...
@@ -262,7 +262,7 @@
SUM(CASE WHEN mi.mem_sex = 0 THEN 1 ELSE 0 END) AS alreadyMaleCount,
SUM(CASE WHEN mi.mem_sex = 0 THEN 1 ELSE 0 END) AS alreadyMaleCount,
SUM(CASE WHEN mi.mem_sex = 1 THEN 1 ELSE 0 END) AS alreadyFemaleCount
SUM(CASE WHEN mi.mem_sex = 1 THEN 1 ELSE 0 END) AS alreadyFemaleCount
from cms_activity ca
from cms_activity ca
left join cms_application cma on ca.business_id = cma.activity_id
left join cms_application cma on ca.business_id = cma.activity_id
and cma.del_flag = '0'
LEFT JOIN mem_info mi ON mi.user_id = cma.create_by
LEFT JOIN mem_info mi ON mi.user_id = cma.create_by
where ca.business_id = #{businessId}
where ca.business_id = #{businessId}
</select>
</select>
...
@@ -273,6 +273,8 @@
...
@@ -273,6 +273,8 @@
COALESCE(SUM(CASE WHEN mi.mem_sex = 1 THEN 1 ELSE 0 END), 0) AS alreadyFemaleCount
COALESCE(SUM(CASE WHEN mi.mem_sex = 1 THEN 1 ELSE 0 END), 0) AS alreadyFemaleCount
from cms_application ca
from cms_application ca
LEFT JOIN mem_info mi ON mi.user_id = ca.create_by
LEFT JOIN mem_info mi ON mi.user_id = ca.create_by
where ca.activity_id = #{businessId}
where 1=1
and ca.activity_id = #{businessId}
and ca.del_flag = '0'
</select>
</select>
</mapper>
</mapper>
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