当前位置: 首页 > news >正文

匿名聊天网站怎么做ordown wordpress

匿名聊天网站怎么做,ordown wordpress,百度小程序seo,网站怎么做限时抢购在垃圾项目中一般都是使用mybatis plus自动返回Page,但是涉及到多表联合或者等等情况最终还是要使用mybatis进行手写sql查询,所以有此文章以便后续使用查询. 首先mysql需要支持多条查询语句,在mysql配置url后加上: allowMultiQueriestrueuseAffectedRowstrue Mapper…在垃圾项目中一般都是使用mybatis plus自动返回Page,但是涉及到多表联合或者等等情况最终还是要使用mybatis进行手写sql查询,所以有此文章以便后续使用查询. 首先mysql需要支持多条查询语句,在mysql配置url后加上: allowMultiQueriestrueuseAffectedRowstrue Mapper查询数据的返回值用Object接收 ListObject getWarningDataFromPage(Nullable Param(userId) Long userId,Nullable Param(orderNum) String orderNum,Nullable Param(deviceId) String deviceId,Param(pageSize) long pageSize,Param(pageNo) long pageNo); mapper xml语句 !--需查询数据map-- resultMap idBaseResultMap typecom.jingli.modules.sys.warning.domain.Warningid propertyid columnid jdbcTypeINTEGER/result propertywarningId columnwarning_id jdbcTypeVARCHAR/result propertywarningType columnwarning_type jdbcTypeINTEGER/result propertywarningDesc columnwarning_desc jdbcTypeVARCHAR/result propertywarningContent columnwarning_content jdbcTypeVARCHAR/result propertywarningTime columnwarning_time jdbcTypeTIMESTAMP/result propertyoperatorId columnoperator_id jdbcTypeINTEGER/result propertydeviceId columndevice_id jdbcTypeVARCHAR/result propertyport columnport jdbcTypeVARCHAR/result propertyorderNumber columnorder_number jdbcTypeVARCHAR/result propertystatus columnstatus jdbcTypeINTEGER/result propertyremark columnremark jdbcTypeVARCHAR//resultMap!--total数据--resultMap typejava.lang.Integer idcountresult columntotal//resultMap!--进行多次查询获取到对应数据-- select idgetWarningDataFromPage resultMapBaseResultMap,countSELECT SQL_CALC_FOUND_ROWScw.id, cw.warning_id, cw.warning_type, cw.warning_desc, cw.warning_content, cw.warning_time, cw.operator_id,cw.device_id, cw.port, cw.order_number, cw.status, cw.remarkFROMc_warning AS cwLEFT JOIN c_charging_pile AS ccp ON cw.device_id ccp.IDWHERE 1 1if testnull ! userIdAND ccp.userId #{userId}/ifif testnull ! orderNum and orderNum !AND cw.order_number #{orderNum}/ifif testnull ! deviceId and deviceId !AND cw.device_id #{deviceId}/iflimit #{pageNo},#{pageSize};###用于获取totalSELECT FOUND_ROWS() as total;/select从ListObject中取出数据 Overridepublic PageWarning getWarningPage(Nullable Long userId, Nonnull Long pageSize, Nonnull Long pageNo, Nullable String deviceId, Nullable String orderNum) {Long selectNum (pageNo - 1) * pageSize;ListObject dtoData warningMapper.getWarningDataFromPage(userId, orderNum, deviceId, pageSize, selectNum);ListWarning warningList (ListWarning) dtoData.get(0);Integer total ((ListInteger) dtoData.get(1)).get(0);PageWarning warningPage new Page(pageNo, pageSize);warningPage.setRecords(warningList);warningPage.setTotal(total);warningPage.setSearchCount(true);warningPage.setCurrent(pageNo);warningPage.setSize(pageSize);return warningPage;} 至此可实现mybatis plus的Page查询mysql中执行查询total并不会再次查询而是获取到对应的分页查询到数据的结果.
http://www.hkea.cn/news/14316091/

相关文章:

  • html做的宠物网站南召网站建设
  • 自适应网站怎么做wordpress主题手机版不显示侧边栏
  • 做土特产网站什么名字最好市网站建设公司
  • 网站建设是前端吗wordpress4.95
  • 北京赵公口网站建设苏州网站制作开发公司
  • 网站开发小图标WordPress怎么文章连号
  • 怎样用别人的网站做修改病句用html制作购物网站
  • 张家港外贸型网站建设灰色关键词快速排名
  • 北京公司的网站建设房子装修改造
  • c 创建一个网站怎么做wordpress不同尺寸图片大小
  • 公司建网站哪家柯城建设局网站
  • 一台网站服务器多少钱服务专业制作网页
  • 百度小程序还需要做网站吗wordpress5.0.2图集怎么发布
  • 网站上那些兼职网页怎么做的网站提交至google
  • 建设商务网站的理由中山市做网站的公司
  • 网站建设公司浩森宇特移动网站建设是什么
  • 知乎企业网站建设网站建设企
  • 杭州滨江的网站建设公司网站建设引入谷歌地图
  • 网站建设教学工作总结6uehtml wordpress
  • 网站建设经费保障如何申请百度竞价排名
  • 网站建设可行性研究唐山网站建设那家性价比高
  • 江西宗杰建设工程有限公司网站网站怎么备案啊
  • app网站开发著名的网络营销案例
  • 西安建设网站的公司哪家好凡科送审平台学生不能登录
  • 美食网站模板下载做导航网站用什么建站程序
  • 怎样建设与维护自己的平台网站dw php网站建设视频教程
  • 网站 猜你喜欢 怎么做哪个做网站公司
  • 微网站的搭建流程网站建设常用的6大布局加代码
  • 滨州网站开发公司怎么建一个网站卖东西
  • 网站开发费属于什么费用二次元博客源码wordpress