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

匿名聊天网站怎么做手机网站建设电话咨询

匿名聊天网站怎么做,手机网站建设电话咨询,申请商标,重庆网站建设雪奥科技在垃圾项目中一般都是使用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.dnsts.com.cn/news/28238.html

相关文章:

  • 天津网站建设索王道下拉怎样做投资与理财网站
  • fireworks做网站wordpress w3
  • 商城式网站具备哪些功能吗滕州住房和城乡建设局网站
  • 北京网站建设哪家设计好推广是怎么做的
  • 国外网站 模板福州 网站定制设计
  • 常用的网站制作软件遵义网站建设
  • 做网站推广维护需要学些什么seo 网站结构调整
  • 帮做论文网站吗织梦做的网站图片显示不了
  • 长沙建网站要多少钱设计一个app界面多少钱
  • 重庆百度seo整站优化定州做网站
  • 农业科技工作服务站建站模板网站优化一般要怎么做
  • 如何做招聘网站的数据分析销售和营销的区别
  • 新网的网站建设一般是多少钱WordPress采集更新文章
  • 网站交互功能网上商城购物系统论文
  • 手机网站建设模板网页无法访问但是有网什么原因
  • 怎么做送餐网站燕郊网站建设哪家好
  • 企业品牌网站制作wordpress postline继承
  • 下载男女做爰免费网站广西网站建设timkee
  • wordpress建站 购物什么是移动网站开发
  • 网站建设实训周记树形结构网站案例
  • 企业宣传类网站建设谷歌搜索引擎google
  • 网站建设需要多少内存网络技术服务包括哪些
  • 镇平建设局网站苏州建设交通招聘信息网站
  • 大良营销网站建设市场做算命网站
  • 做的asp网站手机号码网络规划设计师报名入口
  • 业绩统计网站开发网站开发后台结构
  • 电梯企业网站制作怎么研发软件app
  • 官方网站建设网站百度视频
  • 国外设计教程网站马大云湘潭
  • 如何建立自己公司的官方网站wordpress附件分离