Commit 893837ac authored by 高东东's avatar 高东东

添加中航西飞项目

parent 4fc2234f
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-api</artifactId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>amos-boot-module-avic-api</artifactId>
</project>
\ No newline at end of file
package com.yeejoin.amos.avic.face.model;
import org.typroject.tyboot.core.rdbms.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author 子杨
* @since 2022-03-28
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class AvicCustomPathModel extends BaseModel {
/**
*
*/
private static final long serialVersionUID = 6756323320498708828L;
private String agencyCode;
private String pathName;
private String path;
/**
* 分类编码
*/
private String desc;
}
package com.yeejoin.amos.avic.face.orm.dao;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.avic.face.orm.entity.AvicCustomPath;
/**
* <p>
* Mapper 接口
* </p>
*
* @author 子杨
* @since 2022-03-28
*/
@Mapper
public interface AvicCustomPathMapper extends BaseMapper<AvicCustomPath> {
}
\ No newline at end of file
package com.yeejoin.amos.avic.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author 子杨
* @since 2022-03-28
*/
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("avic_custom_path")
public class AvicCustomPath extends BaseEntity {
@TableField("AGENCY_CODE")
private String agencyCode;
@TableField("PATH_NAME")
private String pathName;
@TableField("PATH")
private String path;
/**
* 分类编码
*/
@TableField("DESC")
private String desc;
}
package com.yeejoin.amos.avic.face.service;
import org.springframework.stereotype.Component;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.avic.face.model.AvicCustomPathModel;
import com.yeejoin.amos.avic.face.orm.dao.AvicCustomPathMapper;
import com.yeejoin.amos.avic.face.orm.entity.AvicCustomPath;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/**
* <p>
* 服务类
* </p>
*
* @author 子杨
* @since 2022-03-28
*/
@Component
public class AvicCustomPathService extends BaseService<AvicCustomPathModel,AvicCustomPath,AvicCustomPathMapper> {
/**
* 分页查询
*/
public Page<AvicCustomPathModel> queryForAvicCustomPathPage(Page page, String agencyCode) {
return this.queryForPage(page, null, false, agencyCode);
}
/**
* 列表查询 示例
*/
public List<AvicCustomPathModel> queryForAvicCustomPathList(String agencyCode) {
return this.queryForList("" , false, agencyCode);
}
}
package com.yeejoin.amos.avic.face.webservice;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService(targetNamespace = "http://service.avic.amos.yeejoin.com")
public interface FileFransferService {
/**
* 传输文件
* @param fileContent
* @param fileName
* @param path
*/
@WebMethod
public void transferFile(byte[] fileContent, String fileName, String path);
/**
* 传输目录配置
* @param name
* @param path
* @param desc
*/
@WebMethod
public void transferPathConfig(String name, String path, String desc);
}
<?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="com.yeejoin.amos.avic.face.orm.dao.AvicCustomPathMapper">
</mapper>
......@@ -27,5 +27,6 @@
<module>amos-boot-module-equip-api</module>
<module>amos-boot-module-latentdanger-api</module>
<module>amos-boot-module-ccs-api</module>
<module>amos-boot-module-avic-api</module>
</modules>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-biz</artifactId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>amos-boot-module-avic-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-avic-api</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
<version>3.2.6</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.yeejoin.amos.avic.config;
import javax.xml.ws.Endpoint;
import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.yeejoin.amos.avic.face.webservice.FileFransferService;
@Configuration
public class CxfConfig {
@Autowired
FileFransferService fileFransferService;
@Autowired
private Bus bus;
@Bean
public Endpoint endpoint() {
EndpointImpl endpoint = new EndpointImpl(bus, fileFransferService);
endpoint.publish("/fileFransfer");
return endpoint;
}
}
package com.yeejoin.amos.avic.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.avic.controller.AvicCustomPathResource;
import com.yeejoin.amos.avic.face.model.AvicCustomPathModel;
import com.yeejoin.amos.avic.face.service.AvicCustomPathService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.doc.TycloudResource;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
/**
* <p>
* 前端控制器
* </p>
*
* @author 子杨
* @since 2022-03-28
*/
@RestController
@TycloudResource(module = "avic", value = "avicCustomPath")
@RequestMapping(value = "/v1/avic/AvicCustomPath")
@Api(tags = "avic-")
public class AvicCustomPathResource {
private final Logger logger = LogManager.getLogger(AvicCustomPathResource.class);
@Autowired
private AvicCustomPathService simpleService;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "创建")
@RequestMapping(value = "", method = RequestMethod.POST)
public ResponseModel<AvicCustomPathModel> create(@RequestBody AvicCustomPathModel model) {
model = simpleService.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "更新")
@RequestMapping(value = "/{sequenceNbr}", method = RequestMethod.PUT)
public ResponseModel<AvicCustomPathModel> update(@RequestBody AvicCustomPathModel model,
@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(simpleService.updateWithModel(model));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询单个对象")
@RequestMapping(value = "/{sequenceNbr}", method = RequestMethod.GET)
public ResponseModel<AvicCustomPathModel> seleteOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(simpleService.queryBySeq(sequenceNbr));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "分页查询")
@RequestMapping(value = "/page", method = RequestMethod.GET)
public ResponseModel<Page> queryForPage(@RequestParam(value = "agencyCode") String agencyCode,
@RequestParam(value = "current") int current, @RequestParam(value = "size") int size) {
Page page = new Page();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(simpleService.queryForAvicCustomPathPage(page, agencyCode));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "列表查询")
@RequestMapping(value = "/list", method = RequestMethod.GET)
public ResponseModel selectForList(@RequestParam(value = "agencyCode") String agencyCode) {
return ResponseHelper.buildResponse(simpleService.queryForAvicCustomPathList(agencyCode));
}
}
package com.yeejoin.amos.avic.service.impl;
import javax.jws.WebService;
import org.springframework.stereotype.Component;
import com.yeejoin.amos.avic.face.webservice.FileFransferService;
@WebService(serviceName = "FileFransferService",
targetNamespace = "http://service.avic.amos.yeejoin.com",
endpointInterface = "com.yeejoin.amos.avic.face.webservice.FileFransferService")
@Component
public class FileFransferServiceImpl implements FileFransferService {
@Override
public void transferFile(byte[] fileContent, String fileName, String path) {
}
@Override
public void transferPathConfig(String name, String path, String desc) {
}
}
......@@ -54,5 +54,6 @@
<module>amos-boot-module-latentdanger-biz</module>
<module>amos-boot-module-equip-biz</module>
<module>amos-boot-module-ccs-biz</module>
<module>amos-boot-module-avic-biz</module>
</modules>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-biz-boot</artifactId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>amos-boot-system-avic</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-avic-biz</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.yeejoin.amos;
import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
import java.net.InetAddress;
import java.net.UnknownHostException;
import javax.xml.ws.WebServiceProvider;
/**
* <pre>
* 服务启动类
* </pre>
*/
@SpringBootApplication
@EnableTransactionManagement
@EnableConfigurationProperties
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
@MapperScan({"org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*",
"org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*",
"com.yeejoin.amos.boot.module.*.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper",
"com.yeejoin.amos.avic.face.orm.dao*"})
@ComponentScan(basePackages = {"org.typroject", "com.yeejoin.amos"})
public class AmoAVICApplication {
private static final Logger logger = LoggerFactory.getLogger(AmoAVICApplication.class);
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext context = SpringApplication.run(AmoAVICApplication.class, args);
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
GlobalExceptionHandler.setAlwaysOk(true);
logger.info("\n----------------------------------------------------------\n\t"
+ "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port
+ path + "/doc.html\n" + "----------------------------------------------------------");
}
}
## DB properties:
spring.datasource.url=jdbc:mysql://172.16.3.18:3306/amos_avic_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
## eureka properties:
eureka.instance.hostname=172.16.3.18
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database=1
spring.redis.host=172.16.3.18
spring.redis.port=6379
spring.redis.password=yeejoin@2020
\ No newline at end of file
spring.application.name=AMOS-BIZ-AVIC-API
server.servlet.context-path=/avic
server.port=8808
spring.profiles.active=dev
spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
logging.config=classpath:logback-${spring.profiles.active}.xml
## mybatis-plus配置控制台打印完整带参数SQL语句
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
## DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle=10
spring.datasource.hikari.maximum-pool-size=25
spring.datasource.hikari.auto-commit=true
spring.datasource.hikari.idle-timeout=30000
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.max-lifetime=120000
spring.datasource.hikari.connection-timeout=30000
spring.datasource.hikari.connection-test-query=SELECT 1
##liquibase
spring.liquibase.change-log=classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled=true
## eureka properties:
eureka.client.registry-fetch-interval-seconds=5
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url-path=/actuator/health
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.lease-renewal-interval-in-seconds=5
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
## redis properties:
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
## redis失效时间
redis.cache.failure.time=10800
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
</databaseChangeLog>
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/ccs.log.%d{yyyy-MM-dd}.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>7</MaxHistory>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>${LOG_PATTERN}</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>30mb</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="INFO">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
......@@ -271,16 +271,17 @@
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>Releases</id>
<name>Releases</name>
<url>http://4v059425e3.zicp.vip:13535/nexus/content/repositories/releases/</url>
</repository>
<repository>
<id>Snapshots</id>
<name>Snapshots</name>
<url>http://4v059425e3.zicp.vip:13535/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>Releases</id>
<name>Releases</name>
<url>http://36.46.149.14:8081/nexus/content/repositories/releases/</url>
</repository>
<repository>
<id>Snapshots</id>
<name>Snapshots</name>
<url>http://36.46.149.14:8081/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
......@@ -291,6 +292,7 @@
<modules>
<module>amos-boot-module</module>
<module>amos-boot-biz-common</module>
<module>amos-boot-system-avic</module>
<module>amos-boot-system-tzs</module>
<module>amos-boot-system-jcs</module>
<module>amos-boot-system-knowledgebase</module>
......
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