From 4484de8a9af2b94b76ea31eb48e3393bfe1314b0 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 26 九月 2024 20:15:26 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TIntegralRuleController.java | 25 ++++++++++++++++++++++--- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderInvoiceController.java | 2 +- ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxV3Pay.java | 2 +- ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java | 7 ++++++- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppCouponController.java | 2 ++ ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/OtherFallbackFactory.java | 5 +++++ ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/SiteInfoVO.java | 2 ++ 7 files changed, 39 insertions(+), 6 deletions(-) diff --git a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/SiteInfoVO.java b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/SiteInfoVO.java index bb44560..f96faad 100644 --- a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/SiteInfoVO.java +++ b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/SiteInfoVO.java @@ -28,6 +28,8 @@ private Integer couponCount; @ApiModelProperty(value = "超时占位费说明") private String spaceChargeExplain; + @ApiModelProperty(value = "添加车辆最高可得积分 车辆信息为空 展示提示语") + private Integer integral; @ApiModelProperty(value = "上次选择车辆logo") private String carLogo; diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/OtherFallbackFactory.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/OtherFallbackFactory.java index 32ee877..a1e3ea3 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/OtherFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/OtherFallbackFactory.java @@ -34,6 +34,11 @@ return new OtherClient() { @Override + public R<Integer> getAddCarIntegral() { + return R.fail("查询首次添加车辆可获积分:" + throwable.getMessage()); + } + + @Override public R<Page<TCompany>> queryUnitPage(UnitListQueryDto unitListQueryDto) { return R.fail("查询单位列表失败:" + throwable.getMessage()); } diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java index 3c08f02..606bbc1 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java @@ -20,7 +20,12 @@ */ @FeignClient(contextId = "UnitClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = OtherFallbackFactory.class) public interface OtherClient { - + /** + * 远程调用 获取首次添加车辆可获得积分 + * @return + */ + @PostMapping("/integral/getAddCarIntegral") + public R<Integer> getAddCarIntegral(); //单位分页 @PostMapping(value = "/t-company/unit/page") R<Page<TCompany>> queryUnitPage(@RequestBody UnitListQueryDto unitListQueryDto); diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppCouponController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppCouponController.java index 56842b3..aed6abb 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppCouponController.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppCouponController.java @@ -116,6 +116,8 @@ .eq("app_user_id",tokenService.getLoginUserApplet().getUserId()) .orderByDesc("create_time")); Long data1 = chargingOrderClient.getCar().getData(); + Integer data2 = otherClient.getAddCarIntegral().getData(); + data.setIntegral(data2); if (!cars.isEmpty()){ if (data1 == -1){ // 没有充电订单 展示最新添加的车辆 diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderInvoiceController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderInvoiceController.java index 5132faf..e3838b3 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderInvoiceController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderInvoiceController.java @@ -128,7 +128,7 @@ //组装的顺序非常重要,一定要先组装文本域,再组装文件 MimeBodyPart htmlPart = new MimeBodyPart(); // 组装内容 - htmlPart.setContent("This is message content", "text/html;charset=UTF-8"); + htmlPart.setContent("开票", "text/html;charset=UTF-8"); msgMultipart.addBodyPart(htmlPart); // 组装附件 diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TIntegralRuleController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TIntegralRuleController.java index 42e3bf3..1813a92 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TIntegralRuleController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TIntegralRuleController.java @@ -2,6 +2,7 @@ import java.time.LocalDateTime; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.ruoyi.common.core.domain.R; @@ -34,9 +35,25 @@ private THtmlService htmlService; @Autowired private TIntegralRuleService integralRuleService; - - - + + + /** + * 远程调用 获取首次添加车辆可获得积分 + * @return + */ + @PostMapping("/getAddCarIntegral") + public R<Integer> getAddCarIntegral() { + TIntegralRule one = integralRuleService.getOne(null); + String addVehiclesEarnsPoints = one.getAddVehiclesEarnsPoints(); + JSONObject jsonObject = JSON.parseObject(addVehiclesEarnsPoints); + Integer point = 0; + //增加车牌50分,必填 + point += jsonObject.getInteger("num1"); + point += jsonObject.getInteger("num2"); + point += jsonObject.getInteger("num3"); + point += jsonObject.getInteger("num4"); + return R.ok(point); + } @GetMapping("/getSet") @ApiOperation(tags = {"管理后台-积分管理","小程序-个人中心-签到"},value = "获取积分设置") public R<TIntegralRule> getSet() { @@ -57,6 +74,8 @@ } return R.ok(); } + + @GetMapping("/getInfo") @ApiOperation(tags = {"管理后台-积分管理"},value = "type 1=积分规则说明," + "2=会员折扣说明," + diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxV3Pay.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxV3Pay.java index 818f242..e322861 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxV3Pay.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxV3Pay.java @@ -132,7 +132,7 @@ .amount(WxPaymentInfoModel.Amount.builder().total(amount).build()) .payer(WxPaymentInfoModel.Payer.builder().openid(openid).build()) // 分不分账 - //.settle_info(WxPaymentInfoModel.SettleInfo.builder().profit_sharing(true).build()) +// .settle_info(WxPaymentInfoModel.SettleInfo.builder().profit_sharing(true).build()) .build(); // 封装基础数据 String reqBody = buildBaseParam(requestBody -- Gitblit v1.7.1