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
76b085ab
Commit
76b085ab
authored
Jan 18, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改关注
parent
fca9b11f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
21 deletions
+99
-21
AppMemInfoController.java
...isoft/app/appMemInfo/controller/AppMemInfoController.java
+25
-5
MemInfoRepository.java
...a/org/rcisoft/business/memInfo/dao/MemInfoRepository.java
+8
-4
MemFollowDTO.java
...ava/org/rcisoft/business/memInfo/entity/MemFollowDTO.java
+13
-0
MemInfoService.java
.../org/rcisoft/business/memInfo/service/MemInfoService.java
+7
-6
MemInfoServiceImpl.java
...oft/business/memInfo/service/impl/MemInfoServiceImpl.java
+34
-4
MemInfoMapper.xml
...esources/mapper/business/memInfo/mapper/MemInfoMapper.xml
+12
-2
No files found.
src/main/java/org/rcisoft/app/appMemInfo/controller/AppMemInfoController.java
View file @
76b085ab
...
...
@@ -11,8 +11,7 @@ import io.swagger.v3.oas.annotations.Operation;
import
io.swagger.v3.oas.annotations.Parameter
;
import
io.swagger.v3.oas.annotations.Parameters
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
jakarta.servlet.http.HttpServletResponse
;
import
org.imgscalr.Scalr
;
import
org.rcisoft.business.memInfo.entity.MemFollowDTO
;
import
org.rcisoft.business.memInfo.entity.MemInfo
;
import
org.rcisoft.business.memInfo.service.MemInfoService
;
import
org.rcisoft.core.anno.CyEncryptSm4Anno
;
...
...
@@ -27,11 +26,9 @@ import org.rcisoft.core.operlog.enums.CyLogTypeEnum;
import
org.rcisoft.core.result.CyResult
;
import
org.rcisoft.core.result.enums.CyResSysExcEnum
;
import
org.rcisoft.core.service.CyFileStorageService
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.rcisoft.core.util.CyResultGenUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.mock.web.MockMultipartFile
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -44,7 +41,6 @@ import java.awt.image.BufferedImage;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* Created by cy on 2024年12月20日 下午3:35:34.
...
...
@@ -273,4 +269,28 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> {
memInfo
);
}
@CyOpeLogAnno
(
title
=
"system-会员关注-会员关注"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@Operation
(
summary
=
"会员关注"
,
description
=
"会员关注"
)
@PostMapping
(
value
=
"/open/memInfo/follow"
)
@CyEncryptSm4Anno
public
Integer
follow
(
@RequestBody
MemFollowDTO
followDTO
)
{
return
memInfoServiceImpl
.
addFollow
(
followDTO
);
}
@CyOpeLogAnno
(
title
=
"system-会员关注-查询是否关注"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@Operation
(
summary
=
"查询是否关注"
,
description
=
"查询是否关注"
)
@GetMapping
(
value
=
"/open/memInfo/isFollow"
)
@CyEncryptSm4Anno
public
MemFollowDTO
isFollow
(
MemFollowDTO
followDTO
)
{
return
memInfoServiceImpl
.
isFollow
(
followDTO
);
}
@CyOpeLogAnno
(
title
=
"system-会员取消关注-会员取消关注"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@Operation
(
summary
=
"会员取消关注"
,
description
=
"会员取消关注"
)
@PostMapping
(
value
=
"/open/memInfo/followDelete"
)
@CyEncryptSm4Anno
public
Integer
followDelete
(
@RequestBody
MemFollowDTO
followDTO
)
{
return
memInfoServiceImpl
.
deleteFollow
(
followDTO
);
}
}
src/main/java/org/rcisoft/business/memInfo/dao/MemInfoRepository.java
View file @
76b085ab
package
org
.
rcisoft
.
business
.
memInfo
.
dao
;
import
org.rcisoft.business.cmsActivity.entity.CmsActivity
;
import
org.rcisoft.business.memInfo.entity.ArticleExamStatus
;
import
org.rcisoft.business.memInfo.entity.opmArticleDTO
;
import
org.rcisoft.business.memInfo.entity.peopleNumberDTO
;
import
org.rcisoft.business.memInfo.entity.*
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.business.memInfo.entity.MemInfo
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.sys.rbac.user.dto.SysUserRbacDTO
;
import
org.springframework.stereotype.Repository
;
import
org.rcisoft.core.model.CyPageInfo
;
...
...
@@ -99,5 +97,11 @@ public interface MemInfoRepository extends CyBaseMapper<MemInfo> {
* @return
*/
MemInfo
selectByOpenId
(
String
openId
);
Integer
addFollow
(
@Param
(
"entity"
)
MemFollowDTO
followDTO
);
MemFollowDTO
getFollow
(
@Param
(
"entity"
)
MemFollowDTO
followDTO
);
Integer
deleteFollow
(
@Param
(
"entity"
)
MemFollowDTO
followDTO
);
}
src/main/java/org/rcisoft/business/memInfo/entity/MemFollowDTO.java
0 → 100644
View file @
76b085ab
package
org
.
rcisoft
.
business
.
memInfo
.
entity
;
import
lombok.Data
;
@Data
public
class
MemFollowDTO
{
private
Integer
userId
;
private
Integer
targetId
;
private
Integer
isFollowed
;
}
src/main/java/org/rcisoft/business/memInfo/service/MemInfoService.java
View file @
76b085ab
package
org
.
rcisoft
.
business
.
memInfo
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.rcisoft.business.memInfo.entity.ArticleExamStatus
;
import
org.rcisoft.business.memInfo.entity.MemInfo
;
import
org.rcisoft.business.memInfo.entity.opmArticleDTO
;
import
org.rcisoft.business.memInfo.entity.peopleNumberDTO
;
import
org.rcisoft.business.memInfo.entity.*
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
...
...
@@ -95,4 +90,10 @@ public interface MemInfoService {
CyPersistModel
checkIdCard
(
MemInfo
memInfo
);
CyPersistModel
update
(
MemInfo
memInfo
);
Integer
addFollow
(
MemFollowDTO
followDTO
);
MemFollowDTO
isFollow
(
MemFollowDTO
followDTO
);
Integer
deleteFollow
(
MemFollowDTO
followDTO
);
}
src/main/java/org/rcisoft/business/memInfo/service/impl/MemInfoServiceImpl.java
View file @
76b085ab
...
...
@@ -7,9 +7,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.rcisoft.alibaba.faceVerify.bean.FaceVerifyAliComp
;
import
org.rcisoft.alibaba.faceVerify.bean.FaceVerifyRedisBean
;
import
org.rcisoft.business.memInfo.bean.MemberGenerateBean
;
import
org.rcisoft.business.memInfo.entity.ArticleExamStatus
;
import
org.rcisoft.business.memInfo.entity.opmArticleDTO
;
import
org.rcisoft.business.memInfo.entity.peopleNumberDTO
;
import
org.rcisoft.business.memInfo.entity.*
;
import
org.rcisoft.core.constant.CyDelStaCons
;
import
org.rcisoft.core.constant.CyFlagStaCons
;
import
org.rcisoft.core.exception.CyServiceException
;
...
...
@@ -17,7 +15,6 @@ import org.rcisoft.core.service.CyRedisService;
import
org.rcisoft.core.util.*
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.business.memInfo.dao.MemInfoRepository
;
import
org.rcisoft.business.memInfo.entity.MemInfo
;
import
org.rcisoft.business.memInfo.service.MemInfoService
;
import
org.rcisoft.sys.constant.CyUserCons
;
...
...
@@ -500,4 +497,37 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
memInfo
.
getBusinessId
()+
"的会员表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 添加关注
*
* @param followDTO
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
Integer
addFollow
(
MemFollowDTO
followDTO
){
return
baseMapper
.
addFollow
(
followDTO
);
}
/**
* 查询是否关注
*
* @param followDTO
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
MemFollowDTO
isFollow
(
MemFollowDTO
followDTO
){
return
baseMapper
.
getFollow
(
followDTO
);
}
/**
* 取消关注
*
* @param followDTO
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
Integer
deleteFollow
(
MemFollowDTO
followDTO
){
return
baseMapper
.
deleteFollow
(
followDTO
);
}
}
src/main/resources/mapper/business/memInfo/mapper/MemInfoMapper.xml
View file @
76b085ab
...
...
@@ -519,6 +519,16 @@
parameterType=
"java.lang.String"
>
select * from mem_info where wx_openid = #{openId} and del_flag = 0
</select>
<select
id=
"getFollow"
resultType=
"org.rcisoft.business.memInfo.entity.MemFollowDTO"
parameterType=
"org.rcisoft.business.memInfo.entity.MemFollowDTO"
>
SELECT MAX(CASE WHEN ouf.business_id IS NOT NULL THEN 1 ELSE 0 END) AS isFollowed
FROM (SELECT 1 AS dummy) d LEFT JOIN opm_user_follow ouf ON ouf.user_id = #{entity.userId} AND ouf.target_id = #{entity.targetId};
</select>
<delete
id=
"deleteFollow"
parameterType=
"org.rcisoft.business.memInfo.entity.MemFollowDTO"
>
delete from opm_user_follow
where user_id = #{entity.userId} and target_id = #{entity.targetId}
</delete>
<insert
id=
"addFollow"
parameterType=
"org.rcisoft.business.memInfo.entity.MemFollowDTO"
>
insert into opm_user_follow (target_id,user_id)
values(#{entity.targetId},#{entity.userId})
</insert>
</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