|
|
@@ -1,6 +1,7 @@
|
|
|
package com.cyksj.web.controller.group;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.date.BetweenFormater;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUnit;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
@@ -1300,6 +1301,14 @@ public class GroupRelationController {
|
|
|
.field(GalaxyCoinRenewTicketsView::getUserId, userIdList).op(Operator.InList)
|
|
|
.put("condition", conditionSql)
|
|
|
.field(GalaxyCoinRenewTicketsView::getIsVip, Boolean.FALSE)
|
|
|
+ //非独立账号
|
|
|
+ .field(GalaxyCoinRenewTicketsView::getMonths, 300).op(Operator.NotEqual)
|
|
|
+ //购买
|
|
|
+ .field(GalaxyCoinRenewTicketsView::getAqType, 1)
|
|
|
+ //非代充
|
|
|
+ .field(GalaxyCoinRenewTicketsView::getRechargeStatus).op(Operator.IsNull)
|
|
|
+ //车队状态
|
|
|
+ .field(GalaxyCoinRenewTicketsView::getGroupsStatus, GroupsTrips.Status.waiting.name()).op(Operator.NotEqual)
|
|
|
.field(GalaxyCoinRenewTicketsView::getStatus, List.of(GroupsRelation.Status.validity.name(), GroupsRelation.Status.outside.name()))
|
|
|
.orderBy(GalaxyCoinRenewTicketsView::getExpiryTime).asc()
|
|
|
.build());
|
|
|
@@ -1342,6 +1351,17 @@ public class GroupRelationController {
|
|
|
//此次最大可抵扣银河币数量
|
|
|
BigDecimal maxDeductGalaxyCoin = maxPriceSku.getPrice().multiply(maxRate).divide(payMoney).multiply(payGalaxyCoin);
|
|
|
galaxyCoinRenewTicketsView.setMaxGalaxyCoinDeduct(userGalaxyCoin.compareTo(maxDeductGalaxyCoin) > 0 ? maxDeductGalaxyCoin : userGalaxyCoin);
|
|
|
+ if (galaxyCoinRenewTicketsView.getExpiryTime() != null && galaxyCoinRenewTicketsView.getGoodsType() == 1) {
|
|
|
+ String remainDays = DateUtil.formatBetween(now, galaxyCoinRenewTicketsView.getExpiryTime(), BetweenFormater.Level.DAY);
|
|
|
+ if ("0天".equals(remainDays)) {
|
|
|
+ remainDays = "小于1天";
|
|
|
+ } else {
|
|
|
+ //当天也算
|
|
|
+ int days = Integer.parseInt(remainDays.substring(0, remainDays.indexOf("天")));
|
|
|
+ remainDays = days + 1 + "天";
|
|
|
+ }
|
|
|
+ galaxyCoinRenewTicketsView.setRemainDays(remainDays);
|
|
|
+ }
|
|
|
}
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|