diff --git a/hai-bweb/src/main/java/com/bweb/model/ExportOutRechargeOrder.java b/hai-bweb/src/main/java/com/bweb/model/ExportOutRechargeOrder.java index 18bc6cae..f828273a 100644 --- a/hai-bweb/src/main/java/com/bweb/model/ExportOutRechargeOrder.java +++ b/hai-bweb/src/main/java/com/bweb/model/ExportOutRechargeOrder.java @@ -19,6 +19,9 @@ public class ExportOutRechargeOrder { @ExcelProperty("支付方式") private String payTypeName; + @ExcelProperty("工会卡") + private String laborUnionCard; + @ExcelProperty("充值内容") private String rechargeContent; @@ -55,6 +58,8 @@ public class ExportOutRechargeOrder { @ExcelProperty("充值状态") private String rechargeStatusName; + + // 错误消息 private String errorMessage; @@ -187,6 +192,14 @@ public class ExportOutRechargeOrder { this.rechargeStatusName = rechargeStatusName; } + public String getLaborUnionCard() { + return laborUnionCard; + } + + public void setLaborUnionCard(String laborUnionCard) { + this.laborUnionCard = laborUnionCard; + } + public String getErrorMessage() { return errorMessage; } diff --git a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java index a2e5329b..3d3be1d2 100644 --- a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java @@ -66,6 +66,7 @@ public interface OutRechargeOrderMapperExt { "SELECT" + " order_no as orderNo," + " operator_name as operatorName," + + " labor_union_card as laborUnionCard," + " case recharge_type when 1 then '快充' when 2 then '慢充' end rechargeTypeName ," + " case pay_type when 2 then '微信支付' when 3 then '工会卡支付' when 4 then '银联支付' when null then '积分抵扣' end payTypeName," + " recharge_content as rechargeContent,recharge_price as rechargePrice,pay_price as payPrice,discount_deduction_price as discountDeductionPrice,integral_deduction_price as integralDeductionPrice,pay_real_price as payRealPrice," + diff --git a/hai-service/src/main/java/com/hai/model/OutRechargeOrderModel.java b/hai-service/src/main/java/com/hai/model/OutRechargeOrderModel.java index b53fefc0..4d0208a1 100644 --- a/hai-service/src/main/java/com/hai/model/OutRechargeOrderModel.java +++ b/hai-service/src/main/java/com/hai/model/OutRechargeOrderModel.java @@ -23,6 +23,7 @@ public class OutRechargeOrderModel extends OutRechargeOrder { private Date payTime; private String payStatusName; private String rechargeStatusName; + private String laborUnionCard; @Override public String getOrderNo() { @@ -174,4 +175,14 @@ public class OutRechargeOrderModel extends OutRechargeOrder { public void setRechargeStatusName(String rechargeStatusName) { this.rechargeStatusName = rechargeStatusName; } + + @Override + public String getLaborUnionCard() { + return laborUnionCard; + } + + @Override + public void setLaborUnionCard(String laborUnionCard) { + this.laborUnionCard = laborUnionCard; + } } diff --git a/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java index d2392212..72e407f7 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java @@ -83,19 +83,21 @@ public class HltUnionCardVipServiceImpl implements HltUnionCardVipService { // 1: 1-E信通会员权益,2-工会卡会员权益 int equityLevel = 0; - // 判断用户是否有会员权益 - for (Object dataObject : cardInfoObject.getJSONArray("data")) { - JSONObject d = (JSONObject) dataObject; - if (d.getInteger("level").equals(1) || d.getInteger("level").equals(12)) { - isVip = true; - equityLevel = 1; - } else if (d.getInteger("level").equals(2)) { - isVip = true; - equityLevel = 2; - } else if (d.getInteger("level").equals(3)) { - isVip = true; - isFree = true; - equityLevel = 1; + if (cardInfoObject != null) { + // 判断用户是否有会员权益 + for (Object dataObject : cardInfoObject.getJSONArray("data")) { + JSONObject d = (JSONObject) dataObject; + if (d.getInteger("level").equals(1) || d.getInteger("level").equals(12)) { + isVip = true; + equityLevel = 1; + } else if (d.getInteger("level").equals(2)) { + isVip = true; + equityLevel = 2; + } else if (d.getInteger("level").equals(3)) { + isVip = true; + isFree = true; + equityLevel = 1; + } } }