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

网站营销队伍关键词分析工具有哪些

网站营销队伍,关键词分析工具有哪些,.net网站开发实训报告,备案域名是什么意思在垃圾项目中一般都是使用mybatis plus自动返回Page,但是涉及到多表联合或者等等情况最终还是要使用mybatis进行手写sql查询,所以有此文章以便后续使用查询. 首先mysql需要支持多条查询语句,在mysql配置url后加上: &allowMultiQueriestrue&useAffectedRowstrue Mapper…

在垃圾项目中一般都是使用mybatis plus自动返回Page,但是涉及到多表联合或者等等情况最终还是要使用mybatis进行手写sql查询,所以有此文章以便后续使用查询.

首先mysql需要支持多条查询语句,在mysql配置url后加上:

&allowMultiQueries=true&useAffectedRows=true

Mapper查询数据的返回值用Object接收

 List<Object> 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 id="BaseResultMap" type="com.jingli.modules.sys.warning.domain.Warning"><id property="id" column="id" jdbcType="INTEGER"/><result property="warningId" column="warning_id" jdbcType="VARCHAR"/><result property="warningType" column="warning_type" jdbcType="INTEGER"/><result property="warningDesc" column="warning_desc" jdbcType="VARCHAR"/><result property="warningContent" column="warning_content" jdbcType="VARCHAR"/><result property="warningTime" column="warning_time" jdbcType="TIMESTAMP"/><result property="operatorId" column="operator_id" jdbcType="INTEGER"/><result property="deviceId" column="device_id" jdbcType="VARCHAR"/><result property="port" column="port" jdbcType="VARCHAR"/><result property="orderNumber" column="order_number" jdbcType="VARCHAR"/><result property="status" column="status" jdbcType="INTEGER"/><result property="remark" column="remark" jdbcType="VARCHAR"/></resultMap><!--total数据--><resultMap type="java.lang.Integer" id="count"><result column="total"/></resultMap><!--进行多次查询获取到对应数据-->
<select id="getWarningDataFromPage" resultMap="BaseResultMap,count">SELECT 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.remarkFROM`c_warning` AS `cw`LEFT JOIN `c_charging_pile` AS `ccp` ON cw.device_id = ccp.IDWHERE 1 = 1<if test="null != userId">AND ccp.userId = #{userId}</if><if test="null != orderNum and orderNum !=''">AND cw.order_number = #{orderNum}</if><if test="null != deviceId and deviceId !=''">AND cw.device_id = #{deviceId}</if>limit #{pageNo},#{pageSize};###用于获取totalSELECT FOUND_ROWS() as total;</select>

从List<Object>中取出数据:

 @Overridepublic Page<Warning> getWarningPage(@Nullable Long userId, @Nonnull Long pageSize, @Nonnull Long pageNo, @Nullable String deviceId, @Nullable String orderNum) {Long selectNum = (pageNo - 1) * pageSize;List<Object> dtoData = warningMapper.getWarningDataFromPage(userId, orderNum, deviceId, pageSize, selectNum);List<Warning> warningList = (List<Warning>) dtoData.get(0);Integer total =((List<Integer>) dtoData.get(1)).get(0);Page<Warning> 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/605955/

相关文章:

  • 中国建设承包商网站创建软件平台该怎么做
  • 中小企业网站建设费用海外推广服务
  • 企业名称的英文做网站名seo是怎么优化推广的
  • 手机在线建站西安seo服务公司
  • 网站开发有前途吗我也要投放广告
  • 备案 网站名称怎么写crm软件
  • 扁平式网站模板b2b网站推广优化
  • 做外贸网站网络营销咨询服务
  • 江门网站建设方案报价淘宝seo优化怎么做
  • 盘龙城做网站推广网站推广
  • 如何做电子书网站域名站长工具
  • 物联网平台有哪些排名优化外包公司
  • 秦皇岛汽车网站制作数字营销工具
  • 培训教育的网站怎么做东莞做网站的联系电话
  • 云南做网站的公司外贸谷歌优化
  • 网页设计学徒培训可试学巢湖seo推广
  • 让顾客心动的句子seo模拟点击软件源码
  • 设计类专业包括哪些kj6699的seo综合查询
  • 手机网站制作哪家好查关键词
  • 米拓企业网站管理系统电商培训机构排名前十
  • 做效果图有哪些网站seo点击排名
  • 网络营销推广网站收录seo推广排名平台有哪些
  • 产品经理如何看待网站开发广州软件系统开发seo推广
  • wordpress 忘记管理员如何做网站seo
  • app和网站哪个有优势淘宝关键词排名
  • wordpress该域名宁波网站seo公司
  • 建购物网站怎么建呀简单的网站建设
  • 江苏省建设教育协会网站首页百度知道合伙人答题兼职入口
  • 做优化的网站平台搭建
  • 做网站需要多久网络推广是什么专业