A股项目迁移
This commit is contained in:
23
src/main/java/cn/stock/market/dto/CityDTO.java
Normal file
23
src/main/java/cn/stock/market/dto/CityDTO.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package cn.stock.market.dto;
|
||||
|
||||
import cn.stock.market.infrastructure.db.po.CityPO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* CityDTO
|
||||
*
|
||||
* @author xlfd
|
||||
* @email xlfd@gmail.com
|
||||
* @created 2021/06/16
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel
|
||||
public class CityDTO extends CityPO {
|
||||
}
|
||||
50
src/main/java/cn/stock/market/dto/JsonInfoDTO.java
Normal file
50
src/main/java/cn/stock/market/dto/JsonInfoDTO.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package cn.stock.market.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ag.utils.DateUtils;
|
||||
import com.ag.utils.StringConvertJSONObjectSerializer;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
import cn.qutaojing.common.utils.fastjson.DateJsonSerializer;
|
||||
import cn.qutaojing.common.utils.jackson.String2JsonObjSerializer;
|
||||
import cn.stock.market.infrastructure.db.po.JsonInfoPO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* JsonInfoDTO
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2022/08/16
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class JsonInfoDTO extends JsonInfoPO {
|
||||
@JsonSerialize(using = DateJsonSerializer.class)
|
||||
@JSONField(format = DateUtils.YYYY_MM_DD_HH_MM_SS)
|
||||
@Override
|
||||
public Date getUpdateAt() {
|
||||
return super.getUpdateAt();
|
||||
}
|
||||
|
||||
@JsonSerialize(using = DateJsonSerializer.class)
|
||||
@JSONField(format = DateUtils.YYYY_MM_DD_HH_MM_SS)
|
||||
@Override
|
||||
public Date getCreateAt() {
|
||||
return super.getCreateAt();
|
||||
}
|
||||
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
@Override
|
||||
public String getExt() {
|
||||
return super.getExt();
|
||||
}
|
||||
}
|
||||
23
src/main/java/cn/stock/market/dto/RealtimeDTO.java
Normal file
23
src/main/java/cn/stock/market/dto/RealtimeDTO.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package cn.stock.market.dto;
|
||||
|
||||
import cn.stock.market.infrastructure.db.po.RealtimePO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* RealtimeDTO
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/17
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(
|
||||
callSuper = false
|
||||
)
|
||||
public class RealtimeDTO extends RealtimePO {
|
||||
}
|
||||
23
src/main/java/cn/stock/market/dto/SiteArticleDTO.java
Normal file
23
src/main/java/cn/stock/market/dto/SiteArticleDTO.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package cn.stock.market.dto;
|
||||
|
||||
import cn.stock.market.infrastructure.db.po.SiteArticlePO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* SiteArticleDTO
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/17
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(
|
||||
callSuper = false
|
||||
)
|
||||
public class SiteArticleDTO extends SiteArticlePO {
|
||||
}
|
||||
23
src/main/java/cn/stock/market/dto/SiteNewsDTO.java
Normal file
23
src/main/java/cn/stock/market/dto/SiteNewsDTO.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package cn.stock.market.dto;
|
||||
|
||||
import cn.stock.market.infrastructure.db.po.SiteNewsPO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* SiteNewsDTO
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/19
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(
|
||||
callSuper = false
|
||||
)
|
||||
public class SiteNewsDTO extends SiteNewsPO {
|
||||
}
|
||||
23
src/main/java/cn/stock/market/dto/StockDTO.java
Normal file
23
src/main/java/cn/stock/market/dto/StockDTO.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package cn.stock.market.dto;
|
||||
|
||||
import cn.stock.market.infrastructure.stockdb.po.StockPO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* StockDTO
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/17
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(
|
||||
callSuper = false
|
||||
)
|
||||
public class StockDTO extends StockPO {
|
||||
}
|
||||
23
src/main/java/cn/stock/market/dto/SysLogDTO.java
Normal file
23
src/main/java/cn/stock/market/dto/SysLogDTO.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package cn.stock.market.dto;
|
||||
|
||||
import cn.stock.market.infrastructure.db.po.SysLogPO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* CityDTO
|
||||
*
|
||||
* @author xlfd
|
||||
* @email xlfd@gmail.com
|
||||
* @created 2021/06/16
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel
|
||||
public class SysLogDTO extends SysLogPO {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.stock.market.dto.command;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* JsonInfoCreateCommand
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2022/08/16
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
public class JsonInfoCreateCommand {
|
||||
String type;
|
||||
String ext;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.stock.market.dto.command;
|
||||
|
||||
import java.lang.Integer;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* JsonInfoModifyCommand
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2022/08/16
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(
|
||||
callSuper = false
|
||||
)
|
||||
public class JsonInfoModifyCommand extends JsonInfoCreateCommand {
|
||||
Integer id;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.stock.market.dto.command;
|
||||
|
||||
import java.lang.Double;
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* RealtimeCreateCommand
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/17
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
public class RealtimeCreateCommand {
|
||||
Integer id;
|
||||
|
||||
String time;
|
||||
|
||||
Integer volumes;
|
||||
|
||||
Double price;
|
||||
|
||||
Double rates;
|
||||
|
||||
Integer amounts;
|
||||
|
||||
String stockCode;
|
||||
|
||||
/**
|
||||
* 均价 */
|
||||
Double averagePrice;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.stock.market.dto.command;
|
||||
|
||||
import java.lang.Integer;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* RealtimeModifyCommand
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/17
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(
|
||||
callSuper = false
|
||||
)
|
||||
public class RealtimeModifyCommand extends RealtimeCreateCommand {
|
||||
Integer id;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package cn.stock.market.dto.command;
|
||||
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* SiteArticleCreateCommand
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/17
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
public class SiteArticleCreateCommand {
|
||||
Integer id;
|
||||
|
||||
String artTitle;
|
||||
|
||||
String artType;
|
||||
|
||||
String artImg;
|
||||
|
||||
String author;
|
||||
|
||||
Integer hitTimes;
|
||||
|
||||
Integer isShow;
|
||||
|
||||
Date addTime;
|
||||
|
||||
String artSummary;
|
||||
|
||||
String artCnt;
|
||||
|
||||
String spiderUrl;
|
||||
|
||||
/**
|
||||
* 来源id */
|
||||
String sourceId;
|
||||
|
||||
/**
|
||||
* 浏览量 */
|
||||
Integer views;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.stock.market.dto.command;
|
||||
|
||||
import java.lang.Integer;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* SiteArticleModifyCommand
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/17
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(
|
||||
callSuper = false
|
||||
)
|
||||
public class SiteArticleModifyCommand extends SiteArticleCreateCommand {
|
||||
Integer id;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package cn.stock.market.dto.command;
|
||||
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* SiteNewsCreateCommand
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/19
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
public class SiteNewsCreateCommand {
|
||||
/**
|
||||
* 新闻主键id */
|
||||
Integer id;
|
||||
|
||||
/**
|
||||
* 新闻类型:1、财经要闻,2、经济数据,3、全球股市,4、7*24全球,5、商品资讯,6、上市公司,7、全球央行 */
|
||||
Integer type;
|
||||
|
||||
/**
|
||||
* 新闻标题 */
|
||||
String title;
|
||||
|
||||
/**
|
||||
* 来源id */
|
||||
String sourceId;
|
||||
|
||||
/**
|
||||
* 来源名称 */
|
||||
String sourceName;
|
||||
|
||||
/**
|
||||
* 浏览量 */
|
||||
Integer views;
|
||||
|
||||
/**
|
||||
* 状态:1、启用,0、停用 */
|
||||
Integer status;
|
||||
|
||||
/**
|
||||
* 显示时间 */
|
||||
Date showTime;
|
||||
|
||||
/**
|
||||
* 添加时间 */
|
||||
Date addTime;
|
||||
|
||||
/**
|
||||
* 图片地址 */
|
||||
String imgurl;
|
||||
|
||||
/**
|
||||
* 描述 */
|
||||
String description;
|
||||
|
||||
/**
|
||||
* 新闻内容 */
|
||||
String content;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.stock.market.dto.command;
|
||||
|
||||
import java.lang.Integer;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* SiteNewsModifyCommand
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/19
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(
|
||||
callSuper = false
|
||||
)
|
||||
public class SiteNewsModifyCommand extends SiteNewsCreateCommand {
|
||||
Integer id;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package cn.stock.market.dto.command;
|
||||
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* StockCreateCommand
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/17
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
public class StockCreateCommand {
|
||||
Integer id;
|
||||
|
||||
String stockName;
|
||||
|
||||
String stockCode;
|
||||
|
||||
String stockSpell;
|
||||
|
||||
String stockType;
|
||||
|
||||
String stockGid;
|
||||
|
||||
String stockPlate;
|
||||
|
||||
Integer isLock;
|
||||
|
||||
Integer isShow;
|
||||
|
||||
Date addTime;
|
||||
|
||||
/**
|
||||
* 点差费率 */
|
||||
BigDecimal spreadRate;
|
||||
|
||||
/**
|
||||
* 涨幅比例 */
|
||||
BigDecimal increaseRatio;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.stock.market.dto.command;
|
||||
|
||||
import java.lang.Integer;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* StockModifyCommand
|
||||
*
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @created 2023/06/17
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(
|
||||
callSuper = false
|
||||
)
|
||||
public class StockModifyCommand extends StockCreateCommand {
|
||||
Integer id;
|
||||
}
|
||||
14
src/main/java/cn/stock/market/dto/model/AboutUs.java
Normal file
14
src/main/java/cn/stock/market/dto/model/AboutUs.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AboutUs {
|
||||
String icon;
|
||||
String name;
|
||||
String url;
|
||||
String phone;
|
||||
String mp;
|
||||
String copyright;
|
||||
String copyrightUrl;
|
||||
}
|
||||
14
src/main/java/cn/stock/market/dto/model/AddressThumb.java
Normal file
14
src/main/java/cn/stock/market/dto/model/AddressThumb.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AddressThumb {
|
||||
String role;
|
||||
String name;
|
||||
String contactPhone;
|
||||
String viewPhone;
|
||||
String cityPath;
|
||||
String cityPathText;
|
||||
String address;
|
||||
}
|
||||
28
src/main/java/cn/stock/market/dto/model/Bank.java
Normal file
28
src/main/java/cn/stock/market/dto/model/Bank.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import com.ag.utils.Jsons;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class Bank {
|
||||
String currency;
|
||||
String bankCode;
|
||||
String bankName;
|
||||
String bankIcon;
|
||||
String remark;
|
||||
|
||||
public static void main(String[] args) {
|
||||
String s = "{\"bankCode\":\"ccb\",\"bankIcon\":\"https://stock-prod.oss-cn-hangzhou.aliyuncs.com/bankIcon/ac02108bde1a640ffedb5117793762db.png\",\"bankName\":\"建设银行\",\"remark\":\"银行监管账户\"}";
|
||||
Bank bean = Jsons.toBean(s, Bank.class);
|
||||
System.out.println(bean);
|
||||
}
|
||||
}
|
||||
116
src/main/java/cn/stock/market/dto/model/CapitalIncrement.java
Normal file
116
src/main/java/cn/stock/market/dto/model/CapitalIncrement.java
Normal file
@@ -0,0 +1,116 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import cn.stock.market.constant.BillOrderEvent;
|
||||
import cn.stock.market.constant.CapitalType;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 资金增加描述
|
||||
*
|
||||
* @author xlfd
|
||||
* @email xlfd@gmail.com
|
||||
* @version 1.0
|
||||
* @created Sep 18, 2021 1:10:27 PM
|
||||
*/
|
||||
@Getter
|
||||
public class CapitalIncrement {
|
||||
BillOrderEvent event;
|
||||
CapitalType capitalType;
|
||||
BigDecimal originalAmount;
|
||||
BigDecimal tradeAmount;
|
||||
BigDecimal amount;
|
||||
BigDecimal refundAmount;
|
||||
BigDecimal sysAmount;
|
||||
BigDecimal supplierAmount;
|
||||
BigDecimal customerAmount;
|
||||
|
||||
public JSONObject json() {
|
||||
JSONObject json = new JSONObject();
|
||||
if(originalAmount != null) {
|
||||
json.put("originalAmount", originalAmount);
|
||||
}
|
||||
if(tradeAmount != null) {
|
||||
json.put("tradeAmount", tradeAmount);
|
||||
}
|
||||
if(amount != null) {
|
||||
json.put("amount", amount);
|
||||
}
|
||||
if(refundAmount != null) {
|
||||
json.put("refundAmount", refundAmount);
|
||||
}
|
||||
if(sysAmount != null) {
|
||||
json.put("sysAmount", sysAmount);
|
||||
}
|
||||
if(supplierAmount != null) {
|
||||
json.put("supplierAmount", supplierAmount);
|
||||
}
|
||||
if(customerAmount != null) {
|
||||
json.put("customerAmount", customerAmount);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
public static IncrementBuilder builder() {
|
||||
return new IncrementBuilder();
|
||||
}
|
||||
|
||||
public final static class IncrementBuilder {
|
||||
CapitalIncrement incr = null;
|
||||
public IncrementBuilder() {
|
||||
incr = new CapitalIncrement();
|
||||
}
|
||||
|
||||
public IncrementBuilder originalAmount(BigDecimal originalAmount) {
|
||||
incr.originalAmount = originalAmount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IncrementBuilder tradeAmount(BigDecimal tradeAmount) {
|
||||
incr.tradeAmount = tradeAmount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IncrementBuilder amount(BigDecimal amount) {
|
||||
incr.amount = amount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IncrementBuilder refundAmount(BigDecimal refundAmount) {
|
||||
incr.refundAmount = refundAmount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IncrementBuilder sysAmount(BigDecimal sysAmount) {
|
||||
incr.sysAmount = sysAmount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IncrementBuilder supplierAmount(BigDecimal supplierAmount) {
|
||||
incr.supplierAmount = supplierAmount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IncrementBuilder customerAmount(BigDecimal customerAmount) {
|
||||
incr.customerAmount = customerAmount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IncrementBuilder capitalType(CapitalType capitalType) {
|
||||
incr.capitalType = capitalType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IncrementBuilder event(BillOrderEvent event) {
|
||||
incr.event = event;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CapitalIncrement build() {
|
||||
return incr;
|
||||
}
|
||||
}
|
||||
}
|
||||
44
src/main/java/cn/stock/market/dto/model/ClickActionInfo.java
Normal file
44
src/main/java/cn/stock/market/dto/model/ClickActionInfo.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import cn.stock.market.constant.ClickAction;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class ClickActionInfo {
|
||||
ClickAction action;
|
||||
String actionTarget;
|
||||
String actionText;
|
||||
String expend;
|
||||
|
||||
public static ClickActionInfo of(ClickAction action, Integer id) {
|
||||
return of(action, String.valueOf(id));
|
||||
}
|
||||
|
||||
public static ClickActionInfo of(ClickAction action, String actionTarget) {
|
||||
return of(action, actionTarget, null);
|
||||
}
|
||||
|
||||
public static ClickActionInfo of(ClickAction action, String actionTarget, String expend) {
|
||||
return ClickActionInfo.builder()
|
||||
.action(action)
|
||||
.expend(expend)
|
||||
.actionText(action.remark())
|
||||
.actionTarget(actionTarget)
|
||||
.build();
|
||||
}
|
||||
|
||||
public void fillExpend() {
|
||||
if(action == ClickAction.GOODS_DETAIL) {
|
||||
} else if(action == ClickAction.SUBJECT) {
|
||||
} else if(action == ClickAction.FRONT_CLASSIFY) {
|
||||
}
|
||||
}
|
||||
}
|
||||
26
src/main/java/cn/stock/market/dto/model/CurrencyRatio.java
Normal file
26
src/main/java/cn/stock/market/dto/model/CurrencyRatio.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* 币种比例
|
||||
* @author xlfd
|
||||
* @email xlfd@gmail.com
|
||||
* @version 1.0
|
||||
* @created Jul 27, 2021 1:51:16 PM
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class CurrencyRatio {
|
||||
Double cny;
|
||||
|
||||
public static CurrencyRatio allCny() {
|
||||
return new CurrencyRatio(1.0D);
|
||||
}
|
||||
}
|
||||
37
src/main/java/cn/stock/market/dto/model/ExchangeInfoDTO.java
Normal file
37
src/main/java/cn/stock/market/dto/model/ExchangeInfoDTO.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import cn.qutaojing.common.constant.Currency;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
*
|
||||
* title: ExchangerRate.java
|
||||
* 汇率
|
||||
*
|
||||
* @author rplees
|
||||
* @email xlfd@gmail.com
|
||||
* @version 1.0
|
||||
* @created Aug 12, 2022 10:52:32 AM
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class ExchangeInfoDTO {
|
||||
@ApiModelProperty("兑出币种")
|
||||
Currency from;
|
||||
@ApiModelProperty("兑入币种")
|
||||
Currency to;
|
||||
@ApiModelProperty("汇率(1 from币种 = ${rate} to币种)")
|
||||
BigDecimal rate;
|
||||
@ApiModelProperty("可兑金额")
|
||||
BigDecimal fromBalance;
|
||||
}
|
||||
75
src/main/java/cn/stock/market/dto/model/ExchangeRate.java
Normal file
75
src/main/java/cn/stock/market/dto/model/ExchangeRate.java
Normal file
@@ -0,0 +1,75 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ag.exception.SysTipsException;
|
||||
|
||||
import cn.qutaojing.common.constant.Currency;
|
||||
import cn.qutaojing.common.utils.BigDecimals;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
*
|
||||
* title: ExchangerRate.java
|
||||
* 汇率
|
||||
*
|
||||
* @author rplees
|
||||
* @email xlfd@gmail.com
|
||||
* @version 1.0
|
||||
* @created Aug 12, 2022 10:52:32 AM
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class ExchangeRate {
|
||||
@ApiModelProperty("当前币种")
|
||||
Currency base;
|
||||
@ApiModelProperty("与不同币种的汇率信息")
|
||||
Map<Currency, BigDecimal> rates;
|
||||
|
||||
public BigDecimal toCurrency(Currency from, Currency to) {
|
||||
if(base != from && base != to) {
|
||||
throw new SysTipsException("不能计算汇率比");
|
||||
}
|
||||
|
||||
if(! rates.containsKey(to)) {
|
||||
throw new SysTipsException("没有该币种[" + to.remark() + "]信息, 无法兑换");
|
||||
}
|
||||
|
||||
if(base == from) {
|
||||
return rates.get(to);
|
||||
} else {
|
||||
return BigDecimals.divide(1, rates.get(from)).setScale(4, RoundingMode.HALF_UP);
|
||||
}
|
||||
}
|
||||
|
||||
// public BigDecimal toCurrencyValue(Currency to, BigDecimal value) {
|
||||
// BigDecimal currency = toCurrency(to);
|
||||
// return BigDecimals.multiplys(value, currency);
|
||||
// }
|
||||
//
|
||||
// public BigDecimal toCurrencyValue(String to, BigDecimal value) {
|
||||
// BigDecimal currency = toCurrency(Currency.of(to));
|
||||
// return BigDecimals.multiplys(value, currency);
|
||||
// }
|
||||
|
||||
public BigDecimal toCurrencyValue(Currency from, Currency to, BigDecimal value) {
|
||||
BigDecimal currency = toCurrency(from, to);
|
||||
return BigDecimals.multiplys(value, currency).setScale(2, RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal toCurrencyValue(String from, String to, BigDecimal value) {
|
||||
Currency fromCurrency = Currency.of(from);
|
||||
Currency toCurrency = Currency.of(to);
|
||||
return toCurrencyValue(fromCurrency, toCurrency, value);
|
||||
}
|
||||
}
|
||||
26
src/main/java/cn/stock/market/dto/model/HKStockNewInfo.java
Normal file
26
src/main/java/cn/stock/market/dto/model/HKStockNewInfo.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@ApiModel("香港新股信息")
|
||||
public class HKStockNewInfo {
|
||||
@ApiModelProperty("股票代码")
|
||||
private String symbol;
|
||||
@ApiModelProperty("股票名称")
|
||||
private String name;
|
||||
@ApiModelProperty("上市时间")
|
||||
private String applyBeginDate;
|
||||
@ApiModelProperty("中签率")
|
||||
private String lotWinRate;
|
||||
@ApiModelProperty("价格")
|
||||
private String price;
|
||||
@ApiModelProperty("类型(1深 2沪 3北)")
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
||||
31
src/main/java/cn/stock/market/dto/model/IStockPrice.java
Normal file
31
src/main/java/cn/stock/market/dto/model/IStockPrice.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.ag.utils.vo.KVContainer;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
public interface IStockPrice {
|
||||
default BigDecimal yesterdayPrice() {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
BigDecimal price();
|
||||
|
||||
default List<KVContainer<BigDecimal, BigDecimal>> sell() {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
|
||||
default List<KVContainer<BigDecimal, BigDecimal>> buy() {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
|
||||
default BigDecimal priceRange() {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
default BigDecimal priceRate() {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class IdentityAuthInfo {
|
||||
String name;
|
||||
String idcard;
|
||||
String address;
|
||||
String birth;
|
||||
String nation;
|
||||
String gender;
|
||||
String authority;
|
||||
|
||||
String fortUrl;
|
||||
String backUrl;
|
||||
}
|
||||
159
src/main/java/cn/stock/market/dto/model/InvitationActi.java
Normal file
159
src/main/java/cn/stock/market/dto/model/InvitationActi.java
Normal file
@@ -0,0 +1,159 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import com.ag.utils.CollectionUtils;
|
||||
import com.ag.utils.SysConstant.BooleanEnum;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import cn.stock.market.application.Dics;
|
||||
import cn.stock.market.dto.model.InvitationActi.RulePrize;
|
||||
import cn.stock.market.dto.model.InvitationActi.UserInvitationInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* 邀请赚现金活动
|
||||
* @author rplees
|
||||
* @email rplees.i.ly@gmail.com
|
||||
* @version 1.0
|
||||
* @created Oct 20, 2022 11:35:47 AM
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class InvitationActi {
|
||||
String name;
|
||||
Integer status;
|
||||
List<RulePrize> rulePrizeList;
|
||||
|
||||
public boolean open() {
|
||||
return BooleanEnum.isOn(status);
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class RulePrize {
|
||||
Integer step;
|
||||
Long needInvitationCount;
|
||||
String stockCode;
|
||||
String stockName;
|
||||
Integer stockCount;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class UserInvitationInfo {
|
||||
Long invitationCount;
|
||||
List<RulePrize> rulePrizeList;
|
||||
|
||||
public Integer preStep() {
|
||||
if(CollectionUtils.isEmpty(rulePrizeList)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return rulePrizeList.get(rulePrizeList.size() - 1).step;
|
||||
}
|
||||
}
|
||||
|
||||
public RulePrize hit(UserInvitationInfo userInvitationInfo) {
|
||||
List<Integer> alreadyStep = Lists.transform(userInvitationInfo.rulePrizeList, RulePrize::getStep);
|
||||
|
||||
RulePrize rulePrize = rulePrizeList.stream()
|
||||
.filter(val -> ! alreadyStep.contains(val.getStep()))
|
||||
.sorted(Comparator.comparing(RulePrize::getNeedInvitationCount).reversed())
|
||||
.filter(val -> val.needInvitationCount <= userInvitationInfo.getInvitationCount())
|
||||
.findFirst().orElse(null);
|
||||
|
||||
return rulePrize;
|
||||
}
|
||||
|
||||
public static InvitationActi invitationActi() {
|
||||
return InvitationActi.builder()
|
||||
.name("邀请送股票活动")
|
||||
.status(1)
|
||||
.rulePrizeList(Lists.newArrayList(
|
||||
RulePrize.builder()
|
||||
.step(1)
|
||||
.needInvitationCount(3L)
|
||||
.stockCount(1)
|
||||
.stockCode("01810")
|
||||
.stockName("小米集团-W")
|
||||
.build(),
|
||||
|
||||
RulePrize.builder()
|
||||
.step(2)
|
||||
.needInvitationCount(8L)
|
||||
.stockCount(3)
|
||||
.stockCode("01810")
|
||||
.stockName("小米集团-W")
|
||||
.build(),
|
||||
|
||||
RulePrize.builder()
|
||||
.step(3)
|
||||
.needInvitationCount(15L)
|
||||
.stockCount(4)
|
||||
.stockCode("01810")
|
||||
.stockName("小米集团-W")
|
||||
.build()
|
||||
))
|
||||
.build();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
UserInvitationInfo userInvitationInfo = UserInvitationInfo.builder()
|
||||
.invitationCount(2L)
|
||||
.rulePrizeList(Lists.newArrayList())
|
||||
.build();
|
||||
RulePrize prize = invitationActi().hit(userInvitationInfo);
|
||||
System.out.println(JSON.toJSONString(prize));
|
||||
|
||||
userInvitationInfo.setInvitationCount(6L);
|
||||
prize = invitationActi().hit(userInvitationInfo);
|
||||
System.out.println(JSON.toJSONString(prize));
|
||||
|
||||
userInvitationInfo.setInvitationCount(10L);
|
||||
prize = invitationActi().hit(userInvitationInfo);
|
||||
System.out.println(JSON.toJSONString(prize));
|
||||
|
||||
userInvitationInfo.setInvitationCount(15L);
|
||||
prize = invitationActi().hit(userInvitationInfo);
|
||||
System.out.println(JSON.toJSONString(prize));
|
||||
|
||||
userInvitationInfo.setRulePrizeList(Lists.newArrayList(
|
||||
RulePrize.builder()
|
||||
.step(1)
|
||||
.needInvitationCount(3L)
|
||||
.stockCount(1)
|
||||
.stockCode("01810")
|
||||
.build(),
|
||||
|
||||
RulePrize.builder()
|
||||
.step(2)
|
||||
.needInvitationCount(8L)
|
||||
.stockCount(3)
|
||||
.stockCode("01810")
|
||||
.build(),
|
||||
|
||||
RulePrize.builder()
|
||||
.step(3)
|
||||
.needInvitationCount(15L)
|
||||
.stockCount(4)
|
||||
.stockCode("01810")
|
||||
.build()
|
||||
));
|
||||
|
||||
prize = invitationActi().hit(userInvitationInfo);
|
||||
System.out.println(JSON.toJSONString(prize));
|
||||
}
|
||||
}
|
||||
41
src/main/java/cn/stock/market/dto/model/LogisticsInfo.java
Normal file
41
src/main/java/cn/stock/market/dto/model/LogisticsInfo.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.ag.exception.SysTipsException;
|
||||
|
||||
import cn.stock.market.application.Dics;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class LogisticsInfo {
|
||||
String logisticsCode;
|
||||
String logistics;
|
||||
|
||||
String receiverPhone;
|
||||
String senderPhone;
|
||||
String no;
|
||||
|
||||
public static LogisticsInfo from(String logisticsCode, String no) {
|
||||
String logistics = Dics.of().getFromCache("logistics." + logisticsCode, null);
|
||||
if(StringUtils.isBlank(logistics)) {
|
||||
throw new SysTipsException("找不到该物流信息");
|
||||
}
|
||||
|
||||
LogisticsInfo logisticsInfo = LogisticsInfo.builder()
|
||||
.logistics(logistics)
|
||||
.logisticsCode(logisticsCode)
|
||||
.no(no)
|
||||
.build();
|
||||
|
||||
return logisticsInfo;
|
||||
}
|
||||
}
|
||||
215
src/main/java/cn/stock/market/dto/model/StockAdminListVO.java
Normal file
215
src/main/java/cn/stock/market/dto/model/StockAdminListVO.java
Normal file
@@ -0,0 +1,215 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class StockAdminListVO {
|
||||
private Integer id;
|
||||
private String stockName;
|
||||
private String stockCode;
|
||||
private String stockSpell;
|
||||
private String stockType;
|
||||
private String stockGid;
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
private String stockPlate;
|
||||
private Integer isLock;
|
||||
private Integer isShow;
|
||||
private Date addTime;
|
||||
private String nowPrice;
|
||||
private BigDecimal hcrate;
|
||||
private BigDecimal day3Rate;
|
||||
/*点差费率*/
|
||||
private BigDecimal spreadRate;
|
||||
|
||||
public void setStockName(String stockName) {
|
||||
this.stockName = stockName;
|
||||
}
|
||||
|
||||
public void setStockCode(String stockCode) {
|
||||
this.stockCode = stockCode;
|
||||
}
|
||||
|
||||
public void setStockSpell(String stockSpell) {
|
||||
this.stockSpell = stockSpell;
|
||||
}
|
||||
|
||||
public void setStockType(String stockType) {
|
||||
this.stockType = stockType;
|
||||
}
|
||||
|
||||
public void setStockGid(String stockGid) {
|
||||
this.stockGid = stockGid;
|
||||
}
|
||||
|
||||
public void setStockPlate(String stockPlate) {
|
||||
this.stockPlate = stockPlate;
|
||||
}
|
||||
|
||||
public void setIsLock(Integer isLock) {
|
||||
this.isLock = isLock;
|
||||
}
|
||||
|
||||
public void setIsShow(Integer isShow) {
|
||||
this.isShow = isShow;
|
||||
}
|
||||
|
||||
public void setAddTime(Date addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public void setNowPrice(String nowPrice) {
|
||||
this.nowPrice = nowPrice;
|
||||
}
|
||||
|
||||
public void setHcrate(BigDecimal hcrate) {
|
||||
this.hcrate = hcrate;
|
||||
}
|
||||
|
||||
public void setDay3Rate(BigDecimal day3Rate) {
|
||||
this.day3Rate = day3Rate;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) return true;
|
||||
if (!(o instanceof StockAdminListVO)) return false;
|
||||
StockAdminListVO other = (StockAdminListVO) o;
|
||||
if (!other.canEqual(this)) return false;
|
||||
Object this$id = getId(), other$id = other.getId();
|
||||
if ((this$id == null) ? (other$id != null) : !this$id.equals(other$id)) return false;
|
||||
Object this$stockName = getStockName(), other$stockName = other.getStockName();
|
||||
if ((this$stockName == null) ? (other$stockName != null) : !this$stockName.equals(other$stockName))
|
||||
return false;
|
||||
Object this$stockCode = getStockCode(), other$stockCode = other.getStockCode();
|
||||
if ((this$stockCode == null) ? (other$stockCode != null) : !this$stockCode.equals(other$stockCode))
|
||||
return false;
|
||||
Object this$stockSpell = getStockSpell(), other$stockSpell = other.getStockSpell();
|
||||
if ((this$stockSpell == null) ? (other$stockSpell != null) : !this$stockSpell.equals(other$stockSpell))
|
||||
return false;
|
||||
Object this$stockType = getStockType(), other$stockType = other.getStockType();
|
||||
if ((this$stockType == null) ? (other$stockType != null) : !this$stockType.equals(other$stockType))
|
||||
return false;
|
||||
Object this$stockGid = getStockGid(), other$stockGid = other.getStockGid();
|
||||
if ((this$stockGid == null) ? (other$stockGid != null) : !this$stockGid.equals(other$stockGid)) return false;
|
||||
Object this$stockPlate = getStockPlate(), other$stockPlate = other.getStockPlate();
|
||||
if ((this$stockPlate == null) ? (other$stockPlate != null) : !this$stockPlate.equals(other$stockPlate))
|
||||
return false;
|
||||
Object this$isLock = getIsLock(), other$isLock = other.getIsLock();
|
||||
if ((this$isLock == null) ? (other$isLock != null) : !this$isLock.equals(other$isLock)) return false;
|
||||
Object this$isShow = getIsShow(), other$isShow = other.getIsShow();
|
||||
if ((this$isShow == null) ? (other$isShow != null) : !this$isShow.equals(other$isShow)) return false;
|
||||
Object this$addTime = getAddTime(), other$addTime = other.getAddTime();
|
||||
if ((this$addTime == null) ? (other$addTime != null) : !this$addTime.equals(other$addTime)) return false;
|
||||
Object this$nowPrice = getNowPrice(), other$nowPrice = other.getNowPrice();
|
||||
if ((this$nowPrice == null) ? (other$nowPrice != null) : !this$nowPrice.equals(other$nowPrice)) return false;
|
||||
Object this$hcrate = getHcrate(), other$hcrate = other.getHcrate();
|
||||
if ((this$hcrate == null) ? (other$hcrate != null) : !this$hcrate.equals(other$hcrate)) return false;
|
||||
Object this$day3Rate = getDay3Rate(), other$day3Rate = other.getDay3Rate();
|
||||
return !((this$day3Rate == null) ? (other$day3Rate != null) : !this$day3Rate.equals(other$day3Rate));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof StockAdminListVO;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
Object $id = getId();
|
||||
result = result * 59 + (($id == null) ? 43 : $id.hashCode());
|
||||
Object $stockName = getStockName();
|
||||
result = result * 59 + (($stockName == null) ? 43 : $stockName.hashCode());
|
||||
Object $stockCode = getStockCode();
|
||||
result = result * 59 + (($stockCode == null) ? 43 : $stockCode.hashCode());
|
||||
Object $stockSpell = getStockSpell();
|
||||
result = result * 59 + (($stockSpell == null) ? 43 : $stockSpell.hashCode());
|
||||
Object $stockType = getStockType();
|
||||
result = result * 59 + (($stockType == null) ? 43 : $stockType.hashCode());
|
||||
Object $stockGid = getStockGid();
|
||||
result = result * 59 + (($stockGid == null) ? 43 : $stockGid.hashCode());
|
||||
Object $stockPlate = getStockPlate();
|
||||
result = result * 59 + (($stockPlate == null) ? 43 : $stockPlate.hashCode());
|
||||
Object $isLock = getIsLock();
|
||||
result = result * 59 + (($isLock == null) ? 43 : $isLock.hashCode());
|
||||
Object $isShow = getIsShow();
|
||||
result = result * 59 + (($isShow == null) ? 43 : $isShow.hashCode());
|
||||
Object $addTime = getAddTime();
|
||||
result = result * 59 + (($addTime == null) ? 43 : $addTime.hashCode());
|
||||
Object $nowPrice = getNowPrice();
|
||||
result = result * 59 + (($nowPrice == null) ? 43 : $nowPrice.hashCode());
|
||||
Object $hcrate = getHcrate();
|
||||
result = result * 59 + (($hcrate == null) ? 43 : $hcrate.hashCode());
|
||||
Object $day3Rate = getDay3Rate();
|
||||
return result * 59 + (($day3Rate == null) ? 43 : $day3Rate.hashCode());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "StockAdminListVO(id=" + getId() + ", stockName=" + getStockName() + ", stockCode=" + getStockCode() + ", stockSpell=" + getStockSpell() + ", stockType=" + getStockType() + ", stockGid=" + getStockGid() + ", stockPlate=" + getStockPlate() + ", isLock=" + getIsLock() + ", isShow=" + getIsShow() + ", addTime=" + getAddTime() + ", nowPrice=" + getNowPrice() + ", hcrate=" + getHcrate() + ", day3Rate=" + getDay3Rate() + getHcrate() + ", spreadRate=" + getSpreadRate()+ ")";
|
||||
}
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public String getStockName() {
|
||||
return this.stockName;
|
||||
}
|
||||
|
||||
public String getStockCode() {
|
||||
return this.stockCode;
|
||||
}
|
||||
|
||||
public String getStockSpell() {
|
||||
return this.stockSpell;
|
||||
}
|
||||
|
||||
public String getStockType() {
|
||||
return this.stockType;
|
||||
}
|
||||
|
||||
public String getStockGid() {
|
||||
return this.stockGid;
|
||||
}
|
||||
|
||||
public String getStockPlate() {
|
||||
return this.stockPlate;
|
||||
}
|
||||
|
||||
public Integer getIsLock() {
|
||||
return this.isLock;
|
||||
}
|
||||
|
||||
public Integer getIsShow() {
|
||||
return this.isShow;
|
||||
}
|
||||
|
||||
public Date getAddTime() {
|
||||
return this.addTime;
|
||||
}
|
||||
|
||||
|
||||
public String getNowPrice() {
|
||||
return this.nowPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getHcrate() {
|
||||
return this.hcrate;
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal getDay3Rate() {
|
||||
return this.day3Rate;
|
||||
}
|
||||
|
||||
public BigDecimal getSpreadRate() {
|
||||
return spreadRate;
|
||||
}
|
||||
|
||||
public void setSpreadRate(BigDecimal spreadRate) {
|
||||
this.spreadRate = spreadRate;
|
||||
}
|
||||
}
|
||||
30
src/main/java/cn/stock/market/dto/model/StockCode.java
Normal file
30
src/main/java/cn/stock/market/dto/model/StockCode.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import cn.stock.market.constant.StockSource;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class StockCode {
|
||||
String code;
|
||||
StockSource source;
|
||||
|
||||
public static StockCode a(String code) {
|
||||
return of(code, StockSource.A);
|
||||
}
|
||||
|
||||
public static StockCode of(String code, String source) {
|
||||
return of(code, StockSource.of(source));
|
||||
}
|
||||
|
||||
public static StockCode of(String code, StockSource source) {
|
||||
return StockCode.builder().code(code).source(source).build();
|
||||
}
|
||||
}
|
||||
171
src/main/java/cn/stock/market/dto/model/StockDetail.java
Normal file
171
src/main/java/cn/stock/market/dto/model/StockDetail.java
Normal file
@@ -0,0 +1,171 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.ag.utils.vo.KVContainer;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import cn.qutaojing.common.utils.BigDecimals;
|
||||
import cn.stock.market.constant.StockSource;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class StockDetail implements IStockPrice {
|
||||
String code;
|
||||
String name;
|
||||
@ApiModelProperty("昨收")
|
||||
BigDecimal yesterdayPrice;
|
||||
@ApiModelProperty("开盘价")
|
||||
BigDecimal openPrice;
|
||||
@ApiModelProperty("当前价格")
|
||||
BigDecimal currentPrice;
|
||||
|
||||
@ApiModelProperty("买一")
|
||||
BigDecimal buyOnePrice;
|
||||
@ApiModelProperty("买二")
|
||||
BigDecimal buyTwoPrice;
|
||||
@ApiModelProperty("买三")
|
||||
BigDecimal buyThreePrice;
|
||||
@ApiModelProperty("买四")
|
||||
BigDecimal buyFourPrice;
|
||||
@ApiModelProperty("买五")
|
||||
BigDecimal buyFivePrice;
|
||||
|
||||
@ApiModelProperty("买一量(手)")
|
||||
BigDecimal buyOneAmount;
|
||||
@ApiModelProperty("买二量(手)")
|
||||
BigDecimal buyTwoAmount;
|
||||
@ApiModelProperty("买三量(手)")
|
||||
BigDecimal buyThreeAmount;
|
||||
@ApiModelProperty("买四量(手)")
|
||||
BigDecimal buyFourAmount;
|
||||
@ApiModelProperty("买五量(手)")
|
||||
BigDecimal buyFiveAmount;
|
||||
|
||||
@ApiModelProperty("卖一")
|
||||
BigDecimal sellOnePrice;
|
||||
@ApiModelProperty("卖二")
|
||||
BigDecimal sellTwoPrice;
|
||||
@ApiModelProperty("卖三")
|
||||
BigDecimal sellThreePrice;
|
||||
@ApiModelProperty("卖四")
|
||||
BigDecimal sellFourPrice;
|
||||
@ApiModelProperty("卖五")
|
||||
BigDecimal sellFivePrice;
|
||||
|
||||
@ApiModelProperty("卖一量(手)")
|
||||
BigDecimal sellOneAmount;
|
||||
@ApiModelProperty("卖二量(手)")
|
||||
BigDecimal sellTwoAmount;
|
||||
@ApiModelProperty("卖三量(手)")
|
||||
BigDecimal sellThreeAmount;
|
||||
@ApiModelProperty("卖四量(手)")
|
||||
BigDecimal sellFourAmount;
|
||||
@ApiModelProperty("卖五量(手)")
|
||||
BigDecimal sellFiveAmount;
|
||||
|
||||
@ApiModelProperty("41: 最高")
|
||||
BigDecimal highest;
|
||||
@ApiModelProperty("42: 最低")
|
||||
BigDecimal lowest;
|
||||
@ApiModelProperty("36: 成交量(手)")
|
||||
BigDecimal volume;
|
||||
@ApiModelProperty("37: 成交额(万)")
|
||||
BigDecimal turnover;
|
||||
String time;
|
||||
|
||||
@ApiModelProperty("换手率")
|
||||
BigDecimal turnoverRate;
|
||||
@ApiModelProperty("39: 市盈率")
|
||||
BigDecimal peRatio;
|
||||
@ApiModelProperty("流通市值")
|
||||
BigDecimal circulationMarketValue;
|
||||
@ApiModelProperty("总市值")
|
||||
BigDecimal totalMarketValue;
|
||||
@ApiModelProperty("市净率")
|
||||
BigDecimal pbRatio;
|
||||
@ApiModelProperty("43: 振幅")
|
||||
BigDecimal amplitude;
|
||||
String jys;
|
||||
|
||||
@ApiModelProperty("47: 涨停价")
|
||||
String hardenPrice;
|
||||
@ApiModelProperty("48: 跌停价")
|
||||
String dropPrice;
|
||||
|
||||
@ApiModelProperty("涨跌额")
|
||||
BigDecimal priceRange;
|
||||
@ApiModelProperty("涨跌比")
|
||||
BigDecimal priceRate;
|
||||
|
||||
public StockInfo thumb() {
|
||||
return StockInfo.builder()
|
||||
.buy(buy())
|
||||
.code(code)
|
||||
.jsy(jys)
|
||||
.name(name)
|
||||
.price(currentPrice)
|
||||
.priceRange(priceRange)
|
||||
.priceRate(priceRate)
|
||||
.sell(sell())
|
||||
.source(StockSource.A)
|
||||
.yesterdayPrice(yesterdayPrice)
|
||||
.build();
|
||||
}
|
||||
|
||||
BigDecimal unitConversion(BigDecimal decimal) {
|
||||
return BigDecimals.multiplys(decimal, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KVContainer<BigDecimal, BigDecimal>> sell() {
|
||||
List<KVContainer<BigDecimal, BigDecimal>> pList = Lists.newArrayList(
|
||||
KVContainer.from(getSellOnePrice(), unitConversion(getSellOneAmount())),
|
||||
KVContainer.from(getSellTwoPrice(), unitConversion(getSellTwoAmount())),
|
||||
KVContainer.from(getSellThreePrice(), unitConversion(getSellThreeAmount())),
|
||||
KVContainer.from(getSellFourPrice(), unitConversion(getSellFourAmount())),
|
||||
KVContainer.from(getSellFivePrice(), unitConversion(getSellFiveAmount())));
|
||||
return pList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KVContainer<BigDecimal, BigDecimal>> buy() {
|
||||
List<KVContainer<BigDecimal, BigDecimal>> pList = Lists.newArrayList(
|
||||
KVContainer.from(getBuyOnePrice(), unitConversion(getBuyOneAmount())),
|
||||
KVContainer.from(getBuyTwoPrice(), unitConversion(getBuyTwoAmount())),
|
||||
KVContainer.from(getBuyThreePrice(), unitConversion(getBuyThreeAmount())),
|
||||
KVContainer.from(getBuyFourPrice(), unitConversion(getBuyFourAmount())),
|
||||
KVContainer.from(getBuyFivePrice(), unitConversion(getBuyFiveAmount())));
|
||||
return pList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal price() {
|
||||
return currentPrice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal yesterdayPrice() {
|
||||
return yesterdayPrice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal priceRange() {
|
||||
return priceRange;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal priceRate() {
|
||||
return priceRate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class StockDetailThumb {
|
||||
String code;
|
||||
String name;
|
||||
@ApiModelProperty("昨收")
|
||||
BigDecimal yesterdayPrice;
|
||||
@ApiModelProperty("开盘价")
|
||||
BigDecimal openPrice;
|
||||
@ApiModelProperty("当前价格")
|
||||
BigDecimal currentPrice;
|
||||
|
||||
BigDecimal highest;
|
||||
BigDecimal lowest;
|
||||
BigDecimal volume;
|
||||
BigDecimal turnover;
|
||||
String time;
|
||||
String jys;
|
||||
|
||||
@ApiModelProperty("涨跌额")
|
||||
BigDecimal priceRange;
|
||||
@ApiModelProperty("涨跌比")
|
||||
BigDecimal priceRate;
|
||||
}
|
||||
56
src/main/java/cn/stock/market/dto/model/StockInfo.java
Normal file
56
src/main/java/cn/stock/market/dto/model/StockInfo.java
Normal file
@@ -0,0 +1,56 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.ag.utils.vo.KVContainer;
|
||||
|
||||
import cn.stock.market.constant.StockSource;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class StockInfo implements IStockPrice {
|
||||
BigDecimal yesterdayPrice;
|
||||
BigDecimal price;
|
||||
BigDecimal priceRange;
|
||||
BigDecimal priceRate;
|
||||
List<KVContainer<BigDecimal, BigDecimal>> sell;
|
||||
List<KVContainer<BigDecimal, BigDecimal>> buy;
|
||||
|
||||
String code;
|
||||
String name;
|
||||
StockSource source;
|
||||
String jsy;
|
||||
@Override
|
||||
public BigDecimal yesterdayPrice() {
|
||||
return yesterdayPrice;
|
||||
}
|
||||
@Override
|
||||
public BigDecimal price() {
|
||||
return price;
|
||||
}
|
||||
@Override
|
||||
public List<KVContainer<BigDecimal, BigDecimal>> sell() {
|
||||
return sell;
|
||||
}
|
||||
@Override
|
||||
public List<KVContainer<BigDecimal, BigDecimal>> buy() {
|
||||
return buy;
|
||||
}
|
||||
@Override
|
||||
public BigDecimal priceRange() {
|
||||
return priceRange;
|
||||
}
|
||||
@Override
|
||||
public BigDecimal priceRate() {
|
||||
return priceRate;
|
||||
}
|
||||
}
|
||||
258
src/main/java/cn/stock/market/dto/model/StockListVO.java
Normal file
258
src/main/java/cn/stock/market/dto/model/StockListVO.java
Normal file
@@ -0,0 +1,258 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
public class StockListVO {
|
||||
|
||||
private String name;
|
||||
|
||||
private String code;
|
||||
|
||||
private String spell;
|
||||
|
||||
private String gid;
|
||||
|
||||
private String nowPrice;
|
||||
|
||||
private BigDecimal hcrate;
|
||||
|
||||
private String today_max;
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
private String today_min;
|
||||
private String business_balance;
|
||||
private String business_amount;
|
||||
private String preclose_px;
|
||||
private String open_px;
|
||||
private BigDecimal day3Rate;
|
||||
private String stock_type;
|
||||
private String stock_plate;
|
||||
/*是否添加自选:1、添加自选,0、未添加自选*/
|
||||
private String isOption;
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setSpell(String spell) {
|
||||
this.spell = spell;
|
||||
}
|
||||
|
||||
public void setGid(String gid) {
|
||||
this.gid = gid;
|
||||
}
|
||||
|
||||
public void setNowPrice(String nowPrice) {
|
||||
this.nowPrice = nowPrice;
|
||||
}
|
||||
|
||||
public void setHcrate(BigDecimal hcrate) {
|
||||
this.hcrate = hcrate;
|
||||
}
|
||||
|
||||
public void setToday_max(String today_max) {
|
||||
this.today_max = today_max;
|
||||
}
|
||||
|
||||
public void setToday_min(String today_min) {
|
||||
this.today_min = today_min;
|
||||
}
|
||||
|
||||
public void setBusiness_balance(String business_balance) {
|
||||
this.business_balance = business_balance;
|
||||
}
|
||||
|
||||
public void setBusiness_amount(String business_amount) {
|
||||
this.business_amount = business_amount;
|
||||
}
|
||||
|
||||
public void setPreclose_px(String preclose_px) {
|
||||
this.preclose_px = preclose_px;
|
||||
}
|
||||
|
||||
public void setOpen_px(String open_px) {
|
||||
this.open_px = open_px;
|
||||
}
|
||||
|
||||
public void setDay3Rate(BigDecimal day3Rate) {
|
||||
this.day3Rate = day3Rate;
|
||||
}
|
||||
|
||||
public void setStock_type(String stock_type) {
|
||||
this.stock_type = stock_type;
|
||||
}
|
||||
|
||||
public void setStock_plate(String stock_plate) {
|
||||
this.stock_plate = stock_plate;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) return true;
|
||||
if (!(o instanceof StockListVO)) return false;
|
||||
StockListVO other = (StockListVO) o;
|
||||
if (!other.canEqual(this)) return false;
|
||||
Object this$name = getName(), other$name = other.getName();
|
||||
if ((this$name == null) ? (other$name != null) : !this$name.equals(other$name)) return false;
|
||||
Object this$code = getCode(), other$code = other.getCode();
|
||||
if ((this$code == null) ? (other$code != null) : !this$code.equals(other$code)) return false;
|
||||
Object this$spell = getSpell(), other$spell = other.getSpell();
|
||||
if ((this$spell == null) ? (other$spell != null) : !this$spell.equals(other$spell)) return false;
|
||||
Object this$gid = getGid(), other$gid = other.getGid();
|
||||
if ((this$gid == null) ? (other$gid != null) : !this$gid.equals(other$gid)) return false;
|
||||
Object this$nowPrice = getNowPrice(), other$nowPrice = other.getNowPrice();
|
||||
if ((this$nowPrice == null) ? (other$nowPrice != null) : !this$nowPrice.equals(other$nowPrice)) return false;
|
||||
Object this$hcrate = getHcrate(), other$hcrate = other.getHcrate();
|
||||
if ((this$hcrate == null) ? (other$hcrate != null) : !this$hcrate.equals(other$hcrate)) return false;
|
||||
Object this$today_max = getToday_max(), other$today_max = other.getToday_max();
|
||||
if ((this$today_max == null) ? (other$today_max != null) : !this$today_max.equals(other$today_max))
|
||||
return false;
|
||||
Object this$today_min = getToday_min(), other$today_min = other.getToday_min();
|
||||
if ((this$today_min == null) ? (other$today_min != null) : !this$today_min.equals(other$today_min))
|
||||
return false;
|
||||
Object this$business_balance = getBusiness_balance(), other$business_balance = other.getBusiness_balance();
|
||||
if ((this$business_balance == null) ? (other$business_balance != null) : !this$business_balance.equals(other$business_balance))
|
||||
return false;
|
||||
Object this$business_amount = getBusiness_amount(), other$business_amount = other.getBusiness_amount();
|
||||
if ((this$business_amount == null) ? (other$business_amount != null) : !this$business_amount.equals(other$business_amount))
|
||||
return false;
|
||||
Object this$preclose_px = getPreclose_px(), other$preclose_px = other.getPreclose_px();
|
||||
if ((this$preclose_px == null) ? (other$preclose_px != null) : !this$preclose_px.equals(other$preclose_px))
|
||||
return false;
|
||||
Object this$open_px = getOpen_px(), other$open_px = other.getOpen_px();
|
||||
if ((this$open_px == null) ? (other$open_px != null) : !this$open_px.equals(other$open_px)) return false;
|
||||
Object this$day3Rate = getDay3Rate(), other$day3Rate = other.getDay3Rate();
|
||||
if ((this$day3Rate == null) ? (other$day3Rate != null) : !this$day3Rate.equals(other$day3Rate)) return false;
|
||||
Object this$stock_type = getStock_type(), other$stock_type = other.getStock_type();
|
||||
if ((this$stock_type == null) ? (other$stock_type != null) : !this$stock_type.equals(other$stock_type))
|
||||
return false;
|
||||
Object this$stock_plate = getStock_plate(), other$stock_plate = other.getStock_plate();
|
||||
return !((this$stock_plate == null) ? (other$stock_plate != null) : !this$stock_plate.equals(other$stock_plate));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof StockListVO;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
Object $name = getName();
|
||||
result = result * 59 + (($name == null) ? 43 : $name.hashCode());
|
||||
Object $code = getCode();
|
||||
result = result * 59 + (($code == null) ? 43 : $code.hashCode());
|
||||
Object $spell = getSpell();
|
||||
result = result * 59 + (($spell == null) ? 43 : $spell.hashCode());
|
||||
Object $gid = getGid();
|
||||
result = result * 59 + (($gid == null) ? 43 : $gid.hashCode());
|
||||
Object $nowPrice = getNowPrice();
|
||||
result = result * 59 + (($nowPrice == null) ? 43 : $nowPrice.hashCode());
|
||||
Object $hcrate = getHcrate();
|
||||
result = result * 59 + (($hcrate == null) ? 43 : $hcrate.hashCode());
|
||||
Object $today_max = getToday_max();
|
||||
result = result * 59 + (($today_max == null) ? 43 : $today_max.hashCode());
|
||||
Object $today_min = getToday_min();
|
||||
result = result * 59 + (($today_min == null) ? 43 : $today_min.hashCode());
|
||||
Object $business_balance = getBusiness_balance();
|
||||
result = result * 59 + (($business_balance == null) ? 43 : $business_balance.hashCode());
|
||||
Object $business_amount = getBusiness_amount();
|
||||
result = result * 59 + (($business_amount == null) ? 43 : $business_amount.hashCode());
|
||||
Object $preclose_px = getPreclose_px();
|
||||
result = result * 59 + (($preclose_px == null) ? 43 : $preclose_px.hashCode());
|
||||
Object $open_px = getOpen_px();
|
||||
result = result * 59 + (($open_px == null) ? 43 : $open_px.hashCode());
|
||||
Object $day3Rate = getDay3Rate();
|
||||
result = result * 59 + (($day3Rate == null) ? 43 : $day3Rate.hashCode());
|
||||
Object $stock_type = getStock_type();
|
||||
result = result * 59 + (($stock_type == null) ? 43 : $stock_type.hashCode());
|
||||
Object $stock_plate = getStock_plate();
|
||||
return result * 59 + (($stock_plate == null) ? 43 : $stock_plate.hashCode());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "StockListVO(name=" + getName() + ", code=" + getCode() + ", spell=" + getSpell() + ", gid=" + getGid() + ", nowPrice=" + getNowPrice() + ", hcrate=" + getHcrate() + ", today_max=" + getToday_max() + ", today_min=" + getToday_min() + ", business_balance=" + getBusiness_balance() + ", business_amount=" + getBusiness_amount() + ", preclose_px=" + getPreclose_px() + ", open_px=" + getOpen_px() + ", day3Rate=" + getDay3Rate() + ", stock_type=" + getStock_type() + ", stock_plate=" + getStock_plate() + ")";
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
public String getSpell() {
|
||||
return this.spell;
|
||||
}
|
||||
|
||||
public String getGid() {
|
||||
return this.gid;
|
||||
}
|
||||
|
||||
|
||||
public String getNowPrice() {
|
||||
return this.nowPrice;
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal getHcrate() {
|
||||
return this.hcrate;
|
||||
}
|
||||
|
||||
|
||||
public String getToday_max() {
|
||||
return this.today_max;
|
||||
}
|
||||
|
||||
|
||||
public String getToday_min() {
|
||||
return this.today_min;
|
||||
}
|
||||
|
||||
|
||||
public String getBusiness_balance() {
|
||||
return this.business_balance;
|
||||
}
|
||||
|
||||
|
||||
public String getBusiness_amount() {
|
||||
return this.business_amount;
|
||||
}
|
||||
|
||||
|
||||
public String getPreclose_px() {
|
||||
return this.preclose_px;
|
||||
}
|
||||
|
||||
|
||||
public String getOpen_px() {
|
||||
return this.open_px;
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal getDay3Rate() {
|
||||
return this.day3Rate;
|
||||
}
|
||||
|
||||
|
||||
public String getStock_type() {
|
||||
return this.stock_type;
|
||||
}
|
||||
|
||||
public String getStock_plate() {
|
||||
return this.stock_plate;
|
||||
}
|
||||
|
||||
public String getIsOption() {
|
||||
return isOption;
|
||||
}
|
||||
|
||||
public void setIsOption(String isOption) {
|
||||
this.isOption = isOption;
|
||||
}
|
||||
}
|
||||
23
src/main/java/cn/stock/market/dto/model/StockPrice.java
Normal file
23
src/main/java/cn/stock/market/dto/model/StockPrice.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class StockPrice implements IStockPrice {
|
||||
BigDecimal price;
|
||||
|
||||
@Override
|
||||
public BigDecimal price() {
|
||||
return price;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal yesterdayPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public static StockPrice of(BigDecimal price) {
|
||||
StockPrice p = new StockPrice();
|
||||
p.price = price;
|
||||
return p;
|
||||
}
|
||||
}
|
||||
34
src/main/java/cn/stock/market/dto/model/StockThumb.java
Normal file
34
src/main/java/cn/stock/market/dto/model/StockThumb.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StockThumb {
|
||||
Integer id;
|
||||
String source;
|
||||
/**
|
||||
* 股票名称
|
||||
*/
|
||||
String name;
|
||||
/**
|
||||
* 股票代码
|
||||
*/
|
||||
String code;
|
||||
/**
|
||||
* 股票简拼
|
||||
*/
|
||||
String pinyin;
|
||||
String jys;
|
||||
|
||||
String market;
|
||||
|
||||
JSONObject ext;
|
||||
}
|
||||
605
src/main/java/cn/stock/market/dto/model/StockVO.java
Normal file
605
src/main/java/cn/stock/market/dto/model/StockVO.java
Normal file
@@ -0,0 +1,605 @@
|
||||
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import cn.stock.market.domain.basic.entity.Stock;
|
||||
import cn.stock.market.utils.Utils;
|
||||
|
||||
public class StockVO {
|
||||
private int id;
|
||||
private String name;
|
||||
private String code;
|
||||
private String spell;
|
||||
private String gid;
|
||||
private String nowPrice;
|
||||
private BigDecimal hcrate;
|
||||
private String today_max;
|
||||
private String today_min;
|
||||
|
||||
private String business_balance;
|
||||
|
||||
private String business_amount;
|
||||
|
||||
private String preclose_px;
|
||||
|
||||
private String open_px;
|
||||
|
||||
private String buy1;
|
||||
|
||||
private String buy2;
|
||||
|
||||
private String buy3;
|
||||
|
||||
private String buy4;
|
||||
|
||||
private String buy5;
|
||||
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
private String sell1;
|
||||
private String sell2;
|
||||
private String sell3;
|
||||
private String sell4;
|
||||
private String sell5;
|
||||
private String buy1_num;
|
||||
private String buy2_num;
|
||||
private String buy3_num;
|
||||
private String buy4_num;
|
||||
private String buy5_num;
|
||||
private String sell1_num;
|
||||
private String sell2_num;
|
||||
private String sell3_num;
|
||||
private String sell4_num;
|
||||
private String sell5_num;
|
||||
private String minImg;
|
||||
private String dayImg;
|
||||
private String weekImg;
|
||||
private String monthImg;
|
||||
|
||||
private Integer depositAmt;
|
||||
|
||||
public static StockVO from(StockDetail detail, Stock stock) {
|
||||
StockVO vo = new StockVO();
|
||||
if(stock != null) {
|
||||
vo.setId(stock.getId());
|
||||
vo.setCode(stock.getStockCode());
|
||||
vo.setSpell(stock.getStockSpell());
|
||||
vo.setGid(stock.getStockGid());
|
||||
}
|
||||
|
||||
vo.setName(detail.getName());
|
||||
vo.setCode(detail.getCode());
|
||||
// vo.setGid(Utils.fenxi(detail.getCode()));
|
||||
vo.setNowPrice(String.valueOf(detail.getCurrentPrice()));
|
||||
vo.setHcrate(detail.getPriceRate().setScale(2));
|
||||
vo.setToday_max(String.valueOf(detail.getHighest()));
|
||||
vo.setToday_min(String.valueOf(detail.getLowest()));
|
||||
|
||||
vo.setBuy1(String.valueOf(detail.getBuyOnePrice()));
|
||||
vo.setBuy2(String.valueOf(detail.getBuyTwoPrice()));
|
||||
vo.setBuy3(String.valueOf(detail.getBuyThreePrice()));
|
||||
vo.setBuy4(String.valueOf(detail.getBuyFourPrice()));
|
||||
vo.setBuy5(String.valueOf(detail.getBuyFivePrice()));
|
||||
|
||||
vo.setSell1(String.valueOf(detail.getSellOnePrice()));
|
||||
vo.setSell2(String.valueOf(detail.getSellTwoPrice()));
|
||||
vo.setSell3(String.valueOf(detail.getSellThreePrice()));
|
||||
vo.setSell4(String.valueOf(detail.getSellFourPrice()));
|
||||
vo.setSell5(String.valueOf(detail.getSellFivePrice()));
|
||||
|
||||
vo.setBuy1_num(String.valueOf(detail.getBuyOneAmount()));
|
||||
vo.setBuy2_num(String.valueOf(detail.getBuyTwoAmount()));
|
||||
vo.setBuy3_num(String.valueOf(detail.getBuyThreeAmount()));
|
||||
vo.setBuy4_num(String.valueOf(detail.getBuyFourAmount()));
|
||||
vo.setBuy5_num(String.valueOf(detail.getBuyFiveAmount()));
|
||||
|
||||
vo.setSell1_num(String.valueOf(detail.getSellOneAmount()));
|
||||
vo.setSell2_num(String.valueOf(detail.getSellTwoAmount()));
|
||||
vo.setSell3_num(String.valueOf(detail.getSellThreeAmount()));
|
||||
vo.setSell4_num(String.valueOf(detail.getSellFourAmount()));
|
||||
vo.setSell5_num(String.valueOf(detail.getSellFiveAmount()));
|
||||
|
||||
vo.setOpen_px(String.valueOf(detail.getOpenPrice()));
|
||||
vo.setPreclose_px(String.valueOf(detail.getYesterdayPrice()));
|
||||
vo.setBusiness_balance(String.valueOf(detail.getTurnover()));
|
||||
vo.setBusiness_amount(String.valueOf(detail.getVolume()));
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setSpell(String spell) {
|
||||
this.spell = spell;
|
||||
}
|
||||
|
||||
public void setGid(String gid) {
|
||||
this.gid = gid;
|
||||
}
|
||||
|
||||
public void setNowPrice(String nowPrice) {
|
||||
this.nowPrice = nowPrice;
|
||||
}
|
||||
|
||||
public void setHcrate(BigDecimal hcrate) {
|
||||
this.hcrate = hcrate;
|
||||
}
|
||||
|
||||
public void setToday_max(String today_max) {
|
||||
this.today_max = today_max;
|
||||
}
|
||||
|
||||
public void setToday_min(String today_min) {
|
||||
this.today_min = today_min;
|
||||
}
|
||||
|
||||
public void setBusiness_balance(String business_balance) {
|
||||
this.business_balance = business_balance;
|
||||
}
|
||||
|
||||
public void setBusiness_amount(String business_amount) {
|
||||
this.business_amount = business_amount;
|
||||
}
|
||||
|
||||
public void setPreclose_px(String preclose_px) {
|
||||
this.preclose_px = preclose_px;
|
||||
}
|
||||
|
||||
public void setOpen_px(String open_px) {
|
||||
this.open_px = open_px;
|
||||
}
|
||||
|
||||
public void setBuy1(String buy1) {
|
||||
this.buy1 = buy1;
|
||||
}
|
||||
|
||||
public void setBuy2(String buy2) {
|
||||
this.buy2 = buy2;
|
||||
}
|
||||
|
||||
public void setBuy3(String buy3) {
|
||||
this.buy3 = buy3;
|
||||
}
|
||||
|
||||
public void setBuy4(String buy4) {
|
||||
this.buy4 = buy4;
|
||||
}
|
||||
|
||||
public void setBuy5(String buy5) {
|
||||
this.buy5 = buy5;
|
||||
}
|
||||
|
||||
public void setSell1(String sell1) {
|
||||
this.sell1 = sell1;
|
||||
}
|
||||
|
||||
public void setSell2(String sell2) {
|
||||
this.sell2 = sell2;
|
||||
}
|
||||
|
||||
public void setSell3(String sell3) {
|
||||
this.sell3 = sell3;
|
||||
}
|
||||
|
||||
public void setSell4(String sell4) {
|
||||
this.sell4 = sell4;
|
||||
}
|
||||
|
||||
public void setSell5(String sell5) {
|
||||
this.sell5 = sell5;
|
||||
}
|
||||
|
||||
public void setBuy1_num(String buy1_num) {
|
||||
this.buy1_num = buy1_num;
|
||||
}
|
||||
|
||||
public void setBuy2_num(String buy2_num) {
|
||||
this.buy2_num = buy2_num;
|
||||
}
|
||||
|
||||
public void setBuy3_num(String buy3_num) {
|
||||
this.buy3_num = buy3_num;
|
||||
}
|
||||
|
||||
public void setBuy4_num(String buy4_num) {
|
||||
this.buy4_num = buy4_num;
|
||||
}
|
||||
|
||||
public void setBuy5_num(String buy5_num) {
|
||||
this.buy5_num = buy5_num;
|
||||
}
|
||||
|
||||
public void setSell1_num(String sell1_num) {
|
||||
this.sell1_num = sell1_num;
|
||||
}
|
||||
|
||||
public void setSell2_num(String sell2_num) {
|
||||
this.sell2_num = sell2_num;
|
||||
}
|
||||
|
||||
public void setSell3_num(String sell3_num) {
|
||||
this.sell3_num = sell3_num;
|
||||
}
|
||||
|
||||
public void setSell4_num(String sell4_num) {
|
||||
this.sell4_num = sell4_num;
|
||||
}
|
||||
|
||||
public void setSell5_num(String sell5_num) {
|
||||
this.sell5_num = sell5_num;
|
||||
}
|
||||
|
||||
public void setMinImg(String minImg) {
|
||||
this.minImg = minImg;
|
||||
}
|
||||
|
||||
public void setDayImg(String dayImg) {
|
||||
this.dayImg = dayImg;
|
||||
}
|
||||
|
||||
public void setWeekImg(String weekImg) {
|
||||
this.weekImg = weekImg;
|
||||
}
|
||||
|
||||
public void setMonthImg(String monthImg) {
|
||||
this.monthImg = monthImg;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) return true;
|
||||
if (!(o instanceof StockVO)) return false;
|
||||
StockVO other = (StockVO) o;
|
||||
if (!other.canEqual(this)) return false;
|
||||
if (getId() != other.getId()) return false;
|
||||
Object this$name = getName(), other$name = other.getName();
|
||||
if ((this$name == null) ? (other$name != null) : !this$name.equals(other$name)) return false;
|
||||
Object this$code = getCode(), other$code = other.getCode();
|
||||
if ((this$code == null) ? (other$code != null) : !this$code.equals(other$code)) return false;
|
||||
Object this$spell = getSpell(), other$spell = other.getSpell();
|
||||
if ((this$spell == null) ? (other$spell != null) : !this$spell.equals(other$spell)) return false;
|
||||
Object this$gid = getGid(), other$gid = other.getGid();
|
||||
if ((this$gid == null) ? (other$gid != null) : !this$gid.equals(other$gid)) return false;
|
||||
Object this$nowPrice = getNowPrice(), other$nowPrice = other.getNowPrice();
|
||||
if ((this$nowPrice == null) ? (other$nowPrice != null) : !this$nowPrice.equals(other$nowPrice)) return false;
|
||||
Object this$hcrate = getHcrate(), other$hcrate = other.getHcrate();
|
||||
if ((this$hcrate == null) ? (other$hcrate != null) : !this$hcrate.equals(other$hcrate)) return false;
|
||||
Object this$today_max = getToday_max(), other$today_max = other.getToday_max();
|
||||
if ((this$today_max == null) ? (other$today_max != null) : !this$today_max.equals(other$today_max))
|
||||
return false;
|
||||
Object this$today_min = getToday_min(), other$today_min = other.getToday_min();
|
||||
if ((this$today_min == null) ? (other$today_min != null) : !this$today_min.equals(other$today_min))
|
||||
return false;
|
||||
Object this$business_balance = getBusiness_balance(), other$business_balance = other.getBusiness_balance();
|
||||
if ((this$business_balance == null) ? (other$business_balance != null) : !this$business_balance.equals(other$business_balance))
|
||||
return false;
|
||||
Object this$business_amount = getBusiness_amount(), other$business_amount = other.getBusiness_amount();
|
||||
if ((this$business_amount == null) ? (other$business_amount != null) : !this$business_amount.equals(other$business_amount))
|
||||
return false;
|
||||
Object this$preclose_px = getPreclose_px(), other$preclose_px = other.getPreclose_px();
|
||||
if ((this$preclose_px == null) ? (other$preclose_px != null) : !this$preclose_px.equals(other$preclose_px))
|
||||
return false;
|
||||
Object this$open_px = getOpen_px(), other$open_px = other.getOpen_px();
|
||||
if ((this$open_px == null) ? (other$open_px != null) : !this$open_px.equals(other$open_px)) return false;
|
||||
Object this$buy1 = getBuy1(), other$buy1 = other.getBuy1();
|
||||
if ((this$buy1 == null) ? (other$buy1 != null) : !this$buy1.equals(other$buy1)) return false;
|
||||
Object this$buy2 = getBuy2(), other$buy2 = other.getBuy2();
|
||||
if ((this$buy2 == null) ? (other$buy2 != null) : !this$buy2.equals(other$buy2)) return false;
|
||||
Object this$buy3 = getBuy3(), other$buy3 = other.getBuy3();
|
||||
if ((this$buy3 == null) ? (other$buy3 != null) : !this$buy3.equals(other$buy3)) return false;
|
||||
Object this$buy4 = getBuy4(), other$buy4 = other.getBuy4();
|
||||
if ((this$buy4 == null) ? (other$buy4 != null) : !this$buy4.equals(other$buy4)) return false;
|
||||
Object this$buy5 = getBuy5(), other$buy5 = other.getBuy5();
|
||||
if ((this$buy5 == null) ? (other$buy5 != null) : !this$buy5.equals(other$buy5)) return false;
|
||||
Object this$sell1 = getSell1(), other$sell1 = other.getSell1();
|
||||
if ((this$sell1 == null) ? (other$sell1 != null) : !this$sell1.equals(other$sell1)) return false;
|
||||
Object this$sell2 = getSell2(), other$sell2 = other.getSell2();
|
||||
if ((this$sell2 == null) ? (other$sell2 != null) : !this$sell2.equals(other$sell2)) return false;
|
||||
Object this$sell3 = getSell3(), other$sell3 = other.getSell3();
|
||||
if ((this$sell3 == null) ? (other$sell3 != null) : !this$sell3.equals(other$sell3)) return false;
|
||||
Object this$sell4 = getSell4(), other$sell4 = other.getSell4();
|
||||
if ((this$sell4 == null) ? (other$sell4 != null) : !this$sell4.equals(other$sell4)) return false;
|
||||
Object this$sell5 = getSell5(), other$sell5 = other.getSell5();
|
||||
if ((this$sell5 == null) ? (other$sell5 != null) : !this$sell5.equals(other$sell5)) return false;
|
||||
Object this$buy1_num = getBuy1_num(), other$buy1_num = other.getBuy1_num();
|
||||
if ((this$buy1_num == null) ? (other$buy1_num != null) : !this$buy1_num.equals(other$buy1_num)) return false;
|
||||
Object this$buy2_num = getBuy2_num(), other$buy2_num = other.getBuy2_num();
|
||||
if ((this$buy2_num == null) ? (other$buy2_num != null) : !this$buy2_num.equals(other$buy2_num)) return false;
|
||||
Object this$buy3_num = getBuy3_num(), other$buy3_num = other.getBuy3_num();
|
||||
if ((this$buy3_num == null) ? (other$buy3_num != null) : !this$buy3_num.equals(other$buy3_num)) return false;
|
||||
Object this$buy4_num = getBuy4_num(), other$buy4_num = other.getBuy4_num();
|
||||
if ((this$buy4_num == null) ? (other$buy4_num != null) : !this$buy4_num.equals(other$buy4_num)) return false;
|
||||
Object this$buy5_num = getBuy5_num(), other$buy5_num = other.getBuy5_num();
|
||||
if ((this$buy5_num == null) ? (other$buy5_num != null) : !this$buy5_num.equals(other$buy5_num)) return false;
|
||||
Object this$sell1_num = getSell1_num(), other$sell1_num = other.getSell1_num();
|
||||
if ((this$sell1_num == null) ? (other$sell1_num != null) : !this$sell1_num.equals(other$sell1_num))
|
||||
return false;
|
||||
Object this$sell2_num = getSell2_num(), other$sell2_num = other.getSell2_num();
|
||||
if ((this$sell2_num == null) ? (other$sell2_num != null) : !this$sell2_num.equals(other$sell2_num))
|
||||
return false;
|
||||
Object this$sell3_num = getSell3_num(), other$sell3_num = other.getSell3_num();
|
||||
if ((this$sell3_num == null) ? (other$sell3_num != null) : !this$sell3_num.equals(other$sell3_num))
|
||||
return false;
|
||||
Object this$sell4_num = getSell4_num(), other$sell4_num = other.getSell4_num();
|
||||
if ((this$sell4_num == null) ? (other$sell4_num != null) : !this$sell4_num.equals(other$sell4_num))
|
||||
return false;
|
||||
Object this$sell5_num = getSell5_num(), other$sell5_num = other.getSell5_num();
|
||||
if ((this$sell5_num == null) ? (other$sell5_num != null) : !this$sell5_num.equals(other$sell5_num))
|
||||
return false;
|
||||
Object this$minImg = getMinImg(), other$minImg = other.getMinImg();
|
||||
if ((this$minImg == null) ? (other$minImg != null) : !this$minImg.equals(other$minImg)) return false;
|
||||
Object this$dayImg = getDayImg(), other$dayImg = other.getDayImg();
|
||||
if ((this$dayImg == null) ? (other$dayImg != null) : !this$dayImg.equals(other$dayImg)) return false;
|
||||
Object this$weekImg = getWeekImg(), other$weekImg = other.getWeekImg();
|
||||
if ((this$weekImg == null) ? (other$weekImg != null) : !this$weekImg.equals(other$weekImg)) return false;
|
||||
Object this$monthImg = getMonthImg(), other$monthImg = other.getMonthImg();
|
||||
return !((this$monthImg == null) ? (other$monthImg != null) : !this$monthImg.equals(other$monthImg));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof StockVO;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
result = result * 59 + getId();
|
||||
Object $name = getName();
|
||||
result = result * 59 + (($name == null) ? 43 : $name.hashCode());
|
||||
Object $code = getCode();
|
||||
result = result * 59 + (($code == null) ? 43 : $code.hashCode());
|
||||
Object $spell = getSpell();
|
||||
result = result * 59 + (($spell == null) ? 43 : $spell.hashCode());
|
||||
Object $gid = getGid();
|
||||
result = result * 59 + (($gid == null) ? 43 : $gid.hashCode());
|
||||
Object $nowPrice = getNowPrice();
|
||||
result = result * 59 + (($nowPrice == null) ? 43 : $nowPrice.hashCode());
|
||||
Object $hcrate = getHcrate();
|
||||
result = result * 59 + (($hcrate == null) ? 43 : $hcrate.hashCode());
|
||||
Object $today_max = getToday_max();
|
||||
result = result * 59 + (($today_max == null) ? 43 : $today_max.hashCode());
|
||||
Object $today_min = getToday_min();
|
||||
result = result * 59 + (($today_min == null) ? 43 : $today_min.hashCode());
|
||||
Object $business_balance = getBusiness_balance();
|
||||
result = result * 59 + (($business_balance == null) ? 43 : $business_balance.hashCode());
|
||||
Object $business_amount = getBusiness_amount();
|
||||
result = result * 59 + (($business_amount == null) ? 43 : $business_amount.hashCode());
|
||||
Object $preclose_px = getPreclose_px();
|
||||
result = result * 59 + (($preclose_px == null) ? 43 : $preclose_px.hashCode());
|
||||
Object $open_px = getOpen_px();
|
||||
result = result * 59 + (($open_px == null) ? 43 : $open_px.hashCode());
|
||||
Object $buy1 = getBuy1();
|
||||
result = result * 59 + (($buy1 == null) ? 43 : $buy1.hashCode());
|
||||
Object $buy2 = getBuy2();
|
||||
result = result * 59 + (($buy2 == null) ? 43 : $buy2.hashCode());
|
||||
Object $buy3 = getBuy3();
|
||||
result = result * 59 + (($buy3 == null) ? 43 : $buy3.hashCode());
|
||||
Object $buy4 = getBuy4();
|
||||
result = result * 59 + (($buy4 == null) ? 43 : $buy4.hashCode());
|
||||
Object $buy5 = getBuy5();
|
||||
result = result * 59 + (($buy5 == null) ? 43 : $buy5.hashCode());
|
||||
Object $sell1 = getSell1();
|
||||
result = result * 59 + (($sell1 == null) ? 43 : $sell1.hashCode());
|
||||
Object $sell2 = getSell2();
|
||||
result = result * 59 + (($sell2 == null) ? 43 : $sell2.hashCode());
|
||||
Object $sell3 = getSell3();
|
||||
result = result * 59 + (($sell3 == null) ? 43 : $sell3.hashCode());
|
||||
Object $sell4 = getSell4();
|
||||
result = result * 59 + (($sell4 == null) ? 43 : $sell4.hashCode());
|
||||
Object $sell5 = getSell5();
|
||||
result = result * 59 + (($sell5 == null) ? 43 : $sell5.hashCode());
|
||||
Object $buy1_num = getBuy1_num();
|
||||
result = result * 59 + (($buy1_num == null) ? 43 : $buy1_num.hashCode());
|
||||
Object $buy2_num = getBuy2_num();
|
||||
result = result * 59 + (($buy2_num == null) ? 43 : $buy2_num.hashCode());
|
||||
Object $buy3_num = getBuy3_num();
|
||||
result = result * 59 + (($buy3_num == null) ? 43 : $buy3_num.hashCode());
|
||||
Object $buy4_num = getBuy4_num();
|
||||
result = result * 59 + (($buy4_num == null) ? 43 : $buy4_num.hashCode());
|
||||
Object $buy5_num = getBuy5_num();
|
||||
result = result * 59 + (($buy5_num == null) ? 43 : $buy5_num.hashCode());
|
||||
Object $sell1_num = getSell1_num();
|
||||
result = result * 59 + (($sell1_num == null) ? 43 : $sell1_num.hashCode());
|
||||
Object $sell2_num = getSell2_num();
|
||||
result = result * 59 + (($sell2_num == null) ? 43 : $sell2_num.hashCode());
|
||||
Object $sell3_num = getSell3_num();
|
||||
result = result * 59 + (($sell3_num == null) ? 43 : $sell3_num.hashCode());
|
||||
Object $sell4_num = getSell4_num();
|
||||
result = result * 59 + (($sell4_num == null) ? 43 : $sell4_num.hashCode());
|
||||
Object $sell5_num = getSell5_num();
|
||||
result = result * 59 + (($sell5_num == null) ? 43 : $sell5_num.hashCode());
|
||||
Object $minImg = getMinImg();
|
||||
result = result * 59 + (($minImg == null) ? 43 : $minImg.hashCode());
|
||||
Object $dayImg = getDayImg();
|
||||
result = result * 59 + (($dayImg == null) ? 43 : $dayImg.hashCode());
|
||||
Object $weekImg = getWeekImg();
|
||||
result = result * 59 + (($weekImg == null) ? 43 : $weekImg.hashCode());
|
||||
Object $monthImg = getMonthImg();
|
||||
return result * 59 + (($monthImg == null) ? 43 : $monthImg.hashCode());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "StockVO(id=" + getId() + ", name=" + getName() + ", code=" + getCode() + ", spell=" + getSpell() + ", gid=" + getGid() + ", nowPrice=" + getNowPrice() + ", hcrate=" + getHcrate() + ", today_max=" + getToday_max() + ", today_min=" + getToday_min() + ", business_balance=" + getBusiness_balance() + ", business_amount=" + getBusiness_amount() + ", preclose_px=" + getPreclose_px() + ", open_px=" + getOpen_px() + ", buy1=" + getBuy1() + ", buy2=" + getBuy2() + ", buy3=" + getBuy3() + ", buy4=" + getBuy4() + ", buy5=" + getBuy5() + ", sell1=" + getSell1() + ", sell2=" + getSell2() + ", sell3=" + getSell3() + ", sell4=" + getSell4() + ", sell5=" + getSell5() + ", buy1_num=" + getBuy1_num() + ", buy2_num=" + getBuy2_num() + ", buy3_num=" + getBuy3_num() + ", buy4_num=" + getBuy4_num() + ", buy5_num=" + getBuy5_num() + ", sell1_num=" + getSell1_num() + ", sell2_num=" + getSell2_num() + ", sell3_num=" + getSell3_num() + ", sell4_num=" + getSell4_num() + ", sell5_num=" + getSell5_num() + ", minImg=" + getMinImg() + ", dayImg=" + getDayImg() + ", weekImg=" + getWeekImg() + ", monthImg=" + getMonthImg()+ ", depositAmt=" + getDepositAmt() + ")";
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
public String getSpell() {
|
||||
return this.spell;
|
||||
}
|
||||
|
||||
public String getGid() {
|
||||
return this.gid;
|
||||
}
|
||||
|
||||
|
||||
public String getNowPrice() {
|
||||
return this.nowPrice;
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal getHcrate() {
|
||||
return this.hcrate;
|
||||
}
|
||||
|
||||
|
||||
public String getToday_max() {
|
||||
return this.today_max;
|
||||
}
|
||||
|
||||
|
||||
public String getToday_min() {
|
||||
return this.today_min;
|
||||
}
|
||||
|
||||
|
||||
public String getBusiness_balance() {
|
||||
return this.business_balance;
|
||||
}
|
||||
|
||||
|
||||
public String getBusiness_amount() {
|
||||
return this.business_amount;
|
||||
}
|
||||
|
||||
|
||||
public String getPreclose_px() {
|
||||
return this.preclose_px;
|
||||
}
|
||||
|
||||
|
||||
public String getOpen_px() {
|
||||
return this.open_px;
|
||||
}
|
||||
|
||||
|
||||
public String getBuy1() {
|
||||
return this.buy1;
|
||||
}
|
||||
|
||||
public String getBuy2() {
|
||||
return this.buy2;
|
||||
}
|
||||
|
||||
public String getBuy3() {
|
||||
return this.buy3;
|
||||
}
|
||||
|
||||
public String getBuy4() {
|
||||
return this.buy4;
|
||||
}
|
||||
|
||||
public String getBuy5() {
|
||||
return this.buy5;
|
||||
}
|
||||
|
||||
|
||||
public String getSell1() {
|
||||
return this.sell1;
|
||||
}
|
||||
|
||||
public String getSell2() {
|
||||
return this.sell2;
|
||||
}
|
||||
|
||||
public String getSell3() {
|
||||
return this.sell3;
|
||||
}
|
||||
|
||||
public String getSell4() {
|
||||
return this.sell4;
|
||||
}
|
||||
|
||||
public String getSell5() {
|
||||
return this.sell5;
|
||||
}
|
||||
|
||||
|
||||
public String getBuy1_num() {
|
||||
return this.buy1_num;
|
||||
}
|
||||
|
||||
public String getBuy2_num() {
|
||||
return this.buy2_num;
|
||||
}
|
||||
|
||||
public String getBuy3_num() {
|
||||
return this.buy3_num;
|
||||
}
|
||||
|
||||
public String getBuy4_num() {
|
||||
return this.buy4_num;
|
||||
}
|
||||
|
||||
public String getBuy5_num() {
|
||||
return this.buy5_num;
|
||||
}
|
||||
|
||||
|
||||
public String getSell1_num() {
|
||||
return this.sell1_num;
|
||||
}
|
||||
|
||||
public String getSell2_num() {
|
||||
return this.sell2_num;
|
||||
}
|
||||
|
||||
public String getSell3_num() {
|
||||
return this.sell3_num;
|
||||
}
|
||||
|
||||
public String getSell4_num() {
|
||||
return this.sell4_num;
|
||||
}
|
||||
|
||||
public String getSell5_num() {
|
||||
return this.sell5_num;
|
||||
}
|
||||
|
||||
|
||||
public String getMinImg() {
|
||||
return this.minImg;
|
||||
}
|
||||
|
||||
public String getDayImg() {
|
||||
return this.dayImg;
|
||||
}
|
||||
|
||||
public String getWeekImg() {
|
||||
return this.weekImg;
|
||||
}
|
||||
|
||||
public String getMonthImg() {
|
||||
return this.monthImg;
|
||||
}
|
||||
|
||||
public Integer getDepositAmt() {
|
||||
return depositAmt;
|
||||
}
|
||||
|
||||
public void setDepositAmt(Integer depositAmt) {
|
||||
this.depositAmt = depositAmt;
|
||||
}
|
||||
}
|
||||
|
||||
188
src/main/java/cn/stock/market/dto/model/Tax.java
Normal file
188
src/main/java/cn/stock/market/dto/model/Tax.java
Normal file
@@ -0,0 +1,188 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.List;
|
||||
|
||||
import com.ag.utils.CollectionUtils;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import cn.qutaojing.common.utils.BigDecimals;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@ApiModel("交易收费")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class Tax {
|
||||
@ApiModelProperty("平台汇总")
|
||||
public BigDecimal platformSum;
|
||||
@ApiModelProperty("三方汇总")
|
||||
public BigDecimal thirtySum;
|
||||
@ApiModelProperty("总汇总")
|
||||
public BigDecimal totalSum;
|
||||
|
||||
/**
|
||||
* 印花税
|
||||
*/
|
||||
@ApiModelProperty("印花税")
|
||||
public BigDecimal stampTax;
|
||||
/**
|
||||
* 佣金
|
||||
*/
|
||||
@ApiModelProperty("交易佣金")
|
||||
public BigDecimal commission;
|
||||
|
||||
@ApiModelProperty("平台费")
|
||||
public BigDecimal platformTax;
|
||||
|
||||
@ApiModelProperty("產品處理費")
|
||||
public BigDecimal productHandlerTax;
|
||||
@ApiModelProperty("證券管理費")
|
||||
public BigDecimal securitiesManageTax;
|
||||
@ApiModelProperty("交易活動費")
|
||||
public BigDecimal tradeActiTax;
|
||||
@ApiModelProperty("證監會費(僅賣單時收取) ")
|
||||
public BigDecimal securitiesTax;
|
||||
|
||||
@ApiModelProperty("结算费")
|
||||
public BigDecimal settlementTax;
|
||||
@ApiModelProperty("交易费")
|
||||
public BigDecimal tradeTax;
|
||||
@ApiModelProperty("交易征費")
|
||||
public BigDecimal tradeTranTax;
|
||||
@ApiModelProperty("交易所费用")
|
||||
public BigDecimal jysTax;
|
||||
@ApiModelProperty("財匯局交易征費")
|
||||
public BigDecimal chjTradeTranTax;
|
||||
|
||||
public void sum() {
|
||||
platformSum = BigDecimals.add(commission, platformTax);
|
||||
thirtySum = BigDecimals.add(stampTax, productHandlerTax, securitiesManageTax, tradeActiTax, securitiesTax, settlementTax, tradeTax, tradeTranTax, jysTax, chjTradeTranTax);
|
||||
totalSum = BigDecimals.add(platformSum, thirtySum);
|
||||
}
|
||||
|
||||
public static Tax subtract(Tax source, Tax ... t) {
|
||||
Tax tax = new Tax();
|
||||
Field[] fields = Tax.class.getFields();
|
||||
for (Field field : fields) {
|
||||
// Class<?> type = field.getType();
|
||||
// if(! type.isInstance(BigDecimal.class)) {
|
||||
// continue;
|
||||
// }
|
||||
field.setAccessible(true);
|
||||
|
||||
BigDecimal sourceValue = BigDecimal.ZERO;
|
||||
try {
|
||||
sourceValue = (BigDecimal) field.get(source);
|
||||
} catch (IllegalArgumentException | IllegalAccessException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if(sourceValue == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
List<BigDecimal> l = Lists.newArrayList();
|
||||
for (Tax _t : t) {
|
||||
if(_t == null) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
l.add((BigDecimal) field.get(_t));
|
||||
} catch (IllegalArgumentException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
field.set(tax, BigDecimals.lSubtract(sourceValue, l));
|
||||
} catch (IllegalArgumentException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
tax.sum();
|
||||
return tax;
|
||||
}
|
||||
|
||||
public static Tax multiply(Tax source, BigDecimal percent) {
|
||||
Tax tax = new Tax();
|
||||
Field[] fields = Tax.class.getFields();
|
||||
for (Field field : fields) {
|
||||
// Class<?> type = field.getType();
|
||||
// if(! type.isInstance(BigDecimal.class)) {
|
||||
// continue;
|
||||
// }
|
||||
field.setAccessible(true);
|
||||
|
||||
BigDecimal sourceValue = BigDecimal.ZERO;
|
||||
try {
|
||||
sourceValue = (BigDecimal) field.get(source);
|
||||
} catch (IllegalArgumentException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if(sourceValue == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
field.set(tax, BigDecimals.multiplys(sourceValue, percent).setScale(2, RoundingMode.DOWN));
|
||||
} catch (IllegalArgumentException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
tax.sum();
|
||||
return tax;
|
||||
}
|
||||
|
||||
public static Tax add(Tax ... t) {
|
||||
Tax tax = new Tax();
|
||||
Field[] fields = Tax.class.getFields();
|
||||
for (Field field : fields) {
|
||||
// Class<?> type = field.getType();
|
||||
// if(! type.isInstance(BigDecimal.class)) {
|
||||
// continue;
|
||||
// }
|
||||
field.setAccessible(true);
|
||||
|
||||
List<BigDecimal> l = Lists.newArrayList();
|
||||
for (Tax _t : t) {
|
||||
if(_t == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
l.add((BigDecimal) field.get(_t));
|
||||
} catch (IllegalArgumentException | IllegalAccessException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtils.isEmpty(l)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
field.set(tax, BigDecimals.lAdd(l).setScale(2, RoundingMode.DOWN));
|
||||
} catch (IllegalArgumentException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
tax.sum();
|
||||
return tax;
|
||||
}
|
||||
|
||||
}
|
||||
22
src/main/java/cn/stock/market/dto/model/TradeAccThumb.java
Normal file
22
src/main/java/cn/stock/market/dto/model/TradeAccThumb.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@NoArgsConstructor
|
||||
@ApiModel
|
||||
public class TradeAccThumb {
|
||||
Integer id;
|
||||
Integer destId;
|
||||
String role;
|
||||
String destName;
|
||||
String destPhone;
|
||||
String type;
|
||||
Integer fakeFlag;
|
||||
}
|
||||
121
src/main/java/cn/stock/market/dto/model/TradeSetting.java
Normal file
121
src/main/java/cn/stock/market/dto/model/TradeSetting.java
Normal file
@@ -0,0 +1,121 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ag.utils.StringConvertJSONObjectSerializer;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
import cn.qutaojing.common.utils.BigDecimals;
|
||||
import cn.qutaojing.common.utils.jackson.String2JsonObjSerializer;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("交易配置")
|
||||
public class TradeSetting {
|
||||
BigDecimal lostWarn;
|
||||
BigDecimal lostClose;
|
||||
BigDecimal preTradingDayCost;
|
||||
@ApiModelProperty("兑换手续费")
|
||||
BigDecimal exchange;
|
||||
@ApiModelProperty("配置的杠杆倍数")
|
||||
Integer multiple;
|
||||
|
||||
/**
|
||||
* 印花税
|
||||
*/
|
||||
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
@ApiModelProperty("印花税")
|
||||
String stampTax;
|
||||
/**
|
||||
* 佣金
|
||||
*/
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
@ApiModelProperty("交易佣金")
|
||||
String commission;
|
||||
|
||||
@ApiModelProperty("平台费")
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
String platformTax;
|
||||
|
||||
@ApiModelProperty("產品處理費")
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
String productHandlerTax;
|
||||
|
||||
@ApiModelProperty("證券管理費")
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
String securitiesManageTax;
|
||||
|
||||
@ApiModelProperty("交易活動費")
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
String tradeActiTax;
|
||||
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
@ApiModelProperty("證監會費(僅賣單時收取) ")
|
||||
String securitiesTax;
|
||||
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
@ApiModelProperty("结算费")
|
||||
String settlementTax;
|
||||
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
@ApiModelProperty("交易费")
|
||||
String tradeTax;
|
||||
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
@ApiModelProperty("交易征費")
|
||||
String tradeTranTax;
|
||||
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
@ApiModelProperty("交易所费用")
|
||||
String jysTax;
|
||||
|
||||
@JsonSerialize(using = String2JsonObjSerializer.class)
|
||||
@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
|
||||
@ApiModelProperty("財匯局交易征費")
|
||||
String chjTradeTranTax;
|
||||
|
||||
// @Deprecated
|
||||
// @ApiModelProperty("佣金比率")
|
||||
// BigDecimal commission;
|
||||
// @Deprecated
|
||||
// @ApiModelProperty("印花税")
|
||||
// BigDecimal stampTax;
|
||||
// @Deprecated
|
||||
// @ApiModelProperty("结算费")
|
||||
// BigDecimal settlementTax;
|
||||
// @Deprecated
|
||||
// @ApiModelProperty("交易征费")
|
||||
// BigDecimal tradeTax;
|
||||
// @Deprecated
|
||||
// @ApiModelProperty("交易所费用")
|
||||
// BigDecimal jysTax;
|
||||
|
||||
public void check() {
|
||||
if(lostWarn == null) lostWarn = BigDecimals.p(0.6);
|
||||
if(lostClose == null) lostClose = BigDecimals.p(0.3);
|
||||
if(preTradingDayCost == null) preTradingDayCost = BigDecimals.p(0.0015);
|
||||
if(multiple == null) multiple = 5;
|
||||
if(exchange == null) exchange = BigDecimals.p(0.01);
|
||||
|
||||
// if(stampTax == null) stampTax = BigDecimals.p(0.001);
|
||||
// if(commission == null) commission = BigDecimals.p(0.0008);
|
||||
// if(settlementTax == null) settlementTax = BigDecimals.p(0);
|
||||
// if(tradeTax == null) tradeTax = BigDecimals.p(0);
|
||||
// if(jysTax == null) jysTax = BigDecimals.p(0);
|
||||
}
|
||||
}
|
||||
34
src/main/java/cn/stock/market/dto/model/UserProtocol.java
Normal file
34
src/main/java/cn/stock/market/dto/model/UserProtocol.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* UserBankCreateCommand
|
||||
*
|
||||
* @author xlfd
|
||||
* @email xlfd@gmail.com
|
||||
* @created 2022/04/14
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
public class UserProtocol {
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotNull
|
||||
String mianzexieyi;
|
||||
|
||||
@NotNull
|
||||
String xinpofengxiangaozhishu;
|
||||
|
||||
/**
|
||||
* 所属银行
|
||||
*/
|
||||
@NotNull
|
||||
String xinpoweituoxieyi;
|
||||
}
|
||||
22
src/main/java/cn/stock/market/dto/model/UserThumb.java
Normal file
22
src/main/java/cn/stock/market/dto/model/UserThumb.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package cn.stock.market.dto.model;
|
||||
|
||||
import cn.qutaojing.common.DestInfo;
|
||||
import cn.qutaojing.common.constant.RoleEnum;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserThumb {
|
||||
Integer id;
|
||||
String phoneNo;
|
||||
String nickName;
|
||||
String headPortrait;
|
||||
|
||||
public DestInfo destInfo() {
|
||||
return DestInfo.builder()
|
||||
.id(String.valueOf(this.getId()))
|
||||
.name(this.getNickName())
|
||||
.phone(this.getPhoneNo())
|
||||
.re(RoleEnum.USER)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package cn.stock.market.dto.query;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.querydsl.core.types.dsl.BooleanExpression;
|
||||
|
||||
import cn.qutaojing.common.jpa.ConditionBuilder;
|
||||
import cn.stock.market.infrastructure.db.po.QSiteArticlePO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @Author: Radish
|
||||
* @Date: 2021-08-16 14:26
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel("文章聚合条件")
|
||||
public class SiteArticleQuery {
|
||||
|
||||
String artTitle;
|
||||
String artType;
|
||||
Integer isShow;
|
||||
|
||||
|
||||
public BooleanExpression where() {
|
||||
QSiteArticlePO q = QSiteArticlePO.siteArticlePO;
|
||||
ConditionBuilder builder = ConditionBuilder.builder();
|
||||
if (StringUtils.isNotBlank(artTitle)) {
|
||||
builder.and(q.artTitle.like("%" + artTitle + "%"));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(artType)) {
|
||||
builder.and(q.artType.like("%" + artType + "%"));
|
||||
}
|
||||
|
||||
if (isShow != null) {
|
||||
builder.and(q.isShow.eq(isShow));
|
||||
}
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
}
|
||||
67
src/main/java/cn/stock/market/dto/query/SiteNewsQuery.java
Normal file
67
src/main/java/cn/stock/market/dto/query/SiteNewsQuery.java
Normal file
@@ -0,0 +1,67 @@
|
||||
package cn.stock.market.dto.query;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.querydsl.core.types.OrderSpecifier;
|
||||
import com.querydsl.core.types.dsl.BooleanExpression;
|
||||
|
||||
import cn.qutaojing.common.jpa.ConditionBuilder;
|
||||
import cn.stock.market.infrastructure.db.po.QSiteNewsPO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @Author: Radish
|
||||
* @Date: 2021-08-16 14:26
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel("新闻聚合条件")
|
||||
public class SiteNewsQuery {
|
||||
static QSiteNewsPO q = QSiteNewsPO.siteNewsPO;
|
||||
Integer status;
|
||||
Integer type;
|
||||
String keyword;
|
||||
|
||||
String orderSpecifier;
|
||||
|
||||
public OrderSpecifier<?> orderSpecifier() {
|
||||
if ("idAsc".equals(orderSpecifier)) {
|
||||
return q.id.asc();
|
||||
} else if ("time1".equals(orderSpecifier)) {
|
||||
return q.showTime.desc();
|
||||
} else if ("time0".equals(orderSpecifier)) {
|
||||
return q.showTime.asc();
|
||||
} else if ("views1".equals(orderSpecifier)) {
|
||||
return q.views.desc();
|
||||
} else if ("views0".equals(orderSpecifier)) {
|
||||
return q.views.asc();
|
||||
}
|
||||
|
||||
return q.showTime.desc();
|
||||
}
|
||||
|
||||
public BooleanExpression where() {
|
||||
ConditionBuilder builder = ConditionBuilder.builder();
|
||||
if (StringUtils.isNotBlank(keyword)) {
|
||||
builder.and(q.title.like("%" + keyword + "%").or(q.sourceName.like("%" + keyword + "%")));
|
||||
}
|
||||
|
||||
if (status != null) {
|
||||
builder.and(q.status.eq(status));
|
||||
}
|
||||
|
||||
if (type != null) {
|
||||
builder.and(q.type.eq(type));
|
||||
}
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user