synchronize priority weekends

master
yixian 4 years ago
parent 86eb49834e
commit 85b3b993bd

@ -24,6 +24,7 @@ import java.util.stream.Collectors;
@Service
public class PriorityListManagerImpl implements PriorityListManager {
private static final String PRIORITY_ID = "id1_priority";
private static final String PRIORITY_WEEKENDS_ID = "priority_weekend";
public static final String KEY_WHITELIST_CLIENTS = "whitelist_clients";
private final Logger logger = LoggerFactory.getLogger(getClass());
private final MerchantInfoProvider mchInfoProvider;
@ -59,7 +60,9 @@ public class PriorityListManagerImpl implements PriorityListManager {
return;
}
monikerList.add(clientMoniker.toUpperCase());
planMapper.setWhitelistClients(PRIORITY_ID, String.join(",", monikerList));
String joinedMonikers = String.join(",", monikerList);
planMapper.setWhitelistClients(PRIORITY_ID, joinedMonikers);
planMapper.setWhitelistClients(PRIORITY_WEEKENDS_ID, joinedMonikers);
try {
PriorityModifyLog log = new PriorityModifyLog()
.setId(IdUtil.getId())
@ -82,7 +85,9 @@ public class PriorityListManagerImpl implements PriorityListManager {
logger.debug("{} not exists,ignore", clientMoniker);
return;
}
planMapper.setWhitelistClients(PRIORITY_ID, String.join(",", monikerList));
String joinedMonikers = String.join(",", monikerList);
planMapper.setWhitelistClients(PRIORITY_ID, joinedMonikers);
planMapper.setWhitelistClients(PRIORITY_WEEKENDS_ID, joinedMonikers);
try {
PriorityModifyLog log = new PriorityModifyLog()
.setId(IdUtil.getId())

Loading…
Cancel
Save