@RequestMapping(value = "/republicPushRecord.do")
@ResponseBody
public Map<String, String> republicPushRecord(@RequestParam("indexid")
String indexid) {
Map<String, String> result = new HashMap<String, String>();
PushRecord pushRecord = pushRecordService.getPushRecordById(indexid);
try {
if (pushRecord.getType() == PushRecord.PUSH_RECORD_TYPE.doc.ordinal()) {
docService.publishDoc(pushRecord.getDocid(), String.valueOf(indexid));
result.put(APIConstant.K_RESULT, APIConstant.V_SUCCESS);
} else if (pushRecord.getType() == PushRecord.PUSH_RECORD_TYPE.model.ordinal()) {
Model model = modelService.getModelInfoByModelName(pushRecord.getModelName());
modelService.publishModelContent(model);
result.put(APIConstant.K_RESULT, APIConstant.V_SUCCESS);
} else {
result.put(APIConstant.K_RESULT, APIConstant.V_FAIL);
result.put(APIConstant.K_MESSAGE, "该类型推送记录无法刷新");