Commit f313008e authored by 王业雄's avatar 王业雄

用户标签字段加上中括号

parent 915cf08e
...@@ -77,6 +77,11 @@ public class ChannelRouteServiceImpl implements IChannelRouteService { ...@@ -77,6 +77,11 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
String userLevel = channelRouteResultVo.getUserLevel(); String userLevel = channelRouteResultVo.getUserLevel();
if (!StringUtils.isEmpty(userLevel)){ if (!StringUtils.isEmpty(userLevel)){
channelRouteResultVo.setUserLevel(userLevel.substring(1, userLevel.length() - 1)); channelRouteResultVo.setUserLevel(userLevel.substring(1, userLevel.length() - 1));
}
String userTag = channelRouteResultVo.getUserTag();
if (!StringUtils.isEmpty(userTag)){
channelRouteResultVo.setUserTag(userTag.replace("[","").replace("]",""));
} }
channelRouteResultVos.add(channelRouteResultVo); channelRouteResultVos.add(channelRouteResultVo);
...@@ -118,7 +123,10 @@ public class ChannelRouteServiceImpl implements IChannelRouteService { ...@@ -118,7 +123,10 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
if (!StringUtils.isEmpty(userLevel)){ if (!StringUtils.isEmpty(userLevel)){
configInfoVo.setUserLevel(userLevel.substring(1, userLevel.length() - 1)); configInfoVo.setUserLevel(userLevel.substring(1, userLevel.length() - 1));
} }
String userTag = configInfoVo.getUserTag();
if (!StringUtils.isEmpty(userTag)){
configInfoVo.setUserTag(userTag.replace("[","").replace("]",""));
}
FundProductEntity one = fundProductRepository.findOne(channelRuleEntity.getFundProductId()); FundProductEntity one = fundProductRepository.findOne(channelRuleEntity.getFundProductId());
if (Objects.nonNull(one)){ if (Objects.nonNull(one)){
configInfoVo.setSystermType(one.getSystermType()); configInfoVo.setSystermType(one.getSystermType());
...@@ -183,6 +191,7 @@ public class ChannelRouteServiceImpl implements IChannelRouteService { ...@@ -183,6 +191,7 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
}else { }else {
channelRuleEntity.setEnable(Byte.valueOf("0")); channelRuleEntity.setEnable(Byte.valueOf("0"));
} }
channelRuleEntity.setUserTag("["+channelRuleEntity.getUserTag()+"]");
channelRuleEntity.setUserLevel("["+channelRuleEntity.getUserLevel()+"]"); channelRuleEntity.setUserLevel("["+channelRuleEntity.getUserLevel()+"]");
channelRuleRepository.save(channelRuleEntity); channelRuleRepository.save(channelRuleEntity);
} }
......
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.quantgroup.asset.distribution.config.code.AreaCode; import com.quantgroup.asset.distribution.config.code.AreaCode;
import com.quantgroup.asset.distribution.config.code.InitAreaCode; import com.quantgroup.asset.distribution.config.code.InitAreaCode;
import com.quantgroup.asset.distribution.constant.CommonConstants;
import com.quantgroup.asset.distribution.enums.route.SystemType; import com.quantgroup.asset.distribution.enums.route.SystemType;
import com.quantgroup.asset.distribution.model.entity.route.fundproduct.*; import com.quantgroup.asset.distribution.model.entity.route.fundproduct.*;
import com.quantgroup.asset.distribution.model.response.GlobalResponse; import com.quantgroup.asset.distribution.model.response.GlobalResponse;
...@@ -29,6 +30,7 @@ import org.springframework.data.domain.Sort; ...@@ -29,6 +30,7 @@ import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import shaded.com.google.common.collect.Lists;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
...@@ -37,6 +39,8 @@ import java.time.LocalDateTime; ...@@ -37,6 +39,8 @@ import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Service @Service
@Slf4j @Slf4j
......
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