This commit is contained in:
GYJ
2025-01-02 19:49:10 +08:00
parent f5626621f0
commit 96aebfdd8b
14 changed files with 269 additions and 258 deletions

View File

@@ -2,6 +2,8 @@ package com.sqx.modules.urlAddress.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sqx.common.utils.DateUtils;
import com.sqx.common.utils.PageUtils;
import com.sqx.common.utils.Result;
@@ -15,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
@RestController
@Api(value = "域名池", tags = {"域名池"})
@@ -49,9 +52,11 @@ public class UrlAddressController extends AbstractController {
@GetMapping("/selectUrlAddressList")
@ApiOperation("查询域名池列表")
public Result selectUrlAddressList(Integer page,Integer limit,String urlAddress,Integer status){
return Result.success().put("data",new PageUtils(urlAddressService.page(new Page<>(page,limit),
new QueryWrapper<UrlAddress>().like(StringUtils.isNotEmpty(urlAddress),"url_address",urlAddress)
.eq(status!=null && status!=0,"status",status))));
PageHelper.startPage(page,limit);
List<UrlAddress> list = urlAddressService.list(new QueryWrapper<UrlAddress>().like(StringUtils.isNotEmpty(urlAddress), "url_address", urlAddress)
.eq(status != null && status != 0, "status", status));
PageInfo<UrlAddress> pageInfo = new PageInfo<>(list);
return Result.success().put("data", PageUtils.page(pageInfo));
}
@GetMapping("/selectUrlAddress")