|
|
@@ -816,10 +816,10 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult<Riskratiotype> getRiskRatioTypeForMarketer(Integer customertype, HttpServletRequest request) {
|
|
|
+ public AjaxResult<Riskratiotype> getRiskRatioTypeForMarketer(Integer customertype, Integer riskcontrolmode, HttpServletRequest request) {
|
|
|
Riskratiotype riskRatioType = iRiskratiotypeMapper.selectOne(new QueryWrapper<Riskratiotype>()
|
|
|
.eq("customertype", customertype)
|
|
|
- .eq("riskcontrolmode", 1));
|
|
|
+ .eq("riskcontrolmode", riskcontrolmode));
|
|
|
|
|
|
if (Objects.nonNull(riskRatioType)) {
|
|
|
BigDecimal cNum = new BigDecimal(100);
|
|
|
@@ -862,17 +862,19 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
.multiply(cNum).setScale(2, RoundingMode.HALF_UP));
|
|
|
}
|
|
|
|
|
|
- List<Market> marketList = iMarketMapper.selectList(new QueryWrapper<Market>().in(StringUtils.isNotBlank(riskRatioType.getCutmarginseq()), "marketid",
|
|
|
- Arrays.stream(riskRatioType.getCutmarginseq().split(",")).filter(s -> !s.trim().isEmpty()).map(Long::valueOf).collect(Collectors.toList())));
|
|
|
- StringBuilder stringBuilder = new StringBuilder();
|
|
|
- for (int i = 0; i < marketList.size(); i++) {
|
|
|
- if (i == marketList.size() - 1) {
|
|
|
- stringBuilder.append(marketList.get(i).getMarketname());
|
|
|
- } else {
|
|
|
- stringBuilder.append(marketList.get(i).getMarketname()).append(",");
|
|
|
+ if(StringUtils.isNotBlank(riskRatioType.getCutmarginseq())){
|
|
|
+ List<Market> marketList = iMarketMapper.selectList(new QueryWrapper<Market>().in("marketid",
|
|
|
+ Arrays.stream(riskRatioType.getCutmarginseq().split(",")).filter(s -> !s.trim().isEmpty()).map(Long::valueOf).collect(Collectors.toList())));
|
|
|
+ StringBuilder stringBuilder = new StringBuilder();
|
|
|
+ for (int i = 0; i < marketList.size(); i++) {
|
|
|
+ if (i == marketList.size() - 1) {
|
|
|
+ stringBuilder.append(marketList.get(i).getMarketname());
|
|
|
+ } else {
|
|
|
+ stringBuilder.append(marketList.get(i).getMarketname()).append(",");
|
|
|
+ }
|
|
|
}
|
|
|
+ riskRatioType.setMarkets(stringBuilder.toString());
|
|
|
}
|
|
|
- riskRatioType.setMarkets(stringBuilder.toString());
|
|
|
}
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), riskRatioType);
|
|
|
}
|
|
|
@@ -1508,7 +1510,6 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
Map<Integer, List<Accounttradeconfig>> type = new HashMap<>();
|
|
|
for (Accounttradeconfig fig : list) {
|
|
|
fig.setAccountname(iUseraccountMapper.selectOrganName(fig.getUserid()));
|
|
|
- fig.setGoodsname(iGoodsMapper.selectOne(new QueryWrapper<Goods>().eq("goodsid", fig.getGoodsid())).getGoodsname());
|
|
|
Integer key = fig.getTradetype();
|
|
|
if (type.containsKey(key)) {
|
|
|
type.get(key).add(fig);
|