From f3904ac655eb148befb53f792cddf44e3b147962 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 22 八月 2024 15:56:12 +0800
Subject: [PATCH] 修改
---
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java | 8 ++++----
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java | 12 +++++-------
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TGoodsMapper.xml | 6 ++----
3 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java
index 0d8fb3e..23c8fc9 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java
@@ -7,9 +7,7 @@
import com.ruoyi.order.api.query.TActivityStatisticsQuery;
import com.ruoyi.order.api.vo.TActivityVO;
import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -20,16 +18,16 @@
@FeignClient(contextId = "OrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = OrderFallbackFactory.class)
public interface OrderClient {
- @PostMapping("/t-exchange-order/getSalesCountByGoodsIds")
- R<List<Integer>> getSalesCountByGoodsId(String goodsIds);
+ @GetMapping("/t-exchange-order/getSalesCountByGoodsIds/{goodsIds}")
+ R<List<Integer>> getSalesCountByGoodsId(@PathVariable("goodsIds") String goodsIds);
/**
* 管理后台 根据t_app_coupon订单购买或者兑换优惠券的订单编号
* @param goodsIds 订单号-商品类型
* @return
*/
- @PostMapping("/t-exchange-order/getCodeByOrderId")
- public R<List<String>> getCodeByOrderId(String goodsIds);
+ @GetMapping("/t-exchange-order/getCodeByOrderId/{goodsIds}")
+ public R<List<String>> getCodeByOrderId(@PathVariable("goodsIds")String goodsIds);
//查询已兑换的订单数
@PostMapping("/t-exchange-order/getById")
public R<Long> getExchangeById(@RequestParam("goodId") Integer goodId,@RequestParam("userId") Long userId,@RequestParam("goodType") Integer goodType);
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java
index de60d7f..92e56a0 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java
@@ -83,8 +83,8 @@
* @param goodsIds 订单号-商品类型
* @return
*/
- @PostMapping("/getSalesCountByGoodsIds")
- public R<List<Integer>> getSalesCountByGoodsId(String goodsIds){
+ @GetMapping("/getSalesCountByGoodsIds/{goodsIds}")
+ public R<List<Integer>> getSalesCountByGoodsId(@PathVariable("goodsIds")String goodsIds){
String[] split = goodsIds.split("-");
// 取出最后一位字符 类型1查询现金购买 类型2查询积分兑换
String s = split[split.length - 1];
@@ -117,8 +117,8 @@
* @param goodsIds 订单号-商品类型
* @return
*/
- @PostMapping("/getCodeByOrderId")
- public R<List<String>> getCodeByOrderId(String goodsIds){
+ @GetMapping("/getCodeByOrderId/{goodsIds}")
+ public R<List<String>> getCodeByOrderId(@PathVariable("goodsIds") String goodsIds){
String[] split = goodsIds.split("-");
List<String> strings = new ArrayList<>();
for (String s : split) {
diff --git a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TGoodsMapper.xml b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TGoodsMapper.xml
index 552b98c..2444fda 100644
--- a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TGoodsMapper.xml
+++ b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TGoodsMapper.xml
@@ -32,7 +32,7 @@
</sql>
<select id="pageList" resultType="com.ruoyi.other.api.domain.TGoods">
select * from t_goods
- <where>
+ where 1=1
<if test="req.name != null and req.name != ''">
AND `name` LIKE concat('%',#{req.name}, '%')
</if>
@@ -42,11 +42,9 @@
<if test="req.status != null">
AND status = #{req.status}
</if>
- <if test="req.otherState != null and req.otherState = 2">
+ <if test="req.otherState != null and req.otherState == 2">
AND inventory = 0
</if>
- AND del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()}
- </where>
ORDER BY create_time DESC
</select>
--
Gitblit v1.7.1