From 8f19dccb029717e7b8b352e926817be076c28d13 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期四, 22 八月 2024 17:48:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/SiteMapper.xml           |    6 +-
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TIntegralRuleController.java  |   32 +++++++++++++++
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderAppealController.java   |    6 +-
 ruoyi-modules/ruoyi-system/pom.xml                                                               |   15 ++-----
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java |    4 -
 5 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/ruoyi-modules/ruoyi-system/pom.xml b/ruoyi-modules/ruoyi-system/pom.xml
index 67ff0c1..756a512 100644
--- a/ruoyi-modules/ruoyi-system/pom.xml
+++ b/ruoyi-modules/ruoyi-system/pom.xml
@@ -39,6 +39,11 @@
             <groupId>com.alibaba.cloud</groupId>
             <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
         </dependency>
+    
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-seata</artifactId>
+        </dependency>
         
     	<!-- SpringBoot Actuator -->
         <dependency>
@@ -108,20 +113,10 @@
 	    <dependency>
 		    <groupId>com.ruoyi</groupId>
 		    <artifactId>ruoyi-api-other</artifactId>
-		    <version>3.6.2</version>
-		    <scope>compile</scope>
 	    </dependency>
 	    <dependency>
 		    <groupId>com.ruoyi</groupId>
 		    <artifactId>ruoyi-api-chargingPile</artifactId>
-		    <version>3.6.2</version>
-		    <scope>compile</scope>
-	    </dependency>
-	    <dependency>
-		    <groupId>io.seata</groupId>
-		    <artifactId>seata-all</artifactId>
-		    <version>1.6.1</version>
-		    <scope>compile</scope>
 	    </dependency>
 
     </dependencies>
diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/SiteMapper.xml b/ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/SiteMapper.xml
index 4ad86d4..804100a 100644
--- a/ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/SiteMapper.xml
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/SiteMapper.xml
@@ -147,13 +147,13 @@
 		select
 		    a.accounting_strategy_id,
 			(a.electrovalence+a.service_charge) AS electrovalence,
-			((a.electrovalence+a.service_charge)*a.discount) AS vipElectrovalence
+			((a.electrovalence+a.service_charge)*b.discount) AS vipElectrovalence
 		from
 		    t_accounting_strategy_detail a
 		left join
 		        t_accounting_strategy b on (a.accounting_strategy_id = b.id)
 		where b.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()}
-		AND DATE_FORMAT(NOW(), '%H:%i:%s') between b.start_time and b.end_time) tasd on (ts.accounting_strategy_id = tasd.accounting_strategy_id)
+		AND DATE_FORMAT(NOW(), '%H:%i:%s') between a.start_time and a.end_time) tasd on (ts.accounting_strategy_id = tasd.accounting_strategy_id)
 		<where>
 			<if test="null != query.name and '' != query.name">
 				and ts.`name` like CONCAT('%', #{query.name}, '%')
@@ -164,7 +164,7 @@
 		<if test="query.sortType != null">
 			<choose>
 				<when test="query.sortType == 1">
-					ORDER BY ts.distance ASC
+					ORDER BY distance ASC
 				</when>
 				<when test="query.sortType == 2">
 					ORDER BY tasd.electrovalence ASC
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
index 1b3e8bd..726a850 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -57,8 +57,6 @@
     private TokenService tokenService;
     @Autowired
     private TOrderEvaluateService orderEvaluateService;
-    @Autowired
-    private TOrderEvaluateTagService orderEvaluateTagService;
     
     @Resource
     private WxPaymentClient wxPaymentClient;
@@ -178,7 +176,7 @@
     @ResponseBody
     @PostMapping(value = "/paymentChargingOrder")
     @ApiOperation(value = "支付充电充值费用", tags = {"小程序-扫一扫"})
-    public AjaxResult paymentChargingOrder(AddChargingOrder addChargingOrder){
+    public AjaxResult paymentChargingOrder(@RequestBody AddChargingOrder addChargingOrder){
         return chargingOrderService.paymentChargingOrder(addChargingOrder);
     }
     
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderAppealController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderAppealController.java
index 8d8ec02..8a2c528 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderAppealController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderAppealController.java
@@ -50,16 +50,16 @@
     /**
      * 查询订单申诉详情
      */
-    @ApiOperation(tags = {"小程序-订单申诉"},value = "查询订单申诉详情")
     @GetMapping(value = "/getDetailById")
-    public AjaxResult<TOrderAppealVO> getDetailById(@RequestParam("id") Integer id) {
+    @ApiOperation(tags = {"小程序-订单申诉"},value = "查询订单申诉详情")
+    public AjaxResult<TOrderAppealVO> getDetailById(Integer id) {
         return AjaxResult.ok(orderAppealService.getDetailById(id));
     }
     
     
     
     @ResponseBody
-    @GetMapping(value = "/addOrderAppeal")
+    @PostMapping(value = "/addOrderAppeal")
     @ApiOperation(value = "申诉订单", tags = {"小程序-充电记录(个人中心)"})
     public AjaxResult addOrderAppeal(@RequestBody TOrderAppeal orderAppeal){
         Long appUserId = tokenService.getLoginUserApplet().getUserId();
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 5027933..dda7683 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.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -45,7 +46,36 @@
     @PostMapping("/saveSet")
     @ApiOperation(tags = {"管理后台-积分管理"},value = "保存积分设置")
     public R saveSet(@RequestBody TIntegralRule dto) {
-        integralRuleService.updateById(dto);
+//        JSONObject jsonObject = JSONObject.parseObject(dto);
+//        String chargeCredit = jsonObject.getString("chargeCredit");
+//        String credit = jsonObject.getString("credit");
+//        String inviteUsersToEarnPoints = jsonObject.getString("inviteUsersToEarnPoints");
+//        String addVehiclesEarnsPoints = jsonObject.getString("addVehiclesEarnsPoints");
+//        String signInForPoints = jsonObject.getString("signInForPoints");
+//        TIntegralRule tIntegralRule = new TIntegralRule();
+//        tIntegralRule.setAddVehiclesEarnsPoints(signInForPoints);
+//        tIntegralRule.setChargeCredit(chargeCredit);
+//        tIntegralRule.setCredit(credit);
+//        tIntegralRule.setSignInForPoints(addVehiclesEarnsPoints);
+//        tIntegralRule.setInviteUsersToEarnPoints(inviteUsersToEarnPoints);
+//        TIntegralRule one = integralRuleService.getOne(null);
+//        if (one!=null){
+//            one.setAddVehiclesEarnsPoints(signInForPoints);
+//            one.setChargeCredit(chargeCredit);
+//            one.setCredit(credit);
+//            one.setSignInForPoints(addVehiclesEarnsPoints);
+//            one.setInviteUsersToEarnPoints(inviteUsersToEarnPoints);
+//            integralRuleService.updateById(one);
+//        }else{
+//            integralRuleService.save(tIntegralRule);
+//        }
+        TIntegralRule one = integralRuleService.getOne(null);
+        if (one!=null){
+            dto.setId(one.getId());
+            integralRuleService.saveOrUpdate(dto);
+        }else{
+            integralRuleService.saveOrUpdate(dto);
+        }
         return R.ok();
     }
     @GetMapping("/getInfo")

--
Gitblit v1.7.1