1.
phpcjl
2024-12-10 071153064e6771e377ee148712be012dba9e13c5
1.
11 文件已重命名
19个文件已修改
1个文件已添加
342 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderGoodsFallbackFactory.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ApplyRefundPass.java 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ChargingOrderListInfoVO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ConfirmOrder.java 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ConfirmOrderVo.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/EndOfChargePageInfo.java 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ReplyEvaluationVO.java 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/SetGoodsNumber.java 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ShoppingCartPayment.java 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/VerifiableShopVo.java 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Shop.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserShopController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/RefundPassService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/ShoppingCartService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsBargainPriceController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
@@ -40,6 +40,9 @@
    @GetMapping("/appUserShop/shop/{userId}")
    R<List<AppUserShop>> getAppUserShop(@PathVariable("userId") Long userId);
    @PostMapping("/appUserShop/addAppUserShop")
    R<Void> addAppUserShop(@RequestBody AppUserShop appUserShop);
    /**
     * 根据用户id获取用户的祖籍列表
     */
@@ -53,4 +56,5 @@
    @PostMapping("/app-user/getVipCount")
    R<Long> getVipCount(@RequestParam("userId")Long userId, @RequestParam("vipId") Integer vipId );
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/factory/RemoteOrderGoodsFallbackFactory.java
@@ -2,6 +2,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.feignClient.RemoteOrderGoodsClient;
import com.ruoyi.order.vo.Price;
import lombok.extern.slf4j.Slf4j;
import com.ruoyi.order.model.Order;
import com.ruoyi.order.model.OrderGood;
@@ -46,6 +47,11 @@
            public R<Void> calculationCommission(Set<String> orderIds) {
                return R.fail("计算佣金失败");
            }
            @Override
            public R<Price> getGoodsPrice(Long appUserId, Integer goodsId, Integer shopId) {
                return R.fail("获取商品价格失败");
            }
        };
    }
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java
@@ -6,6 +6,7 @@
import com.ruoyi.order.factory.RemoteOrderGoodsFallbackFactory;
import com.ruoyi.order.model.Order;
import com.ruoyi.order.model.OrderGood;
import com.ruoyi.order.vo.Price;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -53,4 +54,7 @@
     */
    @PostMapping("/commission/calculationCommission")
    public R<Void> calculationCommission(@RequestBody Set<String> orderIds);
    @GetMapping("/shopping-cart/getGoodsPrice")
    public R<Price> getGoodsPrice(@RequestParam("appUserId") Long appUserId, @RequestParam("goodsId") Integer goodsId, @RequestParam("shopId") Integer shopId);
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ApplyRefundPass.java
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ChargingOrderListInfoVO.java
File was renamed from ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/ChargingOrderListInfoVO.java
@@ -7,7 +7,6 @@
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
@Data
@ApiModel(value = "ChargingOrderListInfoVO对象",description = "充电时段统计列表查看详情VO")
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ConfirmOrder.java
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ConfirmOrderVo.java
File was renamed from ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/ConfirmOrderVo.java
@@ -1,7 +1,6 @@
package com.ruoyi.order.vo;
import com.ruoyi.account.api.model.UserAddress;
import com.ruoyi.account.api.vo.CouponInfoVo;
import com.ruoyi.account.api.vo.PaymentUserCouponVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/EndOfChargePageInfo.java
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderVO.java
File was renamed from ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderVO.java
@@ -1,11 +1,9 @@
package com.ruoyi.order.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
public class OrderVO {
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java
New file
@@ -0,0 +1,73 @@
package com.ruoyi.order.vo;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class Price {
    /**
     * 现金
     */
    private BigDecimal cash;
    /**
     * 积分
     */
    private Integer point;
    /**
     * 获取结束时间
     */
    private Long endTime;
    /**
     * 现金支付
     */
    private Boolean cashPayment;
    /**
     * 积分支付
     */
    private Boolean pointPayment;
    /**
     * 可获得消费积分
     */
    private Integer earnSpendingPoints;
    /**
     * 上级获得分佣金额
     */
    private BigDecimal superiorSubcommission;
    /**
     * 上级获得返佣积分
     */
    private Integer superiorRebatePoints;
    /**
     * 获取返佣积分上级类型(1=直推上级,2=直帮上级)
     */
    private Integer superiorType;
    /**
     * 核销门店可获得服务费
     */
    private BigDecimal servuceShopCharges;
    /**
     * 核销门店可获得服务积分
     */
    private Integer servuceShopPoints;
    /**
     * 技师可获得服务积分
     */
    private Integer technicianPoints;
    /**
     * 绑定门店可获得分佣金额
     */
    private BigDecimal boundShopCharges;
    /**
     * 绑定门店可获得返佣积分
     */
    private Integer boundShopPoints;
    /**
     * 绑定门店上级门店可获得分佣金额
     */
    private BigDecimal boundShopSuperiorsCharges;
    /**
     * 绑定门店上级门店可获得返佣积分
     */
    private Integer boundShopSuperiorsPoints;
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ReplyEvaluationVO.java
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/SetGoodsNumber.java
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/ShoppingCartPayment.java
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/VerifiableShopVo.java
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Shop.java
@@ -96,27 +96,27 @@
    @ApiModelProperty(value = "门店积分总数")
    @TableField("shop_all_point")
    private BigDecimal shopAllPoint;
    private Integer shopAllPoint;
    @ApiModelProperty(value = "门店业绩积分")
    @TableField("shop_point")
    private BigDecimal shopPoint;
    private Integer shopPoint;
    @ApiModelProperty(value = "门店返佣积分")
    @TableField("share_point")
    private BigDecimal sharePoint;
    private Integer sharePoint;
    @ApiModelProperty(value = "门店服务积分")
    @TableField("server_point")
    private BigDecimal serverPoint;
    private Integer serverPoint;
    @ApiModelProperty(value = "下级门店返佣积分")
    @TableField("lower_level_rebate_points")
    private BigDecimal lowerLevelRebatePoints;
    private Integer lowerLevelRebatePoints;
    @ApiModelProperty(value = "门店已用积分")
    @TableField("use_point")
    private BigDecimal usePoint;
    private Integer usePoint;
    @ApiModelProperty(value = "门店分佣总金额")
    @TableField("giveaway_all_money")
@@ -163,5 +163,9 @@
    @TableField("create_time")
    private LocalDateTime createTime;
    @ApiModelProperty(value = "店长姓名")
    @TableField(exist = false)
    private String managerName;
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -65,10 +65,6 @@
    }
    @ResponseBody
    @PostMapping("/appletLogin")
    @ApiOperation(value = "小程序一键登录")
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserShopController.java
@@ -20,6 +20,13 @@
    @Resource
    private AppUserShopService appUserShopService;
    @PostMapping("/addAppUserShop")
    public R<Void> add(@RequestBody AppUserShop appUserShop) {
        appUserShopService.save(appUserShop);
        return R.ok();
    }
    @GetMapping("/shop/{userId}")
    public R<List<AppUserShop>> getAppUserShop(@PathVariable("userId") Long userId) {
        return R.ok(appUserShopService.list(new LambdaQueryWrapper<AppUserShop>()
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -23,7 +23,6 @@
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.List;
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
@@ -2,6 +2,8 @@
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
@@ -41,6 +43,8 @@
    private GoodsShopClient goodsShopClient;
    @Resource
    private ShopClient shopClient;
    @Resource
    private AppUserClient appUserClient;
    
    
    
@@ -138,4 +142,12 @@
    }
    
    
    @GetMapping("/getGoodsPrice")
    public R<Price> getGoodsPrice(Long appUserId, Integer goodsId, Integer shopId){
        AppUser appUser = appUserClient.getAppUserById(appUserId);
        Price price = shoppingCartService.getPrice(appUser, goodsId, shopId);
        return R.ok(price);
    }
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/RefundPassService.java
@@ -4,7 +4,6 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.model.RefundPass;
import com.ruoyi.order.vo.ApplyRefundPass;
import org.springframework.web.bind.annotation.RequestBody;
/**
 * <p>
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/ShoppingCartService.java
@@ -1,6 +1,7 @@
package com.ruoyi.order.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.model.ShoppingCart;
import com.ruoyi.order.vo.*;
@@ -47,4 +48,6 @@
     * @return
     */
    R shoppingCartPayment(ShoppingCartPayment shoppingCartPayment);
    Price getPrice(AppUser appUser, Integer goodsId, Integer shopId);
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -12,7 +12,6 @@
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.order.enums.OrderStatus;
import com.ruoyi.order.enums.OrderType;
import com.ruoyi.order.mapper.OrderGoodMapper;
import com.ruoyi.order.mapper.OrderMapper;
import com.ruoyi.order.model.Order;
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -27,7 +27,6 @@
import com.ruoyi.other.api.vo.GetGoodsBargainPrice;
import com.ruoyi.other.api.vo.GetGoodsShopByGoodsIds;
import com.ruoyi.other.api.vo.GetSeckillActivityInfo;
import lombok.Data;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -35,7 +34,6 @@
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
@@ -155,8 +153,11 @@
            GetGoodsBargainPrice goodsBargainPrice = new GetGoodsBargainPrice();
            goodsBargainPrice.setGoodsId(goodsId);
            goodsBargainPrice.setVip(appUser.getVipId());
            GoodsBargainPriceDetail bargainPriceDetail = null;
            if (shopId != null){
            goodsBargainPrice.setShopId(shopId);
            GoodsBargainPriceDetail bargainPriceDetail = goodsBargainPriceClient.getGoodsBargainPrice(goodsBargainPrice).getData();
                bargainPriceDetail = goodsBargainPriceClient.getGoodsBargainPrice(goodsBargainPrice).getData();
            }
            if(null == bargainPriceDetail){
                //没有门店特价,判断地区价格配置
                GoodsArea area = new GoodsArea();
@@ -174,8 +175,8 @@
                    }else{
                        price.setCash(goodsVip.getSellingPrice());
                        price.setPoint(goodsVip.getIntegral());
                        price.setCashPayment(goodsVip.getCashPayment() == 1 ? true : false);
                        price.setPointPayment(goodsVip.getPointPayment() == 1 ? true : false);
                        price.setCashPayment(goodsVip.getCashPayment() == 1);
                        price.setPointPayment(goodsVip.getPointPayment() == 1);
                        price.setEarnSpendingPoints(goodsVip.getEarnSpendingPoints());
                        price.setSuperiorSubcommission(goodsVip.getSuperiorSubcommission());
                        price.setSuperiorRebatePoints(goodsVip.getSuperiorRebatePoints());
@@ -191,8 +192,8 @@
                }else{
                    price.setCash(goodsArea.getSellingPrice());
                    price.setPoint(goodsArea.getIntegral());
                    price.setCashPayment(goodsArea.getCashPayment() == 1 ? true : false);
                    price.setPointPayment(goodsArea.getPointPayment() == 1 ? true : false);
                    price.setCashPayment(goodsArea.getCashPayment() == 1);
                    price.setPointPayment(goodsArea.getPointPayment() == 1);
                    price.setEarnSpendingPoints(goodsArea.getEarnSpendingPoints());
                    price.setSuperiorSubcommission(goodsArea.getSuperiorSubcommission());
                    price.setSuperiorRebatePoints(goodsArea.getSuperiorRebatePoints());
@@ -208,8 +209,8 @@
            }else{
                price.setCash(bargainPriceDetail.getSellingPrice());
                price.setPoint(bargainPriceDetail.getIntegral());
                price.setCashPayment(bargainPriceDetail.getSellingPrice() != null ? true : false);
                price.setPointPayment(bargainPriceDetail.getIntegral() != null ? true : false);
                price.setCashPayment(bargainPriceDetail.getSellingPrice() != null);
                price.setPointPayment(bargainPriceDetail.getIntegral() != null);
                //门店特价,消费积分使用会员等级的消费积分
                GoodsArea area = new GoodsArea();
                area.setDistrictsCode(appUser.getDistrictCode());
@@ -241,8 +242,8 @@
            if(goodsSeckill.getCashPayment() == 0 && goodsSeckill.getPointPayment() == 1){
                price.setPoint(goodsSeckill.getIntegral());
            }
            price.setCashPayment(goodsSeckill.getCashPayment() == 1 ? true : false);
            price.setPointPayment(goodsSeckill.getPointPayment() == 1 ? true : false);
            price.setCashPayment(goodsSeckill.getCashPayment() == 1);
            price.setPointPayment(goodsSeckill.getPointPayment() == 1);
            price.setEndTime(goodsSeckill.getEndTime());
            price.setEarnSpendingPoints(goodsSeckill.getEarnSpendingPoints());
            price.setSuperiorSubcommission(goodsSeckill.getSuperiorSubcommission());
@@ -260,73 +261,6 @@
    }
    
    
    @Data
    class Price {
        /**
         * 现金
         */
        private BigDecimal cash;
        /**
         * 积分
         */
        private Integer point;
        /**
         * 获取结束时间
         */
        private Long endTime;
        /**
         * 现金支付
         */
        private Boolean cashPayment;
        /**
         * 积分支付
         */
        private Boolean pointPayment;
        /**
         * 可获得消费积分
         */
        private Integer earnSpendingPoints;
        /**
         * 上级获得分佣金额
         */
        private BigDecimal superiorSubcommission;
        /**
         * 上级获得返佣积分
         */
        private Integer superiorRebatePoints;
        /**
         * 获取返佣积分上级类型(1=直推上级,2=直帮上级)
         */
        private Integer superiorType;
        /**
         * 核销门店可获得服务费
         */
        private BigDecimal servuceShopCharges;
        /**
         * 核销门店可获得服务积分
         */
        private Integer servuceShopPoints;
        /**
         * 技师可获得服务积分
         */
        private Integer technicianPoints;
        /**
         * 绑定门店可获得分佣金额
         */
        private BigDecimal boundShopCharges;
        /**
         * 绑定门店可获得返佣积分
         */
        private Integer boundShopPoints;
        /**
         * 绑定门店上级门店可获得分佣金额
         */
        private BigDecimal boundShopSuperiorsCharges;
        /**
         * 绑定门店上级门店可获得返佣积分
         */
        private Integer boundShopSuperiorsPoints;
    }
    
    @Override
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsBargainPriceController.java
@@ -41,9 +41,13 @@
     */
    @PostMapping("/getGoodsBargainPrice")
    public R<GoodsBargainPriceDetail> getGoodsBargainPrice(@RequestBody GetGoodsBargainPrice goodsBargainPrice){
        GoodsBargainPrice one = goodsBargainPriceService.getOne(new LambdaQueryWrapper<GoodsBargainPrice>().eq(GoodsBargainPrice::getGoodsId, goodsBargainPrice.getGoodsId())
                .eq(GoodsBargainPrice::getShopId, goodsBargainPrice.getShopId()).eq(GoodsBargainPrice::getAuditStatus, 1).eq(GoodsBargainPrice::getDelFlag, 0)
                .orderByDesc(GoodsBargainPrice::getCreateTime).last(" limit 0,1"));
        GoodsBargainPrice one = goodsBargainPriceService.getOne(new LambdaQueryWrapper<GoodsBargainPrice>()
                .eq(GoodsBargainPrice::getGoodsId, goodsBargainPrice.getGoodsId())
                .eq(GoodsBargainPrice::getShopId, goodsBargainPrice.getShopId())
                .eq(GoodsBargainPrice::getAuditStatus, 1)
                .eq(GoodsBargainPrice::getDelFlag, 0)
                .orderByDesc(GoodsBargainPrice::getCreateTime)
                .last(" limit 0,1"));
        if(null == one){
            return R.ok();
        }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -11,16 +11,15 @@
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.api.domain.ShopScore;
import com.ruoyi.other.enums.ShopStatus;
import com.ruoyi.other.service.ShopScoreService;
import com.ruoyi.other.service.ShopService;
import com.ruoyi.other.service.TechnicianService;
import com.ruoyi.other.vo.NearbyShopVO;
import com.ruoyi.other.vo.ShopDetailVO;
import com.ruoyi.system.api.model.LoginUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -43,8 +42,6 @@
@Api(tags = "门店")
public class ShopController extends BaseController {
    @Resource
    private TechnicianService technicianService;
    @Resource
    private ShopService shopService;
    @Resource
    private AppUserClient appUserClient;
@@ -55,20 +52,64 @@
    @PostMapping
    @ApiOperation(value = "新增门店", tags = {"后台管理-门店管理-新增门店"})
    @Transactional(rollbackFor = Exception.class)
    public R<Void> add(@RequestBody Shop shop){
        shop.setShopAllPoint(0);
        shop.setShopPoint(0);
        shop.setSharePoint(0);
        shop.setServerPoint(0);
        shop.setLowerLevelRebatePoints(0);
        shop.setUsePoint(0);
        shop.setGiveawayAllMoney(BigDecimal.ZERO);
        shop.setGiveawayMoney(BigDecimal.ZERO);
        shop.setLowerLevelGiveawayMoney(BigDecimal.ZERO);
        shop.setServerGiveawayMoney(BigDecimal.ZERO);
        shop.setCanWithdrawMoney(BigDecimal.ZERO);
        shop.setWithdrawMoney(BigDecimal.ZERO);
        shop.setOrderNumber(0);
        shop.setServerOrderNumber(0);
        shop.setCustomOrderNumber(0);
        shopService.save(shop);
        LoginUser loginUserApplet = tokenService.getLoginUserApplet();
        AppUserShop appUserShop = new AppUserShop();
        appUserShop.setAppUserId(loginUserApplet.getUserid());
        appUserShop.setShopId(shop.getId());
        appUserClient.addAppUserShop(appUserShop);
        return R.ok();
    }
    @PostMapping("/getDetailById")
    @ApiOperation(value = "门店详情", tags = {"后台管理-门店管理-门店详情"})
    public R<Shop> getDetailById(@RequestParam("id") Long id){
        Shop byId = shopService.getById(id);
        return R.ok(byId);
    }
    @DeleteMapping("/deleteShop")
    @ApiOperation(value = "删除门店", tags = {"后台管理-门店管理-删除门店"})
    public R<Void> deleteShop(@ApiParam("门店id") @RequestParam("id") Integer id){
        shopService.removeById(id);
        return R.ok();
    }
    @PutMapping("/editShop")
    @ApiOperation(value = "编辑门店", tags = {"后台管理-门店管理-编辑门店"})
    public R<Void> editShop(@RequestBody Shop shop){
        shopService.updateById(shop);
        return R.ok();
    }
    @GetMapping("/list")
    @ApiOperation(value = "门店列表", tags = {"后台管理-门店管理-门店列表"})
    public R<List<Shop>> list(@ApiParam("页码") @RequestParam Integer PageNum,@ApiParam("每一页数据大小") Integer pageSize,Shop shop){
        List<Shop> list = shopService.list();
    }
    /**
     * 附近门店列表
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java
@@ -1,6 +1,8 @@
package com.ruoyi.other.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.vo.NearbyShopVO;
import com.ruoyi.other.vo.ShopDetailVO;
@@ -19,6 +21,8 @@
 */
public interface ShopMapper extends BaseMapper<Shop> {
    IPage<Shop> selectShopList(@Param("page") Page<Shop> page,@Param("shop") Shop shop);
    List<NearbyShopVO> selectNearbyShopList(@Param("longitude") BigDecimal longitude,@Param("latitude") BigDecimal latitude);
    ShopDetailVO selectShopDetail(Integer shopId);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java
@@ -18,6 +18,8 @@
 */
public interface ShopService extends IService<Shop> {
    List<Shop> getShopList(Shop shop);
    List<NearbyShopVO> nearbyShopList(BigDecimal longitude, BigDecimal latitude);
    ShopDetailVO getShopDetail(Integer shopId, BigDecimal longitude, BigDecimal latitude);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -4,9 +4,12 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.utils.bean.BeanUtils;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.order.feignClient.RemoteOrderGoodsClient;
import com.ruoyi.order.vo.Price;
import com.ruoyi.other.api.domain.*;
import com.ruoyi.other.enums.GoodsStatus;
import com.ruoyi.other.mapper.GoodsAreaMapper;
@@ -54,6 +57,8 @@
    private GoodsShopMapper goodsShopMapper;
    @Resource
    private ShopMapper shopMapper;
    @Resource
    private RemoteOrderGoodsClient remoteOrderGoodsClient;
    @Override
    public List<GoodsVO> goodsList(Goods search) {
@@ -63,11 +68,18 @@
                .like(StringUtils.isNotEmpty(search.getName()), Goods::getName, search.getName()));
        List<GoodsVO> result = new ArrayList<>();
        LoginUser loginUserApplet = tokenService.getLoginUserApplet();
        for (Goods goods : goodsList) {
            GoodsVO goodsVO = new GoodsVO();
            BeanUtils.copyBeanProp(goodsVO, goods);
            goodsVO.setGoodsId(goods.getId());
            goodsVO.setGoodsName(goods.getName());
            R<Price> r = remoteOrderGoodsClient.getGoodsPrice(loginUserApplet.getUserid(), goods.getId(), null);
            if (R.isSuccess(r)){
                Price price = r.getData();
                goodsVO.setSellingPrice(price.getCash());
                goodsVO.setIntegral(price.getPoint());
            }
            result.add(goodsVO);
        }
        return result;
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
@@ -1,9 +1,12 @@
package com.ruoyi.other.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.common.core.exception.ServiceException;
import com.ruoyi.common.core.utils.GeodesyUtil;
import com.ruoyi.order.feignClient.RemoteOrderGoodsClient;
import com.ruoyi.other.api.domain.ShopScore;
import com.ruoyi.other.mapper.ShopMapper;
import com.ruoyi.other.api.domain.Shop;
@@ -35,6 +38,15 @@
    private ShopMapper shopMapper;
    @Resource
    private ShopScoreService shopScoreService;
    @Resource
    private RemoteOrderGoodsClient remoteOrderGoodsClient;
    @Override
    public List<Shop> getShopList(Shop shop) {
        IPage<Shop> shopIPage = shopMapper.selectShopList(null, null);
        return shopIPage.getRecords();
    }
    @Override
    public List<NearbyShopVO> nearbyShopList(BigDecimal longitude, BigDecimal latitude) {
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopMapper.xml
@@ -53,4 +53,31 @@
            ts.longitude,
            ts.latitude
    </select>
    <select id="selectShopList" resultType="com.ruoyi.other.api.domain.Shop">
        SELECT
            ts.id,
            ts.`name`,
            ts.business_date,
            tau.`name` managerName,
            ts.phone,
            ts.address,
            ts.`status`
        FROM
            `qijisheng_other`.t_shop ts
                LEFT JOIN `qijisheng_account`.t_app_user tau ON ts.app_user_id = tau.id
        <where>
            <if test="shop.name != null and shop.name != ''">
                and ts.name like concat('%',#{shop.name},'%')
            </if>
            <if test="shop.managerName != null and shop.managerName != ''">
                and tau.name like concat('%',#{shop.managerName},'%')
            </if>
            <if test="shop.phone != null and shop.phone != ''">
                and ts.phone like concat('%',#{shop.phone},'%')
            </if>
            <if test="shop.status != null and shop.status != ''">
                and ts.status = #{shop.status}
            </if>
        </where>
    </select>
</mapper>