commit
cfc8dd9e5d
@ -0,0 +1,48 @@
|
|||||||
|
######################################################################
|
||||||
|
# Build Tools
|
||||||
|
|
||||||
|
.gradle
|
||||||
|
/build/
|
||||||
|
!gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# IDE
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
nbproject/private/
|
||||||
|
build/*
|
||||||
|
nbbuild/
|
||||||
|
dist/
|
||||||
|
nbdist/
|
||||||
|
.nb-gradle/
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Others
|
||||||
|
*.log
|
||||||
|
*.xml.versionsBackup
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
!*/build/*.java
|
||||||
|
!*/build/*.html
|
||||||
|
!*/build/*.xml
|
||||||
|
/log/
|
||||||
|
|
||||||
|
package-lock.json
|
||||||
|
/bin/
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2018 RuoYi
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
@ -0,0 +1,225 @@
|
|||||||
|
<?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>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.6.3</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>com.ssdmn</groupId>
|
||||||
|
<artifactId>ssdmn</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
|
||||||
|
<name>ssdmn</name>
|
||||||
|
<description>ssdmnBoot系统</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||||
|
<druid.version>1.2.6</druid.version>
|
||||||
|
<bitwalker.version>1.21</bitwalker.version>
|
||||||
|
<swagger.version>3.0.0</swagger.version>
|
||||||
|
<kaptcha.version>2.3.2</kaptcha.version>
|
||||||
|
<mybatis-plus-boot-starter.version>3.4.2</mybatis-plus-boot-starter.version>
|
||||||
|
<pagehelper.boot.version>1.3.1</pagehelper.boot.version>
|
||||||
|
<fastjson.version>1.2.83</fastjson.version>
|
||||||
|
<oshi.version>5.8.0</oshi.version>
|
||||||
|
<jna.version>5.8.0</jna.version>
|
||||||
|
<commons.io.version>2.11.0</commons.io.version>
|
||||||
|
<commons.fileupload.version>1.4</commons.fileupload.version>
|
||||||
|
<commons.collections.version>3.2.2</commons.collections.version>
|
||||||
|
<poi.version>4.1.2</poi.version>
|
||||||
|
<velocity.version>1.7</velocity.version>
|
||||||
|
<jwt.version>0.9.1</jwt.version>
|
||||||
|
<beetl.version>1.1.55.RELEASE</beetl.version>
|
||||||
|
<commons-text.version>1.9</commons-text.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<!-- 依赖声明 -->
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- 阿里数据库连接池 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid-spring-boot-starter</artifactId>
|
||||||
|
<version>${druid.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 解析客户端操作系统、浏览器等 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>eu.bitwalker</groupId>
|
||||||
|
<artifactId>UserAgentUtils</artifactId>
|
||||||
|
<version>${bitwalker.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringBoot集成mybatis plus框架 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<version>${mybatis-plus-boot-starter.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-extension</artifactId>
|
||||||
|
<version>${mybatis-plus-boot-starter.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- pagehelper 分页插件 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.pagehelper</groupId>
|
||||||
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
|
<version>${pagehelper.boot.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 获取系统信息 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.oshi</groupId>
|
||||||
|
<artifactId>oshi-core</artifactId>
|
||||||
|
<version>${oshi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.java.dev.jna</groupId>
|
||||||
|
<artifactId>jna</artifactId>
|
||||||
|
<version>${jna.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.java.dev.jna</groupId>
|
||||||
|
<artifactId>jna-platform</artifactId>
|
||||||
|
<version>${jna.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Swagger3依赖 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-boot-starter</artifactId>
|
||||||
|
<version>${swagger.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>swagger-models</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- io常用工具类 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>${commons.io.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-text</artifactId>
|
||||||
|
<version>${commons-text.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ibeetl</groupId>
|
||||||
|
<artifactId>beetl-framework-starter</artifactId>
|
||||||
|
<version>${beetl.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 文件上传工具类 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-fileupload</groupId>
|
||||||
|
<artifactId>commons-fileupload</artifactId>
|
||||||
|
<version>${commons.fileupload.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- excel工具 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.poi</groupId>
|
||||||
|
<artifactId>poi-ooxml</artifactId>
|
||||||
|
<version>${poi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- collections工具类 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-collections</groupId>
|
||||||
|
<artifactId>commons-collections</artifactId>
|
||||||
|
<version>${commons.collections.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 阿里JSON解析器 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>${fastjson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Token生成与解析-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt</artifactId>
|
||||||
|
<version>${jwt.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>ssdmn-chat-gpt-api</module>
|
||||||
|
</modules>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/java</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.xml</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>${java.version}</source>
|
||||||
|
<target>${java.version}</target>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>public</id>
|
||||||
|
<name>aliyun nexus</name>
|
||||||
|
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>public</id>
|
||||||
|
<name>aliyun nexus</name>
|
||||||
|
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
</project>
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.ssdmn;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ssdmn.common.annotation.boot.SpringBootApplication;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SpringBoot入口
|
||||||
|
*
|
||||||
|
* @author 郭世旭
|
||||||
|
* @version 1.0
|
||||||
|
* @createTime 2021-04-10 09:58:30
|
||||||
|
*/
|
||||||
|
@SpringBootApplication
|
||||||
|
public class WebMain {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(WebMain.class,args);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,119 @@
|
|||||||
|
package com.ssdmn.aliyun;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阿里云相关服务类
|
||||||
|
*
|
||||||
|
* @author 郭世旭
|
||||||
|
* @version 1.0
|
||||||
|
* @createTime 2021-0-15 09:58:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Configuration
|
||||||
|
@ConfigurationProperties(prefix = "alibaba.cloud")
|
||||||
|
@ConditionalOnProperty(prefix = "alibaba.cloud", value = {"access-key", "secret-key"})
|
||||||
|
public class AliYunProperties {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OSS配置
|
||||||
|
*/
|
||||||
|
private final Oss oss = new Oss();
|
||||||
|
/**
|
||||||
|
* 短信配置
|
||||||
|
*/
|
||||||
|
private final Sms sms = new Sms();
|
||||||
|
/**
|
||||||
|
* MQ配置
|
||||||
|
*/
|
||||||
|
private final Rocketmq rocketmq = new Rocketmq();
|
||||||
|
/**
|
||||||
|
* accessKey
|
||||||
|
*/
|
||||||
|
private String accessKey;
|
||||||
|
/**
|
||||||
|
* secretKey
|
||||||
|
*/
|
||||||
|
private String secretKey;
|
||||||
|
/**
|
||||||
|
* 地区
|
||||||
|
*/
|
||||||
|
private String regionId;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Oss {
|
||||||
|
/**
|
||||||
|
* 实例名
|
||||||
|
*/
|
||||||
|
private String bucketName;
|
||||||
|
/**
|
||||||
|
* 文件访问地址
|
||||||
|
*/
|
||||||
|
private String domain;
|
||||||
|
/**
|
||||||
|
* 回调地址
|
||||||
|
*/
|
||||||
|
private String callback;
|
||||||
|
/**
|
||||||
|
* 上传地址
|
||||||
|
*/
|
||||||
|
private String endpoint;
|
||||||
|
/**
|
||||||
|
* 永久文件路径
|
||||||
|
*/
|
||||||
|
private String everlastDir;
|
||||||
|
/**
|
||||||
|
* 临时文件路径
|
||||||
|
*/
|
||||||
|
private String tempDir;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 到期时间(s)
|
||||||
|
*/
|
||||||
|
private Long expireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Sms {
|
||||||
|
/**
|
||||||
|
* 短信签名
|
||||||
|
*/
|
||||||
|
private String signName;
|
||||||
|
/**
|
||||||
|
* 短信模板
|
||||||
|
*/
|
||||||
|
private String templateCode;
|
||||||
|
/**
|
||||||
|
* 验证码长度
|
||||||
|
*/
|
||||||
|
private Integer length;
|
||||||
|
/**
|
||||||
|
* 有效时长
|
||||||
|
*/
|
||||||
|
private Long validTime;
|
||||||
|
/**
|
||||||
|
* Report queue name.
|
||||||
|
*/
|
||||||
|
private String reportQueueName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Up queue name.
|
||||||
|
*/
|
||||||
|
private String upQueueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Rocketmq {
|
||||||
|
private String nameSrvAddr;
|
||||||
|
private String topic;
|
||||||
|
private String groupId;
|
||||||
|
private String tag;
|
||||||
|
private String orderTopic;
|
||||||
|
private String orderGroupId;
|
||||||
|
private String orderTag;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package com.ssdmn.aliyun;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 阿里云图片信息对象
|
||||||
|
* @author: 郭世旭
|
||||||
|
* @create: 2021-06-23 11:32
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class ImageInfo {
|
||||||
|
private Map<String,String> fileSize;
|
||||||
|
private Map<String,String> format;
|
||||||
|
private Map<String,String> imageHeight;
|
||||||
|
private Map<String,String> imageWidth;
|
||||||
|
private Map<String,String> resolutionUnit;
|
||||||
|
private Map<String,String> xResolution;
|
||||||
|
private Map<String,String> yResolution;
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
package com.ssdmn.aliyun;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阿里云OSS签名返回实体
|
||||||
|
*
|
||||||
|
* @author 郭世旭
|
||||||
|
* @version 1.0
|
||||||
|
* @createTime 2021-03-22 09:58:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OssPolicyResult {
|
||||||
|
/**
|
||||||
|
* accessId
|
||||||
|
*/
|
||||||
|
private String accessid;
|
||||||
|
/**
|
||||||
|
* 加密数据
|
||||||
|
*/
|
||||||
|
private String policy;
|
||||||
|
/**
|
||||||
|
* 签名
|
||||||
|
*/
|
||||||
|
private String signature;
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
private String dir;
|
||||||
|
/**
|
||||||
|
* 访问地址
|
||||||
|
*/
|
||||||
|
private String host;
|
||||||
|
/**
|
||||||
|
* 回调地址
|
||||||
|
*/
|
||||||
|
private String callback;
|
||||||
|
/**
|
||||||
|
* 前端回调方法
|
||||||
|
*/
|
||||||
|
private String callbackFun;
|
||||||
|
/**
|
||||||
|
* 到期时间
|
||||||
|
*/
|
||||||
|
private Long expire;
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.ssdmn.biz.chatmodel.mapper;
|
||||||
|
|
||||||
|
import com.ssdmn.biz.chatmodel.pojo.domain.ChatModelConfig;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【chat_model_config】的数据库操作Mapper
|
||||||
|
* @createDate 2023-02-28 13:38:34
|
||||||
|
* @Entity com.ssdmn.biz.chatmodel.pojo.domain.ChatModelConfig
|
||||||
|
*/
|
||||||
|
public interface ChatModelConfigMapper extends BaseMapper<ChatModelConfig> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?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.ssdmn.biz.chatmodel.mapper.ChatModelConfigMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.ssdmn.biz.chatmodel.pojo.domain.ChatModelConfig">
|
||||||
|
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="integral" column="integral" jdbcType="DOUBLE"/>
|
||||||
|
<result property="modelId" column="model_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="logo" column="logo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="description" column="description" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,name,integral,
|
||||||
|
model_id,logo,description
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.ssdmn.biz.chatmodel.pojo.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @TableName chat_model_config
|
||||||
|
*/
|
||||||
|
@TableName(value ="chat_model_config")
|
||||||
|
@Data
|
||||||
|
public class ChatModelConfig implements Serializable {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 积分/字
|
||||||
|
*/
|
||||||
|
private Double integral;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* openai模型id
|
||||||
|
*/
|
||||||
|
private String modelId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* logo
|
||||||
|
*/
|
||||||
|
private String logo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.ssdmn.biz.chatmodel.service;
|
||||||
|
|
||||||
|
import com.ssdmn.biz.chatmodel.pojo.domain.ChatModelConfig;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【chat_model_config】的数据库操作Service
|
||||||
|
* @createDate 2023-02-28 13:38:34
|
||||||
|
*/
|
||||||
|
public interface ChatModelConfigService extends IService<ChatModelConfig> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.ssdmn.biz.chatmodel.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ssdmn.biz.chatmodel.pojo.domain.ChatModelConfig;
|
||||||
|
import com.ssdmn.biz.chatmodel.service.ChatModelConfigService;
|
||||||
|
import com.ssdmn.biz.chatmodel.mapper.ChatModelConfigMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【chat_model_config】的数据库操作Service实现
|
||||||
|
* @createDate 2023-02-28 13:38:34
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ChatModelConfigServiceImpl extends ServiceImpl<ChatModelConfigMapper, ChatModelConfig>
|
||||||
|
implements ChatModelConfigService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.ssdmn.biz.config.constants;
|
||||||
|
|
||||||
|
public class Constants {
|
||||||
|
|
||||||
|
public static final String SIGN_IN_INTEGRAL = "SIGN_IN_INTEGRAL";
|
||||||
|
|
||||||
|
public static final String FILL_INFO_INTEGRAL = "FILL_INFO_INTEGRAL";
|
||||||
|
|
||||||
|
public static final String INVITE_INTEGRAL = "INVITE_INTEGRAL";
|
||||||
|
|
||||||
|
public static final String FIRST_RECHARGE_INTEGRAL = "FIRST_RECHARGE_INTEGRAL";
|
||||||
|
|
||||||
|
public static final String REGISTER_INTEGRAL = "FIRST_RECHARGE_INTEGRAL";
|
||||||
|
public static final String EXTRA_INTEGRAL = "EXTRA_INTEGRAL";
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.ssdmn.biz.config.mapper;
|
||||||
|
|
||||||
|
import com.ssdmn.biz.config.pojo.domain.SysConfig;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【sys_config(参数配置表)】的数据库操作Mapper
|
||||||
|
* @createDate 2023-03-01 13:22:21
|
||||||
|
* @Entity com.ssdmn.biz.config.pojo.domain.SysConfig
|
||||||
|
*/
|
||||||
|
public interface SysConfigMapper extends BaseMapper<SysConfig> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
<?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.ssdmn.biz.config.mapper.SysConfigMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.ssdmn.biz.config.pojo.domain.SysConfig">
|
||||||
|
<id property="configId" column="config_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="configName" column="config_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="configKey" column="config_key" jdbcType="VARCHAR"/>
|
||||||
|
<result property="configValue" column="config_value" jdbcType="VARCHAR"/>
|
||||||
|
<result property="configType" column="config_type" jdbcType="CHAR"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
config_id,config_name,config_key,
|
||||||
|
config_value,config_type,create_by,
|
||||||
|
create_time,update_by,update_time,
|
||||||
|
remark
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.ssdmn.biz.config.service;
|
||||||
|
|
||||||
|
import com.ssdmn.biz.config.pojo.domain.SysConfig;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【sys_config(参数配置表)】的数据库操作Service
|
||||||
|
* @createDate 2023-03-01 13:22:21
|
||||||
|
*/
|
||||||
|
public interface SysConfigService extends IService<SysConfig> {
|
||||||
|
|
||||||
|
SysConfig getByKey(String key);
|
||||||
|
|
||||||
|
String getValueByKey(String key);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package com.ssdmn.biz.config.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ssdmn.biz.config.pojo.domain.SysConfig;
|
||||||
|
import com.ssdmn.biz.config.service.SysConfigService;
|
||||||
|
import com.ssdmn.biz.config.mapper.SysConfigMapper;
|
||||||
|
import com.ssdmn.common.lang.Assert;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
* @description 针对表【sys_config(参数配置表)】的数据库操作Service实现
|
||||||
|
* @createDate 2023-03-01 13:22:21
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig>
|
||||||
|
implements SysConfigService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysConfig getByKey(String key) {
|
||||||
|
return getOne(Wrappers.lambdaQuery(SysConfig.class).eq(SysConfig::getConfigKey, key));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getValueByKey(String key) {
|
||||||
|
SysConfig sysConfig = getByKey(key);
|
||||||
|
Assert.notNull(sysConfig, "配置不存在");
|
||||||
|
Assert.notBlank(sysConfig.getConfigValue(), "配置不存在");
|
||||||
|
|
||||||
|
return sysConfig.getConfigValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,56 @@
|
|||||||
|
package com.ssdmn.biz.contants;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常量
|
||||||
|
*
|
||||||
|
* @author 郭世旭
|
||||||
|
* @version 1.0
|
||||||
|
* @createTime 2021-03-22 09:58:30
|
||||||
|
*/
|
||||||
|
public interface ScheduleConstants {
|
||||||
|
String TASK_CLASS_NAME = "TASK_CLASS_NAME";
|
||||||
|
|
||||||
|
/** 执行目标key */
|
||||||
|
String TASK_PROPERTIES = "TASK_PROPERTIES";
|
||||||
|
|
||||||
|
/** 默认 */
|
||||||
|
String MISFIRE_DEFAULT = "0";
|
||||||
|
|
||||||
|
/** 立即触发执行 */
|
||||||
|
String MISFIRE_IGNORE_MISFIRES = "1";
|
||||||
|
|
||||||
|
/** 触发一次执行 */
|
||||||
|
String MISFIRE_FIRE_AND_PROCEED = "2";
|
||||||
|
|
||||||
|
/** 不触发立即执行 */
|
||||||
|
String MISFIRE_DO_NOTHING = "3";
|
||||||
|
|
||||||
|
/** 允许并发 */
|
||||||
|
String CONCURRENT_YES = "1";
|
||||||
|
|
||||||
|
/** 不允许并发执行 */
|
||||||
|
String CONCURRENT_NO = "0";
|
||||||
|
|
||||||
|
enum Status{
|
||||||
|
/**
|
||||||
|
* 正常
|
||||||
|
*/
|
||||||
|
NORMAL("0"),
|
||||||
|
/**
|
||||||
|
* 暂停
|
||||||
|
*/
|
||||||
|
PAUSE("1");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
private Status(String value)
|
||||||
|
{
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue()
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
package com.ssdmn.biz.contants;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常量
|
||||||
|
*
|
||||||
|
* @author 郭世旭
|
||||||
|
* @version 1.0
|
||||||
|
* @createTime 2021-03-22 09:58:30
|
||||||
|
*/
|
||||||
|
public interface SysConstants {
|
||||||
|
/**
|
||||||
|
* 成功 200
|
||||||
|
*/
|
||||||
|
int SUCCESS_CODE = 200;
|
||||||
|
/**
|
||||||
|
* 成功 0
|
||||||
|
*/
|
||||||
|
String SUCCESS_MESSAGE = "success";
|
||||||
|
/**
|
||||||
|
* 请求成功消息
|
||||||
|
*/
|
||||||
|
String RESPONSE_SUCCESS_MESSAGE = "true";
|
||||||
|
/**
|
||||||
|
* 失败 -1
|
||||||
|
*/
|
||||||
|
int ERROR_CODE = -1;
|
||||||
|
/**
|
||||||
|
* 失败 -1
|
||||||
|
*/
|
||||||
|
String ERROR_MESSAGE = "error";
|
||||||
|
/**
|
||||||
|
* 登录相关错误代码
|
||||||
|
*/
|
||||||
|
int LOGIN_CODE = 401;
|
||||||
|
/**
|
||||||
|
* 请求头token键
|
||||||
|
*/
|
||||||
|
String TOKEN_KEY = "token";
|
||||||
|
/**
|
||||||
|
* 有效
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
Integer ONE = 1;
|
||||||
|
/**
|
||||||
|
* 无效
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
Integer ZERO = 0;
|
||||||
|
/**
|
||||||
|
* 有效
|
||||||
|
*/
|
||||||
|
Integer VALID = 1;
|
||||||
|
/**
|
||||||
|
* 无效
|
||||||
|
*/
|
||||||
|
Integer INVALID = 0;
|
||||||
|
/**
|
||||||
|
* 已删除
|
||||||
|
*/
|
||||||
|
Integer DELETED = 1;
|
||||||
|
/**
|
||||||
|
* 未删除
|
||||||
|
*/
|
||||||
|
Integer NOT_DELETED =0;
|
||||||
|
/**
|
||||||
|
* 上架
|
||||||
|
*/
|
||||||
|
Integer ON_SALE = 1;
|
||||||
|
/**
|
||||||
|
* 未上架
|
||||||
|
*/
|
||||||
|
Integer NOT_ON_SALE =0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* session有效时间
|
||||||
|
*/
|
||||||
|
Integer SESSION_KEEP_TIME_SECONDS = 10;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一百
|
||||||
|
*/
|
||||||
|
BigDecimal ONE_HUNDRED = new BigDecimal("100");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工默认密码
|
||||||
|
*/
|
||||||
|
String DEFAULT_PWD = "123456";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义临时文件存放的位置
|
||||||
|
*/
|
||||||
|
String FILE_PATH_UPLOAD = "/opt/hot-pot/houduan/temp/temporary-hotPot-fileUpload/";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店图片
|
||||||
|
*/
|
||||||
|
int STORE_IMAGE_NUMBER = 5;
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.ssdmn.biz.contants;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常量
|
||||||
|
*
|
||||||
|
* @author 郭世旭
|
||||||
|
* @version 1.0
|
||||||
|
* @createTime 2021-03-22 09:58:30
|
||||||
|
*/
|
||||||
|
public interface UserContants {
|
||||||
|
|
||||||
|
interface UserLevel {
|
||||||
|
int COMMON_VIP = 0;
|
||||||
|
int DAY_VIP = 1;
|
||||||
|
int WEEK_VIP = 2;
|
||||||
|
int MONTH_VIP = 3;
|
||||||
|
int YEAR_VIP = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
package com.ssdmn.biz.file;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Base64DecodedMultipartFile implements MultipartFile {
|
||||||
|
|
||||||
|
private final byte[] imgContent;
|
||||||
|
private final String header;
|
||||||
|
|
||||||
|
public Base64DecodedMultipartFile(byte[] imgContent, String header) {
|
||||||
|
this.imgContent = imgContent;
|
||||||
|
this.header = header.split(";")[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return System.currentTimeMillis() + Math.random() + "." + header.split("/")[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOriginalFilename() {
|
||||||
|
return System.currentTimeMillis() + (int)Math.random() * 10000 + "." + header.split("/")[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getContentType() {
|
||||||
|
return header.split(":")[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return imgContent == null || imgContent.length == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getSize() {
|
||||||
|
return imgContent.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public byte[] getBytes() {
|
||||||
|
return imgContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InputStream getInputStream() {
|
||||||
|
return new ByteArrayInputStream(imgContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void transferTo(File dest) throws IOException, IllegalStateException {
|
||||||
|
new FileOutputStream(dest).write(imgContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.ssdmn.biz.file;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件属性类 yml配置文件属性读取
|
||||||
|
* @author 郭世旭
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@ConfigurationProperties(prefix = "file")
|
||||||
|
@ConditionalOnProperty(prefix = "file", value = {"path"})
|
||||||
|
@Data
|
||||||
|
public class FileProperties {
|
||||||
|
|
||||||
|
private final Qr qr = new Qr();
|
||||||
|
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Qr{
|
||||||
|
private String path;
|
||||||
|
private String fileName;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.ssdmn.biz.file.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ssdmn.biz.file.pojo.entity.FileManage;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Data: 2021/5/8 9:56
|
||||||
|
* @Version: 1.0v
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface FileManageMapper extends BaseMapper<FileManage> {
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.ssdmn.biz.file.pojo.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Data: 2021/5/8 9:50
|
||||||
|
* @Version: 1.0v
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("file_manage")
|
||||||
|
public class FileManage {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value="主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="入参时的文件名")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="上传时的文件名")
|
||||||
|
private String uploadName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="文件类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="文件后缀")
|
||||||
|
private String suffix;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="是否是图片 0-不是 1-是")
|
||||||
|
private Integer isPicture;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="文件大小")
|
||||||
|
private Long size;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="文件来源")
|
||||||
|
private String src;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="文件访问路径")
|
||||||
|
private String accessPath;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="md5")
|
||||||
|
private String md5;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="创建时间")
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonIgnore
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="修改时间")
|
||||||
|
@JsonIgnore
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package com.ssdmn.biz.file.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 余洲
|
||||||
|
* @version 0.0.1
|
||||||
|
* @description uploadUrlVO
|
||||||
|
* @since 2021/11/9 10:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UploadUrlVO {
|
||||||
|
@ApiModelProperty("请求路径")
|
||||||
|
URL url;
|
||||||
|
|
||||||
|
@ApiModelProperty("请求头类型")
|
||||||
|
String contentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("上传后的文件地址")
|
||||||
|
String filePath;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
package com.ssdmn.biz.file.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ssdmn.biz.file.pojo.entity.FileManage;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Data: 2021/5/8 9:58
|
||||||
|
* @Version: 1.0v
|
||||||
|
*/
|
||||||
|
public interface FileManageService extends IService<FileManage> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
* @param file 文件
|
||||||
|
* @return 访问路径
|
||||||
|
*/
|
||||||
|
String fileUpload(MultipartFile file);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
* @param file 文件
|
||||||
|
* @return 访问路径
|
||||||
|
*/
|
||||||
|
String fileUpload(File file);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过网络路径上传文件
|
||||||
|
* @param url 文件网格路径
|
||||||
|
* @return 访问路径
|
||||||
|
*/
|
||||||
|
String fileUpload(String url);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过base64上传文件
|
||||||
|
* @param base64 文件base64
|
||||||
|
* @return 访问路径
|
||||||
|
*/
|
||||||
|
String fileUploadByBase64(String base64) throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量上传本地文件
|
||||||
|
* @param files 多个文件
|
||||||
|
* @return 访问路径集合
|
||||||
|
*/
|
||||||
|
List<String> fileUploadBatch(MultipartFile[] files);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,179 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.alibaba.excel.EasyExcel;
|
||||||
|
import com.ssdmn.biz.gupiao.listener.DongCaiSecondaryIndustryListener;
|
||||||
|
import com.ssdmn.biz.gupiao.listener.HighLowOfThreeHundredListener;
|
||||||
|
import com.ssdmn.biz.gupiao.listener.OriginalIssueStockListener;
|
||||||
|
import com.ssdmn.biz.gupiao.listener.TransactionRecordListener;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.DongCaiSecondaryIndustry;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.HighLowOfThreeHundred;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.OriginalIssueStock;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.TransactionRecordImport;
|
||||||
|
import com.ssdmn.biz.gupiao.service.DongCaiSecondaryIndustryService;
|
||||||
|
import com.ssdmn.biz.gupiao.service.HighLowOfThreeHundredService;
|
||||||
|
import com.ssdmn.biz.gupiao.service.OriginalIssueStockService;
|
||||||
|
import com.ssdmn.biz.gupiao.service.TransactionRecordService;
|
||||||
|
import com.ssdmn.common.annotation.combination.PathRestController;
|
||||||
|
import com.ssdmn.common.exception.BizException;
|
||||||
|
import com.ssdmn.common.interceptor.UserCache;
|
||||||
|
import com.ssdmn.common.interceptor.annotation.AuthUser;
|
||||||
|
import com.ssdmn.common.result.Result;
|
||||||
|
import com.ssdmn.common.result.ResultConstants;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import static com.ssdmn.common.result.ResultConstants.FAIL;
|
||||||
|
import static com.ssdmn.common.result.Results.ok;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 数据导入模块
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/7 17:15
|
||||||
|
*/
|
||||||
|
@Api(tags = "数据导入模块")
|
||||||
|
@PathRestController("/import")
|
||||||
|
@Slf4j
|
||||||
|
public class ImportController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
DongCaiSecondaryIndustryService dongCaiSecondaryIndustryService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
HighLowOfThreeHundredService highLowOfThreeHundredService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
OriginalIssueStockService originalIssueStockService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
TransactionRecordService transactionRecordService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping(value = "/dongCaiSecondary")
|
||||||
|
@ApiOperation("东财二级行业指数每日成交情况导入")
|
||||||
|
public Result<String> dongCaiSecondary(@RequestPart("file") MultipartFile file) {
|
||||||
|
Date date = checkFileType(file);
|
||||||
|
|
||||||
|
try {
|
||||||
|
InputStream is = file.getInputStream();
|
||||||
|
EasyExcel.read(is, DongCaiSecondaryIndustry.class, new DongCaiSecondaryIndustryListener(dongCaiSecondaryIndustryService, date))
|
||||||
|
.sheet()
|
||||||
|
.headRowNumber(1)
|
||||||
|
.doRead();
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new BizException(FAIL,e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return ok("导入成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/highLow")
|
||||||
|
@ApiOperation("创300天新高新低导入")
|
||||||
|
public Result<String> highLow(@RequestPart("file") MultipartFile file) {
|
||||||
|
Date date = checkFileType(file);
|
||||||
|
|
||||||
|
try {
|
||||||
|
InputStream is = file.getInputStream();
|
||||||
|
EasyExcel.read(is, HighLowOfThreeHundred.class, new HighLowOfThreeHundredListener(highLowOfThreeHundredService, date))
|
||||||
|
.sheet()
|
||||||
|
.headRowNumber(1)
|
||||||
|
.doRead();
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new BizException(FAIL,e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return ok("导入成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/originalIssueStock")
|
||||||
|
@ApiOperation("动量原始股导入")
|
||||||
|
public Result<String> originalIssueStock(@RequestPart("file") MultipartFile file) {
|
||||||
|
|
||||||
|
Date date = checkFileType(file);
|
||||||
|
|
||||||
|
try {
|
||||||
|
InputStream is = file.getInputStream();
|
||||||
|
EasyExcel.read(is, OriginalIssueStock.class, new OriginalIssueStockListener(originalIssueStockService, date))
|
||||||
|
.sheet()
|
||||||
|
.headRowNumber(1)
|
||||||
|
.doRead();
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new BizException(FAIL,e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return ok("导入成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping(value = "/transactionRecord")
|
||||||
|
@ApiOperation("交易记录导入")
|
||||||
|
public Result<String> transactionRecord(@RequestPart("file") MultipartFile file, @AuthUser UserCache userCache) {
|
||||||
|
|
||||||
|
String fileName = file.getOriginalFilename();
|
||||||
|
if (!fileName.matches("^.+\\.(?i)(xls)$") && !fileName.matches("^.+\\.(?i)(xlsx)$")) {
|
||||||
|
throw new BizException(ResultConstants.SYSTEM_PARAM_FAIL);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
InputStream is = file.getInputStream();
|
||||||
|
EasyExcel.read(is, TransactionRecordImport.class, new TransactionRecordListener(transactionRecordService,userCache))
|
||||||
|
.sheet()
|
||||||
|
.headRowNumber(1)
|
||||||
|
.doRead();
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new BizException(FAIL,e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return ok("导入成功");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查文件类型
|
||||||
|
*
|
||||||
|
* @param file 文件
|
||||||
|
* @return 日期
|
||||||
|
*/
|
||||||
|
private Date checkFileType(MultipartFile file) {
|
||||||
|
String fileName = file.getOriginalFilename();
|
||||||
|
if (!fileName.matches("^.+\\.(?i)(xls)$") && !fileName.matches("^.+\\.(?i)(xlsx)$")) {
|
||||||
|
throw new BizException(ResultConstants.SYSTEM_PARAM_FAIL);
|
||||||
|
}
|
||||||
|
|
||||||
|
Pattern p = Pattern.compile("(\\d{8})");
|
||||||
|
Matcher m = p.matcher(fileName);
|
||||||
|
if (m.find()) {
|
||||||
|
if(!m.group(0).startsWith("20")){
|
||||||
|
throw new BizException(500,"文件名不符合规范");
|
||||||
|
}
|
||||||
|
String group = m.group(0);
|
||||||
|
String year = group.substring(0, 4);
|
||||||
|
String month = group.substring(4, 6);
|
||||||
|
String day = group.substring(6, 8);
|
||||||
|
|
||||||
|
return DateUtil.parseDate(year +"-"+ month + "-"+day);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new BizException(500,"文件名不符合规范");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.controller;
|
||||||
|
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.MyCollectRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.QueryIsCollectRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.QueryMyCollectPageRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.MyCollectPageResponse;
|
||||||
|
import com.ssdmn.biz.gupiao.service.MyCollectService;
|
||||||
|
import com.ssdmn.common.annotation.combination.PathRestController;
|
||||||
|
import com.ssdmn.common.interceptor.UserCache;
|
||||||
|
import com.ssdmn.common.interceptor.annotation.AuthUser;
|
||||||
|
import com.ssdmn.common.page.PageList;
|
||||||
|
import com.ssdmn.common.result.Result;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import static com.ssdmn.common.result.Results.ok;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 11:49
|
||||||
|
*/
|
||||||
|
@Api(tags = "我的收藏")
|
||||||
|
@PathRestController("/collect")
|
||||||
|
@Slf4j
|
||||||
|
public class MyCollectController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
MyCollectService myCollectService;
|
||||||
|
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
@ApiOperation("添加我的收藏")
|
||||||
|
public Result<Void> addMyCollect(@AuthUser UserCache userCache,@RequestBody MyCollectRequest myCollectRequest) {
|
||||||
|
|
||||||
|
myCollectService.addMyCollect(userCache,myCollectRequest);
|
||||||
|
return ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/del")
|
||||||
|
@ApiOperation("删除我的收藏")
|
||||||
|
public Result<Void> delMyCollect(@AuthUser UserCache userCache,@RequestBody MyCollectRequest myCollectRequest) {
|
||||||
|
|
||||||
|
myCollectService.removeMyCollect(userCache,myCollectRequest);
|
||||||
|
return ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/query")
|
||||||
|
@ApiOperation("查询我的收藏")
|
||||||
|
public Result<PageList<MyCollectPageResponse>> queryMyCollect(@AuthUser UserCache userCache,@RequestBody QueryMyCollectPageRequest queryMyCollectPageRequest) {
|
||||||
|
|
||||||
|
return ok(myCollectService.queryMyCollect(userCache,queryMyCollectPageRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/queryIsCollect")
|
||||||
|
@ApiOperation("查询是否收藏某个code")
|
||||||
|
public Result<Integer> queryIsCollect(@AuthUser UserCache userCache,@RequestBody QueryIsCollectRequest queryIsCollectRequest) {
|
||||||
|
|
||||||
|
return ok(myCollectService.queryIsCollect(userCache,queryIsCollectRequest));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.TransactionRecord;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.TransactionRecordTemp;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.EarningsLineRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.ProfitAndLossRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.TransactionRecordPageRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.EarningsLineResponse;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.TotalEarningsResponse;
|
||||||
|
import com.ssdmn.biz.gupiao.service.TransactionRecordService;
|
||||||
|
import com.ssdmn.common.annotation.combination.PathRestController;
|
||||||
|
import com.ssdmn.common.date.DateUtil;
|
||||||
|
import com.ssdmn.common.interceptor.UserCache;
|
||||||
|
import com.ssdmn.common.interceptor.annotation.AuthUser;
|
||||||
|
import com.ssdmn.common.page.PageList;
|
||||||
|
import com.ssdmn.common.result.Result;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.ssdmn.common.result.Results.ok;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 交易记录
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 21:02
|
||||||
|
*/
|
||||||
|
@Api(tags = "交易记录")
|
||||||
|
@PathRestController("/transaction")
|
||||||
|
@Slf4j
|
||||||
|
public class TransactionRecordController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
TransactionRecordService transactionRecordService;
|
||||||
|
|
||||||
|
@PostMapping(value = "/saveOrUpdate")
|
||||||
|
@ApiOperation("保存或修改交易记录")
|
||||||
|
public Result<String> saveOrUpdate(@AuthUser UserCache userCache, @RequestBody TransactionRecord transactionRecord) {
|
||||||
|
transactionRecord.setUserId(userCache.getUserId());
|
||||||
|
transactionRecordService.saveOrUpdateTransactionRecord(transactionRecord);
|
||||||
|
|
||||||
|
return ok("操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/delByIds")
|
||||||
|
@ApiOperation("批量删除交易记录")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "ids", value = "ID集合", required = true, allowMultiple = true, dataType = "long", paramType = "query")
|
||||||
|
})
|
||||||
|
public Result<String> delByIds(@AuthUser UserCache userCache, @RequestParam("ids") List<Long> ids) {
|
||||||
|
|
||||||
|
transactionRecordService.delByIds(userCache,ids);
|
||||||
|
|
||||||
|
return ok("操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/getDetailById/{id:\\d+}")
|
||||||
|
@ApiOperation("查看交易详情")
|
||||||
|
public Result<TransactionRecord> getDetailById(@PathVariable("id") Long id) {
|
||||||
|
|
||||||
|
return ok(transactionRecordService.getDetailById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/findPage")
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
public Result<PageList<TransactionRecord>> findPage(@RequestBody TransactionRecordPageRequest transactionRecordPageRequest) {
|
||||||
|
if(ObjectUtil.isNotEmpty(transactionRecordPageRequest.getNum())) {
|
||||||
|
transactionRecordPageRequest.setEndTime(new Date());
|
||||||
|
transactionRecordPageRequest.setStartTime(DateUtil.offsetDay(new Date(), transactionRecordPageRequest.getNum()* -1));
|
||||||
|
}
|
||||||
|
return ok(transactionRecordService.findPage(transactionRecordPageRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping(value = "/totalEarnings")
|
||||||
|
@ApiOperation("总收益")
|
||||||
|
public Result<TotalEarningsResponse> totalEarnings(@AuthUser UserCache userCache, String securityCode) {
|
||||||
|
|
||||||
|
return ok(transactionRecordService.totalEarnings(userCache,securityCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/earningsLine")
|
||||||
|
@ApiOperation("收益折线图")
|
||||||
|
public Result<Object[]> earningsLine(@AuthUser UserCache userCache, @RequestBody EarningsLineRequest earningsLineRequest) {
|
||||||
|
|
||||||
|
return ok(transactionRecordService.EarningsLine(userCache,earningsLineRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/profitOrLoss")
|
||||||
|
@ApiOperation("盈亏个股分页查询")
|
||||||
|
public Result<PageList<TransactionRecordTemp>> profitOrLoss(@AuthUser UserCache userCache , @RequestBody ProfitAndLossRequest profitAndLossRequest) {
|
||||||
|
|
||||||
|
return ok(transactionRecordService.profitOrLoss(userCache,profitAndLossRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.listener;
|
||||||
|
|
||||||
|
import cn.hutool.log.Log;
|
||||||
|
import cn.hutool.log.LogFactory;
|
||||||
|
import com.alibaba.excel.context.AnalysisContext;
|
||||||
|
import com.alibaba.excel.exception.ExcelDataConvertException;
|
||||||
|
import com.alibaba.excel.read.listener.ReadListener;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.HighLowOfThreeHundred;
|
||||||
|
import com.ssdmn.biz.gupiao.service.HighLowOfThreeHundredService;
|
||||||
|
import com.ssdmn.common.date.DateUtil;
|
||||||
|
import com.ssdmn.common.exception.BizException;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/7 19:21
|
||||||
|
*/
|
||||||
|
public class HighLowOfThreeHundredListener implements ReadListener<HighLowOfThreeHundred> {
|
||||||
|
|
||||||
|
Log log = LogFactory.get(HighLowOfThreeHundredListener.class);
|
||||||
|
|
||||||
|
HighLowOfThreeHundredService highLowOfThreeHundredService;
|
||||||
|
Date date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存数据
|
||||||
|
*/
|
||||||
|
private final List<HighLowOfThreeHundred> cachedDataList = new ArrayList<>();
|
||||||
|
|
||||||
|
public HighLowOfThreeHundredListener(HighLowOfThreeHundredService highLowOfThreeHundredService,Date date) {
|
||||||
|
this.highLowOfThreeHundredService = highLowOfThreeHundredService;
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invoke(HighLowOfThreeHundred data, AnalysisContext analysisContext) {
|
||||||
|
|
||||||
|
data.setBusinessDate(date);
|
||||||
|
String securityCode = data.getSecurityCode();
|
||||||
|
String[] split = securityCode.split("\\.");
|
||||||
|
|
||||||
|
data.setSecurityCode(split[0]);
|
||||||
|
if(split.length>1){
|
||||||
|
data.setSecurityType(split[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
cachedDataList.add(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||||
|
highLowOfThreeHundredService.importExcel(cachedDataList,date);
|
||||||
|
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(Exception exception, AnalysisContext context) throws Exception {
|
||||||
|
throw new BizException(500,"第"+(context.readRowHolder().getRowIndex() + 1 )+"行"
|
||||||
|
+ ((ExcelDataConvertException) exception).getColumnIndex() +"列"
|
||||||
|
+ exception.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasNext(AnalysisContext context) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,112 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.listener;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.log.Log;
|
||||||
|
import cn.hutool.log.LogFactory;
|
||||||
|
import com.alibaba.excel.context.AnalysisContext;
|
||||||
|
import com.alibaba.excel.exception.ExcelDataConvertException;
|
||||||
|
import com.alibaba.excel.read.listener.ReadListener;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.TransactionRecord;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.TransactionRecordImport;
|
||||||
|
import com.ssdmn.biz.gupiao.service.TransactionRecordService;
|
||||||
|
import com.ssdmn.common.date.DateUtil;
|
||||||
|
import com.ssdmn.common.exception.BizException;
|
||||||
|
import com.ssdmn.common.interceptor.UserCache;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 交易记录导入
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 19:33
|
||||||
|
*/
|
||||||
|
public class TransactionRecordListener implements ReadListener<TransactionRecordImport> {
|
||||||
|
|
||||||
|
Log log = LogFactory.get(TransactionRecordListener.class);
|
||||||
|
|
||||||
|
// -1
|
||||||
|
BigDecimal NEGATIVE_ONE = new BigDecimal("-1");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存数据
|
||||||
|
*/
|
||||||
|
private final List<TransactionRecord> cachedDataList = new ArrayList<>();
|
||||||
|
|
||||||
|
private final TransactionRecordService transactionRecordService;
|
||||||
|
private final UserCache userCache;
|
||||||
|
|
||||||
|
|
||||||
|
public TransactionRecordListener(TransactionRecordService transactionRecordService,UserCache userCache) {
|
||||||
|
this.transactionRecordService = transactionRecordService;
|
||||||
|
this.userCache = userCache;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invoke(TransactionRecordImport data, AnalysisContext analysisContext) {
|
||||||
|
TransactionRecord record = new TransactionRecord();
|
||||||
|
record.setUserId(userCache.getUserId());
|
||||||
|
|
||||||
|
// 股票代码
|
||||||
|
String securityCode = data.getSecurityCode();
|
||||||
|
|
||||||
|
if(ObjectUtil.isEmpty(securityCode) || !securityCode.contains(".")){
|
||||||
|
throw new BizException(500,"股票代码不能为空");
|
||||||
|
}
|
||||||
|
String[] split = securityCode.split("\\.");
|
||||||
|
|
||||||
|
record.setSecurityCode(split[0]);
|
||||||
|
if(split.length>1){
|
||||||
|
record.setSecurityType(split[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
record.setTransactionDate(DateUtil.parse(data.getTransactionDate(),"yyyy-MM-dd"));
|
||||||
|
record.setTransactionTime(DateUtil.parse(data.getTransactionDate(),"yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|
||||||
|
// 手续费 14520(5%)
|
||||||
|
String premium = data.getPremium();
|
||||||
|
String[] split1 = premium.split("\\(");
|
||||||
|
|
||||||
|
record.setPremium(new BigDecimal(split1[0]));
|
||||||
|
if(split1.length>1){
|
||||||
|
record.setPremiumRatio(new BigDecimal(split1[1].replaceAll("%","").replaceAll("\\)","")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if("证券买入".equals(data.getTransactionCategory())){
|
||||||
|
|
||||||
|
record.setTransactionAmount(NEGATIVE_ONE.multiply(data.getTransactionAmount()));
|
||||||
|
}else{
|
||||||
|
record.setTransactionAmount(data.getTransactionAmount());
|
||||||
|
}
|
||||||
|
|
||||||
|
record.setTransactionCategory(data.getTransactionCategory());
|
||||||
|
record.setSecurityName(data.getSecurityName());
|
||||||
|
record.setTransactionPrice(data.getTransactionPrice());
|
||||||
|
record.setVolume(data.getVolume());
|
||||||
|
|
||||||
|
cachedDataList.add(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||||
|
|
||||||
|
transactionRecordService.importExcel(cachedDataList);
|
||||||
|
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(Exception exception, AnalysisContext context) throws Exception {
|
||||||
|
|
||||||
|
throw new BizException(500,"第"+(context.readRowHolder().getRowIndex() + 1 )+"行"
|
||||||
|
+ ((ExcelDataConvertException) exception).getColumnIndex() +"列"
|
||||||
|
+ exception.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasNext(AnalysisContext context) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.DongCaiSecondaryIndustry;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.QueryMyCollectPageRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.MyCollectPageResponse;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface DongCaiSecondaryIndustryMapper extends BaseMapper<DongCaiSecondaryIndustry> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 趋势板块查询
|
||||||
|
* @param pageInfo 分页
|
||||||
|
* @param firstDate 第一个日期
|
||||||
|
* @param secondDate 第二个日期
|
||||||
|
* @param sortSort 排序的排序
|
||||||
|
* @param sortChangeSort 排序变化的排序
|
||||||
|
*/
|
||||||
|
Page<DongCaiSecondaryIndustry> trendPlate(@Param("page") Page<PageModel> pageInfo,
|
||||||
|
@Param("firstDate")Date firstDate,
|
||||||
|
@Param("secondDate")Date secondDate,
|
||||||
|
@Param("sortSort") String sortSort,
|
||||||
|
@Param("sortChangeSort")String sortChangeSort);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
<?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.ssdmn.biz.gupiao.mapper.DongCaiSecondaryIndustryMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<!--/**
|
||||||
|
* 趋势板块查询
|
||||||
|
* @param pageInfo 分页
|
||||||
|
* @param firstDate 第一个日期
|
||||||
|
* @param secondDate 第二个日期
|
||||||
|
* @param sortSort 排序的排序
|
||||||
|
* @param sortChangeSort 排序变化的排序
|
||||||
|
*/
|
||||||
|
Page<DongCaiSecondaryIndustry> trendPlate(@Param("page") Page<PageModel> pageInfo,
|
||||||
|
@Param("firstDate")Date firstDate,
|
||||||
|
@Param("secondDate")Date secondDate,
|
||||||
|
@Param("sortSort") String sortSort,
|
||||||
|
@Param("sortChangeSort")String sortChangeSort);-->
|
||||||
|
<select id="trendPlate" resultType="com.ssdmn.biz.gupiao.pojo.domain.DongCaiSecondaryIndustry">
|
||||||
|
select t1.*, t1.sort - t2.sort as sortChange
|
||||||
|
from (select *
|
||||||
|
from dong_cai_secondary_industry
|
||||||
|
where business_date = #{firstDate}
|
||||||
|
) t1
|
||||||
|
left join
|
||||||
|
|
||||||
|
(select * from dong_cai_secondary_industry where business_date = #{secondDate}) t2
|
||||||
|
on t1.security_code = t2.security_code
|
||||||
|
<choose>
|
||||||
|
<when test="sortSort != null and sortSort.trim() != '' and sortChangeSort != null and sortChangeSort.trim() != ''">
|
||||||
|
order by t1.sort ${sortSort},sortChange ${sortChangeSort}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="sortSort != null and sortSort.trim() != '' ">
|
||||||
|
order by t1.sort ${sortSort}
|
||||||
|
</if>
|
||||||
|
<if test="sortChangeSort != null and sortChangeSort.trim() != ''">
|
||||||
|
order by sortChange ${sortChangeSort}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.HighLowOfThreeHundred;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface HighLowOfThreeHundredMapper extends BaseMapper<HighLowOfThreeHundred> {
|
||||||
|
}
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.MyCollect;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.QueryMyCollectPageRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.MyCollectPageResponse;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface MyCollectMapper extends BaseMapper<MyCollect> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人收藏个股查询
|
||||||
|
*
|
||||||
|
* @param pageInfo
|
||||||
|
* @param queryMyCollectPageRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<MyCollectPageResponse> myStockCollectPage(
|
||||||
|
@Param("page") Page<PageModel> pageInfo,
|
||||||
|
@Param("queryMyCollectPageRequest") QueryMyCollectPageRequest queryMyCollectPageRequest,
|
||||||
|
@Param("userId") Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人收藏板块查询
|
||||||
|
*
|
||||||
|
* @param pageInfo
|
||||||
|
* @param queryMyCollectPageRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<MyCollectPageResponse> myBigCollectPage(
|
||||||
|
@Param("page") Page<PageModel> pageInfo,
|
||||||
|
@Param("queryMyCollectPageRequest") QueryMyCollectPageRequest queryMyCollectPageRequest,
|
||||||
|
@Param("userId") Long userId);
|
||||||
|
}
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
<?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.ssdmn.biz.gupiao.mapper.MyCollectMapper">
|
||||||
|
|
||||||
|
<!--板块-1 个股-2-->
|
||||||
|
|
||||||
|
<select id="myStockCollectPage" resultType="com.ssdmn.biz.gupiao.pojo.response.MyCollectPageResponse"
|
||||||
|
parameterType="com.ssdmn.biz.gupiao.pojo.request.QueryMyCollectPageRequest">
|
||||||
|
select ois.*, mc.collect_date
|
||||||
|
from my_collect mc left join
|
||||||
|
original_issue_stock ois on mc.security_code = ois.security_code and mc.security_type = ois.security_type
|
||||||
|
<if test="queryMyCollectPageRequest.dayAndPlateSort != null">
|
||||||
|
left join (
|
||||||
|
select security_code,security_type, count(*) sum from original_issue_stock where rise_stop = '是' and business_date > DATE_sub(DATE(now()), INTERVAL 30 DAY) group by security_code) temp
|
||||||
|
on ois.security_code = temp.security_code and ois.security_type = temp.security_type
|
||||||
|
</if>
|
||||||
|
<where>
|
||||||
|
(mc.security_type != 'EI' and mc.security_name != '上证指数'and mc.security_name != '深证指数'and mc.security_name != '创业板'and mc.security_name != '科创板')
|
||||||
|
and ois.security_code is not null
|
||||||
|
and mc.user_id = #{userId}
|
||||||
|
<if test="queryMyCollectPageRequest.businessDate != null">
|
||||||
|
and ois.business_date = #{queryMyCollectPageRequest.businessDate}
|
||||||
|
</if>
|
||||||
|
<if test="queryMyCollectPageRequest.keyWord != null and queryMyCollectPageRequest.keyWord.trim() != ''">
|
||||||
|
and (ois.security_code like CONCAT('%', #{queryMyCollectPageRequest.keyWord}, '%')
|
||||||
|
or ois.security_name like CONCAT('%', #{queryMyCollectPageRequest.keyWord}, '%'))
|
||||||
|
</if>
|
||||||
|
<if test="queryMyCollectPageRequest.market != null and queryMyCollectPageRequest.market.trim() != ''">
|
||||||
|
and mc.security_type = #{queryMyCollectPageRequest.market}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
group by mc.id
|
||||||
|
<if test = "queryMyCollectPageRequest.dayAndPlateSort != null and queryMyCollectPageRequest.dayAndPlateSort == 1 ">
|
||||||
|
order by temp.sum desc
|
||||||
|
</if>
|
||||||
|
<if test = "queryMyCollectPageRequest.dayAndPlateSort != null and queryMyCollectPageRequest.dayAndPlateSort == 0 ">
|
||||||
|
order by temp.sum
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="myBigCollectPage" resultType="com.ssdmn.biz.gupiao.pojo.response.MyCollectPageResponse"
|
||||||
|
parameterType="com.ssdmn.biz.gupiao.pojo.request.QueryMyCollectPageRequest">
|
||||||
|
select * from (
|
||||||
|
select mc.security_code, mc.security_name,mc.security_type,ois.opening_price,ois.closing_price,ois.highest_price,ois.lowest_price,mc.collect_date
|
||||||
|
from my_collect mc
|
||||||
|
left join original_issue_stock ois
|
||||||
|
on mc.security_code = ois.security_code and mc.security_type = ois.security_type
|
||||||
|
<where> (mc.security_name = '上证指数'
|
||||||
|
or mc.security_name = '深证指数'
|
||||||
|
or mc.security_name = '创业板'
|
||||||
|
or mc.security_name = '科创板')
|
||||||
|
and mc.security_name is not null
|
||||||
|
and mc.user_id = #{userId}
|
||||||
|
<if test="queryMyCollectPageRequest.businessDate != null">
|
||||||
|
and ois.business_date = #{queryMyCollectPageRequest.businessDate}
|
||||||
|
</if>
|
||||||
|
<if test="queryMyCollectPageRequest.keyWord != null and queryMyCollectPageRequest.keyWord.trim() != ''">
|
||||||
|
and (mc.security_code like CONCAT('%', #{queryMyCollectPageRequest.keyWord}, '%')
|
||||||
|
or mc.security_name like CONCAT('%', #{queryMyCollectPageRequest.keyWord}, '%'))
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
group by mc.security_code
|
||||||
|
union all
|
||||||
|
select dcsi.security_code, dcsi.security_name,dcsi.security_type,dcsi.opening_price,dcsi.closing_price,dcsi.highest_price,dcsi.lowest_price,mc.collect_date
|
||||||
|
from my_collect mc
|
||||||
|
left join dong_cai_secondary_industry dcsi
|
||||||
|
on mc.security_code = dcsi.security_code and mc.security_type = dcsi.security_type
|
||||||
|
<where>
|
||||||
|
dcsi.security_name is not null and mc.user_id = #{userId}
|
||||||
|
<if test="queryMyCollectPageRequest.businessDate != null">
|
||||||
|
and dcsi.business_date = #{queryMyCollectPageRequest.businessDate}
|
||||||
|
</if>
|
||||||
|
<if test="queryMyCollectPageRequest.keyWord != null and queryMyCollectPageRequest.keyWord.trim() != ''">
|
||||||
|
and (mc.security_code like CONCAT('%', #{queryMyCollectPageRequest.keyWord}, '%')
|
||||||
|
or mc.security_name like CONCAT('%', #{queryMyCollectPageRequest.keyWord}, '%'))
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
group by mc.security_code
|
||||||
|
) as temp
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.OriginalIssueStock;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.DayAndPlate;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface OriginalIssueStockMapper extends BaseMapper<OriginalIssueStock> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计几天几板
|
||||||
|
* @param businessDate 日期
|
||||||
|
* @param securityCodeSet 股票code集合
|
||||||
|
*/
|
||||||
|
List<DayAndPlate> statisticsDayAndPlate(@Param("businessDate") Date businessDate , @Param("securityCodeSet") Set<String> securityCodeSet);
|
||||||
|
|
||||||
|
|
||||||
|
Page<OriginalIssueStock> findPage(@Param("page") Page<PageModel> pageInfo,
|
||||||
|
@Param("businessDate") Date businessDate,
|
||||||
|
@Param("securityType") String securityType,
|
||||||
|
@Param("riseOrLosses") Integer riseOrLosses,
|
||||||
|
@Param("dayAndPlateSort") Integer dayAndPlateSort,
|
||||||
|
@Param("dongCaiIndustryIndexCode2") String dongCaiIndustryIndexCode2,
|
||||||
|
@Param("keyWord") String keyWord);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
<?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.ssdmn.biz.gupiao.mapper.OriginalIssueStockMapper">
|
||||||
|
|
||||||
|
<!--/**
|
||||||
|
* 统计几天几板
|
||||||
|
* @param businessDate 日期
|
||||||
|
* @param securityCodeList 股票code集合
|
||||||
|
*/
|
||||||
|
List<DayAndPlate> statisticsDayAndPlate(@Param("businessDate") Date businessDate , @Param("securityCodeList") List<String> securityCodeList);
|
||||||
|
-->
|
||||||
|
<select id="statisticsDayAndPlate" resultType="com.ssdmn.biz.gupiao.pojo.response.DayAndPlate">
|
||||||
|
select security_code securityCode,
|
||||||
|
count(*) dayNumber,
|
||||||
|
(select count(*)
|
||||||
|
from original_issue_stock
|
||||||
|
where security_code = securityCode
|
||||||
|
and rise_stop = '是'
|
||||||
|
and business_date > #{businessDate}) plate
|
||||||
|
from original_issue_stock
|
||||||
|
where security_code in (
|
||||||
|
<foreach collection="securityCodeSet" item="code" separator=",">
|
||||||
|
#{code}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
and business_date > #{businessDate}
|
||||||
|
group by security_code
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--PageList<OriginalIssueStock> findPage()-->
|
||||||
|
<select id="findPage" resultType="com.ssdmn.biz.gupiao.pojo.domain.OriginalIssueStock">
|
||||||
|
select ois.*
|
||||||
|
from original_issue_stock ois
|
||||||
|
<if test="dayAndPlateSort != null">
|
||||||
|
left join (
|
||||||
|
select security_code, count(*) sum from original_issue_stock where rise_stop = '是' and business_date > DATE_sub(DATE(now()), INTERVAL 30 DAY) group by security_code) temp
|
||||||
|
on ois.security_code = temp.security_code
|
||||||
|
</if>
|
||||||
|
<where>
|
||||||
|
<if test="businessDate != null ">
|
||||||
|
and ois.business_date = #{businessDate}
|
||||||
|
</if>
|
||||||
|
<if test="dongCaiIndustryIndexCode2 != null and dongCaiIndustryIndexCode2.trim() != ''">
|
||||||
|
and ois.dong_cai_industry_index_code2 = #{dongCaiIndustryIndexCode2}
|
||||||
|
</if>
|
||||||
|
<if test="riseOrLosses != null and riseOrLosses == 1">
|
||||||
|
and ois.rise_stop = '是'
|
||||||
|
</if>
|
||||||
|
<if test="riseOrLosses != null and riseOrLosses == 0">
|
||||||
|
and ois.losses_stop = '是'
|
||||||
|
</if>
|
||||||
|
<if test="securityType != null and securityType.trim() != '' ">
|
||||||
|
and ois.security_type = #{securityType}
|
||||||
|
</if>
|
||||||
|
<if test="keyWord != null and keyWord.trim() != ''">
|
||||||
|
and (ois.security_code like concat('%',#{keyWord},'%') or
|
||||||
|
ois.security_name like concat('%',#{keyWord},'%') or
|
||||||
|
ois.dong_cai_industry_index_level2 like concat('%',#{keyWord},'%') or
|
||||||
|
ois.dong_cai_industry_index_code2 like concat('%',#{keyWord},'%'))
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
<if test = "dayAndPlateSort != null and dayAndPlateSort == 1">
|
||||||
|
order by temp.sum desc
|
||||||
|
</if>
|
||||||
|
<if test = "dayAndPlateSort != null and dayAndPlateSort == 0">
|
||||||
|
order by temp.sum
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.StockName;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface StockNameMapper extends BaseMapper<StockName> {
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.TransactionRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TransactionRecordMapper extends BaseMapper<TransactionRecord> {
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.TransactionRecordTemp;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.QueryBuyOrSell;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TransactionRecordTempMapper extends BaseMapper<TransactionRecordTemp> {
|
||||||
|
|
||||||
|
List<QueryBuyOrSell> queryBuyOrSell( @Param("userId") Long userId,
|
||||||
|
@Param("extreme") String extreme,
|
||||||
|
@Param("transactionCategory") String transactionCategory,
|
||||||
|
@Param("startDate") Date startDate,
|
||||||
|
@Param("endDate") Date endDate);
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<?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.ssdmn.biz.gupiao.mapper.TransactionRecordTempMapper">
|
||||||
|
|
||||||
|
<select id="queryBuyOrSell" resultType="com.ssdmn.biz.gupiao.pojo.response.QueryBuyOrSell">
|
||||||
|
select rc.security_code,t.buyMoney ,rc.transaction_date,rc.security_name,rc.security_type,rc.transaction_price,sn.dong_cai_security_code,sn.dong_cai_security_name
|
||||||
|
from transaction_record rc
|
||||||
|
join (select security_code, ${extreme}(id) id, sum(transaction_amount) buyMoney
|
||||||
|
from transaction_record
|
||||||
|
<where>
|
||||||
|
user_id = #{userId}
|
||||||
|
<if test="transactionCategory != null and transactionCategory.trim() != '' ">
|
||||||
|
and transaction_category = #{transactionCategory}
|
||||||
|
</if>
|
||||||
|
<if test="startDate != null and endDate != null">
|
||||||
|
and transaction_date between #{startDate} and #{endDate}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
group by security_code) t on rc.id = t.id
|
||||||
|
left join stock_name sn on rc.security_code = sn.security_code
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,132 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.domain;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 东财二级行业指数每日成交情况
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/7 15:20
|
||||||
|
*/
|
||||||
|
@TableName("dong_cai_secondary_industry")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class DongCaiSecondaryIndustry {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("排名(序号)")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
@ExcelProperty(index = 0)
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
@ExcelProperty(index = 1)
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("成份个数")
|
||||||
|
@ExcelProperty(index = 2)
|
||||||
|
private Integer numberIngredients;
|
||||||
|
|
||||||
|
@ApiModelProperty("开盘价")
|
||||||
|
@ExcelProperty(index = 3)
|
||||||
|
private BigDecimal openingPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("收盘价")
|
||||||
|
@ExcelProperty(index = 4)
|
||||||
|
private BigDecimal closingPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交量(股)")
|
||||||
|
@ExcelProperty(index = 5)
|
||||||
|
private BigDecimal volume;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交额(百万元)")
|
||||||
|
@ExcelProperty(index = 6)
|
||||||
|
private BigDecimal turnover;
|
||||||
|
|
||||||
|
@ApiModelProperty("总市值(百万元)")
|
||||||
|
@ExcelProperty(index = 7)
|
||||||
|
private BigDecimal totalCapitalization;
|
||||||
|
|
||||||
|
@ApiModelProperty("自由流通市值(百万元)")
|
||||||
|
@ExcelProperty(index = 8)
|
||||||
|
private BigDecimal freeCapitalization;
|
||||||
|
|
||||||
|
@ApiModelProperty("涨跌幅(%)")
|
||||||
|
@ExcelProperty(index = 9)
|
||||||
|
private BigDecimal changePercentage;
|
||||||
|
|
||||||
|
@ApiModelProperty("最高价")
|
||||||
|
@ExcelProperty(index = 10)
|
||||||
|
private BigDecimal highestPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("最低价")
|
||||||
|
@ExcelProperty(index = 11)
|
||||||
|
private BigDecimal lowestPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("上涨家数")
|
||||||
|
@ExcelProperty(index = 12)
|
||||||
|
private String riseNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("下跌家数")
|
||||||
|
@ExcelProperty(index = 13)
|
||||||
|
private String lossesNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("平盘家数")
|
||||||
|
@ExcelProperty(index = 14)
|
||||||
|
private String flatNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("涨停家数")
|
||||||
|
@ExcelProperty(index = 15)
|
||||||
|
private String riseStopNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("跌停家数")
|
||||||
|
@ExcelProperty(index = 16)
|
||||||
|
private String lossesStopNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("停牌家数")
|
||||||
|
@ExcelProperty(index = 17)
|
||||||
|
private String stopNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("近期创历史新高")
|
||||||
|
@ExcelProperty(index = 18)
|
||||||
|
private String recentlyHigh;
|
||||||
|
|
||||||
|
@ApiModelProperty("近期创历史新低")
|
||||||
|
@ExcelProperty(index = 19)
|
||||||
|
private String recentlyLow;
|
||||||
|
|
||||||
|
@ApiModelProperty("市盈率PE(TTM)")
|
||||||
|
@ExcelProperty(index = 20)
|
||||||
|
private String peTtm;
|
||||||
|
|
||||||
|
@ApiModelProperty("市盈率PE中位值(TTM)")
|
||||||
|
@ExcelProperty(index = 21)
|
||||||
|
private String peCenterTtm;
|
||||||
|
|
||||||
|
@ApiModelProperty("排序变化")
|
||||||
|
@TableField(exist=false)
|
||||||
|
private Integer sortChange;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.domain;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 创300天新高新低
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/7 15:39
|
||||||
|
*/
|
||||||
|
@TableName("high_low_of_three_hundred")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class HighLowOfThreeHundred {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
private Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
@ExcelProperty(index = 0)
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
@ExcelProperty(index = 1)
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("开盘价")
|
||||||
|
@ExcelProperty(index = 2)
|
||||||
|
private BigDecimal openingPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("收盘价")
|
||||||
|
@ExcelProperty(index = 3)
|
||||||
|
private BigDecimal closingPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("最高价")
|
||||||
|
@ExcelProperty(index = 4)
|
||||||
|
private BigDecimal highestPrice;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("涨跌幅(%)")
|
||||||
|
@ExcelProperty(index = 5)
|
||||||
|
private BigDecimal changePercentage;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交量(股)")
|
||||||
|
@ExcelProperty(index = 6)
|
||||||
|
private String volume;
|
||||||
|
|
||||||
|
@ApiModelProperty("近期创阶段新高最新[近1日内]")
|
||||||
|
@ExcelProperty(index = 7)
|
||||||
|
private String recentlyHigh;
|
||||||
|
|
||||||
|
@ApiModelProperty("东财行业指数2级")
|
||||||
|
@ExcelProperty(index = 8)
|
||||||
|
private String dongCaiIndustryIndexLevel2;
|
||||||
|
|
||||||
|
@ApiModelProperty("区间最高价日")
|
||||||
|
@ExcelProperty(index = 9)
|
||||||
|
private String highestPriceOfRange;
|
||||||
|
|
||||||
|
@ApiModelProperty("上市天数")
|
||||||
|
@ExcelProperty(index = 10)
|
||||||
|
private Integer dayOnMarket;
|
||||||
|
|
||||||
|
@ApiModelProperty("近期创阶段新低")
|
||||||
|
@ExcelProperty(index = 11)
|
||||||
|
private String hitLowRecently;
|
||||||
|
|
||||||
|
@ApiModelProperty("区间最低价日")
|
||||||
|
@ExcelProperty(index = 12)
|
||||||
|
private String lowestPriceRange;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否为ST股票 1-是 0-否")
|
||||||
|
@ExcelProperty(index = 13)
|
||||||
|
private String isStStock;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否为*ST股票 1-是 0-否")
|
||||||
|
@ExcelProperty(index = 14)
|
||||||
|
private String isStarStStock;
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 我的收藏
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 6:04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("my_collect")
|
||||||
|
public class MyCollect {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("用户Id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty("股票Code")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("股票名称")
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("收藏日期")
|
||||||
|
private Date collectDate;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,133 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.domain;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 动量原始股
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/7 14:59
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("original_issue_stock")
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class OriginalIssueStock {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8" )
|
||||||
|
private Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("排名(序号)")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
@ExcelProperty(index = 0)
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
@ExcelProperty(index = 1)
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("开盘价")
|
||||||
|
@ExcelProperty(index = 2)
|
||||||
|
private BigDecimal openingPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("收盘价")
|
||||||
|
@ExcelProperty(index = 3)
|
||||||
|
private BigDecimal closingPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("最高价")
|
||||||
|
@ExcelProperty(index = 4)
|
||||||
|
private BigDecimal highestPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("最低价")
|
||||||
|
@ExcelProperty(index = 5)
|
||||||
|
private BigDecimal lowestPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("当日涨跌幅")
|
||||||
|
@ExcelProperty(index = 6)
|
||||||
|
private BigDecimal riseLossesCurrentDay;
|
||||||
|
|
||||||
|
@ApiModelProperty("东财行业指数2级")
|
||||||
|
@ExcelProperty(index = 7)
|
||||||
|
private String dongCaiIndustryIndexLevel2;
|
||||||
|
|
||||||
|
@ApiModelProperty("20日区间涨跌幅")
|
||||||
|
@ExcelProperty(index = 8)
|
||||||
|
private BigDecimal rangeRiseLosses20;
|
||||||
|
|
||||||
|
@ApiModelProperty("10日区间涨跌幅")
|
||||||
|
@ExcelProperty(index = 9)
|
||||||
|
private BigDecimal rangeRiseLosses10;
|
||||||
|
|
||||||
|
@ApiModelProperty("60日区间涨跌幅")
|
||||||
|
@ExcelProperty(index = 10)
|
||||||
|
private BigDecimal rangeRiseLosses60;
|
||||||
|
|
||||||
|
@ApiModelProperty("首发上市日期")
|
||||||
|
@ExcelProperty(index = 11)
|
||||||
|
private Date initialListingDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("可交易日数")
|
||||||
|
@ExcelProperty(index = 12)
|
||||||
|
private Integer numberDaysAvailable;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交量")
|
||||||
|
@ExcelProperty(index = 13)
|
||||||
|
private String volume;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交额")
|
||||||
|
@ExcelProperty(index = 14)
|
||||||
|
private String turnover;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属东财行业指数代码[行业类别]2级")
|
||||||
|
@ExcelProperty(index = 15)
|
||||||
|
private String dongCaiIndustryIndexCode2;
|
||||||
|
|
||||||
|
@ApiModelProperty("自由流通市值")
|
||||||
|
@ExcelProperty(index = 16)
|
||||||
|
private String freeCapitalization;
|
||||||
|
|
||||||
|
@ApiModelProperty("20日区间平均成交量")
|
||||||
|
@ExcelProperty(index = 17)
|
||||||
|
private String averageVolumeDay20;
|
||||||
|
|
||||||
|
@ApiModelProperty("机构持仓合计")
|
||||||
|
@ExcelProperty(index = 18)
|
||||||
|
private String totalInstitutionalPositions;
|
||||||
|
|
||||||
|
@ApiModelProperty("东财行业指数3级")
|
||||||
|
@ExcelProperty(index = 19)
|
||||||
|
private String dongCaiIndustryIndexLevel3;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否涨停 1-是 0-否")
|
||||||
|
@ExcelProperty(index = 20)
|
||||||
|
private String riseStop;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否跌停 1-是 0-否")
|
||||||
|
@ExcelProperty(index = 21)
|
||||||
|
private String lossesStop;
|
||||||
|
|
||||||
|
@ApiModelProperty("几天几板")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dayAndPlate;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 股票表
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 6:05
|
||||||
|
*/
|
||||||
|
@TableName("stock_name")
|
||||||
|
@Data
|
||||||
|
public class StockName {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("'来源数据库表名'")
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
@ApiModelProperty("东财")
|
||||||
|
private String dongCaiSecurityCode;
|
||||||
|
private String dongCaiSecurityName;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
StockName that = (StockName) o;
|
||||||
|
return securityCode.equals(that.securityCode) && securityType.equals(that.securityType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(securityCode, securityType);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 交易记录
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 19:19
|
||||||
|
*/
|
||||||
|
@TableName("transaction_record")
|
||||||
|
@Data
|
||||||
|
public class TransactionRecord {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("用户Id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty("交易日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date transactionDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("交易时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date transactionTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交价")
|
||||||
|
private BigDecimal transactionPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交量")
|
||||||
|
private BigDecimal volume;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交金额")
|
||||||
|
private BigDecimal transactionAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty("手续费")
|
||||||
|
private BigDecimal premium;
|
||||||
|
|
||||||
|
@ApiModelProperty("手续费率")
|
||||||
|
private BigDecimal premiumRatio;
|
||||||
|
|
||||||
|
@ApiModelProperty("交易类型")
|
||||||
|
private String transactionCategory;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 个人盈亏临时表
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/10 21:31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("transaction_record_temp")
|
||||||
|
public class TransactionRecordTemp {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("用户Id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("东财行业指数2级")
|
||||||
|
private String dongCaiIndustryIndexLevel2;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属东财行业指数代码[行业类别]2级")
|
||||||
|
private String dongCaiIndustryIndexCode2;
|
||||||
|
|
||||||
|
@ApiModelProperty("总收益")
|
||||||
|
private BigDecimal totalMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty("买入日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8" )
|
||||||
|
private Date buyDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("买入价格")
|
||||||
|
private BigDecimal buyPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("卖出日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8" )
|
||||||
|
private Date sellDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("卖出价格")
|
||||||
|
private BigDecimal sellPrice;
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 余洲
|
||||||
|
* @Date 2023/5/6 8:28
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BigStockDataRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("日期")
|
||||||
|
private LocalDate localDate;
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 收益折线图
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/11 20:02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BrokenLineRequest {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import com.ssdmn.common.page.QueryField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/30 20:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DongCaiRiseLossesRequest {
|
||||||
|
|
||||||
|
PageModel pageModel;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@QueryField
|
||||||
|
Date businessDate;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
@QueryField
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("涨停 - 1 ,跌停 - 0")
|
||||||
|
Integer riseOrLosses;
|
||||||
|
|
||||||
|
@ApiModelProperty("几天几板排序:升序-1 ,降序 - 0")
|
||||||
|
private Integer dayAndPlateSort;
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import com.ssdmn.common.page.QueryField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/7 23:59
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DongCaiSecondaryIndustryRequest {
|
||||||
|
|
||||||
|
PageModel pageModel;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@QueryField
|
||||||
|
Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("趋势类型 1-当日趋势 5-趋势 10-趋势 15-趋势 20-趋势 30-趋势")
|
||||||
|
Integer trendType;
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 收益折线图
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/10 23:03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class EarningsLineRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "收益率-1,收益金额-2",required = true)
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty("时间类型 1-三个月 2-一年")
|
||||||
|
private Integer timeType;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/7 23:59
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class HighLowOfThreeHundredRequest extends PageModel {
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/11 10:52
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class KLineRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("股票类型:上证-SZ, 深证-SH,创业板-30,科创版-688")
|
||||||
|
String securityType;
|
||||||
|
@ApiModelProperty("股票Code")
|
||||||
|
String securityCode;
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 我的收藏
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 12:25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MyCollectRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
private String securityType;
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ssdmn.common.page.QueryField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 个股详情查询
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 6:37
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OriginalIssueStockDetail {
|
||||||
|
|
||||||
|
@ApiModelProperty("股票代码或名称")
|
||||||
|
@QueryField
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("股票代码或名称")
|
||||||
|
@QueryField
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@QueryField
|
||||||
|
Date businessDate;
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import com.ssdmn.common.page.QueryField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 个股详情分页查询
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/8 22:49
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OriginalIssueStockDetailPage {
|
||||||
|
|
||||||
|
PageModel pageModel;
|
||||||
|
|
||||||
|
@ApiModelProperty("股票代码或名称")
|
||||||
|
private String keyWord;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@QueryField
|
||||||
|
Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
@QueryField
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("几天几板排序:升序-1 ,降序 - 0")
|
||||||
|
private Integer dayAndPlateSort;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ssdmn.common.page.QueryField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/7 23:58
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OriginalIssueStockRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@QueryField
|
||||||
|
Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
@QueryField
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("股票类型 上证-SZ, 深证-SH,创业板-30,科创版-688 ")
|
||||||
|
@QueryField
|
||||||
|
String securityType;
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import com.ssdmn.common.page.QueryField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 分页查询原始服
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/8 22:36
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OriginalIssueStockRequestPage {
|
||||||
|
|
||||||
|
PageModel pageModel;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@QueryField
|
||||||
|
Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("股票类型 上证-SZ, 深证-SH,创业板-30,科创版-688")
|
||||||
|
@QueryField
|
||||||
|
String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
@QueryField
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("涨停 - 1 ,跌停 - 0")
|
||||||
|
Integer riseOrLosses;
|
||||||
|
|
||||||
|
@ApiModelProperty("几天几板排序:升序-1 ,降序 - 0")
|
||||||
|
private Integer dayAndPlateSort;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import com.ssdmn.common.page.QueryField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 盈亏查询
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/10 22:10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ProfitAndLossRequest {
|
||||||
|
|
||||||
|
PageModel pageModel;
|
||||||
|
|
||||||
|
@ApiModelProperty("关键字查询")
|
||||||
|
private String keyWord;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
@QueryField
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("盈利-1 亏损 -0")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty("开始时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
Date startDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("结束时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
Date endDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "金额排序 1-升序 0-降序",example = "1")
|
||||||
|
private Integer sortAmount;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.ssdmn.common.page.QueryField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 6:13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QueryIsCollectRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("股票code")
|
||||||
|
@QueryField
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("股票类型")
|
||||||
|
@QueryField
|
||||||
|
private String securityType;
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import com.ssdmn.common.page.QueryField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 6:13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QueryMyCollectPageRequest {
|
||||||
|
|
||||||
|
PageModel pageModel;
|
||||||
|
|
||||||
|
@ApiModelProperty("股票代码或名称")
|
||||||
|
private String keyWord;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@QueryField
|
||||||
|
Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属于大盘")
|
||||||
|
private String market;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "板块-1 个股-2",required = true)
|
||||||
|
private Integer plateOrA;
|
||||||
|
|
||||||
|
@ApiModelProperty("几天几板排序:升序-1 ,降序 - 0")
|
||||||
|
private Integer dayAndPlateSort;
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 交易记录导入实体类
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 21:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class TransactionRecordImport {
|
||||||
|
|
||||||
|
@ApiModelProperty("交易日期")
|
||||||
|
@ExcelProperty(index = 0)
|
||||||
|
private String transactionDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
@ExcelProperty(index = 1)
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
@ExcelProperty(index = 2)
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交价")
|
||||||
|
@ExcelProperty(index = 3)
|
||||||
|
private BigDecimal transactionPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交量")
|
||||||
|
@ExcelProperty(index = 4)
|
||||||
|
private BigDecimal volume;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交金额")
|
||||||
|
@ExcelProperty(index = 5)
|
||||||
|
private BigDecimal transactionAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty("手续费")
|
||||||
|
@ExcelProperty(index = 6)
|
||||||
|
private String premium;
|
||||||
|
|
||||||
|
@ApiModelProperty("交易类型")
|
||||||
|
@ExcelProperty(index = 7)
|
||||||
|
private String transactionCategory;
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
import com.ssdmn.common.page.QueryField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 交易记录分页查询
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 20:02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class TransactionRecordPageRequest {
|
||||||
|
|
||||||
|
PageModel pageModel;
|
||||||
|
|
||||||
|
@ApiModelProperty("股票代码或名称")
|
||||||
|
private String keyWord;
|
||||||
|
|
||||||
|
@ApiModelProperty("交易日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@QueryField
|
||||||
|
private Date transactionDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("交易类型")
|
||||||
|
@QueryField
|
||||||
|
private String transactionCategory;
|
||||||
|
|
||||||
|
@ApiModelProperty("起止时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("截止时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("近几天")
|
||||||
|
private Integer num;
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.DongCaiSecondaryIndustry;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.OriginalIssueStock;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: app大盘信息详情
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/18 22:47
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppBigDetailVO {
|
||||||
|
|
||||||
|
DongCaiSecondaryIndustry dongCaiSecondaryIndustry;
|
||||||
|
|
||||||
|
@ApiModelProperty("成份个数")
|
||||||
|
int size ;
|
||||||
|
|
||||||
|
@ApiModelProperty("涨")
|
||||||
|
long rise ;
|
||||||
|
|
||||||
|
@ApiModelProperty("跌")
|
||||||
|
long losses ;
|
||||||
|
|
||||||
|
@ApiModelProperty("平")
|
||||||
|
long flat ;
|
||||||
|
|
||||||
|
@ApiModelProperty("涨停")
|
||||||
|
long riseStop;
|
||||||
|
|
||||||
|
@ApiModelProperty("跌停")
|
||||||
|
long lossesStop;
|
||||||
|
|
||||||
|
@ApiModelProperty("停牌")
|
||||||
|
long suspension;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: app-大盘信息-个股信息涨跌统计
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/11 22:13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppRiseLossesResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("结果集")
|
||||||
|
List<AppRiseLossesStatistics> list;
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: app-大盘信息-个股信息涨跌统计
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/11 22:13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppRiseLossesStatistics {
|
||||||
|
|
||||||
|
@ApiModelProperty("涨")
|
||||||
|
private Integer riseNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("跌")
|
||||||
|
private Integer lossesNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("平")
|
||||||
|
private Integer equalNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("总金额")
|
||||||
|
private BigDecimal totalAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
private String securityName;
|
||||||
|
}
|
||||||
@ -0,0 +1,75 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 余洲
|
||||||
|
* @Date 2023/5/6 8:34
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BigStockDataDetailResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("值")
|
||||||
|
private String value = "3238.68";
|
||||||
|
|
||||||
|
@ApiModelProperty("值改变类型 0-下跌 1-上升")
|
||||||
|
private Integer valueChangeType = 1;
|
||||||
|
|
||||||
|
@ApiModelProperty("改变的值")
|
||||||
|
private Double valueChangeValue = 6.7D;
|
||||||
|
|
||||||
|
@ApiModelProperty("值改变类型 0-下跌 1-上升")
|
||||||
|
private Integer percentageChangeType = 1;
|
||||||
|
|
||||||
|
@ApiModelProperty("百分比改变的值")
|
||||||
|
private Double percentageChangeValue = 0.21;
|
||||||
|
|
||||||
|
@ApiModelProperty("开盘价")
|
||||||
|
private Double openPrice = 3213.62;
|
||||||
|
|
||||||
|
@ApiModelProperty("收盘价")
|
||||||
|
private Double closePrice = 3238.68;
|
||||||
|
|
||||||
|
@ApiModelProperty("量")
|
||||||
|
private Double num = 1.48;
|
||||||
|
|
||||||
|
@ApiModelProperty("额")
|
||||||
|
private Double price = 1919D;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode = "000001";
|
||||||
|
|
||||||
|
@ApiModelProperty("交易日期")
|
||||||
|
private LocalDate tradeDate = LocalDate.now();
|
||||||
|
|
||||||
|
@ApiModelProperty("最高价")
|
||||||
|
private Double maxPrice = 3270.54;
|
||||||
|
|
||||||
|
@ApiModelProperty("最低价")
|
||||||
|
private Double minPrice = 3210.54;
|
||||||
|
|
||||||
|
@ApiModelProperty("涨跌幅")
|
||||||
|
private Double chg = 5D;
|
||||||
|
|
||||||
|
@ApiModelProperty("10日涨跌幅")
|
||||||
|
private Double chgWith10 = 10D;
|
||||||
|
|
||||||
|
@ApiModelProperty("20日涨跌幅")
|
||||||
|
private Double chgWith20 = 20D;
|
||||||
|
|
||||||
|
@ApiModelProperty("60日涨跌幅")
|
||||||
|
private Double chgWith60 = 30D;
|
||||||
|
|
||||||
|
@ApiModelProperty("流通")
|
||||||
|
private Double circulate = 42.46;
|
||||||
|
|
||||||
|
@ApiModelProperty("20日区间平均交易量")
|
||||||
|
private Double averageTradeWith20 = 60D;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否收藏 0-否 1-是")
|
||||||
|
private Integer isCollect = 0;
|
||||||
|
}
|
||||||
@ -0,0 +1,75 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 余洲
|
||||||
|
* @Date 2023/5/6 8:34
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BigStockDataDetailResponseBak {
|
||||||
|
|
||||||
|
@ApiModelProperty("值")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@ApiModelProperty("值改变类型 0-下跌 1-上升")
|
||||||
|
private Integer valueChangeType;
|
||||||
|
|
||||||
|
@ApiModelProperty("改变的值")
|
||||||
|
private Double valueChangeValue;
|
||||||
|
|
||||||
|
@ApiModelProperty("值改变类型 0-下跌 1-上升")
|
||||||
|
private Integer percentageChangeType;
|
||||||
|
|
||||||
|
@ApiModelProperty("百分比改变的值")
|
||||||
|
private Double percentageChangeValue;
|
||||||
|
|
||||||
|
@ApiModelProperty("开盘价")
|
||||||
|
private Double openPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("收盘价")
|
||||||
|
private Double closePrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("量")
|
||||||
|
private Integer num;
|
||||||
|
|
||||||
|
@ApiModelProperty("额")
|
||||||
|
private Integer price;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("交易日期")
|
||||||
|
private LocalDate tradeDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("最高价")
|
||||||
|
private Double maxPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("最低价")
|
||||||
|
private Double minPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("涨跌幅")
|
||||||
|
private Double chg;
|
||||||
|
|
||||||
|
@ApiModelProperty("10日涨跌幅")
|
||||||
|
private Double chgWith10;
|
||||||
|
|
||||||
|
@ApiModelProperty("20日涨跌幅")
|
||||||
|
private Double chgWith20;
|
||||||
|
|
||||||
|
@ApiModelProperty("60日涨跌幅")
|
||||||
|
private Double chgWith60;
|
||||||
|
|
||||||
|
@ApiModelProperty("流通")
|
||||||
|
private Double circulate;
|
||||||
|
|
||||||
|
@ApiModelProperty("20日区间平均交易量")
|
||||||
|
private Double averageTradeWith20;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否收藏 0-否 1-是")
|
||||||
|
private Integer isCollect;
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 余洲
|
||||||
|
* @Date 2023/5/6 8:34
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BigStockDataResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("涨")
|
||||||
|
private Integer riseNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("跌")
|
||||||
|
private Integer lossesNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("平")
|
||||||
|
private Integer equalNum;
|
||||||
|
|
||||||
|
private List<String> xAxis;
|
||||||
|
|
||||||
|
private List<Integer> data;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否收藏 0-否 1-是")
|
||||||
|
private Integer isCollect;
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 几天几版
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/11 19:03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DayAndPlate {
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("天数")
|
||||||
|
private String dayNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("板数")
|
||||||
|
private String plate;
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/8 0:23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DongCaiSecondaryIndustryResponse {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8" )
|
||||||
|
private Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("排名")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@ApiModelProperty("板块排名变化")
|
||||||
|
private Integer plateUpOrDown;
|
||||||
|
|
||||||
|
@ApiModelProperty("排名变化")
|
||||||
|
private Integer sortChange;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
public Integer getPlateUpOrDown() {
|
||||||
|
if(ObjectUtil.isEmpty(plateUpOrDown)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return plateUpOrDown;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSortChange() {
|
||||||
|
if(ObjectUtil.isEmpty(sortChange)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return sortChange;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 收益拆线图
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/10 23:03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class EarningsLineResponse {
|
||||||
|
|
||||||
|
// @ApiModelProperty("日期列表")
|
||||||
|
// List<String> businessDateList;
|
||||||
|
//
|
||||||
|
// @ApiModelProperty("数据列表")
|
||||||
|
// List<BigDecimal> valueList;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.OriginalIssueStock;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 6:24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MyCollectPageResponse extends OriginalIssueStock {
|
||||||
|
|
||||||
|
@ApiModelProperty("股票ID")
|
||||||
|
private String stockId;
|
||||||
|
|
||||||
|
@ApiModelProperty("收藏日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8" )
|
||||||
|
private Date collectDate;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.OriginalIssueStock;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/10 15:11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OriginalIssueStockDetailResponse extends OriginalIssueStock {
|
||||||
|
|
||||||
|
@ApiModelProperty("是否收藏 1-是")
|
||||||
|
private Integer isCollect;
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/8 0:47
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OriginalIssueStockResponse {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8" )
|
||||||
|
private Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("开盘价")
|
||||||
|
private BigDecimal openingPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("当日涨跌幅")
|
||||||
|
private BigDecimal riseLossesCurrentDay;
|
||||||
|
|
||||||
|
@ApiModelProperty("东财行业指数2级")
|
||||||
|
private String dongCaiIndustryIndexLevel2;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 个股排名变化
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/9 6:46
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OriginalIssueStockSortResponseChange {
|
||||||
|
|
||||||
|
private List<String> xAxis;
|
||||||
|
private List<Integer> yAxis;
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/10 21:47
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QueryBuyOrSell {
|
||||||
|
|
||||||
|
@ApiModelProperty("交易日期")
|
||||||
|
private Date transactionDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券代码")
|
||||||
|
private String securityCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券名称")
|
||||||
|
private String securityName;
|
||||||
|
|
||||||
|
@ApiModelProperty("证券类型")
|
||||||
|
private String securityType;
|
||||||
|
|
||||||
|
@ApiModelProperty("买入总数")
|
||||||
|
private BigDecimal buyMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交价")
|
||||||
|
private BigDecimal transactionPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("东财")
|
||||||
|
private String dongCaiSecurityCode;
|
||||||
|
private String dongCaiSecurityName;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 余洲
|
||||||
|
* @Date 2023/5/6 8:34
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SectorTrendsDataResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("交易日期")
|
||||||
|
private LocalDate tradeDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("板块名称")
|
||||||
|
private String blockName;
|
||||||
|
|
||||||
|
@ApiModelProperty("板块排名")
|
||||||
|
private Integer blockRankNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("改变类型 0-下跌 1-上升")
|
||||||
|
private Integer changeType;
|
||||||
|
|
||||||
|
@ApiModelProperty("改变的值")
|
||||||
|
private Integer changeValue;
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/10 19:34
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StockKLineResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("数据")
|
||||||
|
List<StockKLineVO> valueCollect;
|
||||||
|
|
||||||
|
@ApiModelProperty("日期")
|
||||||
|
List<String> keyCollect;
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 首页k线图
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/10 19:04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StockKLineVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8" )
|
||||||
|
private Date businessDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("开盘价")
|
||||||
|
private BigDecimal openingPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("收盘价")
|
||||||
|
private BigDecimal closingPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("最高价")
|
||||||
|
private BigDecimal highestPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("最低价")
|
||||||
|
private BigDecimal lowestPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("当日涨跌幅")
|
||||||
|
private BigDecimal riseLossesCurrentDay;
|
||||||
|
|
||||||
|
@ApiModelProperty("成交额")
|
||||||
|
private String turnover;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.pojo.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 总收益
|
||||||
|
* @Author: fan
|
||||||
|
* @Version: 1.0
|
||||||
|
* @CreateTime: 2023/5/10 12:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class TotalEarningsResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("总盈亏")
|
||||||
|
private BigDecimal totalEarnings;
|
||||||
|
|
||||||
|
@ApiModelProperty("收益率")
|
||||||
|
private BigDecimal earningsRate;
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.DongCaiSecondaryIndustry;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.OriginalIssueStock;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.DongCaiRiseLossesRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.DongCaiSecondaryIndustryRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.BigStockDataResponse;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.DongCaiSecondaryIndustryResponse;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.OriginalIssueStockSortResponseChange;
|
||||||
|
import com.ssdmn.common.interceptor.UserCache;
|
||||||
|
import com.ssdmn.common.page.PageList;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface DongCaiSecondaryIndustryService extends IService<DongCaiSecondaryIndustry> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*
|
||||||
|
* @param cachedDataList
|
||||||
|
*/
|
||||||
|
void importExcel(List<DongCaiSecondaryIndustry> cachedDataList,Date businessDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 趋势板块
|
||||||
|
*
|
||||||
|
* @param dongCaiSecondaryIndustryRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageList<DongCaiSecondaryIndustryResponse> trendPlate(DongCaiSecondaryIndustryRequest dongCaiSecondaryIndustryRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 板块排名变化
|
||||||
|
* @param securityCode code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
OriginalIssueStockSortResponseChange dongCaiSortChange(String securityCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 块板k线图
|
||||||
|
* @param securityCode 板块code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Object[] dongCaiKLine(String securityCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 块板涨跌区域统计
|
||||||
|
* @param securityCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BigStockDataResponse dongCaiRiseLossesStatistics(UserCache userCache,String securityCode, Date day);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 块板涨/跌停个股
|
||||||
|
*/
|
||||||
|
PageList<OriginalIssueStock> dongCaiRiseLosses(DongCaiRiseLossesRequest dongCaiRiseLossesRequest);
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.service;
|
||||||
|
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.HighLowOfThreeHundred;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface HighLowOfThreeHundredService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*
|
||||||
|
* @param cachedDataList
|
||||||
|
*/
|
||||||
|
void importExcel(List<HighLowOfThreeHundred> cachedDataList, Date businessDate);
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.MyCollect;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.MyCollectRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.QueryIsCollectRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.QueryMyCollectPageRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.MyCollectPageResponse;
|
||||||
|
import com.ssdmn.common.interceptor.UserCache;
|
||||||
|
import com.ssdmn.common.page.PageList;
|
||||||
|
|
||||||
|
public interface MyCollectService extends IService<MyCollect> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加我的收藏
|
||||||
|
*/
|
||||||
|
void addMyCollect(UserCache userCache,MyCollectRequest myCollectRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加我的收藏
|
||||||
|
*/
|
||||||
|
void removeMyCollect(UserCache userCache,MyCollectRequest myCollectRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询我的收藏
|
||||||
|
* @param queryMyCollectPageRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageList<MyCollectPageResponse> queryMyCollect(UserCache userCache,QueryMyCollectPageRequest queryMyCollectPageRequest);
|
||||||
|
|
||||||
|
Integer queryIsCollect(UserCache userCache, QueryIsCollectRequest queryIsCollectRequest);
|
||||||
|
}
|
||||||
@ -0,0 +1,119 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.OriginalIssueStock;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.OriginalIssueStockDetail;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.OriginalIssueStockDetailPage;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.OriginalIssueStockRequest;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.request.OriginalIssueStockRequestPage;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.response.*;
|
||||||
|
import com.ssdmn.common.interceptor.UserCache;
|
||||||
|
import com.ssdmn.common.page.PageList;
|
||||||
|
import com.ssdmn.common.page.PageModel;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public interface OriginalIssueStockService extends IService<OriginalIssueStock> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*
|
||||||
|
* @param cachedDataList 数据
|
||||||
|
* @param businessDate 日期
|
||||||
|
*/
|
||||||
|
void importExcel(List<OriginalIssueStock> cachedDataList, Date businessDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 涨跌统计
|
||||||
|
*
|
||||||
|
* @param userCache
|
||||||
|
* @param originalIssueStockRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BigStockDataResponse riseLossesStatistics(UserCache userCache ,OriginalIssueStockRequest originalIssueStockRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app-大盘信息-个股信息涨跌统计
|
||||||
|
* @param userCache
|
||||||
|
* @param originalIssueStockRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AppRiseLossesResponse appRiseLossesStatistics(UserCache userCache, OriginalIssueStockRequest originalIssueStockRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app首页-大盘信息-详情
|
||||||
|
* @param originalIssueStockRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AppBigDetailVO appBigDetail(OriginalIssueStockRequest originalIssueStockRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页-个股详情
|
||||||
|
* @param pageModel 分页
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageList<OriginalIssueStockResponse> stockDetails(PageModel pageModel);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个股涨跌分页查询
|
||||||
|
* @param originalIssueStockRequestPage 分页
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageList<OriginalIssueStock> riseLossesDetail(OriginalIssueStockRequestPage originalIssueStockRequestPage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个股详情
|
||||||
|
* @param originalIssueStockDetailPage 查询条件
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageList<OriginalIssueStock> originalIssueStockDetail(OriginalIssueStockDetailPage originalIssueStockDetailPage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每日个股详情
|
||||||
|
*
|
||||||
|
* @param userCache
|
||||||
|
* @param originalIssueStockDetail
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
OriginalIssueStockDetailResponse getByCode(UserCache userCache,OriginalIssueStockDetail originalIssueStockDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个股排名变化
|
||||||
|
* @param securityCode 股票代码
|
||||||
|
*/
|
||||||
|
OriginalIssueStockSortResponseChange stockSortChange(String securityCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param securityType 股票大类
|
||||||
|
* @param securityCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Object[] kLine(String securityType,String securityCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 几天几板
|
||||||
|
* @param securityCodeSet 股票代码
|
||||||
|
*/
|
||||||
|
Map<String, DayAndPlate> getDayAndPlateMap(Set<String> securityCodeSet);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pageModel 分页
|
||||||
|
* @param businessDate 日期
|
||||||
|
* @param securityType 类型
|
||||||
|
* @param dayAndPlateSort 几天几板排序
|
||||||
|
* @param dongCaiIndustryIndexCode2 东行二级code
|
||||||
|
* @param keyWord 关键字查询
|
||||||
|
* @return 个股分页数据
|
||||||
|
*/
|
||||||
|
PageList<OriginalIssueStock> findPage(PageModel pageModel,
|
||||||
|
Date businessDate,
|
||||||
|
String securityType,
|
||||||
|
Integer riseOrLosses,
|
||||||
|
Integer dayAndPlateSort,
|
||||||
|
String dongCaiIndustryIndexCode2,
|
||||||
|
String keyWord);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package com.ssdmn.biz.gupiao.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ssdmn.biz.gupiao.pojo.domain.StockName;
|
||||||
|
|
||||||
|
public interface StockNameService extends IService<StockName> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue