|
|
@@ -456,17 +456,23 @@ public class WxCouponController extends BaseController { |
|
|
// wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); |
|
|
// wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); |
|
|
// } |
|
|
// } |
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); |
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); |
|
|
//根据上架时间查询券 |
|
|
|
|
|
WxCouponChannel couponChannelQ = new WxCouponChannel(); |
|
|
|
|
|
couponChannelQ.updateTenantInfo(tenantEntity); |
|
|
|
|
|
couponChannelQ.setStartdate(wxCoupon.getStartdate()); |
|
|
|
|
|
couponChannelQ.setEnddate(wxCoupon.getEnddate()); |
|
|
|
|
|
List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); |
|
|
|
|
|
if (null != couponIds && couponIds.size() > 0 ) { |
|
|
|
|
|
wxCoupon.setIds(couponIds); |
|
|
|
|
|
|
|
|
if (null != wxCoupon.getStartdate() || null != wxCoupon.getEnddate()) { |
|
|
|
|
|
//根据上架时间查询券 |
|
|
|
|
|
WxCouponChannel couponChannelQ = new WxCouponChannel(); |
|
|
|
|
|
couponChannelQ.updateTenantInfo(tenantEntity); |
|
|
|
|
|
couponChannelQ.setStartdate(wxCoupon.getStartdate()); |
|
|
|
|
|
couponChannelQ.setEnddate(wxCoupon.getEnddate()); |
|
|
|
|
|
List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); |
|
|
|
|
|
if (null != couponIds && couponIds.size() > 0 ) { |
|
|
|
|
|
wxCoupon.setIds(couponIds); |
|
|
|
|
|
}else { |
|
|
|
|
|
wxCoupon.setId(-1L); |
|
|
|
|
|
} |
|
|
}else { |
|
|
}else { |
|
|
wxCoupon.setId(-1L); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PageInfo<WxCouponStatisVo> pageInfo = wxCouponService.findCountData(wxCoupon,tenantEntitys, pageNum, pageSize); |
|
|
PageInfo<WxCouponStatisVo> pageInfo = wxCouponService.findCountData(wxCoupon,tenantEntitys, pageNum, pageSize); |
|
|
for (WxCouponStatisVo coupon : pageInfo.getList()) { |
|
|
for (WxCouponStatisVo coupon : pageInfo.getList()) { |
|
|
if (coupon.getSaleAmount() == null) { |
|
|
if (coupon.getSaleAmount() == null) { |
|
|
@@ -498,16 +504,18 @@ public class WxCouponController extends BaseController { |
|
|
// wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); |
|
|
// wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); |
|
|
// } |
|
|
// } |
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); |
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); |
|
|
//根据上架时间查询券 |
|
|
|
|
|
WxCouponChannel couponChannelQ = new WxCouponChannel(); |
|
|
|
|
|
couponChannelQ.updateTenantInfo(tenantEntity); |
|
|
|
|
|
couponChannelQ.setStartdate(wxCoupon.getStartdate()); |
|
|
|
|
|
couponChannelQ.setEnddate(wxCoupon.getEnddate()); |
|
|
|
|
|
List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); |
|
|
|
|
|
if (null != couponIds && couponIds.size() > 0 ) { |
|
|
|
|
|
wxCoupon.setIds(couponIds); |
|
|
|
|
|
}else { |
|
|
|
|
|
wxCoupon.setId(-1L); |
|
|
|
|
|
|
|
|
if (null != wxCoupon.getStartdate() || null != wxCoupon.getEnddate()) { |
|
|
|
|
|
//根据上架时间查询券 |
|
|
|
|
|
WxCouponChannel couponChannelQ = new WxCouponChannel(); |
|
|
|
|
|
couponChannelQ.updateTenantInfo(tenantEntity); |
|
|
|
|
|
couponChannelQ.setStartdate(wxCoupon.getStartdate()); |
|
|
|
|
|
couponChannelQ.setEnddate(wxCoupon.getEnddate()); |
|
|
|
|
|
List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); |
|
|
|
|
|
if (null != couponIds && couponIds.size() > 0 ) { |
|
|
|
|
|
wxCoupon.setIds(couponIds); |
|
|
|
|
|
}else { |
|
|
|
|
|
wxCoupon.setId(-1L); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
wxCouponService.exportCardData(wxCoupon,tenantEntitys, request, response); |
|
|
wxCouponService.exportCardData(wxCoupon,tenantEntitys, request, response); |
|
|
} |
|
|
} |
|
|
@@ -532,16 +540,18 @@ public class WxCouponController extends BaseController { |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); |
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); |
|
|
//根据上架时间查询券 |
|
|
|
|
|
WxCouponChannel couponChannelQ = new WxCouponChannel(); |
|
|
|
|
|
couponChannelQ.updateTenantInfo(tenantEntity); |
|
|
|
|
|
couponChannelQ.setStartdate(wxCoupon.getStartdate()); |
|
|
|
|
|
couponChannelQ.setEnddate(wxCoupon.getEnddate()); |
|
|
|
|
|
List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); |
|
|
|
|
|
if (null != couponIds && couponIds.size() > 0 ) { |
|
|
|
|
|
wxCoupon.setIds(couponIds); |
|
|
|
|
|
}else { |
|
|
|
|
|
wxCoupon.setId(-1L); |
|
|
|
|
|
|
|
|
if (null != wxCoupon.getStartdate() || null != wxCoupon.getEnddate()) { |
|
|
|
|
|
//根据上架时间查询券 |
|
|
|
|
|
WxCouponChannel couponChannelQ = new WxCouponChannel(); |
|
|
|
|
|
couponChannelQ.updateTenantInfo(tenantEntity); |
|
|
|
|
|
couponChannelQ.setStartdate(wxCoupon.getStartdate()); |
|
|
|
|
|
couponChannelQ.setEnddate(wxCoupon.getEnddate()); |
|
|
|
|
|
List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); |
|
|
|
|
|
if (null != couponIds && couponIds.size() > 0 ) { |
|
|
|
|
|
wxCoupon.setIds(couponIds); |
|
|
|
|
|
}else { |
|
|
|
|
|
wxCoupon.setId(-1L); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
PageInfo<WxCouponStatisVo> pageInfo = wxCouponService.findCouponData(wxCoupon, tenantEntitys, pageNum, pageSize); |
|
|
PageInfo<WxCouponStatisVo> pageInfo = wxCouponService.findCouponData(wxCoupon, tenantEntitys, pageNum, pageSize); |
|
|
@@ -572,16 +582,18 @@ public class WxCouponController extends BaseController { |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); |
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); |
|
|
//根据上架时间查询券 |
|
|
|
|
|
WxCouponChannel couponChannelQ = new WxCouponChannel(); |
|
|
|
|
|
couponChannelQ.updateTenantInfo(tenantEntity); |
|
|
|
|
|
couponChannelQ.setStartdate(wxCoupon.getStartdate()); |
|
|
|
|
|
couponChannelQ.setEnddate(wxCoupon.getEnddate()); |
|
|
|
|
|
List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); |
|
|
|
|
|
if (null != couponIds && couponIds.size() > 0 ) { |
|
|
|
|
|
wxCoupon.setIds(couponIds); |
|
|
|
|
|
}else { |
|
|
|
|
|
wxCoupon.setId(-1L); |
|
|
|
|
|
|
|
|
if (null != wxCoupon.getStartdate() || null != wxCoupon.getEnddate()) { |
|
|
|
|
|
//根据上架时间查询券 |
|
|
|
|
|
WxCouponChannel couponChannelQ = new WxCouponChannel(); |
|
|
|
|
|
couponChannelQ.updateTenantInfo(tenantEntity); |
|
|
|
|
|
couponChannelQ.setStartdate(wxCoupon.getStartdate()); |
|
|
|
|
|
couponChannelQ.setEnddate(wxCoupon.getEnddate()); |
|
|
|
|
|
List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); |
|
|
|
|
|
if (null != couponIds && couponIds.size() > 0 ) { |
|
|
|
|
|
wxCoupon.setIds(couponIds); |
|
|
|
|
|
}else { |
|
|
|
|
|
wxCoupon.setId(-1L); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
wxCouponService.exportCouponData(wxCoupon,tenantEntitys, request, response); |
|
|
wxCouponService.exportCouponData(wxCoupon,tenantEntitys, request, response); |
|
|
} |
|
|
} |
|
|
@@ -624,16 +636,18 @@ public class WxCouponController extends BaseController { |
|
|
|
|
|
|
|
|
//根据投放时间搜索 |
|
|
//根据投放时间搜索 |
|
|
private void handleCouponStartDate(WxCoupon wxCoupon){ |
|
|
private void handleCouponStartDate(WxCoupon wxCoupon){ |
|
|
WxCouponChannel couponChannelQ = new WxCouponChannel(); |
|
|
|
|
|
couponChannelQ.updateTenantInfo(wxCoupon); |
|
|
|
|
|
couponChannelQ.setStartdate(wxCoupon.getStartdate()); |
|
|
|
|
|
couponChannelQ.setEnddate(wxCoupon.getEnddate()); |
|
|
|
|
|
List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); |
|
|
|
|
|
if (null != couponIds && couponIds.size() > 0 ) { |
|
|
|
|
|
wxCoupon.setIds(couponIds); |
|
|
|
|
|
}else { |
|
|
|
|
|
wxCoupon.setId(-1L); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (null != wxCoupon.getStartdate() || null != wxCoupon.getEnddate()) { |
|
|
|
|
|
WxCouponChannel couponChannelQ = new WxCouponChannel(); |
|
|
|
|
|
couponChannelQ.updateTenantInfo(wxCoupon); |
|
|
|
|
|
couponChannelQ.setStartdate(wxCoupon.getStartdate()); |
|
|
|
|
|
couponChannelQ.setEnddate(wxCoupon.getEnddate()); |
|
|
|
|
|
List<Long> couponIds = wxCouponChannelService.findCouponIdList(couponChannelQ); |
|
|
|
|
|
if (null != couponIds && couponIds.size() > 0 ) { |
|
|
|
|
|
wxCoupon.setIds(couponIds); |
|
|
|
|
|
}else { |
|
|
|
|
|
wxCoupon.setId(-1L); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("exportCouponPassword") |
|
|
@GetMapping("exportCouponPassword") |
|
|
|