Pu Zhibing
2024-12-10 d9bcc1f955e1cddc6a38e55f769205a9330d3c89
Merge remote-tracking branch 'origin/master'

# Conflicts:
# ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java
1 文件已重命名
36个文件已修改
1个文件已添加
487 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AgentApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserSignRecord.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/BaseSetting.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/TechnicianSubscribe.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/SystemConfigClientFallbackFactory.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/TechnicianClientFallbackFactory.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/VipGoodClientFallbackFactory.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/SystemConfigClient.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/TechnicianClient.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/VipGoodClient.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/VipCenterController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/SignBackRDto.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AgentApplicationService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/VerifiableShopVo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsShopController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RedPackegeSetController.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | 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/TechnicianSubscribeController.java 11 ●●●● 补丁 | 查看 | 原始文档 | 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/mapper/TechnicianMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianSubscribeMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianSubscribeService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AgentApplication.java
@@ -50,11 +50,11 @@
    @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("direct_vip_num")
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java
@@ -238,6 +238,10 @@
    @TableField(exist = false)
    private Long count7;
    @ApiModelProperty("是否签到1是0否")
    @TableField(exist = false)
    private Integer isSign;
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/UserSignRecord.java
@@ -45,6 +45,10 @@
    @TableField("red_amount")
    private BigDecimal redAmount;
    @ApiModelProperty(value = "红包金额")
    @TableField("point")
    private BigDecimal point;
    @ApiModelProperty(value = "删除(0=否,1=是)")
    @TableField("del_flag")
    @TableLogic
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java
@@ -83,4 +83,7 @@
    @ApiModelProperty(value = "技师名称")
    private String technicianName;
    @ApiModelProperty(value = "预约单id")
    private String technicianSubscribeId;
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/BaseSetting.java
@@ -26,7 +26,7 @@
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "1:合伙人积分设置一    2:合伙人积分设置二    3:会员说明设置    4:活动管理-活动设置 1开0关  5:售后设置")
    @ApiModelProperty(value = "1:合伙人积分设置一    2:合伙人积分设置二    3:会员说明设置    4:活动管理-活动设置 1开0关  5:售后设置 6:充值设置")
    @TableId("id")
    private Integer id;
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/TechnicianSubscribe.java
@@ -40,7 +40,7 @@
    @ApiModelProperty(value = "技师id")
    @TableField("technician_id")
    private Long technicianId;
    private Integer technicianId;
    @ApiModelProperty(value = "预约时间")
    @TableField("subscribe_time")
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/SystemConfigClientFallbackFactory.java
@@ -5,6 +5,8 @@
import com.ruoyi.other.api.feignClient.SystemConfigClient;
import org.springframework.cloud.openfeign.FallbackFactory;
import java.math.BigDecimal;
/**
 * @author zhibing.pu
 * @Date 2024/11/29 15:58
@@ -17,6 +19,11 @@
            public R<SystemConfig> getSystemConfig(Integer type) {
                return R.fail("根据类型获取系统配置失败:" + cause.getMessage());
            }
            @Override
            public R<BigDecimal> redPackegeSet() {
                return R.fail("根据红包配置失败:" + cause.getMessage());
            }
        };
    }
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/TechnicianClientFallbackFactory.java
@@ -2,6 +2,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.Technician;
import com.ruoyi.other.api.domain.TechnicianSubscribe;
import com.ruoyi.other.api.feignClient.TechnicianClient;
import org.springframework.cloud.openfeign.FallbackFactory;
@@ -15,9 +16,14 @@
            }
            @Override
            public R<Void> updateStatus(Integer status, Integer subscribeId) {
            public R<Void> updateStatus(Integer status, Long subscribeId) {
                return R.fail("跟新技师预约状态失败:" + cause.getMessage());
            }
            @Override
            public R<TechnicianSubscribe> getSubscribeByOrderId(Long orderId) {
                return R.fail("根据订单id获取预约信息失败:" + cause.getMessage());
            }
        };
    }
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/VipGoodClientFallbackFactory.java
@@ -2,6 +2,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.VipGood;
import com.ruoyi.other.api.domain.VipSetting;
import com.ruoyi.other.api.feignClient.VipGoodClient;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.web.bind.annotation.GetMapping;
@@ -17,6 +18,12 @@
            public R<List<VipGood>> getVipGoodsByVipId(Integer vipId) {
                return R.fail("根据会员id获取会员购买商品失败:" + cause.getMessage());
            }
            @Override
            public R<VipSetting> getVipSettingById(Integer id) {
                return R.fail("根据会员id获取会员失败:" + cause.getMessage());
            }
        };
    }
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/SystemConfigClient.java
@@ -8,6 +8,8 @@
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.math.BigDecimal;
/**
 * @author zhibing.pu
 * @Date 2024/11/29 15:58
@@ -24,4 +26,7 @@
    @PostMapping("/system-config/getSystemConfig")
    R<SystemConfig> getSystemConfig(@RequestParam("type") Integer type);
    @PostMapping("/red-packege-set/get")
    R<BigDecimal> redPackegeSet();
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/TechnicianClient.java
@@ -3,6 +3,7 @@
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.Technician;
import com.ruoyi.other.api.domain.TechnicianSubscribe;
import com.ruoyi.other.api.factory.TechnicianClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@@ -16,5 +17,8 @@
    R<Technician> shopdetail(@RequestParam("id") Integer techId);
    @PutMapping("/technician-subscribe/updateStatus")
    R<Void> updateStatus(@RequestParam("status") Integer status, @RequestParam("subscribeId") Integer subscribeId);
    R<Void> updateStatus(@RequestParam("status") Integer status, @RequestParam("subscribeId") Long subscribeId);
    @GetMapping("/technician-subscribe/getSubscribeByOrderId")
    R<TechnicianSubscribe> getSubscribeByOrderId(@RequestParam("orderId") Long orderId);
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/VipGoodClient.java
@@ -3,6 +3,7 @@
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.VipGood;
import com.ruoyi.other.api.domain.VipSetting;
import com.ruoyi.other.api.factory.VipGoodClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@@ -15,4 +16,7 @@
    @GetMapping("/vip-good/getVipGoodsByVipId")
    public R<List<VipGood>> getVipGoodsByVipId(@RequestParam("subscribeId") Integer vipId);
    @GetMapping("/vip-setting/getVipSettingById")
    public R<VipSetting> getVipSettingById(@RequestParam("id") Integer id);
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java
@@ -1,8 +1,18 @@
package com.ruoyi.account.controller;
import com.ruoyi.account.api.model.AgentApplication;
import com.ruoyi.account.service.AgentApplicationService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.other.api.domain.VipSetting;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
 * <p>
@@ -14,7 +24,16 @@
 */
