Commit ae272a03 by 邓实川 Committed by chenzg

优化接口查询购买记录

parent 86fdf3e2
......@@ -181,9 +181,9 @@ public class QyzxBusinessController {
@RequestParam(required = false) String query, @RequestParam(required = false) String s,
@RequestParam(required = false) String e) {
QueryWrapper<QyzxBuyRecord> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_code", userBean.getOrgCode()).and(!StrUtil.hasBlank(query),
queryWrapper.eq("org_code", userBean.getOrgCode()).and(query != null && query != "",
wq -> wq.like("order_no", query).or().like("content", query));
queryWrapper.between(s != null || s != "" && e != null || e != "", "create_time",
queryWrapper.between(s != null && s != "" && e != null && e != "", "create_time",
!StrUtil.hasBlank(s) ? s : "1000-01-01 00:00:00", !StrUtil.hasBlank(e) ? e : "9999-01-01 00:00:00");
Page<Object> page = PageHelper.startPage(pageNum, pageSize);
List<QyzxBuyRecord> list = QyzxBuyRecord.builder().build().selectList(queryWrapper);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment