This article shares with you how to query the start time and end time range in Vue for your reference. The specific content is as follows Effect picture:Code implementation:OrderList.Vue <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="Order Date"> <a-range-picker size="large" format="YYYY-MM-DD" @change="onDateChange" /> </a-form-item> </a-col> methods: { onDateChange(date, dateString) { console.log(dateString[0]) console.log(dateString[1]) this.beginDate = dateString[0] this.finishDate = dateString[1] } } OrderConntroller.java /** * Paginated list query * * @param order * @param pageNo * @param pageSize * @param req * @return */ @AutoLog(value = "Order-page list query") @ApiOperation(value = "Order-paged list query", notes = "Order-paged list query") @GetMapping(value = "/list") public Result<?> queryPageList(Order order, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { QueryWrapper<Order> queryWrapper = QueryGenerator.initQueryWrapper(order, req.getParameterMap()); if(req.getParameterMap().get("beginDate") != null){ String beginDate = req.getParameterMap().get("beginDate")[0]; String finishDate = req.getParameterMap().get("finishDate")[0]; if (!StringUtils.isEmpty(beginDate) || StringUtils.isEmpty(finishDate)) { DateTime beginOfDay = DateUtil.beginOfDay(DateUtil.parse(beginDate)); DateTime endOfDay = DateUtil.endOfDay(DateUtil.parse(finishDate)); queryWrapper.ge("create_time", beginOfDay).le("create_time", endOfDay); } } LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); Set<String> roles = sysUserService.getUserRolesSet(sysUser.getUsername()); if(!roles.contains("admin")){ queryWrapper.eq("user_name",sysUser.getUsername()); } Page<Order> page = new Page<Order>(pageNo, pageSize); IPage<Order> pageList = orderService.page(page, queryWrapper); return Result.ok(pageList); } The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: MySQL case when usage example analysis
>>: MySQL scheduled database backup operation example
Pull the image root@EricZhou-MateBookProX: docker...
To do a paginated query: 1. For MySQL, it is not ...
Table of contents Preface Bubble Sort Basic Algor...
Table of contents Overall Effect Listen for conta...
Table of contents 1. Understanding Databases 1.1 ...
Many tables in MySQL contain columns that can be ...
This tutorial explains how to verify the IP addre...
Table of contents Some basic configuration About ...
Table of contents 1. Demand 2. Effect 3. All code...
The first method: dynamically add a class to show...
First time writing. Allow me to introduce myself....
Preface According to the scope of locking, locks ...
Table of contents 1.1. Network access between con...
1. Installation version details Server: MariaDB S...
1. Development environment vue+vant 2. Computer s...