|
|
@ -87,6 +87,8 @@ public class HighCouponAgentController { |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "查询今天 代理商已销售的卡券") |
|
|
|
@ApiOperation(value = "查询今天 代理商已销售的卡券") |
|
|
|
public ResponseData getAgentSalesCodeList(HttpServletRequest request, |
|
|
|
public ResponseData getAgentSalesCodeList(HttpServletRequest request, |
|
|
|
|
|
|
|
@RequestParam(name = "consumeTimeS", required = false) Long consumeTimeS, |
|
|
|
|
|
|
|
@RequestParam(name = "consumeTimeE", required = false) Long consumeTimeE, |
|
|
|
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
|
|
|
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
|
|
|
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
|
|
|
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
|
|
|
try { |
|
|
|
try { |
|
|
@ -97,21 +99,29 @@ public class HighCouponAgentController { |
|
|
|
log.error("HighCouponAgentController -> assignCouponAgent() error!","该主角色没有权限"); |
|
|
|
log.error("HighCouponAgentController -> assignCouponAgent() error!","该主角色没有权限"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, ""); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, ""); |
|
|
|
} |
|
|
|
} |
|
|
|
// 计算使用有效期
|
|
|
|
// 如果为空查当前时间
|
|
|
|
Calendar consumeTimeS = Calendar.getInstance(); |
|
|
|
Calendar timeS = Calendar.getInstance(); |
|
|
|
consumeTimeS.setTime(new Date()); |
|
|
|
if (consumeTimeS != null) { |
|
|
|
consumeTimeS.set(Calendar.HOUR_OF_DAY, 00); |
|
|
|
timeS.setTime(new Date(consumeTimeS)); |
|
|
|
consumeTimeS.set(Calendar.MINUTE, 00); |
|
|
|
} else { |
|
|
|
consumeTimeS.set(Calendar.SECOND, 00); |
|
|
|
timeS.setTime(new Date()); |
|
|
|
|
|
|
|
} |
|
|
|
Calendar consumeTimeE = Calendar.getInstance(); |
|
|
|
timeS.set(Calendar.HOUR_OF_DAY, 00); |
|
|
|
consumeTimeE.setTime(new Date()); |
|
|
|
timeS.set(Calendar.MINUTE, 00); |
|
|
|
consumeTimeE.set(Calendar.HOUR_OF_DAY, 23); |
|
|
|
timeS.set(Calendar.SECOND, 00); |
|
|
|
consumeTimeE.set(Calendar.MINUTE, 59); |
|
|
|
|
|
|
|
consumeTimeE.set(Calendar.SECOND, 59); |
|
|
|
Calendar timeE = Calendar.getInstance(); |
|
|
|
|
|
|
|
if (consumeTimeE != null) { |
|
|
|
|
|
|
|
timeE.setTime(new Date(consumeTimeE)); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
timeE.setTime(new Date()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
timeE.set(Calendar.HOUR_OF_DAY, 23); |
|
|
|
|
|
|
|
timeE.set(Calendar.MINUTE, 59); |
|
|
|
|
|
|
|
timeE.set(Calendar.SECOND, 59); |
|
|
|
|
|
|
|
|
|
|
|
PageHelper.startPage(pageNum, pageSize); |
|
|
|
PageHelper.startPage(pageNum, pageSize); |
|
|
|
return ResponseMsgUtil.success(new PageInfo<>(highCouponAgentService.getAgentSalesCodeList(userInfoModel.getHighAgent().getId(), DateUtil.date2String(consumeTimeS.getTime(), "yyyy-MM-dd HH:mm:ss"), DateUtil.date2String(consumeTimeE.getTime(), "yyyy-MM-dd HH:mm:ss")))); |
|
|
|
return ResponseMsgUtil.success(new PageInfo<>(highCouponAgentService.getAgentSalesCodeList(userInfoModel.getHighAgent().getId(), DateUtil.date2String(timeS.getTime(), "yyyy-MM-dd HH:mm:ss"), DateUtil.date2String(timeE.getTime(), "yyyy-MM-dd HH:mm:ss")))); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("HighCouponAgentController --> getAgentSalesCodeList() error!", e); |
|
|
|
log.error("HighCouponAgentController --> getAgentSalesCodeList() error!", e); |
|
|
|