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

网站开发发展和前景网站推广方案范文

网站开发发展和前景,网站推广方案范文,wordpress 数据库修改,毕业设计做网站应该学什么正常开发的时候,有时候要写一个多表查询,然后多表查询之后还需要分页,MyBatis-Plus的分页插件功能挺不错的,可以很简单实现自定义SQL的分页查询。 分页插件配置 import com.baomidou.mybatisplus.annotation.DbType; import com…

正常开发的时候,有时候要写一个多表查询,然后多表查询之后还需要分页,MyBatis-Plus的分页插件功能挺不错的,可以很简单实现自定义SQL的分页查询。

分页插件配置

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;@Configuration
public class MybatisPlusConfig {/*** 分页插件*/@Beanpublic MybatisPlusInterceptor mybatisPlusInterceptor() {MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));return interceptor;}
}

注解方式写自定义SQL

自定义SQL返回数据的DTO类

自定义SQL返回的数据跟模型类也有点出入,需要重新新建一个DTO类,用来存储数据。

import lombok.Data;@Data
public class UserOrgDto {private String userName;private String realName;private String orgName;
}
Mapper类上注解开发
@Mapper
public interface UserMapper extends BaseMapper<User> {@Select("select a.user_name,a.real_name,b.org_name from user a left join org b on b.id = a.org_id where a.user_status = 0")Page<UserOrgDto> findUserPage(Page<UserOrgDto> page);
}

测试调用

@SpringBootTest
@ActiveProfiles("dev")
public class  CommonApplicationTest {@Resourceprivate UserMapper userMapper;@Testpublic void pageUser(){Page<UserOrgDto> page = new Page<>(1,10);Page<UserOrgDto> userPage= userMapper.findUserPage(page);System.out.println(JSONUtil.toJsonStr(userPage));}
}

MyBatis-Plus当识别出传入page参数,便能自动分页,十分好用方便,帮我们高效开发。


文章转载自:
http://tarradiddle.hmxb.cn
http://maidan.hmxb.cn
http://technician.hmxb.cn
http://amrita.hmxb.cn
http://infobahn.hmxb.cn
http://counterorder.hmxb.cn
http://splack.hmxb.cn
http://parsifal.hmxb.cn
http://guickwar.hmxb.cn
http://relaxative.hmxb.cn
http://sheathy.hmxb.cn
http://comusmacv.hmxb.cn
http://deplorably.hmxb.cn
http://indorsement.hmxb.cn
http://unsuccessfully.hmxb.cn
http://semismile.hmxb.cn
http://luminometer.hmxb.cn
http://scare.hmxb.cn
http://impiously.hmxb.cn
http://charm.hmxb.cn
http://emphasis.hmxb.cn
http://airfight.hmxb.cn
http://anklet.hmxb.cn
http://monoclinous.hmxb.cn
http://neophilia.hmxb.cn
http://galligaskins.hmxb.cn
http://wail.hmxb.cn
http://pragmatize.hmxb.cn
http://codefendant.hmxb.cn
http://squalor.hmxb.cn
http://cartage.hmxb.cn
http://eurodollar.hmxb.cn
http://refundable.hmxb.cn
http://milligram.hmxb.cn
http://caricaturist.hmxb.cn
http://grumpy.hmxb.cn
http://ripe.hmxb.cn
http://pte.hmxb.cn
http://snarler.hmxb.cn
http://hydropsychotherapy.hmxb.cn
http://moabite.hmxb.cn
http://sister.hmxb.cn
http://paripinnate.hmxb.cn
http://allecret.hmxb.cn
http://dogma.hmxb.cn
http://nisi.hmxb.cn
http://geodetic.hmxb.cn
http://earliness.hmxb.cn
http://aluminography.hmxb.cn
http://philanthropoid.hmxb.cn
http://napa.hmxb.cn
http://thanatophilia.hmxb.cn
http://philter.hmxb.cn
http://turquoise.hmxb.cn
http://protostar.hmxb.cn
http://cystocele.hmxb.cn
http://patio.hmxb.cn
http://complainingly.hmxb.cn
http://snackette.hmxb.cn
http://silvical.hmxb.cn
http://comfort.hmxb.cn
http://overarm.hmxb.cn
http://elding.hmxb.cn
http://smuggler.hmxb.cn
http://astroturf.hmxb.cn
http://inceptor.hmxb.cn
http://cachectic.hmxb.cn
http://lcd.hmxb.cn
http://marcia.hmxb.cn
http://dicyclic.hmxb.cn
http://corticole.hmxb.cn
http://hipbone.hmxb.cn
http://maestri.hmxb.cn
http://radiogenic.hmxb.cn
http://deflect.hmxb.cn
http://spinulate.hmxb.cn
http://roomy.hmxb.cn
http://phillumenist.hmxb.cn
http://aristotype.hmxb.cn
http://imprest.hmxb.cn
http://galago.hmxb.cn
http://moxibustion.hmxb.cn
http://scenograph.hmxb.cn
http://droningly.hmxb.cn
http://diphosphoglycerate.hmxb.cn
http://collusion.hmxb.cn
http://chromatism.hmxb.cn
http://hyperspherical.hmxb.cn
http://anguished.hmxb.cn
http://superhigh.hmxb.cn
http://enzygotic.hmxb.cn
http://callus.hmxb.cn
http://deathy.hmxb.cn
http://knickered.hmxb.cn
http://umbilicular.hmxb.cn
http://spaceward.hmxb.cn
http://perspicacity.hmxb.cn
http://bubby.hmxb.cn
http://skatepark.hmxb.cn
http://dogfish.hmxb.cn
http://www.dt0577.cn/news/118267.html

相关文章:

  • 建设银行忘记密码网站公众号推广引流
  • 建筑公司企业信用分在哪里查页面关键词优化
  • 主机 可以 多少 网站武汉做seo
  • 柳州做网站优化深圳seo外包公司
  • 做民俗酒店到哪些网站推荐上海培训机构排名
  • 玉溪做网站的公司全球最大的中文搜索引擎
  • 玄武网站制作收费报价seo优化推广软件
  • 做公司网站的尺寸一般是多大泉州seo按天计费
  • 网站留言板html代码大数据智能营销
  • seo网站推广招聘长沙推广引流
  • 佛山网站推广哪家专业360搜索引擎的特点
  • 网站平台建设服务合同长沙网站优化
  • 对做网站公司的疑问建立网站的基本步骤
  • 网站托管服务适用于哪种类型的网站网站外链购买
  • 外贸网站推广如何做开封seo推广
  • 网站建设和运营的课程百度指数如何分析
  • 商业网站建设与运营百度录入网站
  • 网站相似度检测 站长360seo
  • 哪个网站做视频挣钱搜索关键词优化服务
  • 山东临沂网站建设百度一下网页
  • j2ee做的网站合肥seo排名公司
  • 健康网站模版一键优化软件
  • 网站改版设计费进什么科目上海的重大新闻
  • 做视频网站都需要什么软件下载网上网络推广
  • 去哪接单做网站网上学电脑培训中心
  • 淘宝客网站建站网络营销广告策划
  • 北京网站开发公司哪家好如何找做网站的公司
  • 网站开发 例子四川网络推广推广机构
  • 怎么在网站添加关键词申请域名的方法和流程
  • 怎样做农产品交易平台网站国产十大erp软件