mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-05-06 03:51:25 +08:00
[重大更新] 使用 spring 新特性 HttpServiceClient 替代 Dubbo 降低框架使用难度(半成本 数据权限不好使)
This commit is contained in:
@@ -51,15 +51,14 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-mybatis</artifactId>
|
||||
<artifactId>ruoyi-common-http</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-dubbo</artifactId>
|
||||
<artifactId>ruoyi-common-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-security</artifactId>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.dromara.gen;
|
||||
|
||||
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||
@@ -10,7 +9,6 @@ import org.springframework.boot.context.metrics.buffering.BufferingApplicationSt
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableDubbo
|
||||
@SpringBootApplication
|
||||
public class RuoYiGenApplication {
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-dubbo</artifactId>
|
||||
<artifactId>ruoyi-common-http</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.dromara.job;
|
||||
|
||||
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||
@@ -10,7 +9,6 @@ import org.springframework.boot.context.metrics.buffering.BufferingApplicationSt
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@EnableDubbo
|
||||
@SpringBootApplication
|
||||
public class RuoYiJobApplication {
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-dubbo</artifactId>
|
||||
<artifactId>ruoyi-common-seata</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-seata</artifactId>
|
||||
<artifactId>ruoyi-common-http</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.dromara.resource;
|
||||
|
||||
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||
@@ -11,7 +10,6 @@ import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@EnableDubbo
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||
public class RuoYiResourceApplication {
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package org.dromara.resource.dubbo;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
@@ -17,7 +17,6 @@ import org.dromara.resource.domain.SysOssExt;
|
||||
import org.dromara.resource.domain.bo.SysOssBo;
|
||||
import org.dromara.resource.domain.vo.SysOssVo;
|
||||
import org.dromara.resource.service.ISysOssService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
@@ -28,9 +27,8 @@ import java.util.List;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteFileServiceImpl implements RemoteFileService {
|
||||
|
||||
private final ISysOssService sysOssService;
|
||||
|
||||
@@ -2,11 +2,10 @@ package org.dromara.resource.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.mail.utils.MailUtils;
|
||||
import org.dromara.resource.api.RemoteMailService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 邮件服务
|
||||
@@ -15,8 +14,7 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteMailServiceImpl implements RemoteMailService {
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,11 +2,10 @@ package org.dromara.resource.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.sse.dto.SseMessageDTO;
|
||||
import org.dromara.common.sse.utils.SseMessageUtils;
|
||||
import org.dromara.resource.api.RemoteMessageService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,8 +16,7 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteMessageServiceImpl implements RemoteMessageService {
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,13 +2,14 @@ package org.dromara.resource.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.resource.api.RemoteSmsService;
|
||||
import org.dromara.resource.api.domain.RemoteSms;
|
||||
import org.dromara.resource.api.domain.RemoteSmsBatch;
|
||||
import org.dromara.resource.api.domain.RemoteSmsDelayBatch;
|
||||
import org.dromara.sms4j.api.SmsBlend;
|
||||
import org.dromara.sms4j.api.entity.SmsResponse;
|
||||
import org.dromara.sms4j.core.factory.SmsFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -20,8 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteSmsServiceImpl implements RemoteSmsService {
|
||||
|
||||
/**
|
||||
@@ -122,6 +122,11 @@ public class RemoteSmsServiceImpl implements RemoteSmsService {
|
||||
return getRemoteSms(smsResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RemoteSms messageTextingTemplate(RemoteSmsBatch request) {
|
||||
return messageTexting(request.phones(), request.templateId(), request.messages());
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步方法:发送简单文本短信
|
||||
*
|
||||
@@ -195,6 +200,11 @@ public class RemoteSmsServiceImpl implements RemoteSmsService {
|
||||
getSmsBlend().delayMassTexting(phones, templateId, messages, delayedTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delayMessageTextingTemplate(RemoteSmsDelayBatch request) {
|
||||
delayMessageTexting(request.phones(), request.templateId(), request.messages(), request.delayedTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 加入黑名单
|
||||
*
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-mybatis</artifactId>
|
||||
<artifactId>ruoyi-common-http</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-dubbo</artifactId>
|
||||
<artifactId>ruoyi-common-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.dromara.system;
|
||||
|
||||
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||
@@ -10,7 +9,6 @@ import org.springframework.boot.context.metrics.buffering.BufferingApplicationSt
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableDubbo
|
||||
@SpringBootApplication
|
||||
public class RuoYiSystemApplication {
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -2,7 +2,6 @@ package org.dromara.system.controller.system;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.service.DictService;
|
||||
import org.dromara.common.redis.annotation.RepeatSubmit;
|
||||
@@ -32,8 +31,7 @@ public class SysNoticeController extends BaseController {
|
||||
private final ISysNoticeService noticeService;
|
||||
private final DictService dictService;
|
||||
|
||||
@DubboReference
|
||||
private RemoteMessageService remoteMessageService;
|
||||
private final RemoteMessageService remoteMessageService;
|
||||
|
||||
/**
|
||||
* 获取通知公告列表
|
||||
|
||||
@@ -6,7 +6,6 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.crypto.digest.BCrypt;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.apache.seata.spring.annotation.GlobalTransactional;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
@@ -46,8 +45,7 @@ public class SysProfileController extends BaseController {
|
||||
|
||||
private final ISysUserService userService;
|
||||
|
||||
@DubboReference
|
||||
private RemoteFileService remoteFileService;
|
||||
private final RemoteFileService remoteFileService;
|
||||
|
||||
/**
|
||||
* 个人信息
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package org.dromara.system.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.system.api.RemoteClientService;
|
||||
import org.dromara.system.api.domain.vo.RemoteClientVo;
|
||||
import org.dromara.system.domain.vo.SysClientVo;
|
||||
import org.dromara.system.service.ISysClientService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 客户端服务
|
||||
@@ -15,8 +14,7 @@ import org.springframework.stereotype.Service;
|
||||
* @author Michelle.Chung
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteClientServiceImpl implements RemoteClientService {
|
||||
|
||||
private final ISysClientService sysClientService;
|
||||
|
||||
@@ -2,11 +2,10 @@ package org.dromara.system.dubbo;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.json.utils.JsonUtils;
|
||||
import org.dromara.system.api.RemoteConfigService;
|
||||
import org.dromara.system.service.ISysConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -16,8 +15,7 @@ import java.util.List;
|
||||
* @author Michelle.Chung
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteConfigServiceImpl implements RemoteConfigService {
|
||||
|
||||
private final ISysConfigService configService;
|
||||
|
||||
@@ -5,7 +5,7 @@ import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.constant.CacheNames;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
import org.dromara.system.api.RemoteDataScopeService;
|
||||
@@ -13,7 +13,6 @@ import org.dromara.system.domain.SysRoleDept;
|
||||
import org.dromara.system.mapper.SysDeptMapper;
|
||||
import org.dromara.system.mapper.SysRoleDeptMapper;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -26,8 +25,7 @@ import java.util.List;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteDataScopeServiceImpl implements RemoteDataScopeService {
|
||||
|
||||
private final SysRoleDeptMapper roleDeptMapper;
|
||||
|
||||
@@ -4,7 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.constant.SystemConstants;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
import org.dromara.system.api.RemoteDeptService;
|
||||
@@ -13,7 +13,6 @@ import org.dromara.system.domain.SysDept;
|
||||
import org.dromara.system.domain.vo.SysDeptVo;
|
||||
import org.dromara.system.mapper.SysDeptMapper;
|
||||
import org.dromara.system.service.ISysDeptService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -26,8 +25,7 @@ import java.util.Map;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteDeptServiceImpl implements RemoteDeptService {
|
||||
|
||||
private final ISysDeptService deptService;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.dromara.system.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.system.api.RemoteDictService;
|
||||
import org.dromara.system.api.domain.vo.RemoteDictDataVo;
|
||||
@@ -9,7 +9,6 @@ import org.dromara.system.api.domain.vo.RemoteDictTypeVo;
|
||||
import org.dromara.system.domain.vo.SysDictDataVo;
|
||||
import org.dromara.system.domain.vo.SysDictTypeVo;
|
||||
import org.dromara.system.service.ISysDictTypeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -19,8 +18,7 @@ import java.util.List;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteDictServiceImpl implements RemoteDictService {
|
||||
|
||||
private final ISysDictTypeService sysDictTypeService;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.dromara.system.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.system.api.RemoteLogService;
|
||||
import org.dromara.system.api.domain.bo.RemoteLoginInfoBo;
|
||||
@@ -11,7 +11,7 @@ import org.dromara.system.domain.bo.SysOperLogBo;
|
||||
import org.dromara.system.service.ISysLoginInfoService;
|
||||
import org.dromara.system.service.ISysOperLogService;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
/**
|
||||
* 操作日志记录
|
||||
@@ -19,8 +19,7 @@ import org.springframework.stereotype.Service;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteLogServiceImpl implements RemoteLogService {
|
||||
|
||||
private final ISysOperLogService operLogService;
|
||||
@@ -32,6 +31,7 @@ public class RemoteLogServiceImpl implements RemoteLogService {
|
||||
* @param remoteOperLogBo 日志实体
|
||||
*/
|
||||
@Async
|
||||
@PostMapping("/save-log")
|
||||
@Override
|
||||
public void saveLog(RemoteOperLogBo remoteOperLogBo) {
|
||||
SysOperLogBo sysOperLogBo = MapstructUtils.convert(remoteOperLogBo, SysOperLogBo.class);
|
||||
@@ -44,6 +44,7 @@ public class RemoteLogServiceImpl implements RemoteLogService {
|
||||
* @param remoteLoginInfoBo 访问实体
|
||||
*/
|
||||
@Async
|
||||
@PostMapping("/save-login-info")
|
||||
@Override
|
||||
public void saveLoginInfo(RemoteLoginInfoBo remoteLoginInfoBo) {
|
||||
SysLoginInfoBo sysLoginInfoBo = MapstructUtils.convert(remoteLoginInfoBo, SysLoginInfoBo.class);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package org.dromara.system.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.system.api.RemotePermissionService;
|
||||
import org.dromara.system.service.ISysPermissionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -14,8 +13,7 @@ import java.util.Set;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemotePermissionServiceImpl implements RemotePermissionService {
|
||||
|
||||
private final ISysPermissionService permissionService;
|
||||
|
||||
@@ -3,12 +3,11 @@ package org.dromara.system.dubbo;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
import org.dromara.system.api.RemotePostService;
|
||||
import org.dromara.system.domain.SysPost;
|
||||
import org.dromara.system.mapper.SysPostMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -21,8 +20,7 @@ import java.util.Map;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemotePostServiceImpl implements RemotePostService {
|
||||
|
||||
private final SysPostMapper postMapper;
|
||||
|
||||
@@ -3,12 +3,11 @@ package org.dromara.system.dubbo;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
import org.dromara.system.api.RemoteRoleService;
|
||||
import org.dromara.system.domain.SysRole;
|
||||
import org.dromara.system.mapper.SysRoleMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -21,8 +20,7 @@ import java.util.Map;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteRoleServiceImpl implements RemoteRoleService {
|
||||
|
||||
private final SysRoleMapper roleMapper;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.dromara.system.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.system.api.RemoteSocialService;
|
||||
import org.dromara.system.api.domain.bo.RemoteSocialBo;
|
||||
@@ -9,7 +9,6 @@ import org.dromara.system.api.domain.vo.RemoteSocialVo;
|
||||
import org.dromara.system.domain.bo.SysSocialBo;
|
||||
import org.dromara.system.domain.vo.SysSocialVo;
|
||||
import org.dromara.system.service.ISysSocialService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -19,8 +18,7 @@ import java.util.List;
|
||||
* @author Michelle.Chung
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteSocialServiceImpl implements RemoteSocialService {
|
||||
|
||||
private final ISysSocialService sysSocialService;
|
||||
|
||||
@@ -2,7 +2,7 @@ package org.dromara.system.dubbo;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.constant.SystemConstants;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.PageResult;
|
||||
@@ -21,7 +21,6 @@ import org.dromara.system.service.ISysDeptService;
|
||||
import org.dromara.system.service.ISysPostService;
|
||||
import org.dromara.system.service.ISysRoleService;
|
||||
import org.dromara.system.service.ISysUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -32,8 +31,7 @@ import java.util.Map;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteTaskAssigneeServiceImpl implements RemoteTaskAssigneeService {
|
||||
|
||||
// 上级Service注入下级Service 其他Service永远不可能注入当前类 避免循环注入
|
||||
|
||||
@@ -6,7 +6,7 @@ import cn.hutool.core.lang.Opt;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.common.core.constant.SystemConstants;
|
||||
import org.dromara.common.core.enums.UserStatus;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
@@ -32,7 +32,10 @@ import org.dromara.system.mapper.SysUserMapper;
|
||||
import org.dromara.system.mapper.SysUserPostMapper;
|
||||
import org.dromara.system.mapper.SysUserRoleMapper;
|
||||
import org.dromara.system.service.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.service.annotation.GetExchange;
|
||||
import org.springframework.web.service.annotation.PostExchange;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -42,8 +45,7 @@ import java.util.*;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
public class RemoteUserServiceImpl implements RemoteUserService {
|
||||
|
||||
private final ISysUserService userService;
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-http</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-log</artifactId>
|
||||
@@ -64,11 +68,6 @@
|
||||
<artifactId>warm-flow-plugin-ui-sb-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-dubbo</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-seata</artifactId>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.dromara.workflow;
|
||||
|
||||
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||
@@ -10,7 +9,6 @@ import org.springframework.boot.context.metrics.buffering.BufferingApplicationSt
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableDubbo
|
||||
@SpringBootApplication
|
||||
public class RuoYiWorkflowApplication {
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.dromara.workflow.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.http.annotation.RemoteServiceController;
|
||||
import org.dromara.workflow.api.RemoteWorkflowService;
|
||||
import org.dromara.workflow.api.domain.RemoteCompleteTask;
|
||||
import org.dromara.workflow.api.domain.RemoteStartProcess;
|
||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
* @Author ZETA
|
||||
* @Date 2024/6/3
|
||||
*/
|
||||
@DubboService
|
||||
@RemoteServiceController
|
||||
@RequiredArgsConstructor
|
||||
public class RemoteWorkflowServiceImpl implements RemoteWorkflowService {
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.enums.BusinessStatusEnum;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
@@ -54,8 +53,7 @@ public class WorkflowGlobalListener implements GlobalListener {
|
||||
private final IFlwCommonService flwCommonService;
|
||||
private final IFlwNodeExtService nodeExtService;
|
||||
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
private final RemoteUserService remoteUserService;
|
||||
|
||||
/**
|
||||
* 创建监听器,任务创建时执行
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.service.DictService;
|
||||
import org.dromara.common.core.utils.DateUtils;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
@@ -51,10 +50,8 @@ public class FlwChartExtServiceImpl implements ChartExtService {
|
||||
@Value("${warm-flow.node-tooltip:true}")
|
||||
private boolean nodeTooltip;
|
||||
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
@DubboReference
|
||||
private RemoteDeptService remoteDeptService;
|
||||
private final RemoteUserService remoteUserService;
|
||||
private final RemoteDeptService remoteDeptService;
|
||||
|
||||
/**
|
||||
* 设置流程图提示信息
|
||||
|
||||
@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
@@ -24,7 +23,6 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -41,12 +39,9 @@ public class FlwCommonServiceImpl implements IFlwCommonService {
|
||||
|
||||
private static final String DEFAULT_SUBJECT = "单据审批提醒";
|
||||
|
||||
@DubboReference
|
||||
private RemoteMessageService remoteMessageService;
|
||||
@DubboReference
|
||||
private RemoteMailService remoteMailService;
|
||||
@DubboReference
|
||||
private RemoteSmsService remoteSmsService;
|
||||
private final RemoteMessageService remoteMessageService;
|
||||
private final RemoteMailService remoteMailService;
|
||||
private final RemoteSmsService remoteSmsService;
|
||||
|
||||
/**
|
||||
* 根据流程实例发送消息给当前处理人
|
||||
|
||||
@@ -5,7 +5,6 @@ import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.json.utils.JsonUtils;
|
||||
import org.dromara.system.api.RemoteDictService;
|
||||
@@ -73,8 +72,7 @@ public class FlwNodeExtServiceImpl implements NodeExtService, IFlwNodeExtService
|
||||
);
|
||||
}
|
||||
|
||||
@DubboReference
|
||||
private RemoteDictService remoteDictService;
|
||||
private final RemoteDictService remoteDictService;
|
||||
|
||||
/**
|
||||
* 获取节点扩展属性
|
||||
|
||||
@@ -8,7 +8,6 @@ import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.enums.FormatsType;
|
||||
import org.dromara.common.core.utils.DateUtils;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
@@ -46,16 +45,11 @@ public class FlwTaskAssigneeServiceImpl implements IFlwTaskAssigneeService, Hand
|
||||
|
||||
private static final String DEFAULT_GROUP_NAME = "默认分组";
|
||||
|
||||
@DubboReference
|
||||
private RemoteTaskAssigneeService remoteTaskAssigneeService;
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
@DubboReference
|
||||
private RemoteDeptService remoteDeptService;
|
||||
@DubboReference
|
||||
private RemoteRoleService remoteRoleService;
|
||||
@DubboReference
|
||||
private RemotePostService remotePostService;
|
||||
private final RemoteTaskAssigneeService remoteTaskAssigneeService;
|
||||
private final RemoteUserService remoteUserService;
|
||||
private final RemoteDeptService remoteDeptService;
|
||||
private final RemoteRoleService remoteRoleService;
|
||||
private final RemotePostService remotePostService;
|
||||
|
||||
private final IFlwSpelService spelService;
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.enums.BusinessStatusEnum;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
@@ -98,8 +97,7 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
||||
private final IFlwNodeExtService flwNodeExtService;
|
||||
private final FlwInstanceBizExtMapper flwInstanceBizExtMapper;
|
||||
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
private final RemoteUserService remoteUserService;
|
||||
|
||||
/**
|
||||
* 启动任务
|
||||
|
||||
Reference in New Issue
Block a user