luodangjia
2025-01-15 90b41d40bb34ccd8e3bce722946d1bc11b729da5
12.18
8个文件已修改
21 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserPoint.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserPoint.java
@@ -38,7 +38,7 @@
    private Long id;
    @ApiModelProperty(value = "变动类型(1-消费,2-返佣,3-拉新,4-每日分享,5-每日签到,6-使用时长, 7-注册积分, 8-门店业绩," +
            "9-门店返佣,14-下级门店返佣,10-技师业绩,11-兑换商品,12-他人赠送,13-赠与他人)")
            "9-门店返佣,14-下级门店返佣,10-技师业绩,11-兑换商品,12-他人赠送,13-赠与他人,14-兑换券)")
    @TableField("type")
    private Integer type;
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java
@@ -244,7 +244,7 @@
            appUserService.updateById(byId);
            
            UserPoint userPoint = new UserPoint();
            userPoint.setType(11);
            userPoint.setType(14);
            userPoint.setHistoricalPoint(lavePoint);
            userPoint.setVariablePoint(point);
            userPoint.setBalance(byId.getLavePoint());
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -419,7 +419,7 @@
     */
    @PostMapping("/getGoodsSaleNum")
    public R<Integer> getGoodsSaleNum(@RequestParam("goodsId") Integer goodsId, @RequestParam("type") Integer type){
        Integer goodsSaleNum = orderService.getGoodsSaleNum(goodsId, type);
        Integer goodsSaleNum = orderService.getGoodsSaleNum(goodsId, type, null);
        return R.ok(goodsSaleNum);
    }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/OrderMapper.java
@@ -43,7 +43,9 @@
     * @param goodsId
     * @return
     */
    Integer getGoodsSaleNum(@Param("goodsId") Integer goodsId, @Param("type") Integer type);
    Integer getGoodsSaleNum(@Param("goodsId") Integer goodsId,
                            @Param("type") Integer type,
                            @Param("userId") Long userId);
    /**
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java
@@ -98,7 +98,7 @@
     * @param goodsId
     * @return
     */
    Integer getGoodsSaleNum(Integer goodsId, Integer type);
    Integer getGoodsSaleNum(Integer goodsId, Integer type, Long userId);
    /**
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -853,8 +853,8 @@
     * @return
     */
    @Override
    public Integer getGoodsSaleNum(Integer goodsId, Integer type) {
        return this.baseMapper.getGoodsSaleNum(goodsId, type);
    public Integer getGoodsSaleNum(Integer goodsId, Integer type, Long userId) {
        return this.baseMapper.getGoodsSaleNum(goodsId, type, userId);
    }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -723,7 +723,7 @@
            num += num1;
            ShoppingCart shoppingCart = this.getById(id);
            //判断当前数量是否已经超出限购数量(需要计算已经购买的数量)
            Integer goodsSaleNum = orderService.getGoodsSaleNum(shoppingCart.getGoodsId(), type);
            Integer goodsSaleNum = orderService.getGoodsSaleNum(shoppingCart.getGoodsId(), type, userid);
            Goods goods = goodsClient.getGoodsById(shoppingCart.getGoodsId()).getData();
            if(1 == type){
                if(null != goods.getPurchaseLimit() && -1 != goods.getPurchaseLimit() && (goodsSaleNum + num1) > goods.getPurchaseLimit()){
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -118,6 +118,9 @@
        <if test="null != type">
            and a.type = #{type}
        </if>
        <if test="userId != null">
            and b.app_user_id = #{userId}
        </if>
    </select>