视频圈
This commit is contained in:
parent
1b97280283
commit
b28fd0fbbb
|
@ -34,14 +34,11 @@ public class AppShipinquanController {
|
|||
@GetMapping("/list")
|
||||
@ApiOperation("获取视频数据列表")
|
||||
public Result list(BlShipinquan entity, Integer page, Integer limit){
|
||||
QueryWrapper<BlShipinquan> qw = new QueryWrapper<>();
|
||||
qw.orderByDesc("create_time");
|
||||
if(page==null){
|
||||
page=1;
|
||||
limit=10;
|
||||
}
|
||||
IPage<BlShipinquan> pageList = service.page(new Page<>(page,limit),qw);
|
||||
return Result.success().put("data",pageList);
|
||||
return service.findPage(page,limit,entity);
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
package com.sqx.modules.shipinquan.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sqx.modules.bl.order.entity.UserPackage;
|
||||
import com.sqx.modules.shipinquan.entity.BlShipinquan;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@Mapper
|
||||
public interface BlShipinquanDao extends BaseMapper<BlShipinquan> {
|
||||
|
||||
IPage<BlShipinquan> findPage(Page<BlShipinquan> page, @Param("params") BlShipinquan entity);
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
package com.sqx.modules.shipinquan.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.shipinquan.entity.BlShipinquan;
|
||||
|
||||
public interface BlShipinquanService extends IService<BlShipinquan> {
|
||||
|
||||
Result findPage(Integer page, Integer limit, BlShipinquan entity);
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
package com.sqx.modules.shipinquan.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sqx.common.utils.PageUtils;
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.shipinquan.dao.BlShipinquanDao;
|
||||
import com.sqx.modules.shipinquan.entity.BlShipinquan;
|
||||
import com.sqx.modules.shipinquan.service.BlShipinquanService;
|
||||
|
@ -8,5 +11,9 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
@Service
|
||||
public class BlShipinquanServiceImpl extends ServiceImpl<BlShipinquanDao, BlShipinquan> implements BlShipinquanService {
|
||||
|
||||
@Override
|
||||
public Result findPage(Integer page, Integer limit, BlShipinquan entity){
|
||||
Page<BlShipinquan> pages=new Page<>(page,limit);
|
||||
return Result.success().put("data",new PageUtils(baseMapper.findPage(pages,entity)));
|
||||
}
|
||||
}
|
|
@ -20,5 +20,10 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="findPage" resultType="com.sqx.modules.shipinquan.entity.BlShipinquan">
|
||||
select *
|
||||
from bl_shipinquan
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue