无关风月
17 小时以前 b5ead35c1d955f2a0e2e10da79254860d0ba95e9
ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/RecoveryServeController.java
@@ -73,7 +73,7 @@
        List<RecoveryClassify> serveList = recoveryClassifyService.lambdaQuery()
                .eq(RecoveryClassify::getIsDelete, 0)
                .eq(RecoveryClassify::getSupClassify, serveType)
                .orderByDesc(RecoveryClassify::getSort)
                .orderByAsc(RecoveryClassify::getSort)
                .orderByDesc(RecoveryClassify::getCreateTime).list();
        List<UserServeTypeVO> list = new ArrayList<>();
        for (RecoveryClassify classify : serveList) {
@@ -119,7 +119,22 @@
    public R<ServeDetailVO> serveDetail(@RequestParam String serveId) {
        LoginUserInfo loginUser = tokenService.getLoginUserByUser();
        if (null == loginUser) {
            return R.loginExpire("登录失效!");
            RecoveryServe recoveryServe = recoveryServeService.lambdaQuery().eq(RecoveryServe::getId, serveId)
                    .eq(RecoveryServe::getIsDelete, 0).one();
                recoveryServe.setIsCollect(Boolean.FALSE);
            // 获取服务分类
            Integer classifyId = recoveryServe.getClassifyId();
            RecoveryClassify classify = recoveryClassifyService.lambdaQuery()
                    .eq(RecoveryClassify::getId, classifyId).one();
            if (classify.getSupClassify().equals(Constants.TRADE_IN)) {
                recoveryServe.setType(Constants.ZERO);
            } else {
                recoveryServe.setType(Constants.ONE);
            }
            return R.ok(new ServeDetailVO(recoveryServe, null));
        }
        RecoveryServe recoveryServe = recoveryServeService.lambdaQuery().eq(RecoveryServe::getId, serveId)
                .eq(RecoveryServe::getIsDelete, 0).one();
@@ -146,7 +161,9 @@
        UserRecipient userRecipient = userRecipientService.lambdaQuery()
                .eq(UserRecipient::getIsDefault, Constants.ONE)
                .eq(UserRecipient::getUserId, loginUser.getUserid())
                .eq(UserRecipient::getIsDelete, Constants.ZERO).one();
                .eq(UserRecipient::getIsDelete, Constants.ZERO)
                .last("limit 1")
                .one();
        return R.ok(new ServeDetailVO(recoveryServe, userRecipient));
    }