Search in sources :

Example 1 with ConfigHistory

use of com.baidu.disconf.web.service.config.bo.ConfigHistory in project disconf by knightliao.

the class ConfigHistoryMgrImpl method createOne.

@Override
public void createOne(Long configId, String oldValue, String newValue) {
    ConfigHistory configHistory = new ConfigHistory();
    configHistory.setConfigId(configId);
    configHistory.setOldValue(oldValue);
    configHistory.setNewValue(newValue);
    Visitor visitor = ThreadContext.getSessionVisitor();
    if (visitor != null) {
        configHistory.setUpdateBy(visitor.getLoginUserId());
    }
    String curTime = DateUtils.format(new Date(), DataFormatConstants.COMMON_TIME_FORMAT);
    configHistory.setCreateTime(curTime);
    configHistoryDao.create(configHistory);
}
Also used : Visitor(com.baidu.disconf.web.service.user.dto.Visitor) ConfigHistory(com.baidu.disconf.web.service.config.bo.ConfigHistory) Date(java.util.Date)

Aggregations

ConfigHistory (com.baidu.disconf.web.service.config.bo.ConfigHistory)1 Visitor (com.baidu.disconf.web.service.user.dto.Visitor)1 Date (java.util.Date)1