puzhibing
2024-12-26 132b50b690dde85c616448840cc505056de708b4
合并代码
6个文件已修改
37 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/ShopClient.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipSettingController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java
@@ -58,6 +58,10 @@
     */
    private String superiorType;
    /**
     * 获取返佣积分上级类型(1=直推上级,2=直帮上级)
     */
    private String superiorPriceType;
    /**
     * 核销门店可获得服务费
     */
    private BigDecimal servuceShopCharges;
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java
@@ -43,6 +43,10 @@
     */
    private String superiorType;
    /**
     * 获取分佣金额上级类型(1=直推上级,2=直帮上级)
     */
    private String superiorPriceType;
    /**
     * 核销门店可获得服务费
     */
    private BigDecimal servuceShopCharges;
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/ShopClient.java
@@ -55,6 +55,6 @@
     * 编辑门店
     * @param shop
     */
    @PostMapping("/shop-balance-statement/updateShop")
    @PostMapping("/shop/updateShop")
    void updateShop(Shop shop);
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -285,7 +285,7 @@
        }
        //当前绑定门店的店铺信息
        if (user.getShopId() != null) {
            R<Shop> storeById = storeClient.getStoreById(user.getShopId());
            R<Shop> storeById = shopClient.getShopById(user.getShopId());
            if (storeById.getData() != null) {
                user.setShopName(storeById.getData().getName());
            }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipSettingController.java
@@ -158,6 +158,8 @@
        vipSetDto.setPartPoint(new BigDecimal(base1.getContent()));
        BaseSetting base2 = baseSettingService.getById(2);
        vipSetDto.setBottomPartPoint(new BigDecimal(base2.getContent()));
        BaseSetting base3 = baseSettingService.getById(3);
        vipSetDto.setVipInfo(base3.getContent());
        return R.ok(vipSetDto);
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
@@ -9,6 +9,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.exception.ServiceException;
import com.ruoyi.common.core.utils.GeodesyUtil;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.api.domain.ShopScore;
import com.ruoyi.other.mapper.ShopMapper;
@@ -21,6 +22,7 @@
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -42,6 +44,8 @@
    private ShopScoreService shopScoreService;
    @Resource
    private AppUserClient appUserClient;
    @Resource
    private TokenService tokenService;
    @Override
@@ -54,7 +58,25 @@
    @Override
    public List<NearbyShopVO> nearbyShopList(BigDecimal longitude, BigDecimal latitude) {
        Long userid = tokenService.getLoginUserApplet().getUserid();
        AppUser appUser = appUserClient.getAppUserById(userid);
        List<NearbyShopVO> nearbyShopVOS = shopMapper.selectNearbyShopList(longitude, longitude);
        if(null != appUser.getShopId()){
            NearbyShopVO nearbyShopVO = nearbyShopVOS.stream().filter(s -> s.getId().equals(appUser.getShopId().longValue())).findFirst().get();
            if(null != nearbyShopVO){
                nearbyShopVOS.remove(nearbyShopVO);
            }
            Shop shop = shopMapper.selectById(appUser.getShopId());
            NearbyShopVO vo = new NearbyShopVO();
            vo.setId(appUser.getShopId().longValue());
            vo.setName(shop.getName());
            vo.setAddress(shop.getAddress());
            vo.setHomePicture(shop.getHomePicture());
            Double wgs84 = GeodesyUtil.getDistance(longitude.toString() + "," + latitude.toString(), shop.getLongitude() + "," + shop.getLatitude()).get("WGS84");
            vo.setDistance(wgs84.toString());
            nearbyShopVOS.add(0, vo);
        }
        if (nearbyShopVOS == null || nearbyShopVOS.isEmpty()) {
            return Collections.emptyList();
        }
@@ -66,7 +88,6 @@
        }
        Map<Long, List<ShopScore>> shopScoreMap = shopScores.stream().collect(Collectors.groupingBy(ShopScore::getShopId));
        nearbyShopVOS.forEach(nearbyShopVO -> {
            List<ShopScore> scores = shopScoreMap.get(nearbyShopVO.getId());
            if (scores != null && !scores.isEmpty()){