|
@@ -93,7 +93,7 @@ public class CmsOrderController {
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/get")
|
|
@GetMapping("/get")
|
|
|
- public Result<SearchResult<OrderDonBackView>> get(Long channelId, String account, String showId, Long acId, String nickname, String register, Boolean isGoogle, Boolean isSubsidy) {
|
|
|
|
|
|
|
+ public Result<SearchResult<OrderDonBackView>> get(Long channelId, String account, String showId, Long acId, String nickname, String register, Boolean isGoogle, Boolean isSubsidy, Boolean isRenewPackage) {
|
|
|
MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
|
|
MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
if (channelId != null) {
|
|
if (channelId != null) {
|
|
|
List<Long> popularizeIds = channelPopularizeMapper.getPopularizeIdByChannelId(channelId);
|
|
List<Long> popularizeIds = channelPopularizeMapper.getPopularizeIdByChannelId(channelId);
|
|
@@ -143,6 +143,12 @@ public class CmsOrderController {
|
|
|
}
|
|
}
|
|
|
conditionSql += " exists (select 1 from order_don_subsidy_relate ocr where ocr.order_id = o.id limit 1)";
|
|
conditionSql += " exists (select 1 from order_don_subsidy_relate ocr where ocr.order_id = o.id limit 1)";
|
|
|
}
|
|
}
|
|
|
|
|
+ if (isRenewPackage != null) {
|
|
|
|
|
+ if (StrUtil.isNotEmpty(conditionSql)) {
|
|
|
|
|
+ conditionSql += " and ";
|
|
|
|
|
+ }
|
|
|
|
|
+ conditionSql += " exists (select 1 from order_don_renew_record odrr1 where odrr1.order_id = o.id limit 1)";
|
|
|
|
|
+ }
|
|
|
if (StrUtil.isNotBlank(conditionSql)) {
|
|
if (StrUtil.isNotBlank(conditionSql)) {
|
|
|
builder.put("condition", conditionSql);
|
|
builder.put("condition", conditionSql);
|
|
|
}
|
|
}
|
|
@@ -152,6 +158,12 @@ public class CmsOrderController {
|
|
|
Optional.ofNullable(channelPopularizeMapper.selectChannelByPid(data.getPopularizeId()))
|
|
Optional.ofNullable(channelPopularizeMapper.selectChannelByPid(data.getPopularizeId()))
|
|
|
.ifPresent(channelName -> data.setChannel(channelName));
|
|
.ifPresent(channelName -> data.setChannel(channelName));
|
|
|
}
|
|
}
|
|
|
|
|
+ if (data.getCouponId() != null) {
|
|
|
|
|
+ Optional.ofNullable(couponMapper.selectById(data.getCouponId()))
|
|
|
|
|
+ .ifPresent(coupon -> data.setCouponName(coupon.getName()));
|
|
|
|
|
+ data.setCouponMoney(data.getCouponMoney() == null ? BigDecimal.ZERO : data.getCouponMoney());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (data.getCouponUserId() != 0) {
|
|
if (data.getCouponUserId() != 0) {
|
|
|
data.setCouponName(couponMapper.getCouponNameByCouponUserId(data.getCouponUserId()));
|
|
data.setCouponName(couponMapper.getCouponNameByCouponUserId(data.getCouponUserId()));
|
|
|
data.setCouponMoney(data.getCouponMoney() == null ? BigDecimal.ZERO : data.getCouponMoney());
|
|
data.setCouponMoney(data.getCouponMoney() == null ? BigDecimal.ZERO : data.getCouponMoney());
|