Commit 93780511 by zhouhaibao

refactor(strategy): 更新配置默认值并重命名DTO字段

- 修改ImHubConfig中的coverurl默认值为新的图片地址
- 将SopStrategyDetailDTO中的stores字段重命名为storeIds
- 删除SopStrategyEventLogServiceTest中的冗余测试方法
1 parent cc655933
......@@ -13,6 +13,9 @@ public class SopStrategyUpdateReqDTO implements Serializable {
@ApiModelProperty(value = "策略ID")
private Integer strategyId;
@ApiModelProperty(value = "策略名称")
private String strategyName;
@ApiModelProperty(notes = "场景大类", required = true)
private Integer bizType;
......
......@@ -43,6 +43,9 @@ public class SopStrategySnapshotCacheService {
@Autowired
private SopStrategyMetaConditionVariableMapper metaConditionVariableMapper;
@Autowired
private SopCustomerQueryService sopCustomerQueryService;
@Cacheable(value = "strategyDetail", key = "#strategyId")
public StrategyDetailCache loadStrategyDetail(Integer strategyId) {
log.info("加载策略详情缓存, strategyId:{}", strategyId);
......@@ -146,6 +149,11 @@ public class SopStrategySnapshotCacheService {
Map<String, Object> customerInfo = new LinkedHashMap<>();
customerInfo.put("customerInstanceId", customerInstanceId);
Map<String, Object> customer = sopCustomerQueryService.getCustomerById(
customerInstanceId, strategy);
customerInfo.putAll(customer);
snapshot.put("customerInfo", customerInfo);
Map<String, Object> triggerInfo = new LinkedHashMap<>();
......
......@@ -111,7 +111,7 @@ public class StrategySopQueryService {
List<SopStrategyStoreDTO> storeDTOs = storeRels.stream()
.map(rel -> BeanUtil.copyProperties(rel, SopStrategyStoreDTO.class))
.collect(Collectors.toList());
dto.setStores(storeDTOs);
dto.setStoreIds(storeDTOs);
dto.setStoreDescription(buildStoreDescription(strategy.getStoreScopeType(), storeDTOs));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!