Commit 2afbce9d by 雷紫添

命案管理初始化

parents
# http://editorconfig.org
root = true
# 空格替代Tab缩进在各种编辑工具下效果一致
[*]
indent_style = space
indent_size = 4
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
[*.java]
indent_style = tab
[*.{json,yml}]
indent_size = 2
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
# maven #
target
logs
# windows #
Thumbs.db
# Mac #
.DS_Store
# eclipse #
.settings
.project
.classpath
.log
*.class
# idea #
.idea
*.iml
# Package Files #
*.jar
*.war
*.ear
/target
FROM anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER smallchill@163.com
RUN mkdir -p /blade
WORKDIR /blade
EXPOSE 8800
ADD ./target/SpringBlade.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"]
This diff is collapsed. Click to expand it.
java -jar app.jar
APP_NAME=app.jar
#使用说明,用来提示输入参数
usage() {
echo "Usage: sh 执行脚本.sh [start|stop|restart|status]"
exit 1
}
#检查程序是否在运行
is_exist(){
pid=`ps -ef|grep $APP_NAME|grep -v grep|awk '{print $2}' `
#如果不存在返回1,存在返回0
if [ -z "${pid}" ]; then
return 1
else
return 0
fi
}
#启动方法
start(){
is_exist
if [ $? -eq "0" ]; then
echo "${APP_NAME} is already running. pid=${pid} ."
else
nohup java -jar $APP_NAME > /dev/null 2>&1 &
fi
}
#停止方法
stop(){
is_exist
if [ $? -eq "0" ]; then
kill -9 $pid
else
echo "${APP_NAME} is not running"
fi
}
#输出运行状态
status(){
is_exist
if [ $? -eq "0" ]; then
echo "${APP_NAME} is running. Pid is ${pid}"
else
echo "${APP_NAME} is NOT running."
fi
}
#重启
restart(){
stop
start
}
#根据输入参数,选择执行对应方法,不输入则执行使用说明
case "$1" in
"start")
start
;;
"stop")
stop
;;
"status")
status
;;
"restart")
restart
;;
*)
usage
;;
esac
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?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">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springblade</groupId>
<artifactId>SpringBlade</artifactId>
<packaging>jar</packaging>
<version>2.7.1</version>
<properties>
<blade.tool.version>2.7.1</blade.tool.version>
<java.version>1.8</java.version>
<knife4j.version>2.0.3</knife4j.version>
<mybatis.plus.version>3.3.2</mybatis.plus.version>
<protostuff.version>1.6.0</protostuff.version>
<captcha.version>1.6.2</captcha.version>
<easyexcel.version>2.1.6</easyexcel.version>
<spring.boot.version>2.2.7.RELEASE</spring.boot.version>
<spring.platform.version>Cairo-SR8</spring.platform.version>
<!-- 推荐使用Harbor -->
<docker.registry.url>192.168.186.129</docker.registry.url>
<docker.registry.host>http://${docker.registry.url}:2375</docker.registry.host>
<docker.plugin.version>1.1.0</docker.plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>${spring.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-boot</artifactId>
<version>${blade.tool.version}</version>
<exclusions>
<exclusion>
<groupId>org.springblade</groupId>
<artifactId>blade-core-cloud</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-develop</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-oss</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
<version>${knife4j.version}</version>
</dependency>
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>${captcha.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>${easyexcel.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-test</artifactId>
<version>${blade.tool.version}</version>
<scope>test</scope>
</dependency>
<!-- 数据库驱动包 -->
<dependency>
<groupId>org.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>10</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.70</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>2.5.4</version>
</dependency>
</dependencies>
<build>
<finalName>xzxt-zxgl-report</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<finalName>${project.build.finalName}</finalName>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.plugin.version}</version>
<configuration>
<imageName>${docker.registry.url}/blade/${project.artifactId}:${project.version}</imageName>
<dockerDirectory>${project.basedir}</dockerDirectory>
<dockerHost>${docker.registry.host}</dockerHost>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<registryUrl>${docker.registry.url}</registryUrl>
<serverId>${docker.registry.url}</serverId>
<pushImage>true</pushImage>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>aliyun-repos</id>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun-plugin</id>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade;
import org.springblade.common.constant.LauncherConstant;
import org.springblade.core.launch.BladeApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 启动器
*
* @author Chill
*/
@EnableScheduling
@SpringBootApplication
public class Application {
public static void main(String[] args) {
BladeApplication.run(LauncherConstant.APPLICATION_NAME, Application.class, args);
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.common.cache;
/**
* 缓存名
*
* @author Chill
*/
public interface CacheNames {
String NOTICE_ONE = "notice:one";
String DICT_VALUE = "dict:value";
String DICT_LIST = "dict:list";
String CAPTCHA_KEY = "blade:auth::captcha:";
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.common.config;
import org.springblade.core.secure.registry.SecureRegistry;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* Blade配置
*
* @author Chill
*/
@Configuration
public class BladeConfiguration implements WebMvcConfigurer {
@Bean
public SecureRegistry secureRegistry() {
SecureRegistry secureRegistry = new SecureRegistry();
secureRegistry.setEnabled(true);
secureRegistry.excludePathPatterns("/blade-auth/**");
secureRegistry.excludePathPatterns("/api/sys/**");
secureRegistry.excludePathPatterns("/blade-log/**");
secureRegistry.excludePathPatterns("/blade-system/menu/auth-routes");
secureRegistry.excludePathPatterns("/doc.html");
secureRegistry.excludePathPatterns("/js/**");
secureRegistry.excludePathPatterns("/webjars/**");
secureRegistry.excludePathPatterns("/swagger-resources/**");
return secureRegistry;
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/js/**").addResourceLocations("classpath:/js/");
registry.addResourceHandler("doc.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
}
}
package org.springblade.common.config;
import com.fasterxml.classmate.ResolvedType;
import com.fasterxml.classmate.TypeResolver;
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiOperation;
import io.undertow.security.api.SecurityContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.*;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* @Author scott
*/
@Slf4j
@Configuration
@EnableSwagger2
@EnableKnife4j
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {
private final TypeResolver typeResolver;
@Autowired
public SwaggerConfiguration(TypeResolver typeResolver) {
this.typeResolver = typeResolver;
}
/*@Bean
public UiConfiguration uiConfiguration(){
return UiConfigurationBuilder.builder().supportedSubmitMethods(new String[]{})
.displayOperationId(true)
.build();
}*/
@Bean(value = "defaultApi")
public Docket defaultApi() {
ParameterBuilder parameterBuilder=new ParameterBuilder();
List<Parameter> parameters= Lists.newArrayList();
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.groupName("默认接口")
.select()
.apis(RequestHandlerSelectors.basePackage("org.springblade"))
//.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.paths(PathSelectors.any())
.build().globalOperationParameters(parameters);
//.securityContexts(Lists.newArrayList(securityContext())).securitySchemes(Lists.<SecurityScheme>newArrayList(apiKey()));
return docket;
}
/* @Bean(value = "groupRestApi")
public Docket groupRestApi() {
List<ResolvedType> list=Lists.newArrayList();
//SpringAddtionalModel springAddtionalModel= springAddtionalModelService.scan("com.swagger.bootstrap.ui.demo.extend");
return new Docket(DocumentationType.SWAGGER_2)
// .apiInfo(groupApiInfo())
.groupName("分组接口")
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.group"))
.paths(PathSelectors.any())
.build()
.additionalModels(typeResolver.resolve(DeveloperApiInfo.class)).securityContexts(Lists.newArrayList(securityContext(),securityContext1())).securitySchemes(Lists.<SecurityScheme>newArrayList(apiKey(),apiKey1()));
}*/
/* private ApiInfo groupApiInfo(){
DeveloperApiInfoExtension apiInfoExtension=new DeveloperApiInfoExtension();
apiInfoExtension.addDeveloper(new DeveloperApiInfo("张三","zhangsan@163.com","Java"))
.addDeveloper(new DeveloperApiInfo("李四","lisi@163.com","Java"));
return new ApiInfoBuilder()
.title("swagger-bootstrap-ui很棒~~~!!!")
.description("<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>")
.termsOfServiceUrl("http://www.group.com/")
.contact("group@qq.com")
.version("1.0")
.extensions(Lists.newArrayList(apiInfoExtension))
.build();
}*/
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
private ApiKey apiKey() {
return new ApiKey("BearerToken", "Authorization", "header");
}
private ApiKey apiKey1() {
return new ApiKey("BearerToken1", "Authorization-x", "header");
}
/* private SecurityContext securityContext() {
return SecurityContext.builder()
.securityReferences(defaultAuth())
.forPaths(PathSelectors.regex("/.*"))
.build();
}*/
/* private SecurityContext securityContext1() {
return SecurityContext.builder()
.securityReferences(defaultAuth1())
.forPaths(PathSelectors.regex("/.*"))
.build();
}*/
List<SecurityReference> defaultAuth() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
return Lists.newArrayList(new SecurityReference("BearerToken", authorizationScopes));
}
List<SecurityReference> defaultAuth1() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
return Lists.newArrayList(new SecurityReference("BearerToken1", authorizationScopes));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.common.constant;
/**
* 通用常量
*
* @author Chill
*/
public interface CommonConstant {
/**
* sword 系统名
*/
String SWORD_NAME = "sword";
/**
* saber 系统名
*/
String SABER_NAME = "saber";
/**
* 顶级父节点id
*/
Long TOP_PARENT_ID = 0L;
/**
* 顶级父节点名称
*/
String TOP_PARENT_NAME = "顶级";
/**
* 默认密码
*/
String DEFAULT_PASSWORD = "123456";
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.common.constant;
import org.springblade.core.launch.constant.AppConstant;
/**
* 通用常量
*
* @author Chill
*/
public interface LauncherConstant {
/**
* app name
*/
String APPLICATION_NAME = AppConstant.APPLICATION_NAME_PREFIX + "api";
/**
* sentinel dev 地址
*/
String SENTINEL_DEV_ADDR = "127.0.0.1:8858";
/**
* sentinel prod 地址
*/
String SENTINEL_PROD_ADDR = "192.168.186.129:8858";
/**
* sentinel test 地址
*/
String SENTINEL_TEST_ADDR = "192.168.186.129:8858";
/**
* 动态获取sentinel地址
*
* @param profile 环境变量
* @return addr
*/
static String sentinelAddr(String profile) {
switch (profile) {
case (AppConstant.PROD_CODE):
return SENTINEL_PROD_ADDR;
case (AppConstant.TEST_CODE):
return SENTINEL_TEST_ADDR;
default:
return SENTINEL_DEV_ADDR;
}
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.common.launch;
import org.springblade.common.constant.LauncherConstant;
import org.springblade.core.launch.service.LauncherService;
import org.springframework.boot.builder.SpringApplicationBuilder;
import java.util.Properties;
/**
* 启动参数拓展
*
* @author smallchil
*/
public class LauncherServiceImpl implements LauncherService {
@Override
public void launcher(SpringApplicationBuilder builder, String appName, String profile) {
Properties props = System.getProperties();
props.setProperty("spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.common.tool;
/**
* 通用工具类
*
* @author Chill
*/
public class CommonUtil {
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.core.log.config;
import lombok.AllArgsConstructor;
import org.springblade.core.launch.props.BladeProperties;
import org.springblade.core.launch.server.ServerInfo;
import org.springblade.core.log.aspect.ApiLogAspect;
import org.springblade.core.log.event.ApiLogListener;
import org.springblade.core.log.event.ErrorLogListener;
import org.springblade.core.log.event.UsualLogListener;
import org.springblade.core.log.logger.BladeLogger;
import org.springblade.modules.system.service.ILogService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* 日志工具自动配置
*
* @author Chill
*/
@Configuration
@AllArgsConstructor
@ConditionalOnWebApplication
public class BladeLogToolAutoConfiguration {
private final ILogService logService;
private final ServerInfo serverInfo;
private final BladeProperties bladeProperties;
@Bean
public ApiLogAspect apiLogAspect() {
return new ApiLogAspect();
}
@Bean
public BladeLogger bladeLogger() {
return new BladeLogger();
}
@Bean
public ApiLogListener apiLogListener() {
return new ApiLogListener(logService, serverInfo, bladeProperties);
}
@Bean
public ErrorLogListener errorEventListener() {
return new ErrorLogListener(logService, serverInfo, bladeProperties);
}
@Bean
public UsualLogListener bladeEventListener() {
return new UsualLogListener(logService, serverInfo, bladeProperties);
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.core.log.event;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.launch.props.BladeProperties;
import org.springblade.core.launch.server.ServerInfo;
import org.springblade.core.log.constant.EventConstant;
import org.springblade.core.log.model.LogApi;
import org.springblade.core.log.utils.LogAbstractUtil;
import org.springblade.modules.system.service.ILogService;
import org.springframework.context.event.EventListener;
import org.springframework.core.annotation.Order;
import org.springframework.scheduling.annotation.Async;
import java.util.Map;
/**
* 异步监听日志事件
*
* @author Chill
*/
@Slf4j
@AllArgsConstructor
public class ApiLogListener {
private final ILogService logService;
private final ServerInfo serverInfo;
private final BladeProperties bladeProperties;
@Async
@Order
@EventListener(ApiLogEvent.class)
public void saveApiLog(ApiLogEvent event) {
Map<String, Object> source = (Map<String, Object>) event.getSource();
LogApi logApi = (LogApi) source.get(EventConstant.EVENT_LOG);
LogAbstractUtil.addOtherInfoToLog(logApi, bladeProperties, serverInfo);
logService.saveApiLog(logApi);
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.core.log.event;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.launch.props.BladeProperties;
import org.springblade.core.launch.server.ServerInfo;
import org.springblade.core.log.constant.EventConstant;
import org.springblade.core.log.model.LogError;
import org.springblade.core.log.utils.LogAbstractUtil;
import org.springblade.modules.system.service.ILogService;
import org.springframework.context.event.EventListener;
import org.springframework.core.annotation.Order;
import org.springframework.scheduling.annotation.Async;
import java.util.Map;
/**
* 异步监听错误日志事件
*
* @author Chill
*/
@Slf4j
@AllArgsConstructor
public class ErrorLogListener {
private final ILogService logService;
private final ServerInfo serverInfo;
private final BladeProperties bladeProperties;
@Async
@Order
@EventListener(ErrorLogEvent.class)
public void saveErrorLog(ErrorLogEvent event) {
Map<String, Object> source = (Map<String, Object>) event.getSource();
LogError logError = (LogError) source.get(EventConstant.EVENT_LOG);
LogAbstractUtil.addOtherInfoToLog(logError, bladeProperties, serverInfo);
logService.saveErrorLog(logError);
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.core.log.event;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.launch.props.BladeProperties;
import org.springblade.core.launch.server.ServerInfo;
import org.springblade.core.log.constant.EventConstant;
import org.springblade.core.log.model.LogUsual;
import org.springblade.core.log.utils.LogAbstractUtil;
import org.springblade.modules.system.service.ILogService;
import org.springframework.context.event.EventListener;
import org.springframework.core.annotation.Order;
import org.springframework.scheduling.annotation.Async;
import java.util.Map;
/**
* 异步监听日志事件
*
* @author Chill
*/
@Slf4j
@AllArgsConstructor
public class UsualLogListener {
private final ILogService logService;
private final ServerInfo serverInfo;
private final BladeProperties bladeProperties;
@Async
@Order
@EventListener(UsualLogEvent.class)
public void saveUsualLog(UsualLogEvent event) {
Map<String, Object> source = (Map<String, Object>) event.getSource();
LogUsual logUsual = (LogUsual) source.get(EventConstant.EVENT_LOG);
LogAbstractUtil.addOtherInfoToLog(logUsual, bladeProperties, serverInfo);
logService.saveUsualLog(logUsual);
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.core.secure;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* AuthInfo
*
* @author Chill
*/
@Data
@ApiModel(description = "认证信息")
public class AuthInfo {
@ApiModelProperty(value = "令牌")
private String accessToken;
@ApiModelProperty(value = "令牌类型")
private String tokenType;
@ApiModelProperty(value = "刷新令牌")
private String refreshToken;
@ApiModelProperty(value = "头像")
private String avatar = "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png";
@ApiModelProperty(value = "角色名")
private String authority;
@ApiModelProperty(value = "用户名")
private String userName;
@ApiModelProperty(value = "账号名")
private String account;
@ApiModelProperty(value = "过期时间")
private long expiresIn;
@ApiModelProperty(value = "许可证")
private String license = "powered by blade";
}
package org.springblade.founder.api.sso.controller;
import org.springblade.founder.api.sso.model.UserInfo;
import org.springblade.founder.api.sso.model.UserInfoByToken;
import org.springblade.founder.api.sso.utils.HMACSHA256;
import org.springblade.founder.api.sso.utils.IpADressLock;
import org.springblade.founder.api.sso.utils.RedisLock;
import org.springblade.founder.sysuser.entity.SysUser;
import org.springblade.founder.sysuser.service.ISysUserService;
import org.springblade.founder.sysuser.vo.SysUserVO;
import org.springblade.founder.xzfwgl.service.ILdfwSecretService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping(value="api/sys",produces = "application/json; charset=utf-8")
public class UserInfoByTokenController {
@Value(value = "${redistimeout}")
private int redistimeout;
@Autowired
private RedisLock redisLock;
@Autowired
private ISysUserService sysUserService;
@Autowired
private ILdfwSecretService ldfwSecretService;
/* @Autowired
private IpADressLock ipADressLock;*/
@ResponseBody
@PostMapping("/getUserInfoByToken")
public Object queryDatas(HttpServletRequest request, @RequestBody UserInfoByToken userInfo) {
//1.验证是否非法调用()
Map<String, Object> res = new HashMap<>();
/*String idStr=identityCardVerification.IdentityCardVerification(jccj.getUser_id());
if( !jccj.getUser_id().equals(idStr)){
res.put("status_code", "010103");
res.put("message", idStr);
res.put("taskid", jccj.getTaskid());
return res;
}*/
/* if(!ipADressLock.getIpAddress(request)){
res.put("status_code", "010102");
res.put("message", "访问ip地址未授权");
// res.put("taskid", jccj.getTaskid());
return res;
}
long time=System.currentTimeMillis()+redistimeout;
if(!redisLock.lock(jccj.getTaskid(),String.valueOf(time))){
res.put("status_code", "010103");
res.put("message", "请勿重复提交");
// res.put("taskid", jccj.getTaskid());
return res;
}*/
//appid XZ01000005 key 77N1Zd8yFWorgrK7 token 2d69c3e2da6e8ecc8e977603
String app_secretSign="app_id="+userInfo.getApp_id()
+"&app_key"+userInfo.getApp_key()+"&timestamp"
+userInfo.getTimestamp()+"&xz_token"+userInfo.getXz_token();
if ( !HMACSHA256.sha256_HMAC(app_secretSign,ldfwSecretService.selectLdfwSecretByKey(userInfo.getApp_key())).equals(userInfo.getSign())){
res.put("code", "2005");
res.put("msg", "签名与参数信息不符");
return res;
}
try {
//调用业务逻辑开始
//1.通过token拿身份证号
SysUserVO sysUser= sysUserService.selectSysUserBySfzh(redisLock.getzjhmBytoken(userInfo.getXz_token()));
Map<String,Object> data= new HashMap<>();
data.put("SFZH",sysUser.getIdentitycard());
res.put("type", "UserInfo");
res.put("data", data);
res.put("code", "1000");
res.put("msg", "请求成功");
}catch (Exception e){
res.put("code", "9999");
res.put("msg", "其他错误"+e.getMessage());
// res.put("taskid", jccj.getTaskid());
return res;
}
// response.setCharacterEncoding("utf-8");
return res;
}
}
package org.springblade.founder.api.sso.model;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
public class UserInfo {
private String SFZH;
private String YHMC;
private String SEX;
private String JH;
private String JZDM;
private String LXDH;
private String SJHM;
public String GAJGJGDM;
private String GAJGJGMC;
private String ZXBS;
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@ApiModelProperty(value = "更新时间")
private java.util.Date GXSJ;
public String getSFZH() {
return SFZH;
}
public void setSFZH(String SFZH) {
this.SFZH = SFZH;
}
public String getYHMC() {
return YHMC;
}
public void setYHMC(String YHMC) {
this.YHMC = YHMC;
}
public String getSEX() {
return SEX;
}
public void setSEX(String SEX) {
this.SEX = SEX;
}
public String getJH() {
return JH;
}
public void setJH(String JH) {
this.JH = JH;
}
public String getJZDM() {
return JZDM;
}
public void setJZDM(String JZDM) {
this.JZDM = JZDM;
}
public String getLXDH() {
return LXDH;
}
public void setLXDH(String LXDH) {
this.LXDH = LXDH;
}
public String getSJHM() {
return SJHM;
}
public void setSJHM(String SJHM) {
this.SJHM = SJHM;
}
public String getGAJGJGDM() {
return GAJGJGDM;
}
public void setGAJGJGDM(String GAJGJGDM) {
this.GAJGJGDM = GAJGJGDM;
}
public String getGAJGJGMC() {
return GAJGJGMC;
}
public void setGAJGJGMC(String GAJGJGMC) {
this.GAJGJGMC = GAJGJGMC;
}
public String getZXBS() {
return ZXBS;
}
public void setZXBS(String ZXBS) {
this.ZXBS = ZXBS;
}
public Date getGXSJ() {
return GXSJ;
}
public void setGXSJ(Date GXSJ) {
this.GXSJ = GXSJ;
}
}
package org.springblade.founder.api.sso.model;
public class UserInfoByToken {
private String app_id;
private String app_key;
private String xz_token;
private String timestamp;
private String sign;
private String code;
private String data;
public String type;
public String getApp_id() {
return app_id;
}
public void setApp_id(String app_id) {
this.app_id = app_id;
}
public String getApp_key() {
return app_key;
}
public void setApp_key(String app_key) {
this.app_key = app_key;
}
public String getXz_token() {
return xz_token;
}
public void setXz_token(String xz_token) {
this.xz_token = xz_token;
}
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
package org.springblade.founder.api.sso.utils;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
public class HMACSHA256 {
/**
* 将加密后的字节数组转换成字符串
*
* @param b 字节数组
* @return 字符串
*/
public static String byteArrayToHexString(byte[] b) {
StringBuilder hs = new StringBuilder();
String stmp;
for (int n = 0; b!=null && n < b.length; n++) {
stmp = Integer.toHexString(b[n] & 0XFF);
if (stmp.length() == 1){
hs.append('0');
hs.append(stmp);}
}
return hs.toString().toLowerCase();
}
/**
* sha256_HMAC加密
* @param message 消息
* @param secret 秘钥
* @return 加密后字符串
*/
public static String sha256_HMAC(String message, String secret) {
String hash = "";
try {
Mac sha256_HMAC = Mac.getInstance("HmacSHA256");
SecretKeySpec secret_key = new SecretKeySpec(secret.getBytes(), "HmacSHA256");
sha256_HMAC.init(secret_key);
byte[] bytes = sha256_HMAC.doFinal(message.getBytes());
hash = byteArrayToHexString(bytes);
} catch (Exception e) {
System.out.println("Error HmacSHA256 ===========" + e.getMessage());
}
return hash;
}
}
package org.springblade.founder.api.sso.utils;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Hashtable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Component
public class IdentityCardVerification {
/* @Test
public void test(){
System.out.println(IdentityCardVerification("110101199003074370"));
}*/
/**
*身份证验证
* @param idStr
* @return
*/
public String IdentityCardVerification(String idStr){
String[] wf = { "1", "0", "x", "9", "8", "7", "6", "5", "4", "3", "2" };
String[] checkCode = { "7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2" };
String iDCardNo = "";
try {
//判断号码的长度 15位或18位
if (idStr.length() != 18) {
return "身份证号码长度应该为15位或18位";
}
if (idStr.length() == 18) {
iDCardNo = idStr.substring(0, 17);
} else if (idStr.length() == 15) {
iDCardNo = idStr.substring(0, 6) + "19" + idStr.substring(6, 15);
}
if (isStrNum(iDCardNo) == false) {
return "身份证15位号码都应为数字;18位号码除最后一位外,都应为数字";
}
//判断出生年月
String strYear = iDCardNo.substring(6, 10);// 年份
String strMonth = iDCardNo.substring(10, 12);// 月份
String strDay = iDCardNo.substring(12, 14);// 月份
if (isStrDate(strYear + "-" + strMonth + "-" + strDay) == false) {
return "身份证生日无效";
}
GregorianCalendar gc = new GregorianCalendar();
SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
if ((gc.get(Calendar.YEAR) - Integer.parseInt(strYear)) > 150 || (gc.getTime().getTime() - s.parse(strYear + "-" + strMonth + "-" + strDay).getTime()) < 0) {
return "身份证生日不在有效范围";
}
if (Integer.parseInt(strMonth) > 12 || Integer.parseInt(strMonth) == 0) {
return "身份证月份无效";
}
if (Integer.parseInt(strDay) > 31 || Integer.parseInt(strDay) == 0) {
return "身份证日期无效";
}
//判断地区码
Hashtable h = GetAreaCode();
if (h.get(iDCardNo.substring(0, 2)) == null) {
return "身份证地区编码错误";
}
//判断最后一位
int theLastOne = 0;
for (int i = 0; i < 17; i++) {
theLastOne = theLastOne + Integer.parseInt(String.valueOf(iDCardNo.charAt(i))) * Integer.parseInt(checkCode[i]);
}
int modValue = theLastOne % 11;
String strVerifyCode = wf[modValue];
iDCardNo = iDCardNo + strVerifyCode;
if (idStr.length() == 18 &&!iDCardNo.equals(idStr)) {
return "身份证无效,不是合法的身份证号码";
}
}catch (Exception e){
e.printStackTrace();
}
return idStr;
}
/**
* 地区代码
* @return Hashtable
*/
private static Hashtable GetAreaCode() {
Hashtable hashtable = new Hashtable();
hashtable.put("11", "北京");
hashtable.put("12", "天津");
hashtable.put("13", "河北");
hashtable.put("14", "山西");
hashtable.put("15", "内蒙古");
hashtable.put("21", "辽宁");
hashtable.put("22", "吉林");
hashtable.put("23", "黑龙江");
hashtable.put("31", "上海");
hashtable.put("32", "江苏");
hashtable.put("33", "浙江");
hashtable.put("34", "安徽");
hashtable.put("35", "福建");
hashtable.put("36", "江西");
hashtable.put("37", "山东");
hashtable.put("41", "河南");
hashtable.put("42", "湖北");
hashtable.put("43", "湖南");
hashtable.put("44", "广东");
hashtable.put("45", "广西");
hashtable.put("46", "海南");
hashtable.put("50", "重庆");
hashtable.put("51", "四川");
hashtable.put("52", "贵州");
hashtable.put("53", "云南");
hashtable.put("54", "西藏");
hashtable.put("61", "陕西");
hashtable.put("62", "甘肃");
hashtable.put("63", "青海");
hashtable.put("64", "宁夏");
hashtable.put("65", "新疆");
hashtable.put("71", "台湾");
hashtable.put("81", "香港");
hashtable.put("82", "澳门");
hashtable.put("91", "国外");
return hashtable;
}
/**
* 判断字符串是否为数字
* @param str
* @return
*/
private static boolean isStrNum(String str) {
Pattern pattern = Pattern.compile("[0-9]*");
Matcher isNum = pattern.matcher(str);
if (isNum.matches()) {
return true;
} else {
return false;
}
}
/**
* 判断字符串是否为日期格式
* @param strDate
* @return
*/
public static boolean isStrDate(String strDate) {
Pattern pattern = Pattern.compile("^((\\d{2}(([02468][048])|([13579][26]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\\s(((0?[0-9])|([1-2][0-3]))\\:([0-5]?[0-9])((\\s)|(\\:([0-5]?[0-9])))))?$");
Matcher m = pattern.matcher(strDate);
if (m.matches()) {
return true;
} else {
return false;
}
}
}
package org.springblade.founder.api.sso.utils;
public class IpADdress {
public String name;
public String code;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
package org.springblade.founder.api.sso.utils;
import com.alibaba.fastjson.JSONArray;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@Component
public class IpADressLock {
// @Value(value = "${ftpserverip}")
private String ftpserverip;
// @Value(value = "${ftpfilePath}")
private String ftpfilePath;
// @Value(value = "${ipaddress}")
private String ipaddress;
public boolean getIpAddress(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_CLIENT_IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
RestTemplate restTemplate = new RestTemplate();
String result =restTemplate.getForObject("http://"+ftpserverip+ftpfilePath+ipaddress+".js",String.class);
List<IpADdress> resultList= JSONArray.parseArray(result,IpADdress.class);
for(int i = 0;i < resultList.size(); i ++){
if (ip.equals(resultList.get(i).getCode())){
return true;
}
}
return false;
}
}
package org.springblade.founder.api.sso.utils;
import java.util.Random;
/**
* 随机数工具类
*
* @Author:chenssy
* @date:2014年8月11日
*/
public class RandomUtils {
private static final String ALL_CHAR = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
private static final String LETTER_CHAR = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
private static final String NUMBER_CHAR = "0123456789";
/**
* 获取定长的随机数,包含大小写、数字
* @autor:chenssy
* @date:2014年8月11日
*
* @param length
* 随机数长度
* @return
*/
public static String generateString(int length) {
StringBuffer sb = new StringBuffer();
Random random = new Random();
for (int i = 0; i < length; i++) {
sb.append(ALL_CHAR.charAt(random.nextInt(ALL_CHAR.length())));
}
return sb.toString();
}
/**
* 获取定长的随机数,包含大小写字母
* @autor:chenssy
* @date:2014年8月11日
*
* @param length
* 随机数长度
* @return
*/
public static String generateMixString(int length) {
StringBuffer sb = new StringBuffer();
Random random = new Random();
for (int i = 0; i < length; i++) {
sb.append(LETTER_CHAR.charAt(random.nextInt(LETTER_CHAR.length())));
}
return sb.toString();
}
/**
* 获取定长的随机数,只包含小写字母
* @autor:chenssy
* @date:2014年8月11日
*
* @param length
* 随机数长度
* @return
*/
public static String generateLowerString(int length) {
return generateMixString(length).toLowerCase();
}
/**
* 获取定长的随机数,只包含大写字母
* @autor:chenssy
* @date:2014年8月11日
*
* @param length
* 随机数长度
* @return
*/
public static String generateUpperString(int length) {
return generateMixString(length).toUpperCase();
}
/**
* 获取定长的随机数,只包含数字
* @autor:chenssy
* @date:2014年8月11日
*
* @param length
* 随机数长度
* @return
*/
public static String generateNumberString(int length){
StringBuffer sb = new StringBuffer();
Random random = new Random();
for (int i = 0; i < length; i++) {
sb.append(NUMBER_CHAR.charAt(random.nextInt(NUMBER_CHAR.length())));
}
return sb.toString();
}
}
package org.springblade.founder.api.sso.utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.util.concurrent.TimeUnit;
@Component
public class RedisLock {
@Value(value = "${redistimeout}")
private int redistimeout;
@Autowired
private StringRedisTemplate redisTemplate;
public boolean lock(String key,String value){
if(redisTemplate.opsForValue().setIfAbsent(key, value,redistimeout,TimeUnit.MILLISECONDS)){
return true;
}
String currentValue=redisTemplate.opsForValue().get(key);
if(!StringUtils.isEmpty(currentValue)&&Long.parseLong(currentValue)<System.currentTimeMillis()){
String oldvalue=redisTemplate.opsForValue().getAndSet(key, value);
if (!StringUtils.isEmpty(oldvalue)&&oldvalue.equals(currentValue)){
return true;
}
}
return false;
}
public String getzjhmBytoken(String token){
return redisTemplate.opsForValue().get(token);
}
}
package org.springblade.founder.base;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 基础实体类
*
* @author Chill
*/
@Data
public class BaseEntity implements Serializable {
/**
* 创建时间
*/
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@ApiModelProperty(value = "录入时间")
private LocalDateTime lrsj;
/**
* 更新时间
*/
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@ApiModelProperty(value = "改写时间")
private LocalDateTime gxsj;
/**
* 状态[0:未删除,1:删除]
*/
@TableLogic
@ApiModelProperty(value = "是否已删除")
private Integer scbz;
}
package org.springblade.founder.base;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 基础实体类
*
* @author Chill
*/
@Data
public class BaseEntityJcxx implements Serializable {
}
package org.springblade.founder.base;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 基础实体类
*
* @author Chill
*/
@Data
public class BaseEntitySjsb implements Serializable {
/**
* 创建时间
*/
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@ApiModelProperty(value = "录入时间")
private LocalDateTime lrsj;
/**
* 更新时间
*/
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@ApiModelProperty(value = "改写时间")
private LocalDateTime gxsj;
}
package org.springblade.founder.base;
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotEmpty;
import java.util.Date;
import java.util.List;
/**
* 业务封装基础类
*
* @param <M> mapper
* @param <T> model
* @author Chill
*/
@Validated
public class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseEntity> extends ServiceImpl<M, T> implements BaseService<T> {
@Override
public boolean save(T entity) {
BladeUser user = SecureUtil.getUser();
entity.setScbz(BladeConstant.DB_NOT_DELETED);
return super.save(entity);
}
@Override
public boolean updateById(T entity) {
BladeUser user = SecureUtil.getUser();
return super.updateById(entity);
}
@Override
public boolean deleteLogic(@NotEmpty List<Long> ids) {
return super.removeByIds(ids);
}
}
package org.springblade.founder.base;
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.core.tool.constant.BladeConstant;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* 业务封装基础类
*
* @param <M> mapper
* @param <T> model
* @author Chill
*/
@Validated
public class BaseServiceImplJcxx<M extends BaseMapper<T>, T extends BaseEntityJcxx> extends ServiceImpl<M, T> implements BaseService<T> {
@Override
public boolean save(T entity) {
BladeUser user = SecureUtil.getUser();
// entity.setScbz(BladeConstant.DB_NOT_DELETED);
return super.save(entity);
}
@Override
public boolean updateById(T entity) {
BladeUser user = SecureUtil.getUser();
return super.updateById(entity);
}
@Override
public boolean deleteLogic(@NotEmpty List<Long> ids) {
return super.removeByIds(ids);
}
}
package org.springblade.founder.base;
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.core.tool.constant.BladeConstant;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* 业务封装基础类
*
* @param <M> mapper
* @param <T> model
* @author Chill
*/
@Validated
public class BaseServiceImplSjsb<M extends BaseMapper<T>, T extends BaseEntitySjsb> extends ServiceImpl<M, T> implements BaseService<T> {
@Override
public boolean save(T entity) {
BladeUser user = SecureUtil.getUser();
//entity.setScbz(BladeConstant.DB_NOT_DELETED);
return super.save(entity);
}
@Override
public boolean updateById(T entity) {
BladeUser user = SecureUtil.getUser();
return super.updateById(entity);
}
@Override
public boolean deleteLogic(@NotEmpty List<Long> ids) {
return super.removeByIds(ids);
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.jcxx.controller;
import io.swagger.annotations.Api;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.founder.jcxx.entity.TbPzJcxx;
import org.springblade.founder.jcxx.vo.TbPzJcxxVO;
import org.springblade.founder.jcxx.service.ITbPzJcxxService;
import org.springblade.core.boot.ctrl.BladeController;
/**
* 控制器
*
* @author Blade
* @since 2021-01-12
*/
@RestController
@AllArgsConstructor
@RequestMapping("/tbPzJcxx/tbpzjcxx")
@Api(value = "", tags = "接口")
public class TbPzJcxxController extends BladeController {
private ITbPzJcxxService tbPzJcxxService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入tbPzJcxx")
public R<TbPzJcxx> detail(TbPzJcxx tbPzJcxx) {
TbPzJcxx detail = tbPzJcxxService.getOne(Condition.getQueryWrapper(tbPzJcxx));
return R.data(detail);
}
/**
* 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入tbPzJcxx")
public R<IPage<TbPzJcxx>> list(TbPzJcxx tbPzJcxx, Query query) {
IPage<TbPzJcxx> pages = tbPzJcxxService.page(Condition.getPage(query), Condition.getQueryWrapper(tbPzJcxx));
return R.data(pages);
}
/**
* 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入tbPzJcxx")
public R<IPage<TbPzJcxxVO>> page(TbPzJcxxVO tbPzJcxx, Query query) {
IPage<TbPzJcxxVO> pages = tbPzJcxxService.selectTbPzJcxxPage(Condition.getPage(query), tbPzJcxx);
return R.data(pages);
}
/**
* 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入tbPzJcxx")
public R save(@Valid @RequestBody TbPzJcxx tbPzJcxx) {
return R.status(tbPzJcxxService.save(tbPzJcxx));
}
/**
* 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入tbPzJcxx")
public R update(@Valid @RequestBody TbPzJcxx tbPzJcxx) {
return R.status(tbPzJcxxService.updateById(tbPzJcxx));
}
/**
* 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入tbPzJcxx")
public R submit(@Valid @RequestBody TbPzJcxx tbPzJcxx) {
return R.status(tbPzJcxxService.saveOrUpdate(tbPzJcxx));
}
/**
* 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(tbPzJcxxService.deleteLogic(Func.toLongList(ids)));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.jcxx.dto;
import org.springblade.founder.jcxx.entity.TbPzJcxx;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 数据传输对象实体类
*
* @author Blade
* @since 2021-01-12
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class TbPzJcxxDTO extends TbPzJcxx {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.jcxx.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springblade.core.mp.base.BaseEntity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.founder.base.BaseEntityJcxx;
/**
* 实体类
*
* @author Blade
* @since 2021-01-12
*/
@Data
@TableName("TB_PZ_JCXX")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "TbPzJcxx对象", description = "TbPzJcxx对象")
public class TbPzJcxx extends BaseEntityJcxx {
private static final long serialVersionUID = 1L;
@TableField("BH")
private Integer bh;
@TableField("XWDM")
private String xwdm;
@TableField("XWBM")
private String xwbm;
@TableField("XWMC")
private String xwmc;
@TableField("GLBH")
private String glbh;
@TableField("XWBMDESC")
private String xwbmdesc;
@TableField("FWBZ")
private String fwbz;
@TableField("SFSB")
private Integer sfsb;
@TableField("ZDSBKSSJ")
private LocalDateTime zdsbkssj;
@TableField("ZDSBJSSJ")
private LocalDateTime zdsbjssj;
@TableField("IP")
private String ip;
@TableField("GXDWDM")
private String gxdwdm;
@TableField("GXDWMC")
private String gxdwmc;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.jcxx.mapper;
import org.springblade.founder.jcxx.entity.TbPzJcxx;
import org.springblade.founder.jcxx.vo.TbPzJcxxVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
* Mapper 接口
*
* @author Blade
* @since 2021-01-12
*/
public interface TbPzJcxxMapper extends BaseMapper<TbPzJcxx> {
/**
* 自定义分页
*
* @param page
* @param tbPzJcxx
* @return
*/
List<TbPzJcxxVO> selectTbPzJcxxPage(IPage page, TbPzJcxxVO tbPzJcxx);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.founder.jcxx.mapper.TbPzJcxxMapper">
<!-- 通用查询映射结果 -->
<resultMap id="tbPzJcxxResultMap" type="org.springblade.founder.jcxx.entity.TbPzJcxx">
<result column="BH" property="bh"/>
<result column="XWDM" property="xwdm"/>
<result column="XWBM" property="xwbm"/>
<result column="XWMC" property="xwmc"/>
<result column="GLBH" property="glbh"/>
<result column="XWBMDESC" property="xwbmdesc"/>
<result column="FWBZ" property="fwbz"/>
<result column="SFSB" property="sfsb"/>
<result column="ZDSBKSSJ" property="zdsbkssj"/>
<result column="ZDSBJSSJ" property="zdsbjssj"/>
<result column="IP" property="ip"/>
<result column="GXDWDM" property="gxdwdm"/>
<result column="GXDWMC" property="gxdwmc"/>
</resultMap>
<select id="selectTbPzJcxxPage" resultMap="tbPzJcxxResultMap">
select * from TB_PZ_JCXX where is_deleted = 0
</select>
</mapper>
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.jcxx.service;
import org.springblade.founder.jcxx.entity.TbPzJcxx;
import org.springblade.founder.jcxx.vo.TbPzJcxxVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* 服务类
*
* @author Blade
* @since 2021-01-12
*/
public interface ITbPzJcxxService extends BaseService<TbPzJcxx> {
/**
* 自定义分页
*
* @param page
* @param tbPzJcxx
* @return
*/
IPage<TbPzJcxxVO> selectTbPzJcxxPage(IPage<TbPzJcxxVO> page, TbPzJcxxVO tbPzJcxx);
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.jcxx.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.springblade.founder.base.BaseServiceImplJcxx;
import org.springblade.founder.jcxx.entity.TbPzJcxx;
import org.springblade.founder.jcxx.vo.TbPzJcxxVO;
import org.springblade.founder.jcxx.mapper.TbPzJcxxMapper;
import org.springblade.founder.jcxx.service.ITbPzJcxxService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* 服务实现类
*
* @author Blade
* @since 2021-01-12
*/
@Service
@DS("xzxt")
public class TbPzJcxxServiceImpl extends BaseServiceImplJcxx<TbPzJcxxMapper, TbPzJcxx> implements ITbPzJcxxService {
@Override
public IPage<TbPzJcxxVO> selectTbPzJcxxPage(IPage<TbPzJcxxVO> page, TbPzJcxxVO tbPzJcxx) {
return page.setRecords(baseMapper.selectTbPzJcxxPage(page, tbPzJcxx));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.jcxx.vo;
import org.springblade.founder.jcxx.entity.TbPzJcxx;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* 视图实体类
*
* @author Blade
* @since 2021-01-12
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "TbPzJcxxVO对象", description = "TbPzJcxxVO对象")
public class TbPzJcxxVO extends TbPzJcxx {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjfj.controller;
import io.swagger.annotations.Api;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.founder.sjfj.entity.LogSjsbSjfj;
import org.springblade.founder.sjfj.vo.LogSjsbSjfjVO;
import org.springblade.founder.sjfj.service.ILogSjsbSjfjService;
import org.springblade.core.boot.ctrl.BladeController;
/**
* 控制器
*
* @author Blade
* @since 2020-12-14
*/
@RestController
@AllArgsConstructor
@RequestMapping("/sysSjfj/logsjsbsjfj")
@Api(value = "", tags = "接口")
public class LogSjsbSjfjController extends BladeController {
private ILogSjsbSjfjService logSjsbSjfjService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入logSjsbSjfj")
public R<LogSjsbSjfj> detail(LogSjsbSjfj logSjsbSjfj) {
LogSjsbSjfj detail = logSjsbSjfjService.getOne(Condition.getQueryWrapper(logSjsbSjfj));
return R.data(detail);
}
/**
* 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入logSjsbSjfj")
public R<IPage<LogSjsbSjfj>> list(LogSjsbSjfj logSjsbSjfj, Query query) {
IPage<LogSjsbSjfj> pages = logSjsbSjfjService.page(Condition.getPage(query), Condition.getQueryWrapper(logSjsbSjfj));
return R.data(pages);
}
/**
* 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入logSjsbSjfj")
public R<IPage<LogSjsbSjfjVO>> page(LogSjsbSjfjVO logSjsbSjfj, Query query) {
IPage<LogSjsbSjfjVO> pages = logSjsbSjfjService.selectLogSjsbSjfjPage(Condition.getPage(query), logSjsbSjfj);
return R.data(pages);
}
/**
* 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入logSjsbSjfj")
public R save(@Valid @RequestBody LogSjsbSjfj logSjsbSjfj) {
return R.status(logSjsbSjfjService.save(logSjsbSjfj));
}
/**
* 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入logSjsbSjfj")
public R update(@Valid @RequestBody LogSjsbSjfj logSjsbSjfj) {
return R.status(logSjsbSjfjService.updateById(logSjsbSjfj));
}
/**
* 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入logSjsbSjfj")
public R submit(@Valid @RequestBody LogSjsbSjfj logSjsbSjfj) {
return R.status(logSjsbSjfjService.saveOrUpdate(logSjsbSjfj));
}
/**
* 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(logSjsbSjfjService.deleteLogic(Func.toLongList(ids)));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjfj.dto;
import org.springblade.founder.sjfj.entity.LogSjsbSjfj;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 数据传输对象实体类
*
* @author Blade
* @since 2020-12-14
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class LogSjsbSjfjDTO extends LogSjsbSjfj {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjfj.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.founder.base.BaseEntity;
/**
* 实体类
*
* @author Blade
* @since 2020-12-14
*/
@Data
@TableName("SYS_LOG_SJSB_SJFJ")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LogSjsbSjfj对象", description = "LogSjsbSjfj对象")
public class LogSjsbSjfj extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 信息主键编号
*/
@ApiModelProperty(value = "信息主键编号")
@TableField("XXZJBH")
private String xxzjbh;
/**
* 业务信息代码
*/
@ApiModelProperty(value = "业务信息代码")
@TableField("YWXXDM")
private String ywxxdm;
/**
* 表名
*/
@ApiModelProperty(value = "表名")
@TableField("TBLNAME")
private String tblname;
/**
* 主键值
*/
@ApiModelProperty(value = "主键值")
@TableField("KEYVALUE")
private String keyvalue;
/**
* 服务状态(0通过;1不通过;2未上报;10101请求成功;其他请求失败)
*/
@ApiModelProperty(value = "服务状态(0通过;1不通过;2未上报;10101请求成功;其他请求失败)")
@TableField("FWZT")
private String fwzt;
/**
* 录入时间
*/
@ApiModelProperty(value = "录入时间")
@TableField("LRSJ")
private LocalDateTime lrsj;
/**
* 删除标志(0未删除1删除)
*/
@ApiModelProperty(value = "删除标志(0未删除1删除)")
@TableField("SCBZ")
private Integer scbz;
/**
* 上报返回描述
*/
@ApiModelProperty(value = "上报返回描述")
@TableField("SBZTDESC")
private String sbztdesc;
/**
* 返回回执时间
*/
@ApiModelProperty(value = "返回回执时间")
@TableField("FHSJ")
private LocalDateTime fhsj;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
@TableField("GXSJ")
private LocalDateTime gxsj;
/**
* 比对状态(0通过;1不通过)
*/
@ApiModelProperty(value = "比对状态(0通过;1不通过)")
@TableField("BDZT")
private String bdzt;
/**
* 比对时间
*/
@ApiModelProperty(value = "比对时间")
@TableField("BDSJ")
private LocalDateTime bdsj;
/**
* 数据包编号
*/
@ApiModelProperty(value = "数据包编号")
@TableField("SJBBH")
private String sjbbh;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjfj.mapper;
import org.springblade.founder.sjfj.entity.LogSjsbSjfj;
import org.springblade.founder.sjfj.vo.LogSjsbSjfjVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
* Mapper 接口
*
* @author Blade
* @since 2020-12-14
*/
public interface LogSjsbSjfjMapper extends BaseMapper<LogSjsbSjfj> {
/**
* 自定义分页
*
* @param page
* @param logSjsbSjfj
* @return
*/
List<LogSjsbSjfjVO> selectLogSjsbSjfjPage(IPage page, LogSjsbSjfjVO logSjsbSjfj);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.founder.sjfj.mapper.LogSjsbSjfjMapper">
<!-- 通用查询映射结果 -->
<resultMap id="logSjsbSjfjResultMap" type="org.springblade.founder.sjfj.entity.LogSjsbSjfj">
<result column="XXZJBH" property="xxzjbh"/>
<result column="YWXXDM" property="ywxxdm"/>
<result column="TBLNAME" property="tblname"/>
<result column="KEYVALUE" property="keyvalue"/>
<result column="FWZT" property="fwzt"/>
<result column="LRSJ" property="lrsj"/>
<result column="SCBZ" property="scbz"/>
<result column="SBZTDESC" property="sbztdesc"/>
<result column="FHSJ" property="fhsj"/>
<result column="GXSJ" property="gxsj"/>
<result column="BDZT" property="bdzt"/>
<result column="BDSJ" property="bdsj"/>
<result column="SJBBH" property="sjbbh"/>
</resultMap>
<select id="selectLogSjsbSjfjPage" resultMap="logSjsbSjfjResultMap">
select * from SYS_LOG_SJSB_SJFJ where SCBZ = 0
</select>
</mapper>
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjfj.service;
import org.springblade.founder.sjfj.entity.LogSjsbSjfj;
import org.springblade.founder.sjfj.vo.LogSjsbSjfjVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* 服务类
*
* @author Blade
* @since 2020-12-14
*/
public interface ILogSjsbSjfjService extends BaseService<LogSjsbSjfj> {
/**
* 自定义分页
*
* @param page
* @param logSjsbSjfj
* @return
*/
IPage<LogSjsbSjfjVO> selectLogSjsbSjfjPage(IPage<LogSjsbSjfjVO> page, LogSjsbSjfjVO logSjsbSjfj);
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjfj.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.springblade.founder.sjfj.entity.LogSjsbSjfj;
import org.springblade.founder.sjfj.vo.LogSjsbSjfjVO;
import org.springblade.founder.sjfj.mapper.LogSjsbSjfjMapper;
import org.springblade.founder.sjfj.service.ILogSjsbSjfjService;
import org.springblade.founder.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* 服务实现类
*
* @author Blade
* @since 2020-12-14
*/
@Service
@DS("xzxt")
public class LogSjsbSjfjServiceImpl extends BaseServiceImpl<LogSjsbSjfjMapper, LogSjsbSjfj> implements ILogSjsbSjfjService {
@Override
public IPage<LogSjsbSjfjVO> selectLogSjsbSjfjPage(IPage<LogSjsbSjfjVO> page, LogSjsbSjfjVO logSjsbSjfj) {
return page.setRecords(baseMapper.selectLogSjsbSjfjPage(page, logSjsbSjfj));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjfj.vo;
import org.springblade.founder.sjfj.entity.LogSjsbSjfj;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* 视图实体类
*
* @author Blade
* @since 2020-12-14
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LogSjsbSjfjVO对象", description = "LogSjsbSjfjVO对象")
public class LogSjsbSjfjVO extends LogSjsbSjfj {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjjy.controller;
import io.swagger.annotations.Api;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.founder.sjjy.entity.LogSjsberror;
import org.springblade.founder.sjjy.vo.LogSjsberrorVO;
import org.springblade.founder.sjjy.service.ILogSjsberrorService;
import org.springblade.core.boot.ctrl.BladeController;
/**
* 控制器
*
* @author Blade
* @since 2020-10-16
*/
@RestController
@AllArgsConstructor
@RequestMapping("/sysSjjy/logsjsberror")
@Api(value = "", tags = "接口")
public class LogSjsberrorController extends BladeController {
private ILogSjsberrorService logSjsberrorService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入logSjsberror")
public R<LogSjsberror> detail(LogSjsberror logSjsberror) {
LogSjsberror detail = logSjsberrorService.getOne(Condition.getQueryWrapper(logSjsberror));
return R.data(detail);
}
/**
* 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入logSjsberror")
public R<IPage<LogSjsberror>> list(LogSjsberror logSjsberror, Query query) {
IPage<LogSjsberror> pages = logSjsberrorService.page(Condition.getPage(query), Condition.getQueryWrapper(logSjsberror));
return R.data(pages);
}
/**
* 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入logSjsberror")
public R<IPage<LogSjsberrorVO>> page(LogSjsberrorVO logSjsberror, Query query) {
IPage<LogSjsberrorVO> pages = logSjsberrorService.selectLogSjsberrorPage(Condition.getPage(query), logSjsberror);
return R.data(pages);
}
/**
* 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入logSjsberror")
public R save(@Valid @RequestBody LogSjsberror logSjsberror) {
return R.status(logSjsberrorService.save(logSjsberror));
}
/**
* 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入logSjsberror")
public R update(@Valid @RequestBody LogSjsberror logSjsberror) {
return R.status(logSjsberrorService.updateById(logSjsberror));
}
/**
* 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入logSjsberror")
public R submit(@Valid @RequestBody LogSjsberror logSjsberror) {
return R.status(logSjsberrorService.saveOrUpdate(logSjsberror));
}
/**
* 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(logSjsberrorService.deleteLogic(Func.toLongList(ids)));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjjy.dto;
import org.springblade.founder.sjjy.entity.LogSjsberror;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 数据传输对象实体类
*
* @author Blade
* @since 2020-10-16
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class LogSjsberrorDTO extends LogSjsberror {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjjy.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springblade.founder.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 实体类
*
* @author Blade
* @since 2020-10-16
*/
@Data
@TableName("SYS_LOG_SJSBERROR")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LogSjsberror对象", description = "LogSjsberror对象")
public class LogSjsberror extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 数据包编号
*/
@ApiModelProperty(value = "数据包编号")
@TableId("SJBBH")
private String sjbbh;
/**
* 失败原因
*/
@ApiModelProperty(value = "失败原因")
@TableField("FAILERROR")
private String failerror;
/**
* 业务信息代码
*/
@ApiModelProperty(value = "业务信息代码")
@TableField("YWXXDM")
private String ywxxdm;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjjy.mapper;
import org.springblade.founder.sjjy.entity.LogSjsberror;
import org.springblade.founder.sjjy.vo.LogSjsberrorVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
* Mapper 接口
*
* @author Blade
* @since 2020-10-16
*/
public interface LogSjsberrorMapper extends BaseMapper<LogSjsberror> {
/**
* 自定义分页
*
* @param page
* @param logSjsberror
* @return
*/
List<LogSjsberrorVO> selectLogSjsberrorPage(IPage page, LogSjsberrorVO logSjsberror);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.founder.sjjy.mapper.LogSjsberrorMapper">
<!-- 通用查询映射结果 -->
<resultMap id="logSjsberrorResultMap" type="org.springblade.founder.sjjy.entity.LogSjsberror">
<id column="SJBBH" property="sjbbh"/>
<result column="FAILERROR" property="failerror"/>
<result column="SCBZ" property="scbz"/>
<result column="LRSJ" property="lrsj"/>
<result column="GXSJ" property="gxsj"/>
<result column="YWXXDM" property="ywxxdm"/>
</resultMap>
<select id="selectLogSjsberrorPage" resultMap="logSjsberrorResultMap">
select * from SYS_LOG_SJSBERROR where SCBZ = 0
</select>
</mapper>
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjjy.service;
import org.springblade.founder.sjjy.entity.LogSjsberror;
import org.springblade.founder.sjjy.vo.LogSjsberrorVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* 服务类
*
* @author Blade
* @since 2020-10-16
*/
public interface ILogSjsberrorService extends BaseService<LogSjsberror> {
/**
* 自定义分页
*
* @param page
* @param logSjsberror
* @return
*/
IPage<LogSjsberrorVO> selectLogSjsberrorPage(IPage<LogSjsberrorVO> page, LogSjsberrorVO logSjsberror);
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjjy.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.springblade.founder.sjjy.entity.LogSjsberror;
import org.springblade.founder.sjjy.vo.LogSjsberrorVO;
import org.springblade.founder.sjjy.mapper.LogSjsberrorMapper;
import org.springblade.founder.sjjy.service.ILogSjsberrorService;
import org.springblade.founder.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* 服务实现类
*
* @author Blade
* @since 2020-10-16
*/
@Service
@DS("xzxt")
public class LogSjsberrorServiceImpl extends BaseServiceImpl<LogSjsberrorMapper, LogSjsberror> implements ILogSjsberrorService {
@Override
public IPage<LogSjsberrorVO> selectLogSjsberrorPage(IPage<LogSjsberrorVO> page, LogSjsberrorVO logSjsberror) {
return page.setRecords(baseMapper.selectLogSjsberrorPage(page, logSjsberror));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjjy.vo;
import org.springblade.founder.sjjy.entity.LogSjsberror;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* 视图实体类
*
* @author Blade
* @since 2020-10-16
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LogSjsberrorVO对象", description = "LogSjsberrorVO对象")
public class LogSjsberrorVO extends LogSjsberror {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjsb.controller;
import io.swagger.annotations.Api;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.founder.sjsb.entity.LogSjsb;
import org.springblade.founder.sjsb.vo.LogSjsbVO;
import org.springblade.founder.sjsb.service.ILogSjsbService;
import org.springblade.core.boot.ctrl.BladeController;
/**
* 控制器
*
* @author Blade
* @since 2020-12-21
*/
@RestController
@AllArgsConstructor
@RequestMapping("/sysSjsb/logsjsb")
@Api(value = "", tags = "接口")
public class LogSjsbController extends BladeController {
private ILogSjsbService logSjsbService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入logSjsb")
public R<LogSjsb> detail(LogSjsb logSjsb) {
LogSjsb detail = logSjsbService.getOne(Condition.getQueryWrapper(logSjsb));
return R.data(detail);
}
/**
* 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入logSjsb")
public R<IPage<LogSjsb>> list(LogSjsb logSjsb, Query query) {
IPage<LogSjsb> pages = logSjsbService.page(Condition.getPage(query), Condition.getQueryWrapper(logSjsb));
return R.data(pages);
}
/**
* 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入logSjsb")
public R<IPage<LogSjsbVO>> page(LogSjsbVO logSjsb, Query query) {
IPage<LogSjsbVO> pages = logSjsbService.selectLogSjsbPage(Condition.getPage(query), logSjsb);
return R.data(pages);
}
/**
* 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入logSjsb")
public R save(@Valid @RequestBody LogSjsb logSjsb) {
return R.status(logSjsbService.save(logSjsb));
}
/**
* 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入logSjsb")
public R update(@Valid @RequestBody LogSjsb logSjsb) {
return R.status(logSjsbService.updateById(logSjsb));
}
/**
* 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入logSjsb")
public R submit(@Valid @RequestBody LogSjsb logSjsb) {
return R.status(logSjsbService.saveOrUpdate(logSjsb));
}
/**
* 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(logSjsbService.deleteLogic(Func.toLongList(ids)));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjsb.dto;
import org.springblade.founder.sjsb.entity.LogSjsb;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 数据传输对象实体类
*
* @author Blade
* @since 2020-12-21
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class LogSjsbDTO extends LogSjsb {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjsb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springblade.founder.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.founder.base.BaseEntitySjsb;
/**
* 实体类
*
* @author Blade
* @since 2020-12-21
*/
@Data
@TableName("SYS_LOG_SJSB")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LogSjsb对象", description = "LogSjsb对象")
public class LogSjsb extends BaseEntitySjsb {
private static final long serialVersionUID = 1L;
/**
* 信息主键编号
*/
@ApiModelProperty(value = "信息主键编号")
@TableId("XXZJBH")
private String xxzjbh;
/**
* 业务信息代码
*/
@ApiModelProperty(value = "业务信息代码")
@TableField("YWXXDM")
private String ywxxdm;
/**
* 表名
*/
@ApiModelProperty(value = "表名")
@TableField("TBLNAME")
private String tblname;
/**
* 主键值
*/
@ApiModelProperty(value = "主键值")
@TableField("KEYVALUE")
private String keyvalue;
/**
* 服务状态(0通过;1不通过;2未上报;10101请求成功;其他请求失败)
*/
@ApiModelProperty(value = "服务状态(0通过;1不通过;2未上报;10101请求成功;其他请求失败)")
@TableField("FWZT")
private String fwzt;
/**
* 录入时间
*/
@ApiModelProperty(value = "录入时间")
@TableField("LRSJ")
private LocalDateTime lrsj;
/**
* 删除标志(0未删除1删除)
*/
@ApiModelProperty(value = "删除标志(0未删除1删除)")
@TableField("SCBZ")
private String scbz;
/**
* 上报返回描述
*/
@ApiModelProperty(value = "上报返回描述")
@TableField("SBZTDESC")
private String sbztdesc;
/**
* 返回回执时间
*/
@ApiModelProperty(value = "返回回执时间")
@TableField("FHSJ")
private LocalDateTime fhsj;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
@TableField("GXSJ")
private LocalDateTime gxsj;
/**
* 比对状态(0通过;1不通过)
*/
@ApiModelProperty(value = "比对状态(0通过;1不通过)")
@TableField("BDZT")
private String bdzt;
/**
* 比对时间
*/
@ApiModelProperty(value = "比对时间")
@TableField("BDSJ")
private LocalDateTime bdsj;
/**
* 数据包编号
*/
@ApiModelProperty(value = "数据包编号")
@TableField("SJBBH")
private String sjbbh;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjsb.mapper;
import org.springblade.founder.sjsb.entity.LogSjsb;
import org.springblade.founder.sjsb.vo.LogSjsbVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
* Mapper 接口
*
* @author Blade
* @since 2020-12-21
*/
public interface LogSjsbMapper extends BaseMapper<LogSjsb> {
/**
* 自定义分页
*
* @param page
* @param logSjsb
* @return
*/
List<LogSjsbVO> selectLogSjsbPage(IPage page, LogSjsbVO logSjsb);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.founder.sjsb.mapper.LogSjsbMapper">
<!-- 通用查询映射结果 -->
<resultMap id="logSjsbResultMap" type="org.springblade.founder.sjsb.entity.LogSjsb">
<id column="XXZJBH" property="xxzjbh"/>
<result column="YWXXDM" property="ywxxdm"/>
<result column="TBLNAME" property="tblname"/>
<result column="KEYVALUE" property="keyvalue"/>
<result column="FWZT" property="fwzt"/>
<result column="LRSJ" property="lrsj"/>
<result column="SCBZ" property="scbz"/>
<result column="SBZTDESC" property="sbztdesc"/>
<result column="FHSJ" property="fhsj"/>
<result column="GXSJ" property="gxsj"/>
<result column="BDZT" property="bdzt"/>
<result column="BDSJ" property="bdsj"/>
<result column="SJBBH" property="sjbbh"/>
</resultMap>
<select id="selectLogSjsbPage" resultMap="logSjsbResultMap">
select * from SYS_LOG_SJSB where is_deleted = 0
</select>
</mapper>
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjsb.service;
import org.springblade.founder.sjsb.entity.LogSjsb;
import org.springblade.founder.sjsb.vo.LogSjsbVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* 服务类
*
* @author Blade
* @since 2020-12-21
*/
public interface ILogSjsbService extends BaseService<LogSjsb> {
/**
* 自定义分页
*
* @param page
* @param logSjsb
* @return
*/
IPage<LogSjsbVO> selectLogSjsbPage(IPage<LogSjsbVO> page, LogSjsbVO logSjsb);
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjsb.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.springblade.founder.base.BaseServiceImplSjsb;
import org.springblade.founder.sjsb.entity.LogSjsb;
import org.springblade.founder.sjsb.vo.LogSjsbVO;
import org.springblade.founder.sjsb.mapper.LogSjsbMapper;
import org.springblade.founder.sjsb.service.ILogSjsbService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* 服务实现类
*
* @author Blade
* @since 2020-12-21
*/
@Service
@DS("xzxt")
public class LogSjsbServiceImpl extends BaseServiceImplSjsb<LogSjsbMapper, LogSjsb> implements ILogSjsbService {
@Override
public IPage<LogSjsbVO> selectLogSjsbPage(IPage<LogSjsbVO> page, LogSjsbVO logSjsb) {
return page.setRecords(baseMapper.selectLogSjsbPage(page, logSjsb));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sjsb.vo;
import org.springblade.founder.sjsb.entity.LogSjsb;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* 视图实体类
*
* @author Blade
* @since 2020-12-21
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LogSjsbVO对象", description = "LogSjsbVO对象")
public class LogSjsbVO extends LogSjsb {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sysuser.controller;
import io.swagger.annotations.Api;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.founder.sysuser.entity.SysUser;
import org.springblade.founder.sysuser.vo.SysUserVO;
import org.springblade.founder.sysuser.service.ISysUserService;
import org.springblade.core.boot.ctrl.BladeController;
/**
* ?????? 控制器
*
* @author Blade
* @since 2020-08-27
*/
@RestController
@AllArgsConstructor
@RequestMapping("sysxzxtuser/sysuser")
@Api(value = "??????", tags = "??????接口")
public class SysUserController extends BladeController {
private ISysUserService sysUserService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入sysUser")
public R<SysUser> detail(SysUser sysUser) {
SysUser detail = sysUserService.getOne(Condition.getQueryWrapper(sysUser));
return R.data(detail);
}
/**
* 分页 ??????
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入sysUser")
public R<IPage<SysUser>> list(SysUser sysUser, Query query) {
IPage<SysUser> pages = sysUserService.page(Condition.getPage(query), Condition.getQueryWrapper(sysUser));
return R.data(pages);
}
/**
* 自定义分页 ??????
*/
/* @GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入sysUser")
public R<IPage<SysUserVO>> page(SysUserVO sysUser, Query query) {
IPage<SysUserVO> pages = sysUserService.selectSysUserPage(Condition.getPage(query), sysUser);
return R.data(pages);
}*/
/**
* 新增 ??????
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入sysUser")
public R save(@Valid @RequestBody SysUser sysUser) {
return R.status(sysUserService.save(sysUser));
}
/**
* 修改 ??????
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入sysUser")
public R update(@Valid @RequestBody SysUser sysUser) {
return R.status(sysUserService.updateById(sysUser));
}
/**
* 新增或修改 ??????
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入sysUser")
public R submit(@Valid @RequestBody SysUser sysUser) {
return R.status(sysUserService.saveOrUpdate(sysUser));
}
/**
* 删除 ??????
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(sysUserService.deleteLogic(Func.toLongList(ids)));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sysuser.dto;
import org.springblade.founder.sysuser.entity.SysUser;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* ??????数据传输对象实体类
*
* @author Blade
* @since 2020-08-27
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class SysUserDTO extends SysUser {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sysuser.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.founder.base.BaseEntity;
/**
* ??????实体类
*
* @author Blade
* @since 2020-08-27
*/
@Data
@TableName("SYS_USER")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysUser对象", description = "??????")
public class SysUser extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* ???
*/
@ApiModelProperty(value = "???")
@TableId("ID")
private String id;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("UNITCODE")
private String unitcode;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("USERNAME")
private String username;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("PASSWORD")
private String password;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("TRUE_NAME")
private String trueName;
/**
* ?????0?????1????
*/
@ApiModelProperty(value = "?????0?????1????")
@TableField("OPEN_FLAG")
private String openFlag;
@TableField("DEFAULT_MODEL")
private String defaultModel;
@TableField("REMARK")
private String remark;
/**
* ???
*/
@ApiModelProperty(value = "???")
@TableField("LRR")
private String lrr;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("LRSJ")
private LocalDateTime lrsj;
/**
* ???
*/
@ApiModelProperty(value = "???")
@TableField("GXR")
private String gxr;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("GXSJ")
private LocalDateTime gxsj;
/**
* ??????
*/
@ApiModelProperty(value = "??????")
@TableField("LRDWDM")
private String lrdwdm;
/**
* ??????
*/
@ApiModelProperty(value = "??????")
@TableField("LRDWMC")
private String lrdwmc;
/**
* ??????
*/
@ApiModelProperty(value = "??????")
@TableField("IDENTITYCARD")
private String identitycard;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("SEX")
private String sex;
/**
* ??????
*/
@ApiModelProperty(value = "??????")
@TableField("BIRTHDAY")
private LocalDateTime birthday;
/**
* ??????
*/
@ApiModelProperty(value = "??????")
@TableField("TELEPHONE")
private String telephone;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("UNITNAME")
private String unitname;
/**
* ????
*/
/**
* ip??
*/
@ApiModelProperty(value = "ip??")
@TableField("IP")
private String ip;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("GRADE")
private String grade;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("POLICEMANID")
private String policemanid;
@TableField("DEFAULT_DESKTOP")
private BigDecimal defaultDesktop;
/**
* ??????
*/
@ApiModelProperty(value = "??????")
@TableField("THEME")
private String theme;
@TableField("LASTLOGINTIME")
private LocalDateTime lastlogintime;
@TableField("LASTCHECKTIME")
private LocalDateTime lastchecktime;
/**
* ???????????
*/
@ApiModelProperty(value = "???????????")
@TableField("XXZYURL")
private String xxzyurl;
/**
* ?????????????????
*/
@ApiModelProperty(value = "?????????????????")
@TableField("GZZM_ZHY")
private String gzzmZhy;
/**
* ?????????
*/
@ApiModelProperty(value = "?????????")
@TableField("GZZM_YPY")
private String gzzmYpy;
/**
* ?????????
*/
@ApiModelProperty(value = "?????????")
@TableField("GZZM_ZCY")
private String gzzmZcy;
/**
* ????
*/
@ApiModelProperty(value = "????")
@TableField("GZZM_PLAY")
private String gzzmPlay;
/**
* ??????? 00:? 01:?
*/
@ApiModelProperty(value = "??????? 00:? 01:?")
@TableField("GLYBZ")
private String glybz;
/**
* ???????? 00:? 01:?
*/
@ApiModelProperty(value = "???????? 00:? 01:?")
@TableField("TQYHBZ")
private String tqyhbz;
@TableField("JGZ_PHOTO_ZM")
private String jgzPhotoZm;
@TableField("JGZ_PHOTO_FM")
private String jgzPhotoFm;
@TableField("ZBZX_DWDM")
private String zbzxDwdm;
@TableField("GRDF")
private String grdf;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sysuser.mapper;
import org.springblade.founder.sysuser.entity.SysUser;
import org.springblade.founder.sysuser.vo.SysUserVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
* ?????? Mapper 接口
*
* @author Blade
* @since 2020-08-27
*/
public interface SysUserMapper extends BaseMapper<SysUser> {
/**
*
*
* @param page
* @param sysUser
* @return
*/
SysUserVO selectSysUserBySfzh(String sfzh);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.founder.sysuser.mapper.SysUserMapper">
<!-- 通用查询映射结果 -->
<resultMap id="sysUserResultMap" type="org.springblade.founder.sysuser.entity.SysUser">
<id column="ID" property="id"/>
<result column="UNITCODE" property="unitcode"/>
<result column="USERNAME" property="username"/>
<result column="PASSWORD" property="password"/>
<result column="TRUE_NAME" property="trueName"/>
<result column="OPEN_FLAG" property="openFlag"/>
<result column="DEFAULT_MODEL" property="defaultModel"/>
<result column="REMARK" property="remark"/>
<result column="LRR" property="lrr"/>
<result column="LRSJ" property="lrsj"/>
<result column="GXR" property="gxr"/>
<result column="GXSJ" property="gxsj"/>
<result column="LRDWDM" property="lrdwdm"/>
<result column="LRDWMC" property="lrdwmc"/>
<result column="IDENTITYCARD" property="identitycard"/>
<result column="SEX" property="sex"/>
<result column="BIRTHDAY" property="birthday"/>
<result column="TELEPHONE" property="telephone"/>
<result column="UNITNAME" property="unitname"/>
<result column="SCBZ" property="scbz"/>
<result column="IP" property="ip"/>
<result column="GRADE" property="grade"/>
<result column="POLICEMANID" property="policemanid"/>
<result column="DEFAULT_DESKTOP" property="defaultDesktop"/>
<result column="THEME" property="theme"/>
<result column="LASTLOGINTIME" property="lastlogintime"/>
<result column="LASTCHECKTIME" property="lastchecktime"/>
<result column="XXZYURL" property="xxzyurl"/>
<result column="GZZM_ZHY" property="gzzmZhy"/>
<result column="GZZM_YPY" property="gzzmYpy"/>
<result column="GZZM_ZCY" property="gzzmZcy"/>
<result column="GZZM_PLAY" property="gzzmPlay"/>
<result column="GLYBZ" property="glybz"/>
<result column="TQYHBZ" property="tqyhbz"/>
<result column="JGZ_PHOTO_ZM" property="jgzPhotoZm"/>
<result column="JGZ_PHOTO_FM" property="jgzPhotoFm"/>
<result column="ZBZX_DWDM" property="zbzxDwdm"/>
<result column="GRDF" property="grdf"/>
</resultMap>
<select id="selectSysUserBySfzh" resultType="org.springblade.founder.sysuser.vo.SysUserVO">
select * from SYS_USER where identitycard = #{identitycard}
</select>
</mapper>
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sysuser.service;
import org.springblade.founder.sysuser.entity.SysUser;
import org.springblade.founder.sysuser.vo.SysUserVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* ?????? 服务类
*
* @author Blade
* @since 2020-08-27
*/
public interface ISysUserService extends BaseService<SysUser> {
/**
* 自定义分页
*
* @param page
* @param sysUser
* @return
*/
SysUserVO selectSysUserBySfzh(String sfzh);
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sysuser.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.springblade.founder.base.BaseServiceImpl;
import org.springblade.founder.sysuser.entity.SysUser;
import org.springblade.founder.sysuser.vo.SysUserVO;
import org.springblade.founder.sysuser.mapper.SysUserMapper;
import org.springblade.founder.sysuser.service.ISysUserService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* ?????? 服务实现类
*
* @author Blade
* @since 2020-08-27
*/
@Service
@DS("xzxt")
public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, SysUser> implements ISysUserService {
@Override
public SysUserVO selectSysUserBySfzh(String sfzh) {
return baseMapper.selectSysUserBySfzh(sfzh);
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.sysuser.vo;
import org.springblade.founder.sysuser.entity.SysUser;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* ??????视图实体类
*
* @author Blade
* @since 2020-08-27
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysUserVO对象", description = "??????")
public class SysUserVO extends SysUser {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.xzfwgl.controller;
import io.swagger.annotations.Api;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.founder.xzfwgl.entity.LdfwSecret;
import org.springblade.founder.xzfwgl.vo.LdfwSecretVO;
import org.springblade.founder.xzfwgl.service.ILdfwSecretService;
import org.springblade.core.boot.ctrl.BladeController;
/**
* 联动服务密钥 控制器
*
* @author Blade
* @since 2020-09-01
*/
@RestController
@AllArgsConstructor
@RequestMapping("sysLdfwSecret/ldfwsecret")
@Api(value = "联动服务密钥", tags = "联动服务密钥接口")
public class LdfwSecretController extends BladeController {
private ILdfwSecretService ldfwSecretService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入ldfwSecret")
public R<LdfwSecret> detail(LdfwSecret ldfwSecret) {
LdfwSecret detail = ldfwSecretService.getOne(Condition.getQueryWrapper(ldfwSecret));
return R.data(detail);
}
/**
* 分页 联动服务密钥
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入ldfwSecret")
public R<IPage<LdfwSecret>> list(LdfwSecret ldfwSecret, Query query) {
IPage<LdfwSecret> pages = ldfwSecretService.page(Condition.getPage(query), Condition.getQueryWrapper(ldfwSecret));
return R.data(pages);
}
/**
* 自定义分页 联动服务密钥
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入ldfwSecret")
public R<IPage<LdfwSecretVO>> page(LdfwSecretVO ldfwSecret, Query query) {
IPage<LdfwSecretVO> pages = ldfwSecretService.selectLdfwSecretPage(Condition.getPage(query), ldfwSecret);
return R.data(pages);
}
/**
* 新增 联动服务密钥
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入ldfwSecret")
public R save(@Valid @RequestBody LdfwSecret ldfwSecret) {
return R.status(ldfwSecretService.save(ldfwSecret));
}
/**
* 修改 联动服务密钥
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入ldfwSecret")
public R update(@Valid @RequestBody LdfwSecret ldfwSecret) {
return R.status(ldfwSecretService.updateById(ldfwSecret));
}
/**
* 新增或修改 联动服务密钥
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入ldfwSecret")
public R submit(@Valid @RequestBody LdfwSecret ldfwSecret) {
return R.status(ldfwSecretService.saveOrUpdate(ldfwSecret));
}
/**
* 删除 联动服务密钥
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(ldfwSecretService.deleteLogic(Func.toLongList(ids)));
}
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.xzfwgl.dto;
import org.springblade.founder.xzfwgl.entity.LdfwSecret;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 联动服务密钥数据传输对象实体类
*
* @author Blade
* @since 2020-09-01
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class LdfwSecretDTO extends LdfwSecret {
private static final long serialVersionUID = 1L;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.xzfwgl.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springblade.core.mp.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 联动服务密钥实体类
*
* @author Blade
* @since 2020-09-01
*/
@Data
@TableName("SYS_LDFW_SECRET")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LdfwSecret对象", description = "联动服务密钥")
public class LdfwSecret extends BaseEntity {
private static final long serialVersionUID = 1L;
@TableField("APP_ID")
private String appId;
@TableField("APP_KEY")
private String appKey;
@TableField("APP_SECRET")
private String appSecret;
@TableField("USER_IP")
private String userIp;
@TableField("MODULAR_URL")
private String modularUrl;
@TableField("MODULAR_NAME")
private String modularName;
@TableField("XXDJDW_GAJGJGDM")
private String xxdjdwGajgjgdm;
@TableField("XXDJDW_GAJGMC")
private String xxdjdwGajgmc;
@TableField("XXDJRY_XM")
private String xxdjryXm;
@TableField("XXDJRY_GMSFHM")
private String xxdjryGmsfhm;
@TableField("XXDJRY_LXDH")
private String xxdjryLxdh;
@TableField("XXCZDW_GAJGJGDM")
private String xxczdwGajgjgdm;
@TableField("XXCZDW_GAJGMC")
private String xxczdwGajgmc;
@TableField("XXCZRY_XM")
private String xxczryXm;
@TableField("XXCZRY_GMSFHM")
private String xxczryGmsfhm;
@TableField("XXZJBH")
@TableId("XXZJBH")
private String xxzjbh;
@TableField("XXSC_PDBZ")
private String xxscPdbz;
}
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.xzfwgl.mapper;
import org.springblade.founder.xzfwgl.entity.LdfwSecret;
import org.springblade.founder.xzfwgl.vo.LdfwSecretVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
* 联动服务密钥 Mapper 接口
*
* @author Blade
* @since 2020-09-01
*/
public interface LdfwSecretMapper extends BaseMapper<LdfwSecret> {
/**
* 自定义分页
*
* @param page
* @param ldfwSecret
* @return
*/
List<LdfwSecretVO> selectLdfwSecretPage(IPage page, LdfwSecretVO ldfwSecret);
String selectLdfwSecretByKey(String key);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.founder.xzfwgl.mapper.LdfwSecretMapper">
<!-- 通用查询映射结果 -->
<resultMap id="ldfwSecretResultMap" type="org.springblade.founder.xzfwgl.entity.LdfwSecret">
<result column="APP_ID" property="appId"/>
<result column="APP_KEY" property="appKey"/>
<result column="APP_SECRET" property="appSecret"/>
<result column="USER_IP" property="userIp"/>
<result column="MODULAR_URL" property="modularUrl"/>
<result column="MODULAR_NAME" property="modularName"/>
<result column="XXDJDW_GAJGJGDM" property="xxdjdwGajgjgdm"/>
<result column="XXDJDW_GAJGMC" property="xxdjdwGajgmc"/>
<result column="XXDJRY_XM" property="xxdjryXm"/>
<result column="XXDJRY_GMSFHM" property="xxdjryGmsfhm"/>
<result column="XXDJRY_LXDH" property="xxdjryLxdh"/>
<result column="XXCZDW_GAJGJGDM" property="xxczdwGajgjgdm"/>
<result column="XXCZDW_GAJGMC" property="xxczdwGajgmc"/>
<result column="XXCZRY_XM" property="xxczryXm"/>
<result column="XXCZRY_GMSFHM" property="xxczryGmsfhm"/>
<result column="XXZJBH" property="xxzjbh"/>
<result column="XXSC_PDBZ" property="xxscPdbz"/>
</resultMap>
<select id="selectLdfwSecretPage" resultMap="ldfwSecretResultMap">
select * from SYS_LDFW_SECRET where is_deleted = 0
</select>
<select id="selectLdfwSecretByKey" resultType="java.lang.String">
select APP_SECRET from SYS_LDFW_SECRET where app_Key = #{appKey}
</select>
</mapper>
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.founder.xzfwgl.service;
import org.springblade.founder.xzfwgl.entity.LdfwSecret;
import org.springblade.founder.xzfwgl.vo.LdfwSecretVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
* 联动服务密钥 服务类
*
* @author Blade
* @since 2020-09-01
*/
public interface ILdfwSecretService extends BaseService<LdfwSecret> {
/**
* 自定义分页
*
* @param page
* @param ldfwSecret
* @return
*/
IPage<LdfwSecretVO> selectLdfwSecretPage(IPage<LdfwSecretVO> page, LdfwSecretVO ldfwSecret);
String selectLdfwSecretByKey(String key);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment