Commit 2d988356 authored by 罗林杰's avatar 罗林杰

修改留言分页查询

parent 78378719
......@@ -67,8 +67,12 @@ public class MemGoldCoinFlow extends CyIdIncreEntity<MemGoldCoinFlow> {
@TableField(exist = false)
private Integer balance;
//现在的余额
//会员Id
@TableField(exist = false)
private Integer memberId;
//用户
@TableField(exist = false)
private String userNickName;
}
......@@ -72,5 +72,15 @@ public class MemLeaveMessageController extends CyPaginationController<MemLeaveMe
return getGridModelResponse();
}
/**
* 分页查询留言列表
*/
@PreAuthorize("@cyPerm.hasPerm('app:mem:query')")
@CyOpeLogAnno(title = "system-会员表管理-查询对话表", businessType = CyLogTypeEnum.QUERY)
@Operation(summary="分页查询对话列表", description="分页查询对话列表")
@GetMapping(value = "/messageList")
public CyGridModel queryMessageByPagination(MemLeaveMessage memLeaveMessage) {
IPage<MemLeaveMessage> memUserTalkIPage = memLeaveMessageServiceImpl.queryMessageByPagination(getPaginationUtility(), memLeaveMessage);
return getGridModelResponse();
}
}
......@@ -39,5 +39,10 @@ public interface MemLeaveMessageRepository extends CyBaseMapper<MemLeaveMessage>
* 修改对话
*/
int updateUserTalk(MemLeaveMessage memLeaveMessage);
/**
* 分页查询留言
*/
IPage<MemLeaveMessage> queryMessageByPagination(CyPageInfo cyPageInfo, @Param("entity") MemLeaveMessage memLeaveMessage);
}
......@@ -37,9 +37,9 @@ public class MemLeaveMessage extends CyIdIncreNotDataEntity<MemLeaveMessage> {
* @default
*/
@JsonFormat(
pattern = "yyyy-MM-dd"
pattern = "yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createDate;
/**
......@@ -48,9 +48,9 @@ public class MemLeaveMessage extends CyIdIncreNotDataEntity<MemLeaveMessage> {
* @default
*/
@JsonFormat(
pattern = "yyyy-MM-dd"
pattern = "yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateDate;
/**
......@@ -75,6 +75,11 @@ public class MemLeaveMessage extends CyIdIncreNotDataEntity<MemLeaveMessage> {
@TableField(exist = false)
private String memNickName;
/**
* 创建人昵称
*/
@TableField(exist = false)
private String createName;
/**
* 留言删除状态
* 0未删除,1本人已删除,2对方已删除,3双方都删除了
......
......@@ -27,4 +27,9 @@ public interface MemLeaveMessageService {
* 查询留言列表详情 1对1的
*/
IPage<MemLeaveMessage> leaveMessageDetailByPagination(CyPageInfo<MemLeaveMessage> paginationUtility, MemLeaveMessage memLeaveMessage);
/**
* 分页查询留言列表
*/
IPage<MemLeaveMessage> queryMessageByPagination(CyPageInfo<MemLeaveMessage> paginationUtility, MemLeaveMessage memLeaveMessage);
}
......@@ -144,4 +144,16 @@ public class MemLeaveMessageServiceImpl extends ServiceImpl<MemLeaveMessageRepos
userLeaveMessageIPage.getRecords().sort(Comparator.comparing(MemLeaveMessage::getCreateDate));
return userLeaveMessageIPage;
}
/**
* 分页查询留言列表
*
* @param paginationUtility
* @param memLeaveMessage
*/
@Override
public IPage<MemLeaveMessage> queryMessageByPagination(CyPageInfo<MemLeaveMessage> paginationUtility, MemLeaveMessage memLeaveMessage) {
IPage<MemLeaveMessage> userLeaveMessageIPage = memLeaveMessageRepository.queryMessageByPagination(paginationUtility, memLeaveMessage);
return userLeaveMessageIPage;
}
}
......@@ -178,6 +178,12 @@ public class OpmArticle extends CyIdIncreEntity<OpmArticle> {
@TableField(exist = false)
private String memberId;
/**
* 微信号
*/
@TableField(exist = false)
private String memWxCode;
/**
* 当前登录人ID
*/
......
......@@ -47,11 +47,14 @@
</select>
<select id="queryMemGoldCoinFlowsPaged" resultMap="BaseResultMap">
select * from mem_gold_coin_flow
select mgcf.*,
su.nick_name as userNickName
from mem_gold_coin_flow mgcf
left join sys_user su on su.business_id = mgcf.target_id
where 1=1
and del_flag = '0'
and mgcf.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag}
and mgcf.flag = #{entity.flag}
</if>
<if test="entity.type !=null and entity.type != '' ">
and type = #{entity.type}
......@@ -71,7 +74,10 @@
<if test="entity.targetId !=null and entity.targetId != '' ">
and target_id = #{entity.targetId}
</if>
ORDER BY business_id DESC
<if test="entity.userNickName !=null and entity.userNickName != '' ">
and su.nick_name like concat('%',#{entity.userNickName},'%')
</if>
ORDER BY mgcf.business_id DESC
</select>
<select id="balance" resultType="java.lang.Integer">
select mi.gold_coins_count
......
......@@ -66,5 +66,25 @@
(mut.create_by = #{userId} and mut.target_id = #{targetId})
OR (mut.create_by = #{targetId} and mut.target_id = #{userId})
</select>
<select id="queryMessageByPagination" resultType="org.rcisoft.business.memLeaveMessage.entity.MemLeaveMessage">
select
oulm.business_id,
oulm.content,
oulm.create_date,
mi.avatar,
mi.mem_nick_name as createName,
mo.mem_nick_name as memNickName
from mem_user_leave_message oulm
LEFT JOIN mem_info mi ON mi.user_id = oulm.create_by
LEFT JOIN mem_info mo ON mo.user_id = oulm.target_id
where 1=1
<if test="entity.createName !=null and entity.createName != '' ">
and mi.mem_nick_name like concat('%',#{entity.createName},'%')
</if>
<if test="entity.memNickName !=null and entity.memNickName != '' ">
and mo.mem_nick_name like concat('%',#{entity.memNickName},'%')
</if>
ORDER BY oulm.create_date desc
</select>
</mapper>
......@@ -118,6 +118,7 @@
mi.mem_residence_city,
mi.mem_max_education,
mi.mem_career,
mi.mem_wx_code,
mi.business_id AS memberId,
mi.avatar AS avatarId,
CASE
......
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