|
@@ -68,25 +68,30 @@ public class ParamCache {
|
|
|
* @param value 参数值
|
|
|
*/
|
|
|
public static void cacheParam(ParamSettingTypeEnum typeEnum, Long workId, String value) {
|
|
|
+ String workIdStr = String.valueOf(workId);
|
|
|
// 采集
|
|
|
if (ParamSettingTypeEnum.COLLECT.equals(typeEnum)) {
|
|
|
CollectConfig collectConfig = JSON.parseObject(value, CollectConfig.class);
|
|
|
- collectConfigMap.put(String.valueOf(workId), collectConfig);
|
|
|
+ collectConfigMap.remove(workIdStr);
|
|
|
+ collectConfigMap.put(workIdStr, collectConfig);
|
|
|
}
|
|
|
// 粗分档
|
|
|
if (ParamSettingTypeEnum.ROUGH_LEVEL.equals(typeEnum)) {
|
|
|
RoughLevelConfig roughLevelConfig = JSON.parseObject(value, RoughLevelConfig.class);
|
|
|
- roughLevelConfigMap.put(String.valueOf(workId), roughLevelConfig);
|
|
|
+ roughLevelConfigMap.remove(workIdStr);
|
|
|
+ roughLevelConfigMap.put(workIdStr, roughLevelConfig);
|
|
|
}
|
|
|
// 细分档
|
|
|
if (ParamSettingTypeEnum.LEVEL.equals(typeEnum)) {
|
|
|
LevelConfig levelConfig = JSON.parseObject(value, LevelConfig.class);
|
|
|
- levelConfigMap.put(String.valueOf(workId), levelConfig);
|
|
|
+ levelConfigMap.remove(workIdStr);
|
|
|
+ levelConfigMap.put(workIdStr, levelConfig);
|
|
|
}
|
|
|
// 打分
|
|
|
if (ParamSettingTypeEnum.SCORE.equals(typeEnum)) {
|
|
|
ScoreConfig scoreConfig = JSON.parseObject(value, ScoreConfig.class);
|
|
|
- scoreConfigMap.put(String.valueOf(workId), scoreConfig);
|
|
|
+ scoreConfigMap.remove(workIdStr);
|
|
|
+ scoreConfigMap.put(workIdStr, scoreConfig);
|
|
|
}
|
|
|
}
|
|
|
}
|