Base模块调整,物资模块移除
This commit is contained in:
parent
2dbbb68def
commit
58a3cb7865
|
|
@ -27,21 +27,21 @@ public final class ResultBean<T> implements java.io.Serializable{
|
||||||
* 创建一个错误结果,并自定义错误码
|
* 创建一个错误结果,并自定义错误码
|
||||||
*
|
*
|
||||||
* @param code 错误码
|
* @param code 错误码
|
||||||
* @param message 错误信息
|
* @param msg 错误信息
|
||||||
* @return 构建的ResultBean实例
|
* @return 构建的ResultBean实例
|
||||||
*/
|
*/
|
||||||
public static <T> ResultBean<T> error(int code, String message) {
|
public static <T> ResultBean<T> error(int code, String msg) {
|
||||||
return new ResultBean<>(code, message, null);
|
return new ResultBean<>(code, msg, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建一个错误结果
|
* 创建一个错误结果
|
||||||
*
|
*
|
||||||
* @param message 错误信息
|
* @param msg 错误信息
|
||||||
* @return 构建的ResultBean实例
|
* @return 构建的ResultBean实例
|
||||||
*/
|
*/
|
||||||
public static <T> ResultBean<T> error(String message) {
|
public static <T> ResultBean<T> error(String msg) {
|
||||||
return new ResultBean<>(HttpStatus.ERROR, message, null);
|
return new ResultBean<>(HttpStatus.ERROR, msg, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package com.bonus.material.mapper;
|
||||||
import com.bonus.base.api.domain.MaType;
|
import com.bonus.base.api.domain.MaType;
|
||||||
import com.bonus.material.vo.MaTypeVo;
|
import com.bonus.material.vo.MaTypeVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -9,9 +9,6 @@ import com.bonus.material.service.MaTypeService;
|
||||||
import com.bonus.material.vo.MaTypeVo;
|
import com.bonus.material.vo.MaTypeVo;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.data.domain.Page;
|
|
||||||
import org.springframework.data.domain.PageImpl;
|
|
||||||
import org.springframework.data.domain.PageRequest;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,120 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<parent>
|
|
||||||
<artifactId>bonus-modules</artifactId>
|
|
||||||
<groupId>com.bonus</groupId>
|
|
||||||
<version>24.7.1-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>bonus-material</artifactId>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
bonus-modules-base物资管理模块
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
|
|
||||||
<!-- 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>
|
|
||||||
|
|
||||||
<!-- bonus Common DataSource -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.bonus</groupId>
|
|
||||||
<artifactId>bonus-common-datasource</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- bonus Common DataScope -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.bonus</groupId>
|
|
||||||
<artifactId>bonus-common-datascope</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- bonus Common Log -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.bonus</groupId>
|
|
||||||
<artifactId>bonus-common-log</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- bonus Common Swagger -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.bonus</groupId>
|
|
||||||
<artifactId>bonus-common-swagger</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.guava</groupId>
|
|
||||||
<artifactId>guava</artifactId>
|
|
||||||
<version>30.0-jre</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- lombok -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</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>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
package com.bonus.material;
|
|
||||||
|
|
||||||
import com.bonus.common.security.annotation.EnableCustomConfig;
|
|
||||||
import com.bonus.common.security.annotation.EnableRyFeignClients;
|
|
||||||
import com.bonus.common.swagger.annotation.EnableCustomSwagger2;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 物资管理模块
|
|
||||||
* @author ma_sh
|
|
||||||
*/
|
|
||||||
|
|
||||||
@EnableCustomConfig
|
|
||||||
@EnableCustomSwagger2
|
|
||||||
@EnableRyFeignClients
|
|
||||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
|
||||||
public class BonusMaterialApplication {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SpringApplication.run(BonusMaterialApplication.class, args);
|
|
||||||
System.out.println("(♥◠‿◠)ノ゙ bonus-material物资管理模块启动成功 ლ(´ڡ`ლ)゙ \n" +
|
|
||||||
" .-------. ____ __ \n" +
|
|
||||||
" | _ _ \\ \\ \\ / / \n" +
|
|
||||||
" | ( ' ) | \\ _. / ' \n" +
|
|
||||||
" |(_ o _) / _( )_ .' \n" +
|
|
||||||
" | (_,_).' __ ___(_ o _)' \n" +
|
|
||||||
" | |\\ \\ | || |(_,_)' \n" +
|
|
||||||
" | | \\ `' /| `-' / \n" +
|
|
||||||
" | | \\ / \\ / \n" +
|
|
||||||
" ''-' `'-' `-..-' ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
Spring Boot Version: ${spring-boot.version}
|
|
||||||
Spring Application Name: ${spring.application.name}
|
|
||||||
_
|
|
||||||
| |
|
|
||||||
| |__ ___ _ __ _ _ ___
|
|
||||||
| '_ \ / _ \ | '_ \ | | | | / __|
|
|
||||||
| |_) | | (_) | | | | | | |_| | \__ \
|
|
||||||
|_.__/ \___/ |_| |_| \__,_| |___/
|
|
||||||
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
# Tomcat
|
|
||||||
server:
|
|
||||||
port: 18089
|
|
||||||
|
|
||||||
# Spring
|
|
||||||
spring:
|
|
||||||
redis:
|
|
||||||
host: 192.168.0.56
|
|
||||||
port: 6379
|
|
||||||
datasource:
|
|
||||||
druid:
|
|
||||||
stat-view-servlet:
|
|
||||||
enabled: true
|
|
||||||
loginUsername: admin
|
|
||||||
loginPassword: Bonus@Max2024
|
|
||||||
dynamic:
|
|
||||||
strict: false
|
|
||||||
primary: master
|
|
||||||
datasource:
|
|
||||||
master:
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
url: jdbc:mysql://192.168.0.56:3306/bns-smartwh?allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false
|
|
||||||
username: Bonus@git
|
|
||||||
password: Passw0rd!
|
|
||||||
two:
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
url: jdbc:mysql:///192.168.0.56:3306/bns-smartwh?allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false
|
|
||||||
username: Bonus@git
|
|
||||||
password: Passw0rd!
|
|
||||||
servlet:
|
|
||||||
multipart:
|
|
||||||
max-file-size: 5GB
|
|
||||||
max-request-size: 5GB
|
|
||||||
application:
|
|
||||||
# 应用名称
|
|
||||||
name: bonus-material
|
|
||||||
profiles:
|
|
||||||
# 环境配置
|
|
||||||
active: dev
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
# 服务注册地址
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
namespace: 693e01a9-1dc4-4858-b1ae-439da3d35f66
|
|
||||||
config:
|
|
||||||
# 配置中心地址
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
namespace: 693e01a9-1dc4-4858-b1ae-439da3d35f66
|
|
||||||
# 配置文件格式
|
|
||||||
file-extension: yml
|
|
||||||
# 共享配置
|
|
||||||
shared-configs:
|
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
||||||
<!-- 日志存放路径 -->
|
|
||||||
<property name="log.path" value="logs/bonus-material" />
|
|
||||||
<!-- 日志输出格式 -->
|
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/info.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
|
||||||
<logger name="com.bonus" level="info" />
|
|
||||||
<!-- Spring日志级别控制 -->
|
|
||||||
<logger name="org.springframework" level="warn" />
|
|
||||||
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="console" />
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="file_info" />
|
|
||||||
<appender-ref ref="file_error" />
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
<module>bonus-obs</module>
|
<module>bonus-obs</module>
|
||||||
<module>bonus-mongodb</module>
|
<module>bonus-mongodb</module>
|
||||||
<module>bonus-base</module>
|
<module>bonus-base</module>
|
||||||
<module>bonus-material</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>bonus-modules</artifactId>
|
<artifactId>bonus-modules</artifactId>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue