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
When you browse many websites, you will find that ...
This article shares the specific code of JS to ac...
Table of contents 1. The role of nginx process lo...
MySQL database crashes after entering password an...
Copy code The code is as follows: <style type=...
Today, when I was practicing with the Baidu page,...
This article example shares the specific code of ...
Count(*) or Count(1) or Count([column]) are perha...
Just pass in custom parameters HTML <div id=&q...
Reflections on the two viewpoints of “people-orie...
There are many tags and elements in the HTML head ...
When associating two tables, a foreign key could ...
JSON is a lightweight data exchange format that u...
In an article a long time ago, I talked about the...
Table of contents 1. Preparation: 2. Source code ...