From 619a142941010b845eacf50aee9e8a453a18ef4f Mon Sep 17 00:00:00 2001 From: xiaohuang <1559741705@qq.com> Date: Sun, 9 Jun 2024 19:34:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E8=BD=A6=E8=BE=86=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE,=E8=BF=98=E4=B8=8D=E5=8F=AF=E4=BB=A5=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=95=B0=E6=8D=AE=20fix():=E8=A7=A3=E5=86=B3=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=97=AE=E9=A2=98=201:amqp=E6=97=A0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=202:modules=E6=A8=A1=E5=9D=97=E5=88=86=E5=9D=97=E4=B8=8D?= =?UTF-8?q?=E4=B8=8D=E6=B8=85=E6=99=B0=E5=AF=BC=E8=87=B4=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=B7=BB=E5=8A=A0=E4=BB=A5=E5=8F=8A=E4=B8=BB?= =?UTF-8?q?=E7=B1=BB=E6=97=A0=E6=B3=95=E6=89=BE=E5=88=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/remote/RemoteUserService.java | 2 +- .../muyu-business/muyu-data-service/pom.xml | 15 +++ .../muyu/business/config/RabbitmqConfig.java | 8 +- .../service/impl/BusinessServiceImpl.java | 5 +- .../service/impl/EntinfoServiceImpl.java | 58 ++++++++++++ muyu-modules/muyu-business/pom.xml | 93 ------------------- muyu-modules/muyu-system/pom.xml | 2 +- muyu-modules/pom.xml | 1 - pom.xml | 6 -- 9 files changed, 82 insertions(+), 108 deletions(-) diff --git a/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteUserService.java b/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteUserService.java index 9176b0e..0476546 100644 --- a/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteUserService.java +++ b/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteUserService.java @@ -3,9 +3,9 @@ package com.muyu.common.system.remote; import com.muyu.common.core.constant.SecurityConstants; import com.muyu.common.core.constant.ServiceNameConstants; import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.LoginUser; import com.muyu.common.system.domain.SysUser; import com.muyu.common.system.remote.factory.RemoteUserFallbackFactory; -import com.muyu.common.system.domain.LoginUser; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; diff --git a/muyu-modules/muyu-business/muyu-data-service/pom.xml b/muyu-modules/muyu-business/muyu-data-service/pom.xml index 540af65..f5d4223 100644 --- a/muyu-modules/muyu-business/muyu-data-service/pom.xml +++ b/muyu-modules/muyu-business/muyu-data-service/pom.xml @@ -23,8 +23,10 @@ org.springframework.boot spring-boot-starter-amqp + 2.7.13 + com.muyu muyu-common-system @@ -89,6 +91,19 @@ com.muyu muyu-common-swagger + + org.springframework.amqp + spring-amqp + 2.4.13 + + + org.springframework.amqp + spring-amqp + + + org.springframework.amqp + spring-amqp + diff --git a/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/config/RabbitmqConfig.java b/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/config/RabbitmqConfig.java index a67a989..7b9e0d8 100644 --- a/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/config/RabbitmqConfig.java +++ b/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/config/RabbitmqConfig.java @@ -1,7 +1,7 @@ package com.muyu.business.config; -import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; -import org.springframework.amqp.support.converter.MessageConverter; + +import ch.qos.logback.classic.pattern.MessageConverter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -10,6 +10,8 @@ public class RabbitmqConfig { // 消息转换配置 @Bean public MessageConverter jsonMessageConverter() { - return new Jackson2JsonMessageConverter(); + +// return new Jackson2JsonMessageConverter(); +return null; } } diff --git a/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/service/impl/BusinessServiceImpl.java b/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/service/impl/BusinessServiceImpl.java index 28176cb..715d580 100644 --- a/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/service/impl/BusinessServiceImpl.java +++ b/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/service/impl/BusinessServiceImpl.java @@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.muyu.business.domain.Business; import com.muyu.business.mapper.BusinessMapper; import com.muyu.business.service.BusinessService; -import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.DateUtils; import com.muyu.common.security.utils.SecurityUtils; import com.muyu.common.system.domain.LoginUser; @@ -41,7 +40,6 @@ public class BusinessServiceImpl extends ServiceImpl i @Autowired private RemoteUserService remoteUserService; - @Autowired private RedisTemplate redisTemplate; @@ -59,6 +57,7 @@ public class BusinessServiceImpl extends ServiceImpl i LoginUser loginUser = SecurityUtils.getLoginUser(); SysUser user = remoteUserService.selectByUserId(loginUser.getUserid()); + if (user.getUserType().equals("00")){ return businessMapper.selectBusinessList(business); } @@ -84,7 +83,7 @@ public class BusinessServiceImpl extends ServiceImpl i .userType(String.valueOf(business.getId())) .build(); - Result add = remoteUserService.add(sysUser); + remoteUserService.add(sysUser); return i; } diff --git a/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/service/impl/EntinfoServiceImpl.java b/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/service/impl/EntinfoServiceImpl.java index 719cceb..c25e0e8 100644 --- a/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/service/impl/EntinfoServiceImpl.java +++ b/muyu-modules/muyu-business/muyu-data-service/src/main/java/com/muyu/business/service/impl/EntinfoServiceImpl.java @@ -7,6 +7,8 @@ import com.muyu.business.service.IEntinfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * 多数据源 EntinfoServiceImpl * @@ -20,4 +22,60 @@ public class EntinfoServiceImpl extends ServiceImpl impl @Autowired private EntinfoMapper entinfoMapper; + + + /** + * 查询多数据源 + */ + @Override + public Entinfo selectEntinfoById(Long id){ + return entinfoMapper.selectEntinfoById(id); + } + + + /** + * 查询多数据源列表 + */ + @Override + public List selectEntinfoList(Entinfo entinfo){ + return entinfoMapper.selectEntinfoList(entinfo); + } + + + /** + * 新增 + */ + @Override + public int insertEntinfo(Entinfo entinfo){ + return entinfoMapper.insertEntinfo(entinfo); + } + + + /** + * 修改 + */ + @Override + public int updateEntinfo(Entinfo entinfo){ + return entinfoMapper.updateEntinfo(entinfo); + } + + + /** + * 批量删除 + */ + @Override + public int deleteEntinfoByIds(Long[] ids){ + return entinfoMapper.deleteEntinfoByIds(ids); + } + + + /** + * 删除多数据源信息 + */ + @Override + public int deleteEntinfoById(Long id){ + return entinfoMapper.deleteEntinfoById(id); + } + + } diff --git a/muyu-modules/muyu-business/pom.xml b/muyu-modules/muyu-business/pom.xml index cc8b7c6..c1a58ca 100644 --- a/muyu-modules/muyu-business/pom.xml +++ b/muyu-modules/muyu-business/pom.xml @@ -17,97 +17,4 @@ 17 UTF-8 - - - - com.muyu - muyu-common-system - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-sentinel - - - - - org.springframework.boot - spring-boot-starter-actuator - - - - - io.springfox - springfox-swagger-ui - ${swagger.fox.version} - - - - - com.mysql - mysql-connector-j - - - - - com.muyu - muyu-common-datasource - - - - - com.muyu - muyu-common-datascope - - - - - com.muyu - muyu-common-log - - - - - com.muyu - muyu-common-swagger - - - - - - ${project.artifactId} - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - diff --git a/muyu-modules/muyu-system/pom.xml b/muyu-modules/muyu-system/pom.xml index be58498..34cb617 100644 --- a/muyu-modules/muyu-system/pom.xml +++ b/muyu-modules/muyu-system/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> com.muyu - muyu-modules + muyu 3.6.3 4.0.0 diff --git a/muyu-modules/pom.xml b/muyu-modules/pom.xml index dfeb416..4632831 100644 --- a/muyu-modules/pom.xml +++ b/muyu-modules/pom.xml @@ -15,7 +15,6 @@ muyu-file muyu-business muyu-vehicle - muyu-modules diff --git a/pom.xml b/pom.xml index 0bdec14..fc97f1d 100644 --- a/pom.xml +++ b/pom.xml @@ -215,12 +215,6 @@ muyu-visual muyu-modules muyu-common - muyu-modules/muyu-business - muyu-modules/muyu-business/muyu-data-service - muyu-modules/muyu-vehicle - muyu-modules/muyu-vehicle - muyu-modules/muyu-vehicle/muyu-vehicle-service - muyu-modules/muyu-modules-many-datasource pom