diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java index 525af947..535db26b 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java @@ -144,22 +144,27 @@ public class XmQuestionController { public Result getXmQuestionAgeDist(@ApiIgnore @RequestParam Map params){ User user=LoginUtils.getCurrentUserInfo(); params.put("pbranchId",user.getBranchId()); - List> datas= this.xmQuestionService.getXmQuestionAgeDist(params); - return Result.ok("ok","成功",datas); + IPage page=QueryTools.initPage(params); + QueryWrapper qw=QueryTools.initQueryWrapper(XmQuestion.class,params); + List> datas= this.xmQuestionService.getXmQuestionAgeDist(page,qw,params); + return Result.ok("ok","成功").setData(datas).setTotal(datas.size()); } @RequestMapping(value="/getXmQuestionRetestDist",method=RequestMethod.GET) public Result getXmQuestionRetestDist(@ApiIgnore @RequestParam Map params){ User user=LoginUtils.getCurrentUserInfo(); params.put("pbranchId",user.getBranchId()); - List> datas= this.xmQuestionService.getXmQuestionRetestDist(params); - return Result.ok("ok","成功",datas); + IPage page=QueryTools.initPage(params); + QueryWrapper qw=QueryTools.initQueryWrapper(XmQuestion.class,params); + List> datas= this.xmQuestionService.getXmQuestionRetestDist(page,qw,params); + return Result.ok("ok","成功").setData(datas).setTotal(page.getTotal()); } @RequestMapping(value="/getXmQuestionSort",method=RequestMethod.GET) public Result getXmQuestionSort(@ApiIgnore @RequestParam Map params){ - User user=LoginUtils.getCurrentUserInfo(); - IPage page=QueryTools.initPage(params); + User user=LoginUtils.getCurrentUserInfo(); params.put("pbranchId",user.getBranchId()); - List> datas= this.xmQuestionService.getXmQuestionSort(params); + IPage page=QueryTools.initPage(params); + QueryWrapper qw=QueryTools.initQueryWrapper(XmQuestion.class,params); + List> datas= this.xmQuestionService.getXmQuestionSort(page,qw,params); Map m=new HashMap<>(); return Result.ok().setData(datas).setTotal(page.getTotal()); } diff --git a/xm-core/src/main/java/com/xm/core/service/XmQuestionService.java b/xm-core/src/main/java/com/xm/core/service/XmQuestionService.java index c3dfba51..56adc9c9 100644 --- a/xm-core/src/main/java/com/xm/core/service/XmQuestionService.java +++ b/xm-core/src/main/java/com/xm/core/service/XmQuestionService.java @@ -207,12 +207,12 @@ public class XmQuestionService extends BaseService return baseMapper.getXmQuestionAttDist(QueryTools.initPage(params),QueryTools.initQueryWrapper(XmMenu.class,params),params); } - public List> getXmQuestionAgeDist(Map params) { - return baseMapper.getXmQuestionAgeDist(QueryTools.initPage(params),QueryTools.initQueryWrapper(XmMenu.class,params),params); + public List> getXmQuestionAgeDist(IPage page, QueryWrapper qw, Map ext) { + return baseMapper.getXmQuestionAgeDist(page,qw,ext); } - public List> getXmQuestionSort(Map params) { - return baseMapper.getXmQuestionSort(QueryTools.initPage(params),QueryTools.initQueryWrapper(XmMenu.class,params),params); + public List> getXmQuestionSort(IPage page, QueryWrapper qw, Map ext) { + return baseMapper.getXmQuestionSort(page,qw,ext); } @Override @@ -220,8 +220,8 @@ public class XmQuestionService extends BaseService return "Q"+getSequenceService().getCommonNo("{date62:yyyyMMddHHmmss}{rands:4}"); } - public List> getXmQuestionRetestDist(Map params) { - return baseMapper.getXmQuestionRetestDist(QueryTools.initPage(params),QueryTools.initQueryWrapper(XmMenu.class,params),params); + public List> getXmQuestionRetestDist(IPage page, QueryWrapper qw, Map ext) { + return baseMapper.getXmQuestionRetestDist(page,qw,ext); } }