异常
org.apache.ibatis.binding.BindingException: Parameter 'userId' not found
原因:
mapper 文件userId映射异常,增加 @Param 即可,修改如下,SysAnnouncementMapper.java
解决
package org.jeecg.modules.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.system.entity.SysAnnouncement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
/**
* @Description: 系统通告表
* @Author: jeecg-boot
* @Date: 2019-01-02
* @Version: V1.0
*/
public interface SysAnnouncementMapper extends BaseMapper<SysAnnouncement> {
List<SysAnnouncement> querySysCementListByUserId(Page<SysAnnouncement> page, @Param("userId")String userId, @Param("msgCategory")String msgCategory);
}