luodangjia
2025-01-13 3eac3116ce54c2593f09a74feed370cf0800028e
Merge remote-tracking branch 'origin/master'

# Conflicts:
# ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
23个文件已修改
240 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/UserCouponClientFallbackFactory.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/UserCouponClient.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserAddress.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/Order.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/VipCenterController.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserCouponServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | 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 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/ExpressDeliveryUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderPageListVo.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsEvaluateServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/GoodsMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/UserCouponClientFallbackFactory.java
@@ -43,6 +43,11 @@
            public R editUserCoupon(UserCoupon userCoupon) {
                return R.fail("编辑用户优惠券失败:" + cause.getMessage());
            }
            @Override
            public R editReturnUse(UserCoupon userCoupon) {
                return R.fail("编辑用户优惠券使用时间失败:" + cause.getMessage());
            }
        };
    }
}
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/UserCouponClient.java
@@ -59,4 +59,13 @@
     */
    @PostMapping("/user-coupon/editUserCoupon")
    R editUserCoupon(@RequestBody UserCoupon userCoupon);
    /**
     * 编辑用户优惠券使用时间
     * @param userCoupon
     * @return
     */
    @PostMapping("/user-coupon/editReturnUse")
    R editReturnUse(@RequestBody UserCoupon userCoupon);
}
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserAddress.java
@@ -49,6 +49,30 @@
    @ApiModelProperty(value = "收件人电话")
    @TableField("recieve_phone")
    private String recievePhone;
    @ApiModelProperty(value = "省")
    @TableField("province")
    private String province;
    @ApiModelProperty(value = "省编号")
    @TableField("province_code")
    private String provinceCode;
    @ApiModelProperty(value = "市")
    @TableField("city")
    private String city;
    @ApiModelProperty(value = "市编号")
    @TableField("city_code")
    private String cityCode;
    @ApiModelProperty(value = "区")
    @TableField("district")
    private String district;
    @ApiModelProperty(value = "区编号")
    @TableField("district_code")
    private String districtCode;
    @ApiModelProperty(value = "收件人地址")
    @TableField("recieve_address")
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/Order.java
@@ -43,6 +43,10 @@
    @TableField("order_status")
    private Integer orderStatus;
    @ApiModelProperty(value = "1待发货2待收货3待使用4已完成5已取消6已退款7售后中8已评价")
    @TableField("old_order_status")
    private Integer oldOrderStatus;
    @ApiModelProperty(value = "是否已分佣: 0-否 1-是")
    @TableField("is_commission")
    private Integer isCommission;
