Commit fbe1ff9f authored by licc's avatar licc

最大进步奖 最终优化

parent 7c421d96
......@@ -45,8 +45,6 @@ public class AccountManager {
@Autowired
private ProgressPrizeMapper progressPrizeMapper;
@Autowired
private TradeRecordMapper tradeRecordMapper;
private static final String PATTERN = "yyyy-MM";
......@@ -93,6 +91,13 @@ public class AccountManager {
}
}
/**
* 修改 或新增 删除 最大进步奖实体类
*
* @param listVo 最新的进步奖 对象
* @param accountInfoList 要更新的最大进步奖账户收益
* @param prizes 上一次统计的进步奖 对象
*/
@Transactional(rollbackFor = Exception.class)
public void updateOrSavePrize(List<TeamPerformanceSortVo> listVo, List<AccountInfo> accountInfoList, List<ProgressPrize> prizes) {
......@@ -162,6 +167,13 @@ public class AccountManager {
//3、添加账户获得的收益
for (AccountInfo accountInfo : accountInfoList) {
accountMapper.edit(accountInfo);
//添加交易流水记录
TradeRecord tradeRecord = new TradeRecord();
tradeRecord.setUserId(accountInfo.getUserId());
tradeRecord.setTradeType(TradeRecordEnum.PROGRESS_PRIZE.getCode());
tradeRecord.setTradeNo(null);
recordMapper.add(tradeRecord);
}
}
}
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