|
|
|
@@ -470,35 +470,49 @@ public class WxCouponOrderController extends BaseController { |
|
|
|
|
|
|
|
@ApiOperation(value = "B端核销列表链接") |
|
|
|
@GetMapping("/getVerifiedExportUrl") |
|
|
|
public ResultData getVerifiedExportUrl(@ModelAttribute WxCouponOrderBVo wxCouponOrder) { |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "verifyStartDate", value = "券ID", dataType = "date", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "verifyEndDate", value = "券ID", dataType = "date", paramType = "query", required = true) |
|
|
|
}) |
|
|
|
public ResultData getVerifiedExportUrl(String verifyStartDate,String verifyEndDate) { |
|
|
|
//只有B端管理员才能操作这个 |
|
|
|
WxMerchantBUser buser = this.getLoginBUser(); |
|
|
|
if (buser.getIsAdmin() != EnumYesOrNo.YES.getCode()) { |
|
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(),"只有商户管理员才能进行此操作"); |
|
|
|
} |
|
|
|
if (wxCouponOrder == null) wxCouponOrder = new WxCouponOrderBVo(); |
|
|
|
WxCouponOrderBVo wxCouponOrder = new WxCouponOrderBVo(); |
|
|
|
wxCouponOrder.updateTenantInfo(getTenantInfo()); |
|
|
|
StringBuffer sb = new StringBuffer("/api/couponOrder/unLogin/verifiedExport?verifyMerchantId=").append(buser.getMerchantId()) |
|
|
|
.append("&tenantId="+buser.getTenantId()); |
|
|
|
if (null != wxCouponOrder.getVerifyStartDate()) { |
|
|
|
sb.append("&verifyStartDate=").append(wxCouponOrder.getVerifyStartDate()); |
|
|
|
if (null != verifyStartDate) { |
|
|
|
sb.append("&verifyStartDate=").append(verifyStartDate); |
|
|
|
} |
|
|
|
if (null != wxCouponOrder.getVerifyEndDate()) { |
|
|
|
sb.append("&verifyEndDate=").append(wxCouponOrder.getVerifyEndDate()); |
|
|
|
if (null != verifyEndDate) { |
|
|
|
sb.append("&verifyEndDate=").append(verifyEndDate); |
|
|
|
} |
|
|
|
return new ResultData(sb.toString()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/unLogin/verifiedExport") |
|
|
|
@AuthIgnore |
|
|
|
public void verifiedExport(@ModelAttribute WxCouponOrderBVo wxCouponOrder, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
@GetMapping("/unLogin/verifiedExport") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "verifyStartDate", value = "券ID", dataType = "date", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "verifyEndDate", value = "券ID", dataType = "date", paramType = "query", required = true) |
|
|
|
}) |
|
|
|
public void verifiedExport(@ModelAttribute WxCouponOrderBVo wxCouponOrder,String verifyStartDate,String verifyEndDate, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxCouponOrderController::exportData"); |
|
|
|
if (wxCouponOrder == null) { |
|
|
|
return; |
|
|
|
} |
|
|
|
wxCouponOrder.setStartDate(DateUtils.stringToDate("2022-01-01 00:00:00",DateUtils.DATE_TIME_PATTERN)); |
|
|
|
wxCouponOrder.setEndDate(DateUtils.stringToDate("2122-01-01 00:00:00",DateUtils.DATE_TIME_PATTERN)); |
|
|
|
wxCouponOrder.setEndDate(DateUtils.stringToDate("2122-01-01 00:00:00",DateUtils.DATE_TIME_PATTERN)); |
|
|
|
if (null != verifyStartDate) { |
|
|
|
wxCouponOrder.setVerifyStartDate(DateUtils.stringToDate(verifyStartDate+" 00:00:00",DateUtils.DATE_TIME_PATTERN)); |
|
|
|
} |
|
|
|
if (null != verifyEndDate) { |
|
|
|
wxCouponOrder.setVerifyEndDate(DateUtils.stringToDate(verifyEndDate+" 23:59:59",DateUtils.DATE_TIME_PATTERN)); |
|
|
|
} |
|
|
|
wxCouponOrderService.exportData(true,wxCouponOrder, request, response); |
|
|
|
} |
|
|
|
|
|
|
|
|