Crunchy
2024-04-23 c221163b3d14e5e22c9042fb000253b6e5f5fd49
2024-4-23 消息通知后端开发
已修改3个文件
10 ■■■■■ 文件已修改
framework/src/main/java/com/yuanchu/mom/mapper/InformationNotificationMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/com/yuanchu/mom/service/impl/InformationNotificationServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/resources/mapper/InformationNotificationMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/com/yuanchu/mom/mapper/InformationNotificationMapper.java
@@ -18,5 +18,5 @@
 */
public interface InformationNotificationMapper extends BaseMapper<InformationNotification> {
    IPage<InformationNotificationDto> getPage(Page page, String messageType);
    IPage<InformationNotificationDto> getPage(Page page, String messageType, Integer userId);
}
framework/src/main/java/com/yuanchu/mom/service/impl/InformationNotificationServiceImpl.java
@@ -31,7 +31,8 @@
    @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
framework/src/main/resources/mapper/InformationNotificationMapper.xml
@@ -3,12 +3,13 @@
<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>