Commit 3f8052f1 authored by liwei's avatar liwei

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

parent bb470b69
......@@ -107,6 +107,16 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> {
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)
......@@ -377,8 +387,8 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> {
/**
* 查询留言列表详情 1对1的
*/
@CyOpeLogAnno(title = "system-会员表管理-查询留言表", businessType = CyLogTypeEnum.QUERY)
@Operation(summary="分页查询留言列表", description="分页查询留言列表")
@CyOpeLogAnno(title = "system-会员表管理-查询留言详情列表", businessType = CyLogTypeEnum.QUERY)
@Operation(summary="分页查询留言详情列表", description="分页查询留言详情列表")
@GetMapping(value = "/memInfo/leaveMessageDetailList")
// @CyEncryptSm4Anno
public CyGridModel leaveMessageDetailList(UserLeaveMessageDTO dto) {
......
......@@ -27,6 +27,7 @@ public interface CmsActivityRepository extends CyBaseMapper<CmsActivity> {
int deleteCmsActivity(@Param("businessId")Integer businessId);
//修改状态
int updateStatus(@Param("entity") CmsActivity cmsActivity);
//查询活动详情
CmsActivity selectById(@Param("businessId")Integer businessId);
//权重验重
CmsActivity checkWeight(@Param("weight")Integer weight);
......
......@@ -131,8 +131,6 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
public IPage<CmsActivity> findAllByPagination(CyPageInfo<CmsActivity> paginationUtility,
CmsActivity cmsActivity) {
IPage<CmsActivity> cmsActivityIPage = baseMapper.queryCmsActivityPaged(paginationUtility, cmsActivity);
List<CmsActivity> newsInformation = cmsActivityIPage.getRecords();
cmsActivityIPage.setRecords(newsInformation);
return cmsActivityIPage;
}
......
......@@ -103,7 +103,6 @@ public class CmsBannerServiceImpl extends ServiceImpl<CmsBannerRepository, CmsBa
public IPage<CmsBanner> findAllByPagination(CyPageInfo<CmsBanner> paginationUtility,
CmsBanner cmsBanner){
IPage<CmsBanner> result = baseMapper.queryCmsBannersPaged(paginationUtility,cmsBanner);
List<CmsBanner> cmsBannerList = result.getRecords();
return result;
}
......
......@@ -27,6 +27,7 @@ public interface CmsNoticeRepository extends CyBaseMapper<CmsNotice> {
int deleteCmsNotice(@Param("businessId")Integer businessId);
//修改状态
int updateStatus(@Param("entity") CmsNotice cmsNotice);
//查询公告详情
CmsNotice selectById(@Param("businessId")Integer businessId);
//权重验重
CmsNotice checkWeight(@Param("weight")Integer weight);
......
......@@ -115,8 +115,6 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
public IPage<CmsNotice> findAllByPagination(CyPageInfo<CmsNotice> paginationUtility,
CmsNotice cmsNotice) {
IPage<CmsNotice> cmsNoticeIPage = baseMapper.queryCmsNoticePaged(paginationUtility, cmsNotice);
List<CmsNotice> newsInformation = cmsNoticeIPage.getRecords();
cmsNoticeIPage.setRecords(newsInformation);
return cmsNoticeIPage;
}
......
......@@ -55,6 +55,14 @@ public interface MemInfoService {
IPage<MemInfo> findAllByPagination(CyPageInfo<MemInfo> paginationUtility,
MemInfo memInfo);
/**
* 分页查询 会员表
* @param memInfo
* @return
*/
IPage<MemInfo> findLikeListByPagination(CyPageInfo<MemInfo> paginationUtility,
MemInfo memInfo);
/**
* 查询list 会员表
......
......@@ -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 会员表
* @param memInfo
......@@ -589,7 +618,7 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
//redis中 该用户对目标用户的点赞次数
Object redisCountToPersonal = cyRedisServiceImpl.hget(MemberInfoRedisBean.USER_LIKE_USERLIKE + userId, String.valueOf(likeDTO.getTargetId()));
if (redisCountToAll == null && redisCountToPersonal == null){
//用户第一次进行点赞 设置redis缓存 24小时
//用户第一次进行点赞 设置redis缓存
//对所有用户的点赞次数存储
cyRedisServiceImpl.set(MemberInfoRedisBean.USER_LIKE_USERLIKEALL + userId,1);
cyRedisServiceImpl.hset(MemberInfoRedisBean.USER_LIKE_USERLIKE + userId, String.valueOf(likeDTO.getTargetId()),1);
......
......@@ -172,6 +172,10 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
if (list.isEmpty()){
result = paginationUtility;
} else {
if (StringUtils.isNotEmpty(CyUserUtil.getAuthenBusinessId())){
//设置当前登录人id 用来查询该用户对文章是否已点赞
opmArticle.setLoginUserId(CyUserUtil.getAuthenBusinessId());
}
result = baseMapper.queryOpmArticlePaged(paginationUtility,opmArticle);
}
} else {
......@@ -273,7 +277,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
LikeDTO likeDTO = new LikeDTO();
likeDTO.setUserId(CyUserUtil.getAuthenBusinessId());
likeDTO.setCommentId(commentId);
//增加主表该动态的点赞数
//增加该条评论的点赞数
baseMapper.addCommentLikeCount(commentId);
line = baseMapper.likeAdd(likeDTO);
} else if (praiseType.equals("cancel")){
......@@ -281,7 +285,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
//删除点赞表中的数据
String userId = CyUserUtil.getAuthenBusinessId();
baseMapper.likeDelete(userId,commentId);
//修改主表中该动态的点赞数
//修改该条评论的点赞数
line = baseMapper.reduceCommentLikeCount(commentId);
} else {
throw new CyServiceException("点赞失败,请稍后再试");
......@@ -296,6 +300,9 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
*/
@Override
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.setCreateDate(new Date());
dto.setUpdateDate(new Date());
......
......@@ -34,7 +34,7 @@ public class ScheduleTasks {
* 用户点赞数据定时任务 将点赞数据同步到对应的表中
* 会员表 点赞表
*/
@Scheduled(cron = "0 0 10 * * ?")
@Scheduled(cron = "0 0 0 * * ?")
public void userLikeSchedule() {
memInfoService.userLikeSchedule();
}
......
......@@ -87,36 +87,18 @@
LEFT JOIN oss_info oi on cn.picture_id = oi.business_id
LEFT JOIN sys_user su on su.business_id = cn.create_by
where cn.del_flag='0'
<if test="entity.beginTime !=null and entity.beginTime != '' ">
and publish_date &gt;= #{entity.beginTime}
</if>
<if test="entity.endTime !=null and entity.endTime != '' ">
and publish_date &lt;= #{entity.endTime}
</if>
<if test="entity.flag!=null and entity.flag != '' ">
and cn.flag = #{entity.flag}
</if>
<if test="entity.summary !=null and entity.summary != '' ">
and summary like concat('%',#{entity.summary},'%')
<if test="entity.beginTime !=null and entity.beginTime != '' ">
and cn.publish_date &gt;= #{entity.beginTime}
</if>
<if test="entity.endTime !=null and entity.endTime != '' ">
and cn.publish_date &lt;= #{entity.endTime}
</if>
<if test="entity.flag!=null and entity.flag != '' ">
and cn.flag = #{entity.flag}
</if>
<if test="entity.title !=null and entity.title != '' ">
and title like concat('%',#{entity.title},'%')
</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 != '' ">
and title like concat('%',#{entity.title},'%')
</if>
<if test="entity.pictureId !=null and entity.pictureId != '' ">
and picture_id = #{entity.pictureId}
</if>
<if test="entity.isRecommended !=null">
and is_recommended = #{entity.isRecommended}
</if>
......@@ -139,7 +121,7 @@
<select id="selectById" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select cn.*,
oi.url
from cms_notice cn
from cms_notice cn
left join oss_info oi on oi.business_id = cn.picture_id
where cn.business_id = #{businessId}
</select>
......
......@@ -42,7 +42,8 @@
</select>
<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
where 1=1
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