From 0eb94b78e462484bfe92a5c5967eaa0ac0d83fd5 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期一, 22 七月 2024 09:55:55 +0800 Subject: [PATCH] 2.0bug修改 --- ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysRedPacketRecordController.java | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysRedPacketRecordController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysRedPacketRecordController.java index 4e7f6a5..6864027 100644 --- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysRedPacketRecordController.java +++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysRedPacketRecordController.java @@ -48,6 +48,14 @@ private IUserRedPacketRecordService userRedPacketRecordService; + @RequestMapping("/redRecord") + public String index( Model model,Integer couponActivityId,Integer activityType) { + model.addAttribute("activityType",activityType); + model.addAttribute("couponActivityId",couponActivityId); + return PREFIX + "userRedRecord.html"; + } + + /** * 跳转到首页 */ @@ -84,11 +92,8 @@ @RequestMapping(value = "/direct") @ResponseBody public ResultUtil direct(String ids, Integer redId) { - System.err.println("========="+ids+"======="+redId); Double money = 0D; - - SysRedPacketRecord sysRedPacketRecord = sysRedPacketRecordService.selectById(redId); if(null != sysRedPacketRecord){ Integer type = sysRedPacketRecord.getType(); @@ -110,9 +115,10 @@ //添加临时红包数据 UserRedPacketRecord userRedPacketRecord = new UserRedPacketRecord(); userRedPacketRecord.setMoney(money); + userRedPacketRecord.setRemainingAmount(money); userRedPacketRecord.setInsertTime(new Date()); userRedPacketRecord.setCompanyId(1); - userRedPacketRecord.setState(0); + userRedPacketRecord.setState(1); userRedPacketRecord.setOrderId(null); userRedPacketRecord.setOrderType(3); userRedPacketRecord.setUserId(Integer.valueOf(s)); @@ -121,6 +127,22 @@ } return ResultUtil.success(); } + + @RequestMapping(value = "/user/list") + @ResponseBody + public Object list(String createTime,String userName,String userPhone,Integer couponActivityId,Integer activityType,Integer state) { + String beginTime = null; + String endTime = null; + if (SinataUtil.isNotEmpty(createTime)){ + String[] timeArray = createTime.split(" - "); + beginTime = timeArray[0]; + endTime = timeArray[1]; + } + Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); + page.setRecords(sysRedPacketRecordService.getList(page,beginTime,endTime,userName,userPhone,couponActivityId,activityType,state)); + return super.packForBT(page); + } + /** * 获取列表 */ -- Gitblit v1.7.1