@@ -147,6 +151,30 @@
    @TableField("express_result")
    private String expressResult;
    @ApiModelProperty(value = "发货省")
    @TableField("deliver_province")
    private String deliverProvince;
    @ApiModelProperty(value = "发货省编号")
    @TableField("deliver_province_code")
    private String deliverProvinceCode;
    @ApiModelProperty(value = "发货市")
    @TableField("deliver_city")
    private String deliverCity;
    @ApiModelProperty(value = "发货市编号")
    @TableField("deliver_city_code")
    private String deliverCityCode;
    @ApiModelProperty(value = "发货区")
    @TableField("deliver_district")
    private String deliverDistrict;
    @ApiModelProperty(value = "发货区编号")
    @TableField("deliver_district_code")
    private String deliverDistrictCode;
    @ApiModelProperty(value = "收货地址信息")
    @TableField("address_json")
    private String addressJson;
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java
@@ -134,13 +134,13 @@
        }
        //门店员工添加数据,需要判断账号是否存在,共用同一个账号
        if(2 == sysUser1.getRoleType()){
            SysUser one = userService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUserName, user.getPhonenumber())
                    .eq(SysUser::getDelFlag, "0").eq(SysUser::getStatus, "0").eq(SysUser::getRoleType, 2));
            if(null == one){
                AppUser appUser = appUserClient.getAppUserByPhone1(user.getPhonenumber()).getData();
                if(null == appUser){
                    return error("请先注册小程序账号");
                }
            SysUser one = userService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUserName, user.getPhonenumber())
                    .eq(SysUser::getDelFlag, "0").eq(SysUser::getStatus, "0").eq(SysUser::getRoleType, 2));
            if(null == one){
                user.setCreateBy(SecurityUtils.getUsername());
                user.setPassword(SecurityUtils.encryptPassword("a123456"));
                user.setRoleType(sysUser1.getRoleType());
@@ -154,8 +154,13 @@
                sysUserRole.setRoleId(user.getRoleId());
                sysUserRole.setUserId(user.getUserId());
                userRoleService.insertSysUserRole(sysUserRole);
            }
                //添加小程序店员关系数据
                if(null != appUser){
                List<AppUserShop> data = appUserShopClient.getAppUserShop(appUser.getId()).getData();
                Optional<AppUserShop> first = data.stream().filter(s -> s.getShopId().equals(sysUser1.getObjectId())).findFirst();
                if(!first.isPresent()){
                    AppUserShop appUserShop = new AppUserShop();
                    appUserShop.setAppUserId(appUser.getId());
                    appUserShop.setShopId(sysUser1.getObjectId());
@@ -164,6 +169,7 @@
                    appUserClient.editAppUserById(appUser);
                }
            }
            //添加门店员工关系数据
            UserShop userShop = new UserShop();
            userShop.setUserId(one.getUserId());
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
@@ -2,6 +2,10 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.feignClient.AppUserShopClient;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.account.api.model.AppUserShop;
import com.ruoyi.common.core.constant.UserConstants;
import com.ruoyi.common.core.exception.ServiceException;
import com.ruoyi.common.core.utils.SpringUtils;
@@ -79,6 +83,12 @@
    
    @Resource
    private UserShopService userShopService;
    @Resource
    private AppUserShopClient appUserShopClient;
    @Resource
    private AppUserClient appUserClient;
    
    
    /**
@@ -442,6 +452,8 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int deleteUserByIds(Long[] userIds) {
        Long userid = tokenService.getLoginUser().getUserid();
        SysUser sysUser = this.getById(userid);
        for (Long userId : userIds) {
            checkUserAllowed(new SysUser(userId));
//            checkUserDataScope(userId);
@@ -450,14 +462,34 @@
//        userRoleMapper.deleteUserRole(userIds);
//        // 删除用户与岗位关联
//        userPostMapper.deleteUserPost(userIds);
        int i = userMapper.deleteUserByIds(userIds);
//        int i = userMapper.deleteUserByIds(userIds);
        List<SysUser> sysUsers = this.listByIds(Arrays.asList(userIds));
        for (SysUser user : sysUsers) {
            if(2 == user.getRoleType()){
                userShopService.remove(new LambdaQueryWrapper<UserShop>().eq(UserShop::getUserId, user.getUserId()).eq(UserShop::getShopId, user.getObjectId()));
                userShopService.remove(new LambdaQueryWrapper<UserShop>().eq(UserShop::getUserId, user.getUserId()).eq(UserShop::getShopId, sysUser.getObjectId()));
                AppUser appUser = appUserClient.getAppUserByPhone1(user.getPhonenumber()).getData();
                if(null != appUser){
                    AppUserShop appUserShop = new AppUserShop();
                    appUserShop.setAppUserId(appUser.getId());
                    appUserShop.setShopId(sysUser.getObjectId());
                    appUserShopClient.delAppUserShop(appUserShop);
                    int size = appUserShopClient.getAppUserShop(appUser.getId()).getData().size();
                    if(size == 0){
                        appUser.setUserType(1);
                        appUserClient.editAppUserById(appUser);
            }
        }
        return i;
                long count = userShopService.count(new LambdaQueryWrapper<UserShop>().eq(UserShop::getUserId, user.getUserId()));
                if(0 == count){
                    user.setDelFlag("2");
                    this.updateById(user);
                }
            }else{
                user.setDelFlag("2");
                this.updateById(user);
            }
        }
        return 0;
    }
    
    /**
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -104,6 +104,8 @@
    private OrderClient orderClient;
    @Resource
    private ShopBalanceStatementClient shopBalanceStatementClient;
    @Resource
    private UserCancellationLogService userCancellationLogService;
    @ResponseBody
@@ -213,8 +215,7 @@
        return R.ok(user);
    }
    @Resource
    private UserCancellationLogService userCancellationLogService;
    @ResponseBody
    @GetMapping("/unregis")
@@ -310,7 +311,8 @@
        if (user.getShopId() != null) {
            R<Shop> storeById = shopClient.getShopById(user.getShopId());
            if (storeById.getData() != null) {
                user.setShopName(storeById.getData().getName());
                Shop shop = storeById.getData();
                user.setShopName(shop.getName());
            }
        }
        Long count1 = appUserService.lambdaQuery().eq(AppUser::getVipId, 1).eq(AppUser::getInviteUserId, userId).or().eq(AppUser::getTopInviteId,userId).count();
@@ -766,8 +768,6 @@
                        .merge(vipId, distributionAmount, BigDecimal::add);
            }
        }
        // 门店分佣计算
        List<Shop> data = shopClient.getAllShop().getData();
        if(sysUser.getRoleType() == 2){
            data = Arrays.asList(shopClient.getShopById(sysUser.getObjectId()).getData());
@@ -831,9 +831,6 @@
                    return commissionDate;
                })
                .collect(Collectors.toList());
        commissionDetail.setCommissionDateList(commissionDateList);
        return R.ok(commissionDetail);
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java
@@ -105,8 +105,8 @@
                            goodNames.add(datum.getName());
                        }
                    }
                    vo.setGoodNames(goodNames);
                }
                vo.setGoodNames(goodNames);
            }
            record.setCouponInfoVo(vo);
@@ -374,5 +374,18 @@
        userCouponService.updateById(userCoupon);
        return R.ok();
    }
    /**
     * 编辑用户优惠券使用时间
     * @param userCoupon
     * @return
     */
    @PostMapping("/editReturnUse")
    public R editReturnUse(@RequestBody UserCoupon userCoupon){
        userCouponService.update(new LambdaUpdateWrapper<UserCoupon>().eq(UserCoupon::getId, userCoupon.getId())
                .set(UserCoupon::getUseTime, userCoupon.getUseTime()));
        return R.ok();
    }
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/VipCenterController.java
@@ -142,16 +142,6 @@
    private Map<Integer, R<GoodsVip>> getGoodsVips(List<Integer> vipIds) {
        Map<Integer, R<GoodsVip>> result = new HashMap<>();
        for (Integer vipId : vipIds) {
            R<GoodsVip> goodsVipR = goodsVipClient.getGoodsVip(null, vipId);
            result.put(vipId, goodsVipR);
        }
        return result;
    }
    private Map<Integer, R<List<VipGood>>> getVipGoods(List<Integer> vipIds) {
        Map<Integer, R<List<VipGood>>> result = new HashMap<>();
        for (Integer vipId : vipIds) {
@@ -161,13 +151,6 @@
        return result;
    }
    private boolean isValidJson(String json) {
        try {
            JSONObject.parseObject(json);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java
@@ -1,6 +1,7 @@
package com.ruoyi.account.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -53,7 +54,11 @@
    public void apply(AgentApplication agentApplication) {
        LoginUser loginUserApplet = tokenService.getLoginUserApplet();
        AppUser appUser = appUserService.getById(loginUserApplet.getUserid());
        Long aLong = agentApplicationMapper.selectCount(new QueryWrapper<AgentApplication>().eq("app_user_id", appUser.getId())
                .eq("application_vip_id", agentApplication.getApplicationVipId()).eq("status", 1).eq("del_flag", 0));
        if(0 != aLong){
            throw new RuntimeException("已发起申请,请等待平台工作人员与您联系");
        }
        agentApplication.setAppUserId(loginUserApplet.getUserid());
        agentApplication.setStatus(1);
        agentApplication.setApplicationTime(LocalDateTime.now());
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserCouponServiceImpl.java
@@ -12,6 +12,7 @@
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
@@ -44,14 +45,14 @@
    @Override
    public List<PaymentUserCouponVo> getUserCoupon(Long userId, Integer type) {
        List<UserCoupon> list = this.list(new LambdaQueryWrapper<UserCoupon>().eq(UserCoupon::getAppUserId, userId).eq(UserCoupon::getDelFlag, 0)
                .last(" and now() between start_time and end_time"));
                .isNull(UserCoupon::getUseTime).gt(UserCoupon::getEndTime, LocalDateTime.now()).last(" and now() between start_time and end_time"));
        List<Integer> couponIds = list.stream().map(UserCoupon::getCouponId).collect(Collectors.toList());
        if(couponIds.size() == 0){
            return null;
        }
        List<CouponInfo> couponInfoList = couponInfoClient.getCouponInfoList(couponIds).getData();
        //构建返回数据
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        List<PaymentUserCouponVo> infoVoList = new ArrayList<>();
        for (UserCoupon userCoupon : list) {
            CouponInfo couponInfo = couponInfoList.stream().filter(s -> s.getId().equals(userCoupon.getCouponId())).findFirst().get();
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -205,6 +205,7 @@
    public R<Void> updateOrderStatus(@RequestBody Order order){
        Order order1 = orderService.getById(order.getId());
        order1.setOrderStatus(order.getOrderStatus());
        order1.setOldOrderStatus(order.getOldOrderStatus());
        orderService.updateById(order1);
        return R.ok();
    }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
@@ -43,10 +43,6 @@
    @Resource
    private TokenService tokenService;
    @Resource
    private GoodsShopClient goodsShopClient;
    @Resource
    private ShopClient shopClient;
    @Resource
    private AppUserClient appUserClient;
    
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -8,6 +8,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.feignClient.BalanceChangeRecordClient;
import com.ruoyi.account.api.feignClient.UserCouponClient;
import com.ruoyi.account.api.feignClient.UserPointClient;
import com.ruoyi.account.api.model.*;
import com.ruoyi.common.core.domain.R;
@@ -109,6 +110,9 @@
    @Resource
    private SystemConfigClient systemConfigClient;
    
    @Resource
    private UserCouponClient userCouponClient;
    
@@ -193,6 +197,7 @@
        orderDetailVO.setAddressId(userAddress.getId());
        orderDetailVO.setRecieveName(userAddress.getRecieveName());
        orderDetailVO.setRecievePhone(userAddress.getRecievePhone());
        userAddress.setRecieveAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getRecieveAddress());
        orderDetailVO.setRecieveAddress(userAddress.getRecieveAddress());
        orderDetailVO.setOrderNumber(order.getOrderNumber());
        orderDetailVO.setCreateTime(order.getCreateTime());
@@ -490,6 +495,12 @@
            userPoint.setObjectId(order.getId());
            userPointClient.saveUserPoint(userPoint);
            appUserClient.editAppUserById(appUser);
            //回退优惠券状态
            if(null != order.getUserCouponId()){
                UserCoupon userCoupon = userCouponClient.getUserCoupon(order.getUserCouponId()).getData();
                userCoupon.setUseTime(null);
                userCouponClient.editReturnUse(userCoupon);
            }
        }
        if(3 == payMethod){
            //开始运费退款,积分支付,运费是单独进行支付的,所以需要单独退款
@@ -614,6 +625,13 @@
        userPoint.setObjectId(order.getId());
        userPointClient.saveUserPoint(userPoint);
        appUserClient.editAppUserById(appUser);
        //回退优惠券状态
        if(null != order.getUserCouponId()){
            UserCoupon userCoupon = userCouponClient.getUserCoupon(order.getUserCouponId()).getData();
            userCoupon.setUseTime(null);
            userCouponClient.editReturnUse(userCoupon);
        }
        return R.ok();
    }
@@ -742,6 +760,7 @@
        if(StringUtils.isNotEmpty(order.getAddressJson())){
            UserAddress userAddress = JSON.parseObject(order.getAddressJson(), UserAddress.class);
            orderInfo.setRecipient(userAddress.getRecieveName() + "-" + userAddress.getRecievePhone());
            userAddress.setRecieveAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getRecieveAddress());
            orderInfo.setAddress(userAddress.getRecieveAddress());
        }
        if(StringUtils.isNotEmpty(order.getExpressJson()) && !"NULL".equals(order.getExpressJson())){
@@ -838,7 +857,8 @@
                String com = jsonObject.getString("com");
                String num = jsonObject.getString("num");
                UserAddress userAddress = JSON.parseObject(order.getAddressJson(), UserAddress.class);
                MapTrackKD100Vo mapTrackKD100Vo = ExpressDeliveryUtil.kd100MapTrack(com, num, "", userAddress.getRecieveAddress());
                MapTrackKD100Vo mapTrackKD100Vo = ExpressDeliveryUtil.kd100MapTrack(com, num, order.getDeliverProvince() + order.getDeliverCity(),
                        userAddress.getProvince() + userAddress.getCity());
                order.setExpressResult(JSON.toJSONString(mapTrackKD100Vo));
                this.updateById(order);
                //延长时间x小时
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -543,6 +543,7 @@
        UserAddress userAddress = userAddressClient.getDefaultUserAddress(userid).getData();
        if(null != userAddress){
            userAddress.setIdStr(userAddress.getId().toString());
            userAddress.setRecieveAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getRecieveAddress());
            confirmOrderVo.setUserAddress(userAddress);
        }
        confirmOrderVo.setPaymentType(confirmOrder.getPaymentType());
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/ExpressDeliveryUtil.java
@@ -68,7 +68,7 @@
     * 快递100查询带有地图轨迹数据的快递详情
     * @param com   快递公司代码
     * @param num   快递单号
     * @param from  触发城市名称
     * @param from  出发城市名称
     * @param to    到达城市名称
     * @return
     */
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderPageListVo.java
@@ -35,6 +35,8 @@
    private BigDecimal point;
    @ApiModelProperty("订单状态(1待发货2待收货3待使用4已完成5已取消6已退款7售后中8已评价)")
    private Integer status;
    @ApiModelProperty("物流类型(1=自提,2=快递)")
    private Integer expressType;
    /**
     * 用户id
     */
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -60,7 +60,8 @@
            pay_method as paymentType,
            total_amount as orderMoney,
            point,
            order_status as status
            order_status as status,
            if(express_json is not null and express_json != 'NULL' and express_json != '', 2, 1) as expressType
        from t_order where del_flag = 0 and pay_status = 2
        <if test="null != item.code and '' != item.code">
            and order_number like CONCAT('%', #{item.code}, '%')
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java
@@ -90,6 +90,7 @@
        List<GoodsEvaluate> list = goodsEvaluateService.list(new LambdaQueryWrapper<GoodsEvaluate>()
                .eq(GoodsEvaluate::getStatus, 2)
                .eq(GoodsEvaluate::getAppUserId,loginUserApplet.getUserid())
                .eq(GoodsEvaluate::getDelFlag, 0)
                .eq(GoodsEvaluate::getOrderId, orderId));
        for (GoodsEvaluate goodsEvaluate : list) {
            Goods goods = goodsService.getById(goodsEvaluate.getGoodsId());
@@ -111,7 +112,7 @@
        goodsEvaluateService.updateById(goodsEvaluate);
        //修改订单为待评价
        Order data = orderClient.getOrderById(goodsEvaluate.getOrderId()).getData();
        data.setOrderStatus(4);
        data.setOrderStatus(data.getOldOrderStatus());
        orderClient.editOrder(data);
        return R.ok();
    }
@@ -156,6 +157,7 @@
                .in(!goodsIds.isEmpty(), GoodsEvaluate::getGoodsId, goodsIds)
                .in(!usersNameList.isEmpty(), GoodsEvaluate::getAppUserId, usersNameList)
                .eq(goodsEvaluate.getStatus() != null, GoodsEvaluate::getStatus, goodsEvaluate.getStatus())
                .eq(GoodsEvaluate::getDelFlag, 0)
                .orderByDesc(GoodsEvaluate::getCreateTime));
@@ -171,8 +173,10 @@
            item.setUserName(appUser.getName());
        }
        Goods goods = goodsService.getById(item.getGoodsId());
        if(null != goods){
        item.setGoodsName(goods.getName());
    }
    }
    /**
     * 评论详情
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -260,6 +260,9 @@
            }
        }
        String city = TencentMapUtil.inverseGeographicalAnalysis(shop.getLongitude(), shop.getLatitude(), false);
        if(!StringUtils.hasLength(city)){
            city = "510100";
        }
        shop.setProvinceCode(city.substring(0, 2) + "0000");
        shop.setCityCode(city.substring(0, 4) + "00");
        shop.setDistrictCode(city);
@@ -437,7 +440,12 @@
                return R.ok(new ArrayList<>());
            }
            List<Integer> shopIds = appUserShopList.stream().map(AppUserShop::getShopId).collect(Collectors.toList());
            List<Shop> shopList = shopService.list(new LambdaQueryWrapper<Shop>().in(Shop::getId, shopIds).eq(Shop::getDelFlag, 0).eq(Shop::getStatus, 1));
            List<Shop> shopList = shopService.list(new LambdaQueryWrapper<Shop>().in(Shop::getId, shopIds).eq(Shop::getDelFlag, 0));
            long count = shopList.stream().filter(s -> s.getStatus() == 1).count();
            if(shopList.size() > 0 && count == 0){
                return R.fail("操作失败,当前门店已冻结");
            }
            shopList = shopList.stream().filter(s -> s.getStatus() == 1).collect(Collectors.toList());
            if(null != appUser.getShopId()){
                Optional<Shop> first = shopList.stream().filter(s -> s.getId().equals(appUser.getShopId())).findFirst();
                if(first.isPresent()){
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java
@@ -102,6 +102,7 @@
            if(first.isPresent()){
                item.setShopName(first.get().getName());
            }
            item.setIdStr(item.getId().toString());
        }
        return R.ok(page);
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsEvaluateServiceImpl.java
@@ -5,6 +5,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.order.feignClient.OrderClient;
import com.ruoyi.order.feignClient.RemoteOrderGoodsClient;
import com.ruoyi.order.model.Order;
import com.ruoyi.other.mapper.GoodsEvaluateMapper;
@@ -33,6 +34,8 @@
    private RemoteOrderGoodsClient remoteOrderGoodsClient;
    @Resource
    private TokenService tokenService;
    @Resource
    private OrderClient orderClient;
    @Override
    @Transactional(rollbackFor = Exception.class)
@@ -51,8 +54,11 @@
            }
        }
        if (CollectionUtil.isNotEmpty(evaluates)){
            Long orderId = goodsEvaluateVO.getEvaluates().get(0).getOrderId();
            Order data = orderClient.getOrderById(orderId).getData();
            Order order = new Order();
            order.setId(goodsEvaluateVO.getEvaluates().get(0).getOrderId());
            order.setId(data.getId());
            order.setOldOrderStatus(data.getOrderStatus());
            order.setOrderStatus(8);
            R<Void> r = remoteOrderGoodsClient.updateOrderStatus(order);
            if (R.isError(r)){
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/GoodsMapper.xml
@@ -12,14 +12,15 @@
        tg.original_price as originalPrice,
        tg.integral as integral,
        tg.sale_num as saleNum,
        tg.home_page_picture as homePagePicture
        tg.home_page_picture as homePagePicture,
        tg.sort
        FROM t_goods tg
        where tg.del_flag = 0 and tg.status = 2 and (tg.appoint_store = 2 or (tg.appoint_store = 1 and tg.id in (select goods_id from t_goods_shop where shop_id = #{shopId})))
        and tg.type = 1
        <if test="vip != null">
            and (tg.commodity_authority like '%-1%' or tg.commodity_authority like CONCAT('%', #{vip}, '%'))
        </if>
        ORDER BY tg.sale_num DESC
        ORDER BY ifnull(tg.sort, -1) DESC
    </select>
    <select id="selectManageGoodsList" resultType="com.ruoyi.other.api.domain.Goods">
        SELECT