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
e3ca0dd7
Commit
e3ca0dd7
authored
Mar 05, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了活动报名
parent
b7c0a691
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
22 deletions
+61
-22
CmsActivityRepository.java
...isoft/business/cmsActivity/dao/CmsActivityRepository.java
+2
-0
CmsActivityServiceImpl.java
...ness/cmsActivity/service/impl/CmsActivityServiceImpl.java
+7
-0
CmsOrderServiceImpl.java
...t/business/cmsOrder/service/impl/CmsOrderServiceImpl.java
+1
-0
MemInfo.java
...ain/java/org/rcisoft/business/memInfo/entity/MemInfo.java
+5
-0
OpmArticleServiceImpl.java
...siness/opmArticle/service/impl/OpmArticleServiceImpl.java
+0
-4
CmsActivityMapper.xml
.../mapper/business/cmsActivity.mapper/CmsActivityMapper.xml
+6
-0
OpmArticleMapper.xml
...es/mapper/business/opmArticle/mapper/OpmArticleMapper.xml
+40
-18
No files found.
src/main/java/org/rcisoft/business/cmsActivity/dao/CmsActivityRepository.java
View file @
e3ca0dd7
...
@@ -41,5 +41,7 @@ public interface CmsActivityRepository extends CyBaseMapper<CmsActivity> {
...
@@ -41,5 +41,7 @@ public interface CmsActivityRepository extends CyBaseMapper<CmsActivity> {
Integer
getIsApplication
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"activityId"
)
Integer
activityId
);
Integer
getIsApplication
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"activityId"
)
Integer
activityId
);
//增加活动报名人数
//增加活动报名人数
Integer
addApplicationCount
(
@Param
(
"businessId"
)
Integer
businessId
);
Integer
addApplicationCount
(
@Param
(
"businessId"
)
Integer
businessId
);
//查询活动报名人数
Integer
selectByActivityId
(
Integer
businessId
);
}
}
src/main/java/org/rcisoft/business/cmsActivity/service/impl/CmsActivityServiceImpl.java
View file @
e3ca0dd7
...
@@ -223,6 +223,13 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
...
@@ -223,6 +223,13 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
private
void
extracted
(
Integer
businessId
,
CmsActivity
info
)
{
private
void
extracted
(
Integer
businessId
,
CmsActivity
info
)
{
Set
<
String
>
map
=
redisTemplate
.
keys
(
RedisCons
.
ORDER_ACTIVITY
+
":"
+
businessId
+
":"
+
"*"
);
Set
<
String
>
map
=
redisTemplate
.
keys
(
RedisCons
.
ORDER_ACTIVITY
+
":"
+
businessId
+
":"
+
"*"
);
if
(
CollectionUtils
.
isEmpty
(
map
)){
//根据活动id查询报名信息
Integer
count
=
baseMapper
.
selectByActivityId
(
businessId
);
if
(
count
>
0
){
throw
new
CyServiceException
(
"活动已经报名,不允许取消发布"
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
map
))
//报名人数和实际剩余报名人数不等
if
(
CollectionUtils
.
isNotEmpty
(
map
))
//报名人数和实际剩余报名人数不等
throw
new
CyServiceException
(
"活动已经报名,不允许取消发布"
);
throw
new
CyServiceException
(
"活动已经报名,不允许取消发布"
);
if
(
"0"
.
equals
(
info
.
getPublishStatus
()))
if
(
"0"
.
equals
(
info
.
getPublishStatus
()))
...
...
src/main/java/org/rcisoft/business/cmsOrder/service/impl/CmsOrderServiceImpl.java
View file @
e3ca0dd7
...
@@ -203,6 +203,7 @@ public class CmsOrderServiceImpl extends ServiceImpl<CmsOrderRepository,CmsOrder
...
@@ -203,6 +203,7 @@ public class CmsOrderServiceImpl extends ServiceImpl<CmsOrderRepository,CmsOrder
application
.
setActivityId
(
info
.
getBusinessId
());
application
.
setActivityId
(
info
.
getBusinessId
());
application
.
setStatus
(
"1"
);
application
.
setStatus
(
"1"
);
application
.
setApplicationFee
(
BigDecimal
.
ZERO
);
application
.
setApplicationFee
(
BigDecimal
.
ZERO
);
application
.
setCreateDate
(
new
Date
());
applicationRepository
.
insert
(
application
);
applicationRepository
.
insert
(
application
);
//设置价格
//设置价格
orderInfo
.
setPrice
(
BigDecimal
.
ZERO
);
orderInfo
.
setPrice
(
BigDecimal
.
ZERO
);
...
...
src/main/java/org/rcisoft/business/memInfo/entity/MemInfo.java
View file @
e3ca0dd7
...
@@ -608,5 +608,10 @@ public class MemInfo extends CyIdIncreEntity<MemInfo> {
...
@@ -608,5 +608,10 @@ public class MemInfo extends CyIdIncreEntity<MemInfo> {
*/
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
wxNickName
;
private
String
wxNickName
;
/**
* 学历认证图片url
*/
private
String
memEducationUrl
;
}
}
src/main/java/org/rcisoft/business/opmArticle/service/impl/OpmArticleServiceImpl.java
View file @
e3ca0dd7
...
@@ -439,9 +439,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
...
@@ -439,9 +439,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
@Override
public
CyPersistModel
likeAdd
(
Integer
articleId
,
String
praiseType
){
public
CyPersistModel
likeAdd
(
Integer
articleId
,
String
praiseType
){
//添加实名判断
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
userUtil
.
checkUserAuth
(
"请先实名认证!"
);
int
line
=
0
;
int
line
=
0
;
if
(
praiseType
.
equals
(
"praise"
)){
if
(
praiseType
.
equals
(
"praise"
)){
//点赞
//点赞
...
@@ -473,9 +471,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
...
@@ -473,9 +471,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
@Override
public
CyPersistModel
likeCommentAdd
(
Integer
commentId
,
String
praiseType
){
public
CyPersistModel
likeCommentAdd
(
Integer
commentId
,
String
praiseType
){
//添加实名判断
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
userUtil
.
checkUserAuth
(
"请先实名认证!"
);
int
line
=
0
;
int
line
=
0
;
if
(
praiseType
.
equals
(
"praise"
)){
if
(
praiseType
.
equals
(
"praise"
)){
//点赞
//点赞
...
...
src/main/resources/mapper/business/cmsActivity.mapper/CmsActivityMapper.xml
View file @
e3ca0dd7
...
@@ -245,4 +245,10 @@
...
@@ -245,4 +245,10 @@
AND ca.flag = '1'
AND ca.flag = '1'
AND ca.del_flag = '0'
AND ca.del_flag = '0'
</select>
</select>
<select
id=
"selectByActivityId"
resultType=
"java.lang.Integer"
>
select count(*)
from cms_application
where 1=1
and activity_id = #{businessId}
</select>
</mapper>
</mapper>
src/main/resources/mapper/business/opmArticle/mapper/OpmArticleMapper.xml
View file @
e3ca0dd7
...
@@ -213,25 +213,11 @@
...
@@ -213,25 +213,11 @@
CASE
CASE
WHEN oal.business_id IS NOT NULL THEN 1 ELSE 0
WHEN oal.business_id IS NOT NULL THEN 1 ELSE 0
END AS isLike
END AS isLike
# oi.url AS memAvatar,
# GROUP_CONCAT(DISTINCT pic_urls.url ORDER BY pic_urls.url SEPARATOR ',') AS url
FROM
FROM
opm_article opa
opm_article opa
LEFT JOIN opm_topic opt ON opa.topic_id = opt.business_id
LEFT JOIN opm_topic opt ON opa.topic_id = opt.business_id
LEFT JOIN mem_info mi ON opa.create_by = mi.user_id
LEFT JOIN mem_info mi ON opa.create_by = mi.user_id
# LEFT JOIN oss_info oi ON mi.avatar = oi.business_id
LEFT JOIN opm_article_like oal on oal.article_id = opa.business_id and oal.user_id = #{entity.loginUserId}
LEFT JOIN opm_article_like oal on oal.article_id = opa.business_id and oal.user_id = #{entity.loginUserId}
# LEFT JOIN (
# SELECT
# opm_article.business_id,
# CAST(JSON_UNQUOTE(JSON_EXTRACT(picture_id, CONCAT('$.id[', jt_ids.idx - 1, ']'))) AS UNSIGNED) AS picture_id
# FROM
# opm_article,
# JSON_TABLE(JSON_EXTRACT(opm_article.picture_id, '$.id'), '$[*]' COLUMNS (idx FOR ORDINALITY)) AS jt_ids
# WHERE
# opm_article.del_flag = '0'
# ) AS pic_ids ON opa.business_id = pic_ids.business_id
# LEFT JOIN oss_info pic_urls ON pic_ids.picture_id = pic_urls.business_id
WHERE 1=1
WHERE 1=1
and opa.del_flag = '0'
and opa.del_flag = '0'
and opa.flag = '1'
and opa.flag = '1'
...
@@ -256,10 +242,46 @@
...
@@ -256,10 +242,46 @@
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
GROUP BY
UNION ALL(
opa.business_id
SELECT
ORDER BY
opa.business_id,
opa.create_date DESC
opa.flag,
opa.del_flag,
opa.comment_count,
opa.like_count,
opa.exam_status,
opa.is_article,
opa.create_date,
opa.content,
opa.create_by AS userId,
opa.picture_id,
opt.topic_name AS topic,
mi.mem_code,
mi.mem_nick_name,
mi.mem_sex,
mi.mem_birthday,
mi.mem_residence_province,
mi.mem_residence_city,
mi.mem_max_education,
mi.mem_career,
mi.mem_wx_code,
mi.business_id AS memberId,
mi.avatar AS avatarId,
CASE
WHEN oal.business_id IS NOT NULL THEN 1 ELSE 0
END AS isLike
FROM
opm_article opa
LEFT JOIN opm_topic opt ON opa.topic_id = opt.business_id
LEFT JOIN mem_info mi ON opa.create_by = mi.user_id
LEFT JOIN opm_article_like oal on oal.article_id = opa.business_id and oal.user_id = #{entity.loginUserId}
WHERE 1=1
and opa.del_flag = '0'
and opa.flag = '1'
and opa.exam_status = '0'
and opa.create_by = #{entity.loginUserId}
)
ORDER BY create_date DESC
</select>
</select>
<select
id=
"queryUserArticlePaged"
resultType=
"org.rcisoft.business.opmArticle.entity.OpmArticle"
>
<select
id=
"queryUserArticlePaged"
resultType=
"org.rcisoft.business.opmArticle.entity.OpmArticle"
>
SELECT
SELECT
...
...
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