Commit 3f8052f1 authored by liwei's avatar liwei

删除了没用的代码,补了备注

parent bb470b69
...@@ -107,6 +107,16 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> { ...@@ -107,6 +107,16 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> {
return getGridModelResponse(); return getGridModelResponse();
} }
@CyOpeLogAnno(title = "system-会员表管理-查询会员表", businessType = CyLogTypeEnum.QUERY)
@Operation(summary="分页查询喜欢集合", description="分页查询喜欢集合")
@GetMapping(value = "/open/memInfo/likeList")
public CyGridModel likeListByPagination(MemInfo memInfo) {
IPage<MemInfo> memInfoIPage = memInfoServiceImpl.findLikeListByPagination(getPaginationUtility(), memInfo);
for (MemInfo record : memInfoIPage.getRecords()) {
record.setMemWxCode(null);
}
return getGridModelResponse();
}
/** /**
* 文件上传new (2.0) * 文件上传new (2.0)
...@@ -377,8 +387,8 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> { ...@@ -377,8 +387,8 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> {
/** /**
* 查询留言列表详情 1对1的 * 查询留言列表详情 1对1的
*/ */
@CyOpeLogAnno(title = "system-会员表管理-查询留言表", businessType = CyLogTypeEnum.QUERY) @CyOpeLogAnno(title = "system-会员表管理-查询留言详情列表", businessType = CyLogTypeEnum.QUERY)
@Operation(summary="分页查询留言列表", description="分页查询留言列表") @Operation(summary="分页查询留言详情列表", description="分页查询留言详情列表")
@GetMapping(value = "/memInfo/leaveMessageDetailList") @GetMapping(value = "/memInfo/leaveMessageDetailList")
// @CyEncryptSm4Anno // @CyEncryptSm4Anno
public CyGridModel leaveMessageDetailList(UserLeaveMessageDTO dto) { public CyGridModel leaveMessageDetailList(UserLeaveMessageDTO dto) {
......
...@@ -27,6 +27,7 @@ public interface CmsActivityRepository extends CyBaseMapper<CmsActivity> { ...@@ -27,6 +27,7 @@ public interface CmsActivityRepository extends CyBaseMapper<CmsActivity> {
int deleteCmsActivity(@Param("businessId")Integer businessId); int deleteCmsActivity(@Param("businessId")Integer businessId);
//修改状态 //修改状态
int updateStatus(@Param("entity") CmsActivity cmsActivity); int updateStatus(@Param("entity") CmsActivity cmsActivity);
//查询活动详情
CmsActivity selectById(@Param("businessId")Integer businessId); CmsActivity selectById(@Param("businessId")Integer businessId);
//权重验重 //权重验重
CmsActivity checkWeight(@Param("weight")Integer weight); CmsActivity checkWeight(@Param("weight")Integer weight);
......
...@@ -131,8 +131,6 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C ...@@ -131,8 +131,6 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
public IPage<CmsActivity> findAllByPagination(CyPageInfo<CmsActivity> paginationUtility, public IPage<CmsActivity> findAllByPagination(CyPageInfo<CmsActivity> paginationUtility,
CmsActivity cmsActivity) { CmsActivity cmsActivity) {
IPage<CmsActivity> cmsActivityIPage = baseMapper.queryCmsActivityPaged(paginationUtility, cmsActivity); IPage<CmsActivity> cmsActivityIPage = baseMapper.queryCmsActivityPaged(paginationUtility, cmsActivity);
List<CmsActivity> newsInformation = cmsActivityIPage.getRecords();
cmsActivityIPage.setRecords(newsInformation);
return cmsActivityIPage; return cmsActivityIPage;
} }
......
...@@ -103,7 +103,6 @@ public class CmsBannerServiceImpl extends ServiceImpl<CmsBannerRepository, CmsBa ...@@ -103,7 +103,6 @@ public class CmsBannerServiceImpl extends ServiceImpl<CmsBannerRepository, CmsBa
public IPage<CmsBanner> findAllByPagination(CyPageInfo<CmsBanner> paginationUtility, public IPage<CmsBanner> findAllByPagination(CyPageInfo<CmsBanner> paginationUtility,
CmsBanner cmsBanner){ CmsBanner cmsBanner){
IPage<CmsBanner> result = baseMapper.queryCmsBannersPaged(paginationUtility,cmsBanner); IPage<CmsBanner> result = baseMapper.queryCmsBannersPaged(paginationUtility,cmsBanner);
List<CmsBanner> cmsBannerList = result.getRecords();
return result; return result;
} }
......
...@@ -27,6 +27,7 @@ public interface CmsNoticeRepository extends CyBaseMapper<CmsNotice> { ...@@ -27,6 +27,7 @@ public interface CmsNoticeRepository extends CyBaseMapper<CmsNotice> {
int deleteCmsNotice(@Param("businessId")Integer businessId); int deleteCmsNotice(@Param("businessId")Integer businessId);
//修改状态 //修改状态
int updateStatus(@Param("entity") CmsNotice cmsNotice); int updateStatus(@Param("entity") CmsNotice cmsNotice);
//查询公告详情
CmsNotice selectById(@Param("businessId")Integer businessId); CmsNotice selectById(@Param("businessId")Integer businessId);
//权重验重 //权重验重
CmsNotice checkWeight(@Param("weight")Integer weight); CmsNotice checkWeight(@Param("weight")Integer weight);
......
...@@ -115,8 +115,6 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo ...@@ -115,8 +115,6 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
public IPage<CmsNotice> findAllByPagination(CyPageInfo<CmsNotice> paginationUtility, public IPage<CmsNotice> findAllByPagination(CyPageInfo<CmsNotice> paginationUtility,
CmsNotice cmsNotice) { CmsNotice cmsNotice) {
IPage<CmsNotice> cmsNoticeIPage = baseMapper.queryCmsNoticePaged(paginationUtility, cmsNotice); IPage<CmsNotice> cmsNoticeIPage = baseMapper.queryCmsNoticePaged(paginationUtility, cmsNotice);
List<CmsNotice> newsInformation = cmsNoticeIPage.getRecords();
cmsNoticeIPage.setRecords(newsInformation);
return cmsNoticeIPage; return cmsNoticeIPage;
} }
......
...@@ -55,6 +55,14 @@ public interface MemInfoService { ...@@ -55,6 +55,14 @@ public interface MemInfoService {
IPage<MemInfo> findAllByPagination(CyPageInfo<MemInfo> paginationUtility, IPage<MemInfo> findAllByPagination(CyPageInfo<MemInfo> paginationUtility,
MemInfo memInfo); MemInfo memInfo);
/**
* 分页查询 会员表
* @param memInfo
* @return
*/
IPage<MemInfo> findLikeListByPagination(CyPageInfo<MemInfo> paginationUtility,
MemInfo memInfo);
/** /**
* 查询list 会员表 * 查询list 会员表
......
...@@ -259,6 +259,35 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo> ...@@ -259,6 +259,35 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
} }
/**
* 分页查询 会员表
*
* @param paginationUtility
* @param memInfo
* @return
*/
@Override
public IPage<MemInfo> findLikeListByPagination(CyPageInfo<MemInfo> paginationUtility, MemInfo memInfo) {
String loginUserId = CyUserUtil.getAuthenBusinessId();
if (StringUtils.isNotEmpty(loginUserId)){
memInfo.setLoginUserId(Integer.valueOf(loginUserId));
}
//查询我喜欢的 喜欢我的 互相喜欢的会员列表(应用于小程序端-我的)
if (StringUtils.isNotEmpty(memInfo.getQueryType())){
if (memInfo.getQueryType().equals("1")){
//我喜欢的
return baseMapper.queryMeFollowPaged(paginationUtility,memInfo);
} else if(memInfo.getQueryType().equals("2")){
//喜欢我的
return baseMapper.queryFollowMePaged(paginationUtility,memInfo);
} else if(memInfo.getQueryType().equals("3")){
//互相喜欢的
return baseMapper.queryEachFollowPaged(paginationUtility,memInfo);
}
}
return paginationUtility;
}
/** /**
* 查询list 会员表 * 查询list 会员表
* @param memInfo * @param memInfo
...@@ -589,7 +618,7 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo> ...@@ -589,7 +618,7 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
//redis中 该用户对目标用户的点赞次数 //redis中 该用户对目标用户的点赞次数
Object redisCountToPersonal = cyRedisServiceImpl.hget(MemberInfoRedisBean.USER_LIKE_USERLIKE + userId, String.valueOf(likeDTO.getTargetId())); Object redisCountToPersonal = cyRedisServiceImpl.hget(MemberInfoRedisBean.USER_LIKE_USERLIKE + userId, String.valueOf(likeDTO.getTargetId()));
if (redisCountToAll == null && redisCountToPersonal == null){ if (redisCountToAll == null && redisCountToPersonal == null){
//用户第一次进行点赞 设置redis缓存 24小时 //用户第一次进行点赞 设置redis缓存
//对所有用户的点赞次数存储 //对所有用户的点赞次数存储
cyRedisServiceImpl.set(MemberInfoRedisBean.USER_LIKE_USERLIKEALL + userId,1); cyRedisServiceImpl.set(MemberInfoRedisBean.USER_LIKE_USERLIKEALL + userId,1);
cyRedisServiceImpl.hset(MemberInfoRedisBean.USER_LIKE_USERLIKE + userId, String.valueOf(likeDTO.getTargetId()),1); cyRedisServiceImpl.hset(MemberInfoRedisBean.USER_LIKE_USERLIKE + userId, String.valueOf(likeDTO.getTargetId()),1);
......
...@@ -172,6 +172,10 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm ...@@ -172,6 +172,10 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
if (list.isEmpty()){ if (list.isEmpty()){
result = paginationUtility; result = paginationUtility;
} else { } else {
if (StringUtils.isNotEmpty(CyUserUtil.getAuthenBusinessId())){
//设置当前登录人id 用来查询该用户对文章是否已点赞
opmArticle.setLoginUserId(CyUserUtil.getAuthenBusinessId());
}
result = baseMapper.queryOpmArticlePaged(paginationUtility,opmArticle); result = baseMapper.queryOpmArticlePaged(paginationUtility,opmArticle);
} }
} else { } else {
...@@ -273,7 +277,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm ...@@ -273,7 +277,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
LikeDTO likeDTO = new LikeDTO(); LikeDTO likeDTO = new LikeDTO();
likeDTO.setUserId(CyUserUtil.getAuthenBusinessId()); likeDTO.setUserId(CyUserUtil.getAuthenBusinessId());
likeDTO.setCommentId(commentId); likeDTO.setCommentId(commentId);
//增加主表该动态的点赞数 //增加该条评论的点赞数
baseMapper.addCommentLikeCount(commentId); baseMapper.addCommentLikeCount(commentId);
line = baseMapper.likeAdd(likeDTO); line = baseMapper.likeAdd(likeDTO);
} else if (praiseType.equals("cancel")){ } else if (praiseType.equals("cancel")){
...@@ -281,7 +285,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm ...@@ -281,7 +285,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
//删除点赞表中的数据 //删除点赞表中的数据
String userId = CyUserUtil.getAuthenBusinessId(); String userId = CyUserUtil.getAuthenBusinessId();
baseMapper.likeDelete(userId,commentId); baseMapper.likeDelete(userId,commentId);
//修改主表中该动态的点赞数 //修改该条评论的点赞数
line = baseMapper.reduceCommentLikeCount(commentId); line = baseMapper.reduceCommentLikeCount(commentId);
} else { } else {
throw new CyServiceException("点赞失败,请稍后再试"); throw new CyServiceException("点赞失败,请稍后再试");
...@@ -296,6 +300,9 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm ...@@ -296,6 +300,9 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
*/ */
@Override @Override
public CyPersistModel addComment(ArticleCommentDTO dto) { public CyPersistModel addComment(ArticleCommentDTO dto) {
//超过规定的时间不能评论
List<DictData> articleConfig = dictionaryService.selectByTypes("article_config");
String restriction = articleConfig.get(0).getDictValue();
dto.setCommentedUserId(Integer.valueOf(CyUserUtil.getAuthenBusinessId())); dto.setCommentedUserId(Integer.valueOf(CyUserUtil.getAuthenBusinessId()));
dto.setCreateDate(new Date()); dto.setCreateDate(new Date());
dto.setUpdateDate(new Date()); dto.setUpdateDate(new Date());
......
...@@ -34,7 +34,7 @@ public class ScheduleTasks { ...@@ -34,7 +34,7 @@ public class ScheduleTasks {
* 用户点赞数据定时任务 将点赞数据同步到对应的表中 * 用户点赞数据定时任务 将点赞数据同步到对应的表中
* 会员表 点赞表 * 会员表 点赞表
*/ */
@Scheduled(cron = "0 0 10 * * ?") @Scheduled(cron = "0 0 0 * * ?")
public void userLikeSchedule() { public void userLikeSchedule() {
memInfoService.userLikeSchedule(); memInfoService.userLikeSchedule();
} }
......
...@@ -88,35 +88,17 @@ ...@@ -88,35 +88,17 @@
LEFT JOIN sys_user su on su.business_id = cn.create_by LEFT JOIN sys_user su on su.business_id = cn.create_by
where cn.del_flag='0' where cn.del_flag='0'
<if test="entity.beginTime !=null and entity.beginTime != '' "> <if test="entity.beginTime !=null and entity.beginTime != '' ">
and publish_date &gt;= #{entity.beginTime} and cn.publish_date &gt;= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and publish_date &lt;= #{entity.endTime} and cn.publish_date &lt;= #{entity.endTime}
</if> </if>
<if test="entity.flag!=null and entity.flag != '' "> <if test="entity.flag!=null and entity.flag != '' ">
and cn.flag = #{entity.flag} and cn.flag = #{entity.flag}
</if> </if>
<if test="entity.summary !=null and entity.summary != '' ">
and summary like concat('%',#{entity.summary},'%')
</if>
<if test="entity.createBy !=null and entity.createBy != '' ">
and create_by like concat('%',#{entity.createBy},'%')
</if>
<if test="entity.beginTime !=null ">
and cn.publish_date &gt;= #{entity.beginTime}
</if>
<if test="entity.endTime !=null ">
and cn.publish_date &lt;= #{entity.endTime}
</if>
<if test="entity.updateBy !=null and entity.updateBy != '' ">
and update_by like concat('%',#{entity.updateBy},'%')
</if>
<if test="entity.title !=null and entity.title != '' "> <if test="entity.title !=null and entity.title != '' ">
and title like concat('%',#{entity.title},'%') and title like concat('%',#{entity.title},'%')
</if> </if>
<if test="entity.pictureId !=null and entity.pictureId != '' ">
and picture_id = #{entity.pictureId}
</if>
<if test="entity.isRecommended !=null"> <if test="entity.isRecommended !=null">
and is_recommended = #{entity.isRecommended} and is_recommended = #{entity.isRecommended}
</if> </if>
......
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
</select> </select>
<select id="queryCmsBannersPaged" resultMap="BaseResultMap"> <select id="queryCmsBannersPaged" resultMap="BaseResultMap">
select smb.*,oi.url from cms_banner smb select smb.*,oi.url
from cms_banner smb
left join oss_info oi on smb.picture_id = oi.business_id left join oss_info oi on smb.picture_id = oi.business_id
where 1=1 where 1=1
and smb.del_flag = '0' and smb.del_flag = '0'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment