Commit 7b178713 authored by 王业雄's avatar 王业雄

fix

parent 2a6fd6e9
package com.quantgroup.asset.distribution.service.jpa.entity; package com.quantgroup.asset.distribution.service.jpa.entity;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
...@@ -16,6 +17,7 @@ import java.util.Objects; ...@@ -16,6 +17,7 @@ import java.util.Objects;
@Table(name = "channel_rule", schema = "asset-distribution", catalog = "") @Table(name = "channel_rule", schema = "asset-distribution", catalog = "")
@DynamicInsert @DynamicInsert
@DynamicUpdate @DynamicUpdate
@Data
public class ChannelRuleEntity { public class ChannelRuleEntity {
private Long id; private Long id;
private Long fundProductId; private Long fundProductId;
......
...@@ -82,7 +82,7 @@ public class CoreFilter { ...@@ -82,7 +82,7 @@ public class CoreFilter {
List<RoutingRecordVO> routingRecordList = new ArrayList<>(); List<RoutingRecordVO> routingRecordList = new ArrayList<>();
for (ChannelRuleEntity channelRuleEntity : channelRuleEntityList) { for (ChannelRuleEntity channelRuleEntity : channelRuleEntityList) {
FundProductEntity fundProduct = fundProductRepository.getByIdEquals(channelRuleEntity.getFundProductId()); FundProductEntity fundProduct = fundProductRepository.getByIdEquals(channelRuleEntity.getFundProductId());
log.info("coreHandle | 开始路由channelRuleEntity={}",channelRuleEntity); log.info("coreHandle | 开始路由channelRuleEntity={}",channelRuleEntity.toString());
if (fundProduct == null){ if (fundProduct == null){
log.error("这种情况不可能出现,需要看下原因 {}",JSON.toJSONString(channelRuleEntity)); log.error("这种情况不可能出现,需要看下原因 {}",JSON.toJSONString(channelRuleEntity));
continue; continue;
......
...@@ -325,7 +325,9 @@ public class FundProductServiceImpl implements IFundProductService { ...@@ -325,7 +325,9 @@ public class FundProductServiceImpl implements IFundProductService {
} }
}); });
one.setBasicRule(basicRule.substring(0,basicRule.lastIndexOf(" && "))); one.setBasicRule(basicRule.substring(0,basicRule.lastIndexOf(" && ")));
one.setRuleList(ruleList.substring(0,ruleList.lastIndexOf(","))); if (!StringUtils.isEmpty(ruleList)){
one.setRuleList(ruleList.substring(0,ruleList.lastIndexOf(",")));
}
one.setAreaRule(JSONObject.toJSONString(areaRuleConcrete)); one.setAreaRule(JSONObject.toJSONString(areaRuleConcrete));
fundProductRepository.save(one); fundProductRepository.save(one);
return GlobalResponse.success(); return GlobalResponse.success();
......
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