parent
e59c2f3c1e
commit
9963b062c0
8 changed files with 143 additions and 1 deletions
@ -0,0 +1,47 @@ |
||||
package com.blockchain.server.yyyf.indicators; |
||||
|
||||
import com.blockchain.server.yyyf.indicators.dto.AssetsReporter; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
public interface IndicatorsManager { |
||||
/** |
||||
* save assets reporter item |
||||
* |
||||
* @author fengyu.wang |
||||
* @date 2020-05-27 22:32:30 |
||||
*/ |
||||
void saveAssetsReporter(List<AssetsReporter> assetsReporterList); |
||||
|
||||
/** |
||||
* get assets reporter item by assessUserId |
||||
* |
||||
* @param assessUserId page result id |
||||
* @author fengyu.wang |
||||
* @date 2020-05-27 22:32:49 |
||||
*/ |
||||
List<AssetsReporter> getAssetsReporterListByAssessUserId(String assessUserId); |
||||
|
||||
/** |
||||
* calculate single indicator |
||||
* |
||||
* @param assessUserId page result id |
||||
* @param type indicators type |
||||
* @return indicators result |
||||
* @author fengyu.wang |
||||
* @date 2020-05-27 22:34:19 |
||||
*/ |
||||
float calculateIndicators(String assessUserId, String type); |
||||
|
||||
/** |
||||
* calculate indicator by full exam |
||||
* |
||||
* @param assessUserId page result id |
||||
* @return indicators type -> indicators result |
||||
* @author fengyu.wang |
||||
* @date 2020-05-27 22:36:01 |
||||
*/ |
||||
Map<String, Float> calculatePageIndicators(String assessUserId); |
||||
|
||||
} |
@ -0,0 +1,21 @@ |
||||
package com.blockchain.server.yyyf.indicators.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* assets recoding day by day |
||||
* |
||||
* @author fengyu.wang |
||||
* @date 2020-05-27 22:59:34 |
||||
*/ |
||||
@Data |
||||
public class AssetsReporter { |
||||
private String assessUserId;//成绩id
|
||||
private String coinName;//币种
|
||||
private int days;//交易天数
|
||||
private BigDecimal assets;//资产总额
|
||||
private Date createTime;//创建时间
|
||||
} |
@ -0,0 +1,16 @@ |
||||
package com.blockchain.server.yyyf.indicators.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* indicators persist |
||||
* |
||||
* @author fengyu.wang |
||||
* @date 2020-05-27 22:55:14 |
||||
*/ |
||||
@Data |
||||
public class IndicatorsDetail { |
||||
private String assessUserId; |
||||
private String type;//indicator type
|
||||
private float indicator; |
||||
} |
@ -0,0 +1,21 @@ |
||||
package com.blockchain.server.yyyf.task; |
||||
|
||||
import org.springframework.context.annotation.Configuration; |
||||
import org.springframework.scheduling.annotation.EnableScheduling; |
||||
import org.springframework.scheduling.annotation.Scheduled; |
||||
|
||||
@Configuration |
||||
@EnableScheduling |
||||
public class ExamProcessTask { |
||||
|
||||
@Scheduled(cron="0 0 0 1/1 * ? *") |
||||
public void processRecording() { |
||||
//1.获取所有正在进行考核学生id(子系统userId)
|
||||
//2.获取 币币总资产 + 法币总资产 + 数据钱包 + 初始资产 + 挂单资金
|
||||
//3.计算总资产 转换成RMB
|
||||
|
||||
//4.获取学生考核开始时间 计算当前进行到第几天
|
||||
//5.获取学生试卷Id assessUserId
|
||||
//6.保存到DB
|
||||
} |
||||
} |
Loading…
Reference in new issue