Commit 341bef5b authored by 罗林杰's avatar 罗林杰

修改查询

parent 8e8147df
......@@ -194,6 +194,13 @@ public class MemInfoController extends CyPaginationController<MemInfo> {
return CyResultGenUtil.genSuccessResult(memInfoServiceImpl.getArticle(articleExamStatus));
}
@PreAuthorize("@cyPerm.hasPerm('mem:info:list')")
@CyOpeLogAnno(title = "system-会员表管理-查询会员表", businessType = CyLogTypeEnum.QUERY)
@Operation(summary="分页查询会员热度表集合", description="分页查询会员热度表集合")
@GetMapping(value = "/memHost")
public CyGridModel listMemHostByPagination(MemInfo memInfo) {
memInfoServiceImpl.findMemHostByPagination(getPaginationUtility(), memInfo);
return getGridModelResponse();
}
}
......@@ -171,5 +171,10 @@ public interface MemInfoRepository extends CyBaseMapper<MemInfo> {
* 查询我喜欢的 喜欢我的 互相喜欢的数量
*/
MemInfo selectUserFollowCount(Integer userId);
/**
* 分页查询会员热度表
*/
IPage<MemInfo> queryMemHostPaged(CyPageInfo cyPageInfo,@Param("entity") MemInfo memInfo);
}
......@@ -590,5 +590,11 @@ public class MemInfo extends CyIdIncreEntity<MemInfo> {
@TableField(exist = false)
@Excel(name = "星座,1-12 水瓶-摩羯 ,根据birthday,自动带入", orderNum = "4", width = 20)
private List<String> memConstellationList;
/**
* 会员热度排序
*/
@TableField(exist = false)
private Integer memSort;
}
......@@ -108,4 +108,12 @@ public interface MemInfoService {
CyPersistModel addLike(MemLikeDTO likeDTO);
IPage<MemInfo> findRankByPagination(CyPageInfo<MemInfo> paginationUtility, MemInfo memInfo);
/**
* 分页查询 会员热度表
* @param memInfo
* @return
*/
IPage<MemInfo> findMemHostByPagination(CyPageInfo<MemInfo> paginationUtility,
MemInfo memInfo);
}
......@@ -708,4 +708,16 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
log.info("用户点赞数据定时任务执行中...");
}
/**
* 分页查询 会员热度表
* @param memInfo
* @return
*/
@Override
public IPage<MemInfo> findMemHostByPagination(CyPageInfo<MemInfo> paginationUtility,
MemInfo memInfo){
return baseMapper.queryMemHostPaged(paginationUtility,memInfo);
}
}
......@@ -729,4 +729,23 @@
ORDER BY mem_traffic desc
limit 10
</select>
<select id="queryMemHostPaged" resultType="org.rcisoft.business.memInfo.entity.MemInfo">
select *
from mem_info mi
where 1=1
<if test="entity.memCode !=null and entity.memCode != '' ">
and mi.mem_code = #{entity.memCode}
</if>
<if test="entity.memSex !=null and entity.memSex != '' ">
and mi.mem_sex = #{entity.memSex}
</if>
<choose>
<when test="entity.memSort == 0">
ORDER BY mi.mem_liked_count DESC
</when>
<when test="entity.memSort == 1">
ORDER BY mi.mem_followed_count DESC
</when>
</choose>
</select>
</mapper>
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