1、查询一个实体类的单条记录操作
impl实体类里:this.getOne()
OrderEntity entity = this.getOne(new QueryWrapper<OrderEntity>().eq("order_sn", orderSn));
2、通过id,查询一个实体类的单条记录操作
impl实体类里:this.getById()
OrderEntity entity = this.getById(orderEntity.getId());
3、通过某一个值查询多条记录
XXservice.list();
List<OrderItemEntity> order_sn = orderItemService.list(new QueryWrapper<OrderItemEntity>().eq("order_sn", orderSn));
4、查出来的数据分页
this.page()
IPage<OrderEntity> page = this.page( new Query<OrderEntity>().getPage(params), new QueryWrapper<OrderEntity>().eq("member_id",memberRespVo.getId()).orderByDesc("id") );
5、报存一个实体类
XXXservice.save();
paymentInfoService.save(infoEntity);
6、自定义SQL语句
this.baseMapper.方法()
this.baseMapper.updateOrderStatus(outTradeNo,OrderStatusEnum.PAYED.getCode());