ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppCoupon.java
@@ -34,6 +34,8 @@ @ApiModelProperty(value = "主键") @TableId("id") private Long id; @TableField(exist = false) private String uid; @ApiModelProperty(value = "用户id") @TableField("app_user_id") ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java
@@ -695,6 +695,7 @@ @GetMapping(value = "/user/coupon/getById") public R<TAppCoupon> couponGetById(@RequestParam("id")Long id) { TAppCoupon appCoupon = appCouponService.getById(id); appCoupon.setUid(id.toString()); return R.ok(appCoupon); } ruoyi-service/ruoyi-chargingPile/src/main/resources/bootstrap.yml
@@ -46,7 +46,7 @@ enabled: true application-id: ${spring.application.name} tx-service-group: seata_tx_group #此处配置自定义的seata事务分组名称 enable-auto-data-source-proxy: true enable-auto-data-source-proxy: false service: vgroup-mapping: seata_tx_group: default ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderEvaluateController.java
@@ -127,7 +127,7 @@ @ApiImplicitParam(value = "订单id", name = "orderId", required = true), @ApiImplicitParam(value = "订单类型(1=充电订单,2=购物订单,3=兑换订单,4=会员订单)", name = "orderType", required = true), }) public AjaxResult<OrderEvaluateVo> getOrderEvaluate(@PathVariable Integer orderId, Integer orderType){ public AjaxResult<OrderEvaluateVo> getOrderEvaluate(Integer orderId, Integer orderType){ OrderEvaluateVo orderEvaluate = orderEvaluateService.getOrderEvaluate(orderId, orderType); return AjaxResult.success(orderEvaluate); } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -1616,11 +1616,6 @@ return; } //计算用户标签 editUserTag(chargingOrder); //用户推荐奖励 referralReward(chargingOrder); //如果使用优惠券需要判断优惠券是否满足使用条件 //根据实际的充电金额计算退款金额 退回费用=(原金额/总金额)*(总金额-实际充电金额) //退款金额=优惠券金额+剩余充电金额 @@ -1846,7 +1841,11 @@ appUserClient.updateAppUser(appUser); appUserIntegralChangeClient.addAppUserIntegralChange(appUserIntegralChange); } //计算用户标签 editUserTag(chargingOrder); //用户推荐奖励 referralReward(chargingOrder); //开始构建退款费用 if(refundAmount.compareTo(BigDecimal.ZERO) > 0){ ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
@@ -209,8 +209,10 @@ return AjaxResult.error("当前用户已兑换"+count+"张"); }else { //减少库存 good.setInventory(good.getInventory()-exchangeDto.getNum()); goodsService.updateById(good); if (good.getInventory()!=-1) { good.setInventory(good.getInventory() - exchangeDto.getNum()); goodsService.updateById(good); } } if (user.getPoints()<good.getRedeemPoints()){ return AjaxResult.error("当前用户积分不足"); @@ -226,8 +228,10 @@ if (coupon.getInventoryQuantity() != -1 && count >= coupon.getInventoryQuantity()) { return AjaxResult.error("当前用户已到达兑换"+coupon+"次"); }else { coupon.setInventoryQuantity(coupon.getInventoryQuantity()-1); couponService.updateById(coupon); if (coupon.getInventoryQuantity()!=-1) { coupon.setInventoryQuantity(coupon.getInventoryQuantity() - 1); couponService.updateById(coupon); } }