@RestController
@RequestMapping("/agent-application")
public class AgentApplicationController {
public class AgentApplicationController extends BaseController {
    @Resource
    private AgentApplicationService agentApplicationService;
    @PostMapping("/apply")
    @ApiOperation(value = "会员申请", tags = {"会员中心-小程序"})
    public R<Void> apply(@RequestBody AgentApplication agentApplication) {
        agentApplicationService.apply(agentApplication);
        return R.ok();
    }
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -4,9 +4,11 @@
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.account.api.model.UserCancellationLog;
import com.ruoyi.account.api.model.UserCoupon;
import com.ruoyi.account.api.model.UserSignRecord;
import com.ruoyi.account.service.AppUserService;
import com.ruoyi.account.service.UserCancellationLogService;
import com.ruoyi.account.service.UserCouponService;
import com.ruoyi.account.service.UserSignRecordService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.service.TokenService;
@@ -19,6 +21,7 @@
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.time.LocalDate;
import java.util.List;
import com.ruoyi.account.vo.*;
@@ -49,6 +52,9 @@
    private StoreClient storeClient;
    @Resource
    private UserCouponService userCouponService;
    @Resource
    private UserSignRecordService userSignRecordService;
    @ResponseBody
@@ -150,6 +156,14 @@
    public R<AppUser> info(){
        Long userId = tokenService.getLoginUserApplet().getUserid();
        AppUser user = appUserService.getById(userId);
        List<UserSignRecord> list = userSignRecordService.lambdaQuery().eq(UserSignRecord::getSignDay, LocalDate.now()).list();
        if (!list.isEmpty()){
            user.setIsSign(1);
        }else {
            user.setIsSign(0);
        }
        return R.ok(user);
    }
   @Resource
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java
@@ -3,9 +3,16 @@
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.account.api.model.UserSignRecord;
import com.ruoyi.account.dto.SignBackRDto;
import com.ruoyi.account.service.AppUserService;
import com.ruoyi.account.service.UserSignRecordService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.other.api.domain.PointSetting;
import com.ruoyi.other.api.domain.VipSetting;
import com.ruoyi.other.api.feignClient.PointSettingClient;
import com.ruoyi.other.api.feignClient.SystemConfigClient;
import com.ruoyi.other.api.feignClient.VipGoodClient;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
@@ -32,18 +39,37 @@
    @Resource
    private UserSignRecordService userSignRecordService;
    @Resource
    private AppUserService appUserService;
    @Resource
    private TokenService tokenService;
    @Resource
    private PointSettingClient pointSettingClient;
    @Resource
    private SystemConfigClient systemConfigClient;
    @ResponseBody
    @GetMapping("/sign")
    @ApiOperation(value = "签到", tags = {"小程序-签到"})
    public R<AppUser> change(){
    public R<SignBackRDto> sign(){
        Long userId1 = tokenService.getLoginUserApplet().getUserid();
        AppUser byId = appUserService.getById(userId1);
        //获取当前用户的会员信息
        R<PointSetting> pointSetting = pointSettingClient.getPointSetting(byId.getVipId());
        UserSignRecord userSignRecord = new UserSignRecord();
        userSignRecord.setAppUserId(userId1);
        userSignRecord.setCreateTime(LocalDateTime.now());
        userSignRecord.setRedAmount(new BigDecimal(0));
        if (pointSetting.getData() != null) {
            userSignRecord.setPoint(pointSetting.getData().getSignPoint());
        }else {
            userSignRecord.setPoint(BigDecimal.ZERO);
        }
        R<BigDecimal> bigDecimalR = systemConfigClient.redPackegeSet();
        userSignRecord.setRedAmount(bigDecimalR.getData());
        userSignRecord.setSignDay(LocalDate.now());
        return R.ok();
        SignBackRDto signBackRDto = new SignBackRDto();
        signBackRDto.setPoint(userSignRecord.getPoint());
        signBackRDto.setRedAmount(userSignRecord.getRedAmount());
        return R.ok(signBackRDto);
    }
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/VipCenterController.java
@@ -16,10 +16,7 @@
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
@@ -127,6 +124,9 @@
    }
    private boolean checkSuccess(R<?> r) {
        if (!R.isSuccess(r)) {
            log.error("请求失败: " + r.getMsg());
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/dto/SignBackRDto.java
New file
@@ -0,0 +1,12 @@
package com.ruoyi.account.dto;
import lombok.Data;
import org.apache.poi.hpsf.Decimal;
import java.math.BigDecimal;
@Data
public class SignBackRDto {
    private BigDecimal point;
    private BigDecimal redAmount;
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AgentApplicationService.java
@@ -13,4 +13,6 @@
 */
public interface AgentApplicationService extends IService<AgentApplication> {
    void apply(AgentApplication agentApplication);
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java
@@ -1,10 +1,24 @@
package com.ruoyi.account.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.account.api.model.AgentApplication;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.account.mapper.AgentApplicationMapper;
import com.ruoyi.account.service.AgentApplicationService;
import com.ruoyi.account.service.AppUserService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.api.feignClient.ShopClient;
import com.ruoyi.system.api.model.LoginUser;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
 * <p>
@@ -16,5 +30,41 @@
 */
@Service
public class AgentApplicationServiceImpl extends ServiceImpl<AgentApplicationMapper, AgentApplication> implements AgentApplicationService {
    @Resource
    private AgentApplicationMapper agentApplicationMapper;
    @Resource
    private TokenService tokenService;
    @Resource
    private AppUserService appUserService;
    @Resource
    private ShopClient shopClient;
    @Override
    public void apply(AgentApplication agentApplication) {
        LoginUser loginUserApplet = tokenService.getLoginUserApplet();
        AppUser appUser = appUserService.getById(loginUserApplet.getUserid());
        agentApplication.setAppUserId(loginUserApplet.getUserid());
        agentApplication.setApplicationTime(LocalDateTime.now());
        agentApplication.setShopPoint(appUser.getShopPoint());
        agentApplication.setSharePoint(appUser.getSharePoint());
        // 直推用户已达钻石会员数量
        List<AppUser> directVipUserList = appUserService.list(new LambdaQueryWrapper<AppUser>()
                .eq(AppUser::getInviteUserId, appUser.getId())
                .eq(AppUser::getVipId, 3));
        agentApplication.setDirectVipNum(directVipUserList.size());
        // 直推用户已成为代理数量
        List<AppUser> directAgentUserList = appUserService.list(new LambdaQueryWrapper<AppUser>()
                .eq(AppUser::getInviteUserId, appUser.getId())
                .eq(AppUser::getUserType, 4));
        agentApplication.setDirectAgentNum(directAgentUserList.size());
        // 已绑定门店数量
        R<List<Shop>> R = shopClient.getShopByUserIds(Collections.singletonList(loginUserApplet.getUserid()));
        List<Shop> shopList = R.getData();
        agentApplication.setBindShopNum(shopList.size());
        agentApplicationMapper.insert(agentApplication);
    }
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -10,15 +10,21 @@
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.order.enums.OrderStatus;
import com.ruoyi.order.model.Order;
import com.ruoyi.order.service.CommissionService;
import com.ruoyi.order.service.OrderService;
import com.ruoyi.order.vo.OrderDetailVO;
import com.ruoyi.order.vo.OrderVO;
import com.ruoyi.other.api.domain.BaseSetting;
import com.ruoyi.other.api.feignClient.BaseSettingClient;
import com.ruoyi.system.api.model.LoginUser;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.List;
/**
@@ -39,6 +45,10 @@
    private TokenService tokenService;
    @Resource
    private UserAddressClient addressClient;
    @Resource
    private CommissionService commissionService;
    @Resource
    private BaseSettingClient baseSettingClient;
    /**
@@ -112,7 +122,9 @@
    })
    @GetMapping("/cancel/{orderId}")
    public R<Void> cancel(@PathVariable("orderId") Long orderId){
        // TODO 待完善
        orderService.update(new LambdaUpdateWrapper<Order>()
                .eq(Order::getId, orderId)
                .set(Order::getOrderStatus, OrderStatus.CANCELLED.getCode()));
        return R.ok();
    }
@@ -125,7 +137,25 @@
    })
    @GetMapping("/confirm/{orderId}")
    public R<Void> confirm(@PathVariable("orderId") Long orderId){
        // TODO 待完善
        boolean update = orderService.update(new LambdaUpdateWrapper<Order>()
                .eq(Order::getId, orderId)
                .eq(Order::getOrderStatus, OrderStatus.PENDING_RECEIPT.getCode())
                .set(Order::getOrderStatus, OrderStatus.COMPLETED.getCode()));
        if(!update){
            return R.fail("订单状态异常");
        }
        R<BaseSetting> baseSettingR = baseSettingClient.getBaseSetting(5);
        if (R.isError(baseSettingR)) {
            return R.fail("售后设置获取失败");
        }
        BaseSetting baseSetting = baseSettingR.getData();
        if (baseSetting == null) {
            return R.fail("售后设置获取失败");
        }
        String content = baseSetting.getContent();
        JSONObject jsonObject = JSONObject.parseObject(content);
        Long days = jsonObject.getLong("days");
        commissionService.addToCommissionDelayQueue(orderId, LocalDateTime.now().plusDays(days));
        return R.ok();
    }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
@@ -1,11 +1,19 @@
package com.ruoyi.order.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.order.service.ShoppingCartService;
import com.ruoyi.order.vo.*;
import com.ruoyi.other.api.domain.GoodsShop;
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.api.feignClient.GoodsShopClient;
import com.ruoyi.other.api.feignClient.ShopClient;
import com.ruoyi.other.api.vo.GetGoodsShopByGoodsIds;
import com.ruoyi.system.api.model.LoginUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -14,6 +22,9 @@
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@RestController
@RequestMapping("/shopping-cart")
@@ -25,6 +36,11 @@
    
    @Resource
    private TokenService tokenService;
    @Resource
    private GoodsShopClient goodsShopClient;
    @Resource
    private ShopClient shopClient;
    
    
    
@@ -93,4 +109,33 @@
    }
    
    
    @ResponseBody
    @GetMapping("/getVerifiableShop")
    @ApiOperation(value = "获取可核销门店列表", tags = {"购物车-小程序"})
    public R<List<VerifiableShopVo>> getVerifiableShop(){
        LoginUser loginUser = tokenService.getLoginUserApplet();
        List<ShoppingCart> shoppingCarts = shoppingCartService.list(new LambdaQueryWrapper<ShoppingCart>()
                .eq(ShoppingCart::getAppUserId, loginUser.getUserid()));
        List<Integer> goodsIds = shoppingCarts.stream().map(ShoppingCart::getGoodsId).collect(Collectors.toList());
        GetGoodsShopByGoodsIds goodsShopByGoodsIds = new GetGoodsShopByGoodsIds();
        goodsShopByGoodsIds.setGoodsIds(goodsIds);
        R<List<GoodsShop>> r = goodsShopClient.getGoodsShopByGoodsIds(goodsShopByGoodsIds);
        List<GoodsShop> goodsShops = r.getData();
        List<VerifiableShopVo> verifiableShopVoList = new ArrayList<>();
        if (CollectionUtil.isNotEmpty(goodsShops)){
            for (GoodsShop goodsShop : goodsShops) {
                R<Shop> shopR = shopClient.getShopById(goodsShop.getShopId());
                if (R.isSuccess(shopR)){
                    VerifiableShopVo verifiableShopVo = new VerifiableShopVo();
                    verifiableShopVo.setId(shopR.getData().getId());
                    verifiableShopVo.setName(shopR.getData().getName());
                    verifiableShopVoList.add(verifiableShopVo);
                }
            }
        }
        return R.ok(verifiableShopVoList);
    }
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java
@@ -24,5 +24,4 @@
    void writeOff(String code,Integer shopId);
    void commission(Long orderId);
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -17,11 +17,13 @@
import com.ruoyi.order.mapper.OrderMapper;
import com.ruoyi.order.model.Order;
import com.ruoyi.order.model.OrderGood;
import com.ruoyi.order.service.CommissionService;
import com.ruoyi.order.service.OrderService;
import com.ruoyi.order.vo.OrderDetailVO;
import com.ruoyi.order.vo.OrderGoodsVO;
import com.ruoyi.order.vo.OrderVO;
import com.ruoyi.other.api.domain.*;
import com.ruoyi.other.api.feignClient.BaseSettingClient;
import com.ruoyi.other.api.feignClient.ShopClient;
import com.ruoyi.other.api.feignClient.TechnicianClient;
import com.ruoyi.system.api.model.LoginUser;
@@ -29,6 +31,7 @@
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@@ -55,6 +58,10 @@
    private TechnicianClient technicianClient;
    @Resource
    private ShopClient shopClient;
    @Resource
    private CommissionService commissionService;
    @Resource
    private BaseSettingClient baseSettingClient;
    @Override
@@ -135,6 +142,12 @@
            }
            technician = shopdetail.getData();
        }
        R<TechnicianSubscribe> subscribeR = technicianClient.getSubscribeByOrderId(orderId);
        if (!R.isSuccess(subscribeR)){
            throw new ServiceException("获取预约信息失败");
        }
        TechnicianSubscribe subscribe = subscribeR.getData();
        Shop shop = shopR.getData();
        orderDetailVO.setId(order.getId());
        orderDetailVO.setOrderStatus(order.getOrderStatus());
@@ -159,6 +172,7 @@
        orderDetailVO.setLatitude(shop.getLatitude());
        orderDetailVO.setShopId(shop.getId());
        orderDetailVO.setTechnicianName(technician.getName());
        orderDetailVO.setTechnicianSubscribeId(String.valueOf(subscribe.getId()));
        return orderDetailVO;
    }
@@ -194,7 +208,7 @@
    public void writeOff(String code,Integer shopId) {
        LoginUser loginUserApplet = tokenService.getLoginUserApplet();
        Order order = orderMapper.selectOne(new LambdaQueryWrapper<Order>()
                .eq(Order::getOrderNumber, code));
                .eq(Order::getId, code));
        boolean check = check(order, shopId, loginUserApplet.getUserid());
        if (!check){
            throw new ServiceException("订单不存在");
@@ -203,22 +217,30 @@
        orderMapper.updateById(order);
        Integer orderType = order.getOrderType();
        if (orderType.equals(OrderType.SERVICE.getCode())){
            R<Technician> shopdetail = technicianClient.shopdetail(order.getTechnicianId());
            if (shopdetail.getCode() != R.SUCCESS){
                throw new ServiceException("获取技师信息失败");
            R<TechnicianSubscribe> subscribeR = technicianClient.getSubscribeByOrderId(order.getId());
            if (R.isError(subscribeR)){
                throw new ServiceException("获取预约信息失败");
            }
            Technician technician = shopdetail.getData();
            R<Void> r = technicianClient.updateStatus(2, technician.getId());
            if (r.getCode() != R.SUCCESS){
                throw new ServiceException("修改技师状态失败");
            }
            TechnicianSubscribe subscribe = subscribeR.getData();
            subscribe.setStatus(2);
            R<Void> r = technicianClient.updateStatus(subscribe.getStatus(), subscribe.getId());
            if (R.isError(r)){
                throw new ServiceException("更新预约状态失败");
        }
    }
    @Override
    public void commission(Long orderId) {
        // 售后设置
        R<BaseSetting> baseSettingR = baseSettingClient.getBaseSetting(5);
        if (R.isError(baseSettingR)) {
            throw new ServiceException("售后设置获取失败");
        }
        BaseSetting baseSetting = baseSettingR.getData();
        if (baseSetting == null) {
            throw new ServiceException("售后设置获取失败");
        }
        String content = baseSetting.getContent();
        JSONObject jsonObject = JSONObject.parseObject(content);
        Long days = jsonObject.getLong("days");
        commissionService.addToCommissionDelayQueue(order.getId(), LocalDateTime.now().plusDays(days));
    }
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -823,7 +823,7 @@
        order.setGoodName(goodName.substring(0, goodName.length() - 1));
        Goods goods = goodsClient.getGoodsById(goodsList.get(0).getGoodsId()).getData();
        order.setOrderType(goods.getType());
        order.setOrderStatus(1);
        order.setOrderStatus(goods.getType() == 1 ? 3 : 1);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
        order.setOrderNumber("QJS" + getNumber(3) + sdf.format(new Date()));
        order.setTotalAmount(orderMoney.setScale(2, RoundingMode.HALF_EVEN));
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/VerifiableShopVo.java
File was renamed from ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/VerifiableShopVo.java
@@ -1,4 +1,4 @@
package com.ruoyi.other.vo;
package com.ruoyi.order.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
@@ -1,14 +1,17 @@
package com.ruoyi.other.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.other.api.domain.GoodsCategory;
import com.ruoyi.other.service.GoodsCategoryService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@@ -23,10 +26,51 @@
 */
@RestController
@RequestMapping("/goods-category")
@Api(tags = "商品分类")
public class GoodsCategoryController {
@Api("商品分类")
public class GoodsCategoryController extends BaseController {
    @Resource
    private GoodsCategoryService goodsCategoryService;
    @PostMapping("/addGoodsCategory")
    @ApiOperation(value = "添加商品分类", tags = {"管理后台-商品分类"})
    public R<Void> addGoodsCategory(@RequestBody GoodsCategory goodsCategory){
        goodsCategoryService.save(goodsCategory);
        return R.ok();
    }
    @PutMapping("/updateGoodsCategory")
    @ApiOperation(value = "修改商品分类", tags = {"管理后台-商品分类"})
    public R<Void> updateGoodsCategory(@RequestBody GoodsCategory goodsCategory){
        goodsCategoryService.updateById(goodsCategory);
        return R.ok();
    }
    @GetMapping("/getGoodsCategoryById")
    @ApiOperation(value = "商品分类详情", tags = {"管理后台-商品分类"})
    public R<GoodsCategory> getGoodsCategoryById(@RequestParam("id") Integer id){
        return R.ok(goodsCategoryService.getById(id));
    }
    @GetMapping("/getList")
    @ApiOperation(value = "商品分类列表", tags = {"管理后台-商品分类"})
    public R<Page<GoodsCategory>> list(@ApiParam("页码") @RequestParam Integer PageNum,@ApiParam("每一页数据大小") Integer pageSize, GoodsCategory goodsCategory){
        Page<GoodsCategory> page = goodsCategoryService.lambdaQuery()
                .like(StringUtils.isNotEmpty(goodsCategory.getName()),GoodsCategory::getName, goodsCategory.getName())
                .page(Page.of(PageNum, pageSize));
        return R.ok(page);
    }
    @DeleteMapping("/delete")
    @ApiOperation(value = "删除商品分类", tags = {"管理后台-商品分类"})
    public R<Void> delete(@RequestParam("id") Integer id){
        goodsCategoryService.removeById(id);
        return R.ok();
    }
    @GetMapping("/index/list")
    @ApiOperation(value = "商品分类", tags = {"小程序-首页"})
@@ -34,8 +78,7 @@
        List<GoodsCategory> indexlist = goodsCategoryService.lambdaQuery()
                .orderByDesc(GoodsCategory::getCreateTime)
                .last("limit 8")
                .list()
                ;
                .list();
        return R.ok(indexlist);
    }
    @GetMapping("/list")
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
@@ -31,6 +31,14 @@
    @Resource
    private GoodsService goodsService;
    /**
     * 添加商品
     */
    @PostMapping("/addGoods")
    @ApiOperation(value = "添加商品", tags = {"管理后台-发布商品"})
    public R<Void> addGoods(@RequestBody Goods goods) {
        return R.ok();
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsShopController.java
@@ -49,7 +49,9 @@
    @ResponseBody
    @PostMapping("/getGoodsShopByGoodsIds")
    public R<List<GoodsShop>> getGoodsShopByGoodsIds(@RequestBody GetGoodsShopByGoodsIds goodsIds) {
        List<GoodsShop> list = goodsShopService.list(new LambdaQueryWrapper<GoodsShop>().eq(GoodsShop::getShopId, goodsIds.getShopId()).in(GoodsShop::getGoodsId, goodsIds.getGoodsIds()));
        List<GoodsShop> list = goodsShopService.list(new LambdaQueryWrapper<GoodsShop>()
                .eq(goodsIds.getShopId() != null,GoodsShop::getShopId, goodsIds.getShopId())
                .in(goodsIds.getGoodsIds() !=null ,GoodsShop::getGoodsId, goodsIds.getGoodsIds()));
        return R.ok(list);
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RedPackegeSetController.java
@@ -1,9 +1,20 @@
package com.ruoyi.other.controller;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.RedPackegeSet;
import com.ruoyi.other.service.RedPackegeSetService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
 * <p>
@@ -16,6 +27,21 @@
@RestController
@RequestMapping("/red-packege-set")
public class RedPackegeSetController {
    @Resource
    private RedPackegeSetService redPackegeSetService;
    //获取当前生效的红包设置
    @ResponseBody
    @GetMapping("/get")
    public R<BigDecimal> get(){
        LocalDateTime now = LocalDateTime.now();
        RedPackegeSet one = redPackegeSetService.lambdaQuery().le(RedPackegeSet::getStartTime, now).ge(RedPackegeSet::getEndTime, now).one();
        if (one!=null){
            return R.ok(one.getPackegeAmount());
        }else {
            return R.ok(BigDecimal.ZERO);
        }
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
@@ -144,7 +144,7 @@
    @ApiOperation(value = "列表", tags = {"后台-分享管理"})
    @GetMapping("/manage/list")
    public R<Page<Share>> managelist(String name,Integer addType,@RequestParam Integer PageNum,Integer pageSize){
        Page<Share> page = shareService.lambdaQuery().like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(PageNum, pageSize));
        Page<Share> page = shareService.lambdaQuery().eq(Share::getAuditStatus,1).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageSize, pageSize));
        return R.ok(page);
    }
@@ -167,6 +167,14 @@
    }
    @ApiOperation(value = "列表", tags = {"后台-分享管理-审核"})
    @GetMapping("/manage/auth/list")
    public R<Page<Share>> authmanagelist(String name,Integer addType,@RequestParam Integer PageNum,Integer pageSize){
        Page<Share> page = shareService.lambdaQuery().ne(Share::getAuditStatus,1).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageSize, pageSize));
        return R.ok(page);
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -16,7 +16,6 @@
import com.ruoyi.other.service.TechnicianService;
import com.ruoyi.other.vo.NearbyShopVO;
import com.ruoyi.other.vo.ShopDetailVO;
import com.ruoyi.other.vo.VerifiableShopVo;
import com.ruoyi.system.api.model.LoginUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -116,15 +115,6 @@
        return R.ok();
    }
    @ResponseBody
    @GetMapping("/getVerifiableShop")
    @ApiOperation(value = "获取可核销门店列表", tags = {"购物车-小程序"})
    public R<List<VerifiableShopVo>> getVerifiableShop(){
        // todo 待完善 pu
        return R.ok();
    }
    
    
    /**
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
@@ -38,11 +38,11 @@
     */
    @GetMapping("/list")
    @ApiOperation(value = "预约列表", notes = "预约列表", tags = {"小程序-个人中心-门店管理-预约列表"})
    public TableDataInfo<TechnicianSubscribeVO> list(@ApiParam(value = "状态") @RequestParam Integer status,
    public TableDataInfo<TechnicianSubscribeVO> list(@ApiParam(value = "状态") Integer status,
                              @ApiParam(value = "门店id") @RequestParam Long shopId) {
        startPage();
        List<TechnicianSubscribeVO> list = technicianSubscribeService
                .getTechnicianSubscribeByUserAndShop(SecurityUtils.getUserId(), shopId);
                .getTechnicianSubscribeByUserAndShop(shopId,status);
        return getDataTable(list);
    }
@@ -104,6 +104,13 @@
        return R.ok(technicianSubscribeService.getTechnicianSubscribeByUser(page, SecurityUtils.getUserId(), status));
    }
    @GetMapping("/getSubscribeByOrderId")
    @ApiOperation(value = "根据订单id获取预约信息", notes = "根据订单id获取预约信息", tags = {"后台-技师预约管理-根据订单id获取预约信息"})
    public R<TechnicianSubscribe> getSubscribeByOrderId(@ApiParam(value = "订单id") @RequestParam Long orderId) {
        return R.ok(technicianSubscribeService.getOne(new LambdaQueryWrapper<TechnicianSubscribe>()
                .eq(TechnicianSubscribe::getOrderId, orderId)));
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/VipSettingController.java
@@ -92,7 +92,7 @@
    @GetMapping("getVipSettingById")
    @ApiOperation(value = "获取会员设置")
    public R<VipSetting> getVipSettingById(@ApiParam(value = "会员id") @RequestParam Integer id) {
    public R<VipSetting> getVipSettingById(@ApiParam(value = "会员id") @RequestParam("id") Integer id) {
        return R.ok(vipSettingService.getById(id));
    }
    
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java
@@ -4,6 +4,7 @@
import com.ruoyi.other.api.domain.Technician;
import com.ruoyi.other.vo.TechnicianDetailVO;
import com.ruoyi.other.vo.TechnicianVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -17,7 +18,7 @@
 */
public interface TechnicianMapper extends BaseMapper<Technician> {
    List<TechnicianVO> selectTechnicianListByShopId(Long shopId, String name);
    List<TechnicianVO> selectTechnicianListByShopId(@Param("shopId") Long shopId,@Param("name") String name);
    TechnicianDetailVO selectTechnicianDetail(Long technicianId);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianSubscribeMapper.java
@@ -24,8 +24,9 @@
     * @param shopId
     * @return
     */
    public List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(@Param("userId") Long userId,
                                                                           @Param("shopId") Long shopId);
    List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(
                                                                    @Param("shopId") Long shopId,
                                                                    @Param("status") Integer status);
    IPage<TechnicianSubscribeVO> getTechnicianSubscribeByUser(@Param("page") Page<TechnicianSubscribe> page, @Param("userId") Long userId,
                                       @Param("status") Integer status);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianSubscribeService.java
@@ -21,7 +21,7 @@
    /**
     * 查询用于指定门店的相关预约记录
     */
    List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(Long userId, Long shopId);
    List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(Long shopId, Integer status);
    IPage<TechnicianSubscribeVO> getTechnicianSubscribeByUser(Page<TechnicianSubscribe> page, Long userId, Integer status);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
@@ -33,8 +33,8 @@
    private RemoteOrderGoodsClient orderGoodsClient;
    @Override
    public List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(Long userId, Long shopId) {
        return technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop(userId, shopId);
    public List<TechnicianSubscribeVO> getTechnicianSubscribeByUserAndShop(Long shopId, Integer status) {
        return technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop(shopId,status);
    }
    @Override
    public IPage<TechnicianSubscribeVO> getTechnicianSubscribeByUser(Page<TechnicianSubscribe> page, Long userId, Integer status) {
@@ -55,7 +55,7 @@
            technicianSubscribeMapper.insert(subscribe);
        }
        if (subscribe.getTechnicianId() != null){
            orderGoodsClient.subscribe(subscribe.getOrderId(), Math.toIntExact(subscribe.getId()));
            orderGoodsClient.subscribe(subscribe.getOrderId(), subscribe.getTechnicianId());
        }
    }
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml
@@ -4,10 +4,13 @@
    <select id="getTechnicianSubscribeByUserAndShop" resultType="com.ruoyi.other.vo.TechnicianSubscribeVO">
        SELECT
            CAST(tts.id AS CHAR) id,
            tts.user_address,
            ts.`name` shopName,
            ts.address shopAddress,
            tt.name technicianName,
            ts.longitude,
            ts.latitude,
            tts.subscribe_time,
            tts.service_mode,
            tts.status
@@ -16,10 +19,11 @@
                LEFT JOIN t_technician tt ON tts.technician_id = tt.id AND tt.del_flag = 0
                LEFT JOIN t_shop ts ON tt.shop_id = ts.id AND ts.del_flag = 0
        WHERE
           ( (ts.app_user_id = #{userId} AND ts.id = #{shopId})
           OR
            (tt.app_user_id = #{userId} AND ts.id = #{shopId}))
            ts.id = #{shopId}
            AND tts.del_flag = 0
        <if test="status != null">
            AND tts.status = #{status}
        </if>
        ORDER BY tts.create_time DESC
    </select>