* 更新模板信息
* @param model
* @return
*/
public int modifyModel(Model model) {
ModelLog modelLog = new ModelLog();
if (model.getStatus() == Model.modelStatus.unPublish.ordinal()) {
modelLog.setContent(ModelLog.MODEL_MODIFY_COMMON);
} else if (model.getStatus() == Model.modelStatus.publish.ordinal()) {
modelLog.setContent(ModelLog.MODEL_PUBLISH_COMMON);
}
modelLog.setModelContent(model.getContent());
modelLog.setModelName(model.getModelName());
modelLog.setUserName(model.getModifyUser());
int logNumber = modelLogDAO.insertModelLog(modelLog);
if (logNumber <= 0) {
logger.error("插入模板日志失败");
}
int updateNum = modelDAO.updateModel(model);