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
ee67f2c9
Commit
ee67f2c9
authored
Mar 06, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增了app动态删除和报名查询
parent
33805a63
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
170 additions
and
14 deletions
+170
-14
AppOpmArticleController.java
...ft/app/appArticle/controller/AppOpmArticleController.java
+15
-0
AppCmsApplicationController.java
...msApplication/controller/AppCmsApplicationController.java
+49
-0
AppMemFeedbackController.java
...p/appMemFeedBack/controller/AppMemFeedbackController.java
+1
-1
CmsApplicationController.java
...s/cmsApplication/controller/CmsApplicationController.java
+1
-1
CmsApplicationRepository.java
...business/cmsApplication/dao/CmsApplicationRepository.java
+3
-1
CmsApplication.java
...cisoft/business/cmsApplication/entity/CmsApplication.java
+32
-0
CmsApplicationService.java
...usiness/cmsApplication/service/CmsApplicationService.java
+1
-1
CmsApplicationServiceImpl.java
...msApplication/service/impl/CmsApplicationServiceImpl.java
+11
-3
OpmArticleController.java
.../business/opmArticle/controller/OpmArticleController.java
+1
-1
OpmArticleService.java
...cisoft/business/opmArticle/service/OpmArticleService.java
+1
-1
OpmArticleServiceImpl.java
...siness/opmArticle/service/impl/OpmArticleServiceImpl.java
+36
-5
CmsApplicationMapper.xml
...r/business/cmsApplication.mapper/CmsApplicationMapper.xml
+19
-0
No files found.
src/main/java/org/rcisoft/app/appArticle/controller/AppOpmArticleController.java
View file @
ee67f2c9
...
...
@@ -51,6 +51,21 @@ public class AppOpmArticleController extends CyPaginationController<OpmArticle>
}
@PreAuthorize
(
"@cyPerm.hasPerm('sys:opmArticle:delete')"
)
@CyOpeLogAnno
(
title
=
"system-opmArticle管理管理-删除动态"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@Operation
(
summary
=
"删除动态"
,
description
=
"删除动态"
)
@Parameters
({
@Parameter
(
name
=
"businessId"
,
description
=
"businessId"
,
required
=
true
)})
@DeleteMapping
(
"/delete/{businessId:\\w+}"
)
public
CyResult
delete
(
@PathVariable
String
businessId
,
OpmArticle
opmArticle
)
{
opmArticle
.
setBusinessId
(
Integer
.
valueOf
(
businessId
));
CyPersistModel
data
=
opmArticleServiceImpl
.
remove
(
opmArticle
,
"app"
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
/**
* 动态-动态列表
*/
...
...
src/main/java/org/rcisoft/app/appCmsApplication/controller/AppCmsApplicationController.java
0 → 100644
View file @
ee67f2c9
package
org
.
rcisoft
.
app
.
appCmsApplication
.
controller
;
/*固定导入*/
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Parameter
;
import
io.swagger.v3.oas.annotations.Parameters
;
import
jakarta.servlet.http.HttpServletResponse
;
import
org.rcisoft.business.cmsApplication.entity.CmsApplication
;
import
org.rcisoft.business.cmsApplication.service.CmsApplicationService
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.model.CyGridModel
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.operlog.enums.CyLogTypeEnum
;
import
org.rcisoft.core.result.CyResult
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.rcisoft.core.util.CyResultGenUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.util.List
;
/**
* @author cy
* @date 2024年3月25日 下午1:42:40
*/
@RestController
@RequestMapping
(
"/app"
)
public
class
AppCmsApplicationController
extends
CyPaginationController
<
CmsApplication
>
{
@Autowired
private
CmsApplicationService
cmsApplicationServiceImpl
;
@PreAuthorize
(
"@cyPerm.hasPerm('app:application:query')"
)
@CyOpeLogAnno
(
title
=
"system-报名管理-查询报名"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@Operation
(
summary
=
"分页查询报名集合"
,
description
=
"分页查询报名集合"
)
@GetMapping
(
value
=
"/cmsApplication/queryCmsApplicationByPagination"
)
public
CyGridModel
listByPagination
(
CmsApplication
cmsApplication
)
{
// 调用分页查询的方法
cmsApplicationServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
cmsApplication
,
"app"
);
// 返回分页结果
return
getGridModelResponse
();
}
}
src/main/java/org/rcisoft/app/appMemFeedBack/controller/
a
ppMemFeedbackController.java
→
src/main/java/org/rcisoft/app/appMemFeedBack/controller/
A
ppMemFeedbackController.java
View file @
ee67f2c9
...
...
@@ -30,7 +30,7 @@ import java.util.List;
*/
@RestController
@RequestMapping
(
"/app"
)
public
class
a
ppMemFeedbackController
extends
CyPaginationController
<
MemFeedback
>
{
public
class
A
ppMemFeedbackController
extends
CyPaginationController
<
MemFeedback
>
{
@Autowired
...
...
src/main/java/org/rcisoft/business/cmsApplication/controller/CmsApplicationController.java
View file @
ee67f2c9
...
...
@@ -106,7 +106,7 @@ public class CmsApplicationController extends CyPaginationController<CmsApplicat
@GetMapping
(
value
=
"/queryCmsApplicationByPagination"
)
public
CyGridModel
listByPagination
(
CmsApplication
cmsApplication
)
{
// 调用分页查询的方法
cmsApplicationServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
cmsApplication
);
cmsApplicationServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
cmsApplication
,
"web"
);
// 返回分页结果
return
getGridModelResponse
();
}
...
...
src/main/java/org/rcisoft/business/cmsApplication/dao/CmsApplicationRepository.java
View file @
ee67f2c9
...
...
@@ -25,8 +25,10 @@ public interface CmsApplicationRepository extends CyBaseMapper<CmsApplication> {
CmsApplication
findByBusinessId
(
@Param
(
"businessId"
)
Integer
businessId
);
List
<
CmsApplication
>
queryCmsApplication
(
@Param
(
"entity"
)
CmsApplication
cmsApplication
);
//web端报名查询
IPage
<
CmsApplication
>
queryCmsApplicationPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
CmsApplication
cmsApplication
);
//app端报名查询
IPage
<
CmsApplication
>
appQueryCmsApplicationPaged
(
CyPageInfo
<
CmsApplication
>
paginationUtility
,
@Param
(
"entity"
)
CmsApplication
cmsApplication
);
CmsApplication
selectByOrderId
(
Long
orderId
);
...
...
src/main/java/org/rcisoft/business/cmsApplication/entity/CmsApplication.java
View file @
ee67f2c9
...
...
@@ -93,6 +93,18 @@ public class CmsApplication extends CyIdIncreEntity<CmsApplication> {
@TableField
(
"order_id"
)
private
Long
orderId
;
/**
* 活动图片id
*/
@TableField
(
"picture_id"
)
private
Integer
pictureId
;
/**
* 活动图片Url
*/
@TableField
(
exist
=
false
)
private
String
pictureUrl
;
/**
* 用户昵称
*/
...
...
@@ -104,6 +116,26 @@ public class CmsApplication extends CyIdIncreEntity<CmsApplication> {
*/
@TableField
(
exist
=
false
)
private
Integer
memberId
;
/**
* 活动开始时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
String
startTime
;
/**
* 活动结束时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
String
endTime
;
/**
* 活动名称
*/
@TableField
(
exist
=
false
)
private
String
title
;
}
src/main/java/org/rcisoft/business/cmsApplication/service/CmsApplicationService.java
View file @
ee67f2c9
...
...
@@ -49,7 +49,7 @@ public interface CmsApplicationService {
* @return
*/
IPage
<
CmsApplication
>
findAllByPagination
(
CyPageInfo
<
CmsApplication
>
paginationUtility
,
CmsApplication
cmsApplication
);
CmsApplication
cmsApplication
,
String
type
);
/**
...
...
src/main/java/org/rcisoft/business/cmsApplication/service/impl/CmsApplicationServiceImpl.java
View file @
ee67f2c9
...
...
@@ -102,9 +102,17 @@ public class CmsApplicationServiceImpl extends ServiceImpl<CmsApplicationReposit
* @return
*/
@Override
public
IPage
<
CmsApplication
>
findAllByPagination
(
CyPageInfo
<
CmsApplication
>
paginationUtility
,
CmsApplication
cmsApplication
)
{
IPage
<
CmsApplication
>
cmsApplicationIPage
=
baseMapper
.
queryCmsApplicationPaged
(
paginationUtility
,
cmsApplication
);
return
cmsApplicationIPage
;
public
IPage
<
CmsApplication
>
findAllByPagination
(
CyPageInfo
<
CmsApplication
>
paginationUtility
,
CmsApplication
cmsApplication
,
String
type
)
{
if
(
type
.
equals
(
"app"
)){
//小程序
cmsApplication
.
setCreateBy
(
CyUserUtil
.
getAuthenBusinessId
());
IPage
<
CmsApplication
>
cmsApplicationIPage
=
baseMapper
.
appQueryCmsApplicationPaged
(
paginationUtility
,
cmsApplication
);
return
cmsApplicationIPage
;
}
else
{
//web端
IPage
<
CmsApplication
>
cmsApplicationIPage
=
baseMapper
.
queryCmsApplicationPaged
(
paginationUtility
,
cmsApplication
);
return
cmsApplicationIPage
;
}
}
/**
...
...
src/main/java/org/rcisoft/business/opmArticle/controller/OpmArticleController.java
View file @
ee67f2c9
...
...
@@ -73,7 +73,7 @@ public class OpmArticleController extends CyPaginationController<OpmArticle> {
@DeleteMapping
(
"/delete/{businessId:\\w+}"
)
public
CyResult
delete
(
@PathVariable
String
businessId
,
OpmArticle
opmArticle
)
{
opmArticle
.
setBusinessId
(
Integer
.
valueOf
(
businessId
));
CyPersistModel
data
=
opmArticleServiceImpl
.
remove
(
opmArticle
);
CyPersistModel
data
=
opmArticleServiceImpl
.
remove
(
opmArticle
,
"web"
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
...
...
src/main/java/org/rcisoft/business/opmArticle/service/OpmArticleService.java
View file @
ee67f2c9
...
...
@@ -27,7 +27,7 @@ public interface OpmArticleService {
* @param opmArticle
* @return
*/
CyPersistModel
remove
(
OpmArticle
opmArticle
);
CyPersistModel
remove
(
OpmArticle
opmArticle
,
String
type
);
/**
* 逻辑删除 opmArticle管理
...
...
src/main/java/org/rcisoft/business/opmArticle/service/impl/OpmArticleServiceImpl.java
View file @
ee67f2c9
...
...
@@ -3,12 +3,14 @@ package org.rcisoft.business.opmArticle.service.impl;
import
cn.hutool.json.JSONArray
;
import
cn.hutool.json.JSONUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.baidu.censor.dto.CensorResult
;
import
org.rcisoft.baidu.censor.service.ContentCensorService
;
import
org.rcisoft.business.cmsOrder.entity.CmsOrder
;
import
org.rcisoft.business.memGoldCoinFlow.dao.MemGoldCoinFlowRepository
;
import
org.rcisoft.business.memGoldCoinFlow.entity.MemGoldCoinFlow
;
import
org.rcisoft.business.memInfo.bean.MemberInfoRedisBean
;
...
...
@@ -212,11 +214,40 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
OpmArticle
opmArticle
){
int
line
=
baseMapper
.
realDelete
(
opmArticle
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
opmArticle
.
getBusinessId
()+
"的opmArticle管理信息"
);
return
new
CyPersistModel
(
line
);
public
CyPersistModel
remove
(
OpmArticle
opmArticle
,
String
type
){
if
(
type
.
equals
(
"app"
)){
//app端
//校验要删除的动态是不是当前登录人的
QueryWrapper
<
OpmArticle
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
lambda
().
eq
(
OpmArticle:
:
getBusinessId
,
opmArticle
.
getBusinessId
());
wrapper
.
lambda
().
eq
(
OpmArticle:
:
getCreateBy
,
CyUserUtil
.
getAuthenBusinessId
());
List
<
OpmArticle
>
opmArticles
=
baseMapper
.
selectList
(
wrapper
);
if
(
opmArticles
.
size
()
>
0
){
//是当前登录人的
//校验是否超出删除时间
List
<
DictData
>
articleConfig
=
dictionaryService
.
selectByTypes
(
"article_config"
);
DictData
dictData
=
articleConfig
.
stream
().
filter
(
item
->
item
.
getDictLabel
().
equals
(
"delete_article_limit"
)).
findFirst
().
orElse
(
null
);
Integer
limitDay
=
Integer
.
valueOf
(
dictData
.
getDictValue
());
//限制天数
long
articleTime
=
opmArticles
.
get
(
0
).
getCreateDate
().
getTime
()
+
limitDay
*
24
*
60
*
60
*
1000
;
long
nowTime
=
new
Date
().
getTime
();
if
(
articleTime
>
nowTime
){
opmArticle
.
setDelFlag
(
"1"
);
int
line
=
baseMapper
.
deleteById
(
opmArticle
);
return
new
CyPersistModel
(
line
);
}
else
{
//超出规定时间 不能删除
throw
new
CyServiceException
(
1002
,
"已超出规定时间,不能删除!"
);
}
}
else
{
throw
new
CyServiceException
(
1001
,
"您没有权限删除此动态!"
);
}
}
else
{
//小程序端
int
line
=
baseMapper
.
deleteById
(
opmArticle
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
opmArticle
.
getBusinessId
()+
"的opmArticle管理信息"
);
return
new
CyPersistModel
(
line
);
}
}
/**
...
...
src/main/resources/mapper/business/cmsApplication.mapper/CmsApplicationMapper.xml
View file @
ee67f2c9
...
...
@@ -95,6 +95,25 @@
</if>
ORDER BY business_id DESC
</select>
<select
id=
"appQueryCmsApplicationPaged"
resultType=
"org.rcisoft.business.cmsApplication.entity.CmsApplication"
>
SELECT ca2.business_id,
ca2.create_by,
ca2.create_date,
ca2.user_id,
ca2.status,
ca2.application_fee,
ca2.activity_id,
ca1.title,
ca1.picture_id,
ca1.start_time,
ca1.end_time
FROM cms_application ca2
LEFT JOIN cms_activity ca1 on ca1.business_id = ca2.activity_id
Where 1=1
and ca2.del_flag = '0'
and ca2.create_by = #{entity.createBy}
ORDER BY ca2.create_date DESC
</select>
<select
id=
"selectByOrderId"
resultType=
"org.rcisoft.business.cmsApplication.entity.CmsApplication"
>
select * from cms_application where order_id = #{orderId}
</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