parent
92ef1f8437
commit
619a142941
|
@ -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.*;
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||
<version>2.7.13</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-system</artifactId>
|
||||
|
@ -89,6 +91,19 @@
|
|||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
<artifactId>spring-amqp</artifactId>
|
||||
<version>2.4.13</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
<artifactId>spring-amqp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
<artifactId>spring-amqp</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<BusinessMapper, Business> i
|
|||
@Autowired
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private RedisTemplate<String,String> redisTemplate;
|
||||
|
||||
|
@ -59,6 +57,7 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> 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<BusinessMapper, Business> i
|
|||
.userType(String.valueOf(business.getId()))
|
||||
.build();
|
||||
|
||||
Result add = remoteUserService.add(sysUser);
|
||||
remoteUserService.add(sysUser);
|
||||
return i;
|
||||
|
||||
}
|
||||
|
|
|
@ -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<EntinfoMapper, Entinfo> impl
|
|||
|
||||
@Autowired
|
||||
private EntinfoMapper entinfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询多数据源
|
||||
*/
|
||||
@Override
|
||||
public Entinfo selectEntinfoById(Long id){
|
||||
return entinfoMapper.selectEntinfoById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询多数据源列表
|
||||
*/
|
||||
@Override
|
||||
public List<Entinfo> 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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -17,97 +17,4 @@
|
|||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-system</artifactId>
|
||||
</dependency>
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- ZhiLian Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- ZhiLian Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- ZhiLian Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- ZhiLian Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-swagger</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 加入maven deploy插件,当在deploy时,忽略些model-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-modules</artifactId>
|
||||
<artifactId>muyu</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
<module>muyu-file</module>
|
||||
<module>muyu-business</module>
|
||||
<module>muyu-vehicle</module>
|
||||
|
||||
</modules>
|
||||
|
||||
<artifactId>muyu-modules</artifactId>
|
||||
|
|
6
pom.xml
6
pom.xml
|
@ -215,12 +215,6 @@
|
|||
<module>muyu-visual</module>
|
||||
<module>muyu-modules</module>
|
||||
<module>muyu-common</module>
|
||||
<module>muyu-modules/muyu-business</module>
|
||||
<module>muyu-modules/muyu-business/muyu-data-service</module>
|
||||
<module>muyu-modules/muyu-vehicle</module>
|
||||
<module>muyu-modules/muyu-vehicle</module>
|
||||
<module>muyu-modules/muyu-vehicle/muyu-vehicle-service</module>
|
||||
<module>muyu-modules/muyu-modules-many-datasource</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
|
Loading…
Reference in New Issue