puzhibing
2024-08-22 f3904ac655eb148befb53f792cddf44e3b147962
修改
3个文件已修改
26 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TGoodsMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
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) {
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>