public R page(@RequestParam Map<String, Object> params, ZaixianzixunEntity zaixianzixun, HttpServletRequest request){ //获取当前操作的表名 String tableName = request.getSession().getAttribute("tableName").toString(); //如果是医生表,则将医生账号添加到在线咨询实体中 if(tableName.equals("yisheng")) { zaixianzixun.setYishengzhanghao((String)request.getSession().getAttribute("username")); } //如果是用户表,则将用户账号添加到在线咨询实体中 if(tableName.equals("yonghu")) { zaixianzixun.setZhanghao((String)request.getSession().getAttribute("username")); } //构造查询条件 EntityWrapper ew = new EntityWrapper(); //查询分页数据 PageUtils page = zaixianzixunService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zaixianzixun), params), params));

//返回结果
return R.ok().put("data", page);

原文地址: https://www.cveoy.top/t/topic/eFz4 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录