Commit bb470b69 authored by liwei's avatar liwei

完善了留言功能

parent 30e590b6
...@@ -374,4 +374,16 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> { ...@@ -374,4 +374,16 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> {
return getGridModelResponse(); return getGridModelResponse();
} }
/**
* 查询留言列表详情 1对1的
*/
@CyOpeLogAnno(title = "system-会员表管理-查询留言表", businessType = CyLogTypeEnum.QUERY)
@Operation(summary="分页查询留言列表", description="分页查询留言列表")
@GetMapping(value = "/memInfo/leaveMessageDetailList")
// @CyEncryptSm4Anno
public CyGridModel leaveMessageDetailList(UserLeaveMessageDTO dto) {
IPage<MemInfo> userLeaveMessage = memInfoServiceImpl.leaveMessageDetailByPagination(getPaginationUtility(), dto);
return getGridModelResponse();
}
} }
...@@ -172,5 +172,10 @@ public interface MemInfoRepository extends CyBaseMapper<MemInfo> { ...@@ -172,5 +172,10 @@ public interface MemInfoRepository extends CyBaseMapper<MemInfo> {
* 分页查询留言 * 分页查询留言
*/ */
IPage<MemInfo> leaveMessageByPagination(CyPageInfo cyPageInfo,@Param("entity") UserLeaveMessageDTO dto); IPage<MemInfo> leaveMessageByPagination(CyPageInfo cyPageInfo,@Param("entity") UserLeaveMessageDTO dto);
/**
* 查询留言详情列表
*/
IPage<MemInfo> leaveMessageDetailList(CyPageInfo cyPageInfo,@Param("entity") UserLeaveMessageDTO dto);
} }
...@@ -112,4 +112,9 @@ public interface MemInfoService { ...@@ -112,4 +112,9 @@ public interface MemInfoService {
* 分页查询留言列表 * 分页查询留言列表
*/ */
IPage<MemInfo> leaveMessageByPagination(CyPageInfo<MemInfo> paginationUtility, UserLeaveMessageDTO dto); IPage<MemInfo> leaveMessageByPagination(CyPageInfo<MemInfo> paginationUtility, UserLeaveMessageDTO dto);
/**
* 查询留言列表详情 1对1的
*/
IPage<MemInfo> leaveMessageDetailByPagination(CyPageInfo<MemInfo> paginationUtility, UserLeaveMessageDTO dto);
} }
...@@ -702,4 +702,16 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo> ...@@ -702,4 +702,16 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
IPage<MemInfo> userLeaveMessageIPage = memInfoRepository.leaveMessageByPagination(paginationUtility, dto); IPage<MemInfo> userLeaveMessageIPage = memInfoRepository.leaveMessageByPagination(paginationUtility, dto);
return userLeaveMessageIPage; return userLeaveMessageIPage;
} }
/**
* 查询留言列表详情 1对1的
* @param paginationUtility
* @param dto
*/
@Override
public IPage<MemInfo> leaveMessageDetailByPagination(CyPageInfo<MemInfo> paginationUtility, UserLeaveMessageDTO dto) {
dto.setUserId(Integer.valueOf(CyUserUtil.getAuthenBusinessId()));
IPage<MemInfo> userLeaveMessageIPage = memInfoRepository.leaveMessageDetailList(paginationUtility, dto);
return userLeaveMessageIPage;
}
} }
...@@ -626,13 +626,31 @@ ...@@ -626,13 +626,31 @@
mi.avatar, mi.avatar,
mi.mem_nick_name mi.mem_nick_name
FROM opm_user_leave_message oulm FROM opm_user_leave_message oulm
LEFT JOIN mem_info mi ON mi.user_id = oulm.create_by LEFT JOIN mem_info mi ON mi.user_id = oulm.target_id
WHERE oulm.create_by = #{entity.userId} WHERE oulm.create_by = #{entity.userId}
AND oulm.create_date = ( AND oulm.create_date = (
SELECT MAX(oulm2.create_date) SELECT MAX(oulm2.create_date)
FROM opm_user_leave_message oulm2 FROM opm_user_leave_message oulm2
WHERE oulm2.target_id = oulm.target_id WHERE oulm2.target_id = oulm.target_id
AND oulm2.create_by = #{entity.userId} AND oulm2.create_by = #{entity.userId}
) )
order by oulm.create_date desc
</select>
<select id="leaveMessageDetailList" resultType="org.rcisoft.business.memInfo.entity.MemInfo">
select
oulm.business_id,
oulm.content as leaveMessageContent,
oulm.del_status,
oulm.create_date,
oulm.create_by as userId,
oulm.target_id,
mi.avatar,
mi.mem_nick_name
from opm_user_leave_message oulm
LEFT JOIN mem_info mi ON mi.user_id = oulm.create_by
WHERE
(oulm.create_by = #{entity.userId} and oulm.target_id = #{entity.targetId})
OR (oulm.create_by = #{entity.targetId} and oulm.target_id = #{entity.userId})
ORDER BY create_date asc
</select> </select>
</mapper> </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