| | |
| | | */ |
| | | public interface InformationNotificationMapper extends BaseMapper<InformationNotification> { |
| | | |
| | | IPage<InformationNotificationDto> getPage(Page page, String messageType); |
| | | IPage<InformationNotificationDto> getPage(Page page, String messageType, Integer userId); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public IPage<InformationNotificationDto> getPage(Page page, String messageType) { |
| | | return baseMapper.getPage(page, messageType); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | return baseMapper.getPage(page, messageType, map1.get("userId")); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <mapper namespace="com.yuanchu.mom.mapper.InformationNotificationMapper"> |
| | | |
| | | <select id="getPage" resultType="com.yuanchu.mom.pojo.InformationNotificationDto"> |
| | | select i.*, u.name senderUser, u2.name consigneeUserr |
| | | select i.*, u.name senderUser, u2.name consigneeUser |
| | | from information_notification i |
| | | left join user u on i.sender_id = u.id |
| | | left join user u2 on u2.id = i.consignee_id |
| | | where i.consignee_id = #{userId} |
| | | <if test="messageType != '' and messageType != null"> |
| | | where i.message_type = #{messageType} |
| | | and i.message_type = #{messageType} |
| | | </if> |
| | | </select> |
| | | </mapper> |