Commit a3870578 authored by liucx's avatar liucx

增加限制

parent d2208dc4
package com.zfxftech.telmarket.task.followAccount; package com.zfxftech.telmarket.task.followAccount;
import com.zfxftech.telmarket.common.config.CommonConfig; import com.zfxftech.telmarket.common.config.CommonConfig;
import com.zfxftech.telmarket.common.pojo.dao.MemberBase;
import com.zfxftech.telmarket.common.pojo.dao.asset.AssetAccountProductRelation; import com.zfxftech.telmarket.common.pojo.dao.asset.AssetAccountProductRelation;
import com.zfxftech.telmarket.common.pojo.dao.asset.AssetStockPosition; import com.zfxftech.telmarket.common.pojo.dao.asset.AssetStockPosition;
import com.zfxftech.telmarket.common.pojo.vo.asset.AssetMarketDetailsVO; import com.zfxftech.telmarket.common.pojo.vo.asset.AssetMarketDetailsVO;
import com.zfxftech.telmarket.common.util.BigDecimalUtil;
import com.zfxftech.telmarket.common.util.DateUtil; import com.zfxftech.telmarket.common.util.DateUtil;
import com.zfxftech.telmarket.common.util.OptionalUtil; import com.zfxftech.telmarket.common.util.OptionalUtil;
import com.zfxftech.telmarket.service.business.UsMemberBaseService;
import com.zfxftech.telmarket.service.business.asset.AssetAccountProductRelationService; import com.zfxftech.telmarket.service.business.asset.AssetAccountProductRelationService;
import com.zfxftech.telmarket.service.business.asset.AssetStockPositionService; import com.zfxftech.telmarket.service.business.asset.AssetStockPositionService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -29,9 +26,6 @@ import java.util.concurrent.ExecutorService; ...@@ -29,9 +26,6 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import static com.zfxftech.telmarket.common.constant.AdminConstant.MarketTypeEnum.REAL;
import static com.zfxftech.telmarket.common.constant.AdminConstant.MarketTypeEnum.SIMULATED;
/** /**
* Create time: 2022/1/26 * Create time: 2022/1/26
*/ */
...@@ -63,7 +57,7 @@ public class AssetStockPriceTask implements ApplicationRunner { ...@@ -63,7 +57,7 @@ public class AssetStockPriceTask implements ApplicationRunner {
ExecutorService executorServicePersonal = Executors.newFixedThreadPool(100); ExecutorService executorServicePersonal = Executors.newFixedThreadPool(100);
CompletableFuture.runAsync(() -> { CompletableFuture.runAsync(() -> {
while (true) { while (true) {
if (DateUtil.isTradeDayForChangeRemind()) { if (DateUtil.isTradeDayForChangeRemind()&& commonConfig.getStockPriceTask().equals("run")) {
// if (true) { // if (true) {
AtomicReference<Integer> pageNo = new AtomicReference<>(1); AtomicReference<Integer> pageNo = new AtomicReference<>(1);
Integer pageSize = 50; Integer pageSize = 50;
......
...@@ -2,11 +2,9 @@ package com.zfxftech.telmarket.task.followAccount; ...@@ -2,11 +2,9 @@ package com.zfxftech.telmarket.task.followAccount;
import com.zfxftech.telmarket.common.config.CommonConfig; import com.zfxftech.telmarket.common.config.CommonConfig;
import com.zfxftech.telmarket.common.pojo.dao.MemberBase; import com.zfxftech.telmarket.common.pojo.dao.MemberBase;
import com.zfxftech.telmarket.common.pojo.dao.asset.AssetAccountProductRelation;
import com.zfxftech.telmarket.common.pojo.dao.smart.SmartAccountProductRelation; import com.zfxftech.telmarket.common.pojo.dao.smart.SmartAccountProductRelation;
import com.zfxftech.telmarket.common.pojo.dao.smart.SmartStockPosition; import com.zfxftech.telmarket.common.pojo.dao.smart.SmartStockPosition;
import com.zfxftech.telmarket.common.pojo.vo.smart.SmartMarketDetailsVO; import com.zfxftech.telmarket.common.pojo.vo.smart.SmartMarketDetailsVO;
import com.zfxftech.telmarket.common.util.BigDecimalUtil;
import com.zfxftech.telmarket.common.util.DateUtil; import com.zfxftech.telmarket.common.util.DateUtil;
import com.zfxftech.telmarket.common.util.OptionalUtil; import com.zfxftech.telmarket.common.util.OptionalUtil;
import com.zfxftech.telmarket.service.business.UsMemberBaseService; import com.zfxftech.telmarket.service.business.UsMemberBaseService;
...@@ -67,7 +65,7 @@ public class SmartStockPriceTask implements ApplicationRunner { ...@@ -67,7 +65,7 @@ public class SmartStockPriceTask implements ApplicationRunner {
ExecutorService executorServicePersonal = Executors.newFixedThreadPool(100); ExecutorService executorServicePersonal = Executors.newFixedThreadPool(100);
CompletableFuture.runAsync(() -> { CompletableFuture.runAsync(() -> {
while (true) { while (true) {
if (DateUtil.isTradeDayForChangeRemind()) { if (DateUtil.isTradeDayForChangeRemind()&& commonConfig.getStockPriceTask().equals("run")) {
// if (true) { // if (true) {
AtomicReference<Integer> pageNo = new AtomicReference<>(1); AtomicReference<Integer> pageNo = new AtomicReference<>(1);
Integer pageSize = 50; Integer pageSize = 50;
......
...@@ -5,10 +5,11 @@ import com.zfxftech.telmarket.common.pojo.dao.AccountProductRelation; ...@@ -5,10 +5,11 @@ import com.zfxftech.telmarket.common.pojo.dao.AccountProductRelation;
import com.zfxftech.telmarket.common.pojo.dao.MemberBase; import com.zfxftech.telmarket.common.pojo.dao.MemberBase;
import com.zfxftech.telmarket.common.pojo.dao.StockPosition; import com.zfxftech.telmarket.common.pojo.dao.StockPosition;
import com.zfxftech.telmarket.common.pojo.vo.MarketDetailsVO; import com.zfxftech.telmarket.common.pojo.vo.MarketDetailsVO;
import com.zfxftech.telmarket.common.util.BigDecimalUtil;
import com.zfxftech.telmarket.common.util.DateUtil; import com.zfxftech.telmarket.common.util.DateUtil;
import com.zfxftech.telmarket.common.util.OptionalUtil; import com.zfxftech.telmarket.common.util.OptionalUtil;
import com.zfxftech.telmarket.service.business.*; import com.zfxftech.telmarket.service.business.AccountProductRelationService;
import com.zfxftech.telmarket.service.business.StockPositionService;
import com.zfxftech.telmarket.service.business.UsMemberBaseService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationArguments;
...@@ -64,7 +65,7 @@ public class StockPriceTask implements ApplicationRunner { ...@@ -64,7 +65,7 @@ public class StockPriceTask implements ApplicationRunner {
ExecutorService executorServicePersonal = Executors.newFixedThreadPool(100); ExecutorService executorServicePersonal = Executors.newFixedThreadPool(100);
CompletableFuture.runAsync(() -> { CompletableFuture.runAsync(() -> {
while (true) { while (true) {
if (DateUtil.isTradeDayForChangeRemind()) { if (DateUtil.isTradeDayForChangeRemind() && commonConfig.getStockPriceTask().equals("run")) {
// if (true) { // if (true) {
AtomicReference<Integer> pageNo = new AtomicReference<>(1); AtomicReference<Integer> pageNo = new AtomicReference<>(1);
Integer pageSize = 50; Integer pageSize = 50;